private static boolean isTrypsin(MsEnzymeIn enzyme) { // 1. Trypsin 1 KR P return (("RK".equals(enzyme.getCut()) || "KR".equals(enzyme.getCut())) && "P".equals(enzyme.getNocut()) && enzyme.getSense() == Sense.CTERM); }
private static boolean isCynanogenBromide(MsEnzymeIn enzyme) { // 4. Cyanogen_Bromide 1 M - return ("M".equals(enzyme.getCut()) && "-".equals(enzyme.getNocut()) && enzyme.getSense() == Sense.CTERM); }
/** Only some enzymes are supported. */ public static EnzymeType makeEnzymeType(MsEnzymeIn enzyme) { // !---------------------------------------------------------- // TODO This method should be tested and other enzymes should be supported. // !---------------------------------------------------------- if (enzyme == null || enzyme.getName().equalsIgnoreCase("No_Enzyme")) { return makeNoEnzyme(); } // found entries for these in the controlled vocabulary: if (isTrypsin(enzyme)) { return makeTrypsin(); } else if (isCynanogenBromide(enzyme)) { return makeCyanogenBromide(); } else if (isLysCNoCutP(enzyme)) { return makeLysC_OR_TrypsinK_nocutP(); } else if (isLysC(enzyme)) { return makeLysC_OR_TrypsinK(); } else if (isArgC(enzyme)) { return makeArgC_OR_TrypsinR(); } else if (isModifiedChymotrypsin(enzyme)) { return makeModifiedChymotrypsin(); } // could not find and entry for these: else if (enzyme.getName().equalsIgnoreCase("Chymotrypsin")) { return null; // NOTE: can't find a term for this in PSI-MS vocabulary // There is an entry for Chymotrypsin but the given regex does not match // the "cut" residues in sequest.params } return null; }
private static boolean isArgC(MsEnzymeIn enzyme) { // 9. Trypsin_R 1 R P return ("R".equals(enzyme.getCut()) && "P".equals(enzyme.getNocut()) && enzyme.getSense() == Sense.CTERM); }
private static boolean isLysCNoCutP(MsEnzymeIn enzyme) { // 8. Trypsin_K 1 K P return ("K".equals(enzyme.getCut()) && "P".equals(enzyme.getNocut()) && enzyme.getSense() == Sense.CTERM); }
private static boolean isModifiedChymotrypsin(MsEnzymeIn enzyme) { // 11. Cymotryp/Modified 1 FWYL P return (enzyme.getCut() != null && enzyme.getCut().length() == 4 && enzyme.getCut().contains("F") && enzyme.getCut().contains("W") && enzyme.getCut().contains("Y") && enzyme.getCut().contains("L") && "P".equals(enzyme.getNocut()) && enzyme.getSense() == Sense.CTERM); }
private static boolean isLysC(MsEnzymeIn enzyme) { return ("K".equals(enzyme.getCut()) && "-".equals(enzyme.getNocut()) && enzyme.getSense() == Sense.CTERM); }