[MOBY-guts] biomoby commit

Paul Gordon gordonp at dev.open-bio.org
Sun Apr 11 01:58:05 UTC 2010


gordonp
Sat Apr 10 21:58:05 EDT 2010
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/services
In directory dev.open-bio.org:/tmp/cvs-serv18981/src/main/ca/ucalgary/seahawk/services

Modified Files:
	MobyClient.java 
Log Message:
Added regex support for IUPAC monosacchride residues (\M)
moby-live/Java/src/main/ca/ucalgary/seahawk/services MobyClient.java,1.25,1.26
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/services/MobyClient.java,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/services/MobyClient.java	2010/03/17 20:21:55	1.25
+++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/services/MobyClient.java	2010/04/11 01:58:05	1.26
@@ -1391,14 +1391,15 @@
 
     /**
      * Converts seahawk-specific regex syntax into generic Java syntax (e.g \N becomes a
-     * match for any IUPAC DNA character, \P any amino acid).  We pass in the member map so that
+     * match for any IUPAC DNA character, \P any amino acid, \M for any monosacchiride abbreviation).  
+     * We pass in the member map so that
      * this method can populate the last field of rules that inherit complex members (by virtue 
      * of using the capture group whose values is derived from \p{ruleName}), with ruleName 
      */
     protected String processRegExp(String regex, Map<String,String[]> membersMap) throws Exception{
 	String returnValue = regex.replaceAll("\\\\N", "[acgtunxACGTUNX]")
-	    .replaceAll("\\\\P", "[ARNDCQEGHILKMFPSTWYVBZXarndcqeghilkmfpstwyvbz*]");
-	
+	    .replaceAll("\\\\P", "[ARNDCQEGHILKMFPSTWYVBZXarndcqeghilkmfpstwyvbz*]")
+	    .replaceAll("\\\\M", "(?:Abe|IdoA|All|Lyx|Alt|Man|Api|Mur|Ara|Neu|Ara-ol|Neu5Ac|dRib|Neu2en5Ac|Fru|Neu5Gc|Fuc|Kdo|Fuc-ol|Rha|Gal|Rha3,4Me2|GalN|Psi|GalNAc|Qui|B-D-Galp4S|Rib|Glc|Rib5P|GlcN|Ribulo|Rul|GlcN3N|Sor|Glc-ol|Tag|GlcNAc|Tal|GlcA|Xyl|GlcpA6Et|Xylulo|Xul|Gul|Xyl2CMe|Ido)");
 	// Now see if there are any references to other patterns (by rule name) 
 	// with the \p{} syntax specific to Seahawk
 	Pattern charClassPattern = Pattern.compile("\\\\p\\{([A-Za-z0-9]+)\\}");




More information about the MOBY-guts mailing list