From: cmzmasek Date: Sat, 19 Oct 2013 05:08:44 +0000 (+0000) Subject: in progress X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=f4187e1ce2cf7da7e910919f68dd82fea9bccaa2;p=jalview.git in progress --- diff --git a/forester/java/src/org/forester/test/Test.java b/forester/java/src/org/forester/test/Test.java index 0701b66..e829be9 100644 --- a/forester/java/src/org/forester/test/Test.java +++ b/forester/java/src/org/forester/test/Test.java @@ -11170,6 +11170,22 @@ public final class Test { if ( !entry4.getAccession().equals( "AAA36557" ) ) { return false; } + if ( !entry4.getTaxonomyScientificName().equals( "Homo sapiens" ) ) { + System.out.println( entry4.getTaxonomyScientificName() ); + return false; + } + if ( !entry4.getSequenceName().equals( "Homo sapiens (human) ras protein" ) ) { + System.out.println( entry4.getSequenceName() ); + return false; + } + if ( !entry4.getTaxonomyIdentifier().equals( "9606" ) ) { + System.out.println( entry4.getTaxonomyIdentifier() ); + return false; + } + if ( !entry4.getGeneName().equals( "ras" ) ) { + System.out.println( entry4.getGeneName() ); + return false; + } // //TODO fails: // final SequenceDatabaseEntry entry5 = SequenceDbWsTools.obtainEntry( "M30539" ); diff --git a/forester/java/src/org/forester/ws/seqdb/EbiDbEntry.java b/forester/java/src/org/forester/ws/seqdb/EbiDbEntry.java index f3ae59c..418d099 100644 --- a/forester/java/src/org/forester/ws/seqdb/EbiDbEntry.java +++ b/forester/java/src/org/forester/ws/seqdb/EbiDbEntry.java @@ -71,9 +71,12 @@ public final class EbiDbEntry implements SequenceDatabaseEntry { final Pattern mim_PATTERN = Pattern.compile( "\\s+/db_xref=\"MIM:(\\d+)\"" ); final Pattern taxon_PATTERN = Pattern.compile( "\\s+/db_xref=\"taxon:(\\d+)\"" ); final Pattern interpro_PATTERN = Pattern.compile( "\\s+/db_xref=\"InterPro:([A-Z0-9]+)\"" ); - final Pattern uniprot_PATTERN = Pattern.compile( "\\s+/db_xref=\"UniProtKB/TrEMBL:(\\w+)\"" ); - final Pattern hgnc_PATTERN = Pattern.compile( "\\s+/db_xref=\"HGNC:(\\d+)\"" ); + final Pattern uniprot_PATTERN = Pattern.compile( "\\s+/db_xref=\"UniProtKB/[A-Za-z-]*:(\\w+)\"" ); + final Pattern hgnc_PATTERN = Pattern.compile( "\\s+/db_xref=\"[A-Z:]*HGNC:(\\d+)\"" ); final Pattern geneid_PATTERN = Pattern.compile( "\\s+/db_xref=\"GeneID:(\\d+)\"" ); + final Pattern pdb_PATTERN = Pattern.compile( "\\s+/db_xref=\"PDB:([A-Z0-9]+)\"" ); + + final Pattern ec_PATTERN = Pattern.compile( "\\s+/EC_number=\"([\\.\\-\\d]+)\"" ); final Pattern product_PATTERN = Pattern.compile( "\\s+/product=\"(\\w{1,10})\"" ); final EbiDbEntry e = new EbiDbEntry(); @@ -247,6 +250,10 @@ public final class EbiDbEntry implements SequenceDatabaseEntry { if ( product.find() ) { e.setSequenceSymbol( product.group( 1 ) ); } + final Matcher pdb = pdb_PATTERN.matcher( line ); + if ( pdb.find() ) { + e.addCrossReference( new Accession( pdb.group( 1 ), "pdb" ) ); + } } } if ( def.length() > 0 ) {