f3ae59cd34a4b830109b7ab15268df847f8da8ff
[jalview.git] / forester / java / src / org / forester / ws / seqdb / EbiDbEntry.java
1 // $Id:
2 // forester -- software libraries and applications
3 // for genomics and evolutionary biology research.
4 //
5 // Copyright (C) 2010 Christian M Zmasek
6 // Copyright (C) 2010 Sanford-Burnham Medical Research Institute
7 // All rights reserved
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the GNU Lesser General Public
11 // License as published by the Free Software Foundation; either
12 // version 2.1 of the License, or (at your option) any later version.
13 //
14 // This library is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 // Lesser General Public License for more details.
18 //
19 // You should have received a copy of the GNU Lesser General Public
20 // License along with this library; if not, write to the Free Software
21 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22 //
23 // Contact: phylosoft @ gmail . com
24 // WWW: https://sites.google.com/site/cmzmasek/home/software/forester
25
26 package org.forester.ws.seqdb;
27
28 import java.util.List;
29 import java.util.SortedSet;
30 import java.util.TreeSet;
31 import java.util.regex.Matcher;
32 import java.util.regex.Pattern;
33
34 import org.forester.go.GoTerm;
35 import org.forester.phylogeny.data.Accession;
36 import org.forester.phylogeny.data.Annotation;
37 import org.forester.util.ForesterUtil;
38
39 public final class EbiDbEntry implements SequenceDatabaseEntry {
40
41     //    public static SequenceDatabaseEntry createInstanceFromPlainText( final List<String> lines ) {
42     //        final EbiDbEntry e = new EbiDbEntry();
43     //        for( final String line : lines ) {
44     //            if ( line.startsWith( "PA" ) ) {
45     //                e.setPA( SequenceDbWsTools.extractFrom( line, "PA" ) );
46     //            }
47     //            else if ( line.startsWith( "DE" ) ) {
48     //                e.setDe( SequenceDbWsTools.extractFrom( line, "DE" ) );
49     //            }
50     //            else if ( line.startsWith( "OS" ) ) {
51     //                if ( line.indexOf( "(" ) > 0 ) {
52     //                    e.setOs( SequenceDbWsTools.extractFromTo( line, "OS", "(" ) );
53     //                }
54     //                else {
55     //                    e.setOs( SequenceDbWsTools.extractFrom( line, "OS" ) );
56     //                }
57     //            }
58     //            else if ( line.startsWith( "OX" ) ) {
59     //                if ( line.indexOf( "NCBI_TaxID=" ) > 0 ) {
60     //                    e.setTaxId( SequenceDbWsTools.extractFromTo( line, "NCBI_TaxID=", ";" ) );
61     //                }
62     //            }
63     //        }
64     //        return e;
65     //    }
66     public static SequenceDatabaseEntry createInstanceFromPlainTextForRefSeq( final List<String> lines ) {
67         final Pattern X_PATTERN = Pattern.compile( "^[A-Z]+" );
68         final Pattern chromosome_PATTERN = Pattern.compile( "\\s+/chromosome=\"(\\w+)\"" );
69         final Pattern map_PATTERN = Pattern.compile( "\\s+/map=\"([\\w+\\.])\"" );
70         final Pattern gene_PATTERN = Pattern.compile( "\\s+/gene=\"(.+)\"" );
71         final Pattern mim_PATTERN = Pattern.compile( "\\s+/db_xref=\"MIM:(\\d+)\"" );
72         final Pattern taxon_PATTERN = Pattern.compile( "\\s+/db_xref=\"taxon:(\\d+)\"" );
73         final Pattern interpro_PATTERN = Pattern.compile( "\\s+/db_xref=\"InterPro:([A-Z0-9]+)\"" );
74         final Pattern uniprot_PATTERN = Pattern.compile( "\\s+/db_xref=\"UniProtKB/TrEMBL:(\\w+)\"" );
75         final Pattern hgnc_PATTERN = Pattern.compile( "\\s+/db_xref=\"HGNC:(\\d+)\"" );
76         final Pattern geneid_PATTERN = Pattern.compile( "\\s+/db_xref=\"GeneID:(\\d+)\"" );
77         final Pattern ec_PATTERN = Pattern.compile( "\\s+/EC_number=\"([\\.\\-\\d]+)\"" );
78         final Pattern product_PATTERN = Pattern.compile( "\\s+/product=\"(\\w{1,10})\"" );
79         final EbiDbEntry e = new EbiDbEntry();
80         final StringBuilder def = new StringBuilder();
81         boolean in_definition = false;
82         boolean in_features = false;
83         boolean in_source = false;
84         boolean in_gene = false;
85         boolean in_cds = false;
86         boolean in_mrna = false;
87         boolean in_protein = false;
88         for( final String line : lines ) {
89             if ( line.startsWith( "ACCESSION " ) ) {
90                 e.setAccession( SequenceDbWsTools.extractFrom( line, "ACCESSION" ) );
91                 in_definition = false;
92             }
93             else if ( line.startsWith( "ID " ) ) {
94                 e.setAccession( SequenceDbWsTools.extractFromTo( line, "ID", ";" ) );
95                 in_definition = false;
96             }
97             else if ( line.startsWith( "DEFINITION " ) || ( line.startsWith( "DE " ) ) ) {
98                 boolean definiton = false;
99                 if ( line.startsWith( "DEFINITION " ) ) {
100                     definiton = true;
101                 }
102                 if ( line.indexOf( "[" ) > 0 ) {
103                     if ( definiton ) {
104                         x( def, ( SequenceDbWsTools.extractFromTo( line, "DEFINITION", "[" ) ) );
105                     }
106                     else {
107                         x( def, ( SequenceDbWsTools.extractFromTo( line, "DE", "[" ) ) );
108                     }
109                 }
110                 else if ( line.indexOf( "." ) > 0 ) {
111                     if ( definiton ) {
112                         x( def, ( SequenceDbWsTools.extractFromTo( line, "DEFINITION", "." ) ) );
113                     }
114                     else {
115                         x( def, ( SequenceDbWsTools.extractFromTo( line, "DE", "." ) ) );
116                     }
117                 }
118                 else {
119                     if ( definiton ) {
120                         x( def, ( SequenceDbWsTools.extractFrom( line, "DEFINITION" ) ) );
121                     }
122                     else {
123                         x( def, ( SequenceDbWsTools.extractFrom( line, "DE" ) ) );
124                     }
125                 }
126                 if ( definiton ) {
127                     in_definition = true;
128                 }
129             }
130             else if ( line.startsWith( "  ORGANISM " ) ) {
131                 if ( line.indexOf( "(" ) > 0 ) {
132                     e.setTaxonomyScientificName( SequenceDbWsTools.extractFromTo( line, "  ORGANISM", "(" ) );
133                 }
134                 else {
135                     e.setTaxonomyScientificName( SequenceDbWsTools.extractFrom( line, "  ORGANISM" ) );
136                 }
137                 //  in_def = false;
138             }
139             else if ( line.startsWith( "OS " ) ) {
140                 if ( line.indexOf( "(" ) > 0 ) {
141                     e.setTaxonomyScientificName( SequenceDbWsTools.extractFromTo( line, "OS", "(" ) );
142                 }
143                 else {
144                     e.setTaxonomyScientificName( SequenceDbWsTools.extractFrom( line, "OS" ) );
145                 }
146             }
147             else if ( line.startsWith( " " ) && in_definition ) {
148                 def.append( " " );
149                 if ( line.indexOf( "[" ) > 0 ) {
150                     def.append( SequenceDbWsTools.extractTo( line, "[" ) );
151                 }
152                 else if ( line.indexOf( "." ) > 0 ) {
153                     def.append( SequenceDbWsTools.extractTo( line, "." ) );
154                 }
155                 else {
156                     def.append( line.trim() );
157                 }
158             }
159             else {
160                 in_definition = false;
161             }
162             if ( !line.startsWith( "FT " ) && X_PATTERN.matcher( line ).find() ) {
163                 in_features = false;
164                 in_source = false;
165                 in_gene = false;
166                 in_cds = false;
167                 in_mrna = false;
168                 in_protein = false;
169                 // in_def = false;
170             }
171             if ( line.startsWith( "FEATURES " ) || line.startsWith( "FT " ) ) {
172                 in_features = true;
173             }
174             if ( in_features && ( line.startsWith( "     source " ) || line.startsWith( "FT   source " ) ) ) {
175                 in_source = true;
176                 in_gene = false;
177                 in_cds = false;
178                 in_mrna = false;
179                 in_protein = false;
180             }
181             if ( in_features && ( line.startsWith( "     gene " ) || line.startsWith( "FT   gene " ) ) ) {
182                 in_source = false;
183                 in_gene = true;
184                 in_cds = false;
185                 in_mrna = false;
186                 in_protein = false;
187             }
188             if ( in_features && ( line.startsWith( "     CDS " ) || line.startsWith( "FT   CDS " ) ) ) {
189                 in_source = false;
190                 in_gene = false;
191                 in_cds = true;
192                 in_mrna = false;
193                 in_protein = false;
194             }
195             if ( in_features && ( line.startsWith( "     Protein " ) || line.startsWith( "FT   Protein " ) ) ) {
196                 in_source = false;
197                 in_gene = false;
198                 in_cds = false;
199                 in_mrna = false;
200                 in_protein = true;
201             }
202             if ( in_features && ( line.startsWith( "     mRNA " ) || line.startsWith( "FT   mRNA " ) ) ) {
203                 in_source = false;
204                 in_gene = false;
205                 in_cds = false;
206                 in_mrna = true;
207                 in_protein = false;
208             }
209             if ( in_source ) {
210                 final Matcher m = taxon_PATTERN.matcher( line );
211                 if ( m.find() ) {
212                     e.setTaxId( m.group( 1 ) );
213                 }
214             }
215             if ( in_cds || in_gene ) {
216                 final Matcher hgnc = hgnc_PATTERN.matcher( line );
217                 if ( hgnc.find() ) {
218                     e.addCrossReference( new Accession( hgnc.group( 1 ), "hgnc" ) );
219                 }
220                 final Matcher geneid = geneid_PATTERN.matcher( line );
221                 if ( geneid.find() ) {
222                     e.addCrossReference( new Accession( geneid.group( 1 ), "geneid" ) );
223                 }
224             }
225             if ( in_protein || in_cds || in_gene || in_mrna ) {
226                 final Matcher ec = ec_PATTERN.matcher( line );
227                 if ( ec.find() ) {
228                     e.addAnnotation( new Annotation( "EC", ec.group( 1 ) ) );
229                 }
230                 final Matcher gene = gene_PATTERN.matcher( line );
231                 if ( gene.find() ) {
232                     e.setGeneName( gene.group( 1 ) );
233                 }
234                 final Matcher uniprot = uniprot_PATTERN.matcher( line );
235                 if ( uniprot.find() ) {
236                     e.addCrossReference( new Accession( uniprot.group( 1 ), "uniprot" ) );
237                 }
238                 final Matcher interpro = interpro_PATTERN.matcher( line );
239                 if ( interpro.find() ) {
240                     e.addCrossReference( new Accession( interpro.group( 1 ), "interpro" ) );
241                 }
242                 final Matcher mim = mim_PATTERN.matcher( line );
243                 if ( mim.find() ) {
244                     e.addCrossReference( new Accession( mim.group( 1 ), "mim" ) );
245                 }
246                 final Matcher product = product_PATTERN.matcher( line );
247                 if ( product.find() ) {
248                     e.setSequenceSymbol( product.group( 1 ) );
249                 }
250             }
251         }
252         if ( def.length() > 0 ) {
253             e.setSequenceName( def.toString().trim() );
254         }
255         return e;
256     }
257
258     private static void x( final StringBuilder sb, final String s ) {
259         if ( sb.length() > 0 ) {
260             sb.append( " " );
261         }
262         sb.append( s.trim() );
263     }
264     // FIXME actually this is NCBI entry
265     //http://www.ebi.ac.uk/Tools/dbfetch/dbfetch/emb/AAR37336/
266     private String                _pa;
267     private String                _de;
268     private String                _os;
269     private String                _tax_id;
270     private String                _symbol;
271     private String                _provider;
272     private SortedSet<Accession>  _cross_references;
273     private SortedSet<Annotation> _annotations;
274     private String                _gene_name;
275
276     // TODO  PUBMED   15798186
277     //TODO  (FEATURES) 
278     // source /db_xref="taxon:9606"
279     // gene            1..2881  
280     // /gene="RBM39" 
281     //
282     // /db_xref="MIM:604739"  
283     // CDS
284     // /gene="RBM39"
285     // /db_xref="MIM:604739"
286     // /db_xref="InterPro:IPR002475"
287     // /product="Bcl-2"
288     // /db_xref="UniProtKB/TrEMBL:Q5J7V1" <- reparse?
289     //
290     // Protein
291     /*
292     LOCUS       NM_184234               2881 bp    mRNA    linear   PRI 16-JUN-2013
293     DEFINITION  Homo sapiens RNA binding motif protein 39 (RBM39), transcript
294             variant 1, mRNA.
295     ACCESSION   NM_184234
296     VERSION     NM_184234.2  GI:336176061
297     KEYWORDS    RefSeq.
298     SOURCE      Homo sapiens (human)
299     ORGANISM  Homo sapiens
300             Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi;
301             Mammalia; Eutheria; Euarchontoglires; Primates; Haplorrhini;
302             Catarrhini; Hominidae; Homo.
303     REFERENCE   1  (bases 1 to 2881)
304     AUTHORS   Sillars-Hardebol,A.H., Carvalho,B., Belien,J.A., de Wit,M.,
305             Delis-van Diemen,P.M., Tijssen,M., van de Wiel,M.A., Ponten,F.,
306             Meijer,G.A. and Fijneman,R.J.
307     TITLE     CSE1L, DIDO1 and RBM39 in colorectal adenoma to carcinoma
308             progression
309     JOURNAL   Cell Oncol (Dordr) 35 (4), 293-300 (2012)
310     PUBMED   22711543
311     REMARK    GeneRIF: Data show that CSE1L, DIDO1 and RBM39 mRNA expression
312             levels correlated with chromosome 20q DNA copy number status.
313     REFERENCE   2  (bases 1 to 2881)
314     AUTHORS   Huang,G., Zhou,Z., Wang,H. and Kleinerman,E.S.
315     TITLE     CAPER-alpha alternative splicing regulates the expression of
316             vascular endothelial growth factor(1)(6)(5) in Ewing sarcoma cells
317     JOURNAL   Cancer 118 (8), 2106-2116 (2012)
318     PUBMED   22009261
319     REMARK    GeneRIF: Increased VEGF(165) expression is secondary to the
320             down-regulation of CAPER-alpha by EWS/FLI-1. CAPER-alpha mediates
321             alternative splicing and controls the shift from VEGF(189) to
322             VEGF(165) .
323     REFERENCE   3  (bases 1 to 2881)
324     AUTHORS   Han,B., Stockwin,L.H., Hancock,C., Yu,S.X., Hollingshead,M.G. and
325             Newton,D.L.
326     TITLE     Proteomic analysis of nuclei isolated from cancer cell lines
327             treated with indenoisoquinoline NSC 724998, a novel topoisomerase I
328             inhibitor
329     JOURNAL   J. Proteome Res. 9 (8), 4016-4027 (2010)
330     PUBMED   20515076
331     REMARK    Erratum:[J Proteome Res. 2011 Apr 1;10(4):2128]
332     REFERENCE   4  (bases 1 to 2881)
333     AUTHORS   Zhang,J.Y., Looi,K.S. and Tan,E.M.
334     TITLE     Identification of tumor-associated antigens as diagnostic and
335             predictive biomarkers in cancer
336     JOURNAL   Methods Mol. Biol. 520, 1-10 (2009)
337     PUBMED   19381943
338     REFERENCE   5  (bases 1 to 2881)
339     AUTHORS   Dutta,J., Fan,G. and Gelinas,C.
340     TITLE     CAPERalpha is a novel Rel-TAD-interacting factor that inhibits
341             lymphocyte transformation by the potent Rel/NF-kappaB oncoprotein
342             v-Rel
343     JOURNAL   J. Virol. 82 (21), 10792-10802 (2008)
344     PUBMED   18753212
345     REMARK    GeneRIF: this study identifies CAPERalpha (RNA binding motif
346             protein 39) as a new transcriptional coregulator for v-Rel and
347             reveals an important role in modulating Rel's oncogenic activity.
348     REFERENCE   6  (bases 1 to 2881)
349     AUTHORS   Cazalla,D., Newton,K. and Caceres,J.F.
350     TITLE     A novel SR-related protein is required for the second step of
351             Pre-mRNA splicing
352     JOURNAL   Mol. Cell. Biol. 25 (8), 2969-2980 (2005)
353     PUBMED   15798186
354     REFERENCE   7  (bases 1 to 2881)
355     AUTHORS   Dowhan,D.H., Hong,E.P., Auboeuf,D., Dennis,A.P., Wilson,M.M.,
356             Berget,S.M. and O'Malley,B.W.
357     TITLE     Steroid hormone receptor coactivation and alternative RNA splicing
358             by U2AF65-related proteins CAPERalpha and CAPERbeta
359     JOURNAL   Mol. Cell 17 (3), 429-439 (2005)
360     PUBMED   15694343
361     REFERENCE   8  (bases 1 to 2881)
362     AUTHORS   Sun,N.N., Fastje,C.D., Wong,S.S., Sheppard,P.R., Macdonald,S.J.,
363             Ridenour,G., Hyde,J.D. and Witten,M.L.
364     TITLE     Dose-dependent transcriptome changes by metal ores on a human acute
365             lymphoblastic leukemia cell line
366     JOURNAL   Toxicol Ind Health 19 (7-10), 157-163 (2003)
367     PUBMED   15747776
368     REMARK    GeneRIF: 10 genes were down-regulated following treatment of the
369             T-ALL cells with 0.15 and 1.5 microg/mL of metal ores at 72 h
370     REFERENCE   9  (bases 1 to 2881)
371     AUTHORS   Jung,D.J., Na,S.Y., Na,D.S. and Lee,J.W.
372     TITLE     Molecular cloning and characterization of CAPER, a novel
373             coactivator of activating protein-1 and estrogen receptors
374     JOURNAL   J. Biol. Chem. 277 (2), 1229-1234 (2002)
375     PUBMED   11704680
376     REMARK    GeneRIF: This paper describes the mouse gene.
377     REFERENCE   10 (bases 1 to 2881)
378     AUTHORS   Imai,H., Chan,E.K., Kiyosawa,K., Fu,X.D. and Tan,E.M.
379     TITLE     Novel nuclear autoantigen with splicing factor motifs identified
380             with antibody from hepatocellular carcinoma
381     JOURNAL   J. Clin. Invest. 92 (5), 2419-2426 (1993)
382     PUBMED   8227358
383     COMMENT     REVIEWED REFSEQ: This record has been curated by NCBI staff. The
384             reference sequence was derived from DC346351.1, BC141835.1 and
385             C75555.1.
386             On Jun 16, 2011 this sequence version replaced gi:35493810.
387             
388             Summary: This gene encodes a member of the U2AF65 family of
389             proteins. The encoded protein is found in the nucleus, where it
390             co-localizes with core spliceosomal proteins. It has been shown to
391             play a role in both steroid hormone receptor-mediated transcription
392             and alternative splicing, and it is also a transcriptional
393             coregulator of the viral oncoprotein v-Rel. Multiple transcript
394             variants have been observed for this gene. A related pseudogene has
395             been identified on chromosome X. [provided by RefSeq, Aug 2011].
396             
397             Transcript Variant: This variant (1) encodes the longest isoform
398             (a, also called CC1.4).
399             
400             Publication Note:  This RefSeq record includes a subset of the
401             publications that are available for this gene. Please see the Gene
402             record to access additional publications.
403             
404             ##Evidence-Data-START##
405             Transcript exon combination :: BC141835.1, L10911.1 [ECO:0000332]
406             RNAseq introns              :: mixed/partial sample support
407                                            ERS025081, ERS025082 [ECO:0000350]
408             ##Evidence-Data-END##
409             COMPLETENESS: complete on the 3' end.
410     PRIMARY     REFSEQ_SPAN         PRIMARY_IDENTIFIER PRIMARY_SPAN        COMP
411             1-578               DC346351.1         3-580
412             579-2872            BC141835.1         429-2722
413             2873-2881           C75555.1           1-9                 c
414     FEATURES             Location/Qualifiers
415      source          1..2881
416                      /organism="Homo sapiens"
417                      /mol_type="mRNA"
418                      /db_xref="taxon:9606"
419                      /chromosome="20"
420                      /map="20q11.22"
421      gene            1..2881
422                      /gene="RBM39"
423                      /gene_synonym="CAPER; CAPERalpha; FSAP59; HCC1; RNPC2"
424                      /note="RNA binding motif protein 39"
425                      /db_xref="GeneID:9584"
426                      /db_xref="HGNC:15923"
427                      /db_xref="HPRD:09201"
428                      /db_xref="MIM:604739"
429      exon            1..396
430                      /gene="RBM39"
431                      /gene_synonym="CAPER; CAPERalpha; FSAP59; HCC1; RNPC2"
432                      /inference="alignment:Splign:1.39.8"
433      STS             35..262
434                      /gene="RBM39"
435                      /gene_synonym="CAPER; CAPERalpha; FSAP59; HCC1; RNPC2"
436                      /standard_name="REN58946"
437                      /db_xref="UniSTS:383746"
438      misc_feature    221..223
439                      /gene="RBM39"
440                      /gene_synonym="CAPER; CAPERalpha; FSAP59; HCC1; RNPC2"
441                      /note="upstream in-frame stop codon"
442      STS             299..453
443                      /gene="RBM39"
444                      /gene_synonym="CAPER; CAPERalpha; FSAP59; HCC1; RNPC2"
445                      /standard_name="G64285"
446                      /db_xref="UniSTS:158667"
447      exon            397..460
448                      /gene="RBM39"
449                      /gene_synonym="CAPER; CAPERalpha; FSAP59; HCC1; RNPC2"
450                      /inference="alignment:Splign:1.39.8"
451      CDS             410..2002
452                      /gene="RBM39"
453                      /gene_synonym="CAPER; CAPERalpha; FSAP59; HCC1; RNPC2"
454                      /note="isoform a is encoded by transcript variant 1;
455                      coactivator of activating protein-1 and estrogen
456                      receptors; functional spliceosome-associated protein 59;
457                      RNA-binding region (RNP1, RRM) containing 2;
458                      hepatocellular carcinoma protein 1; splicing factor HCC1"
459                      /codon_start=1
460                      /product="RNA-binding protein 39 isoform a"
461                      /protein_id="NP_909122.1"
462                      /db_xref="GI:35493811"
463                      /db_xref="CCDS:CCDS13266.1"
464                      /db_xref="GeneID:9584"
465                      /db_xref="HGNC:15923"
466                      /db_xref="HPRD:09201"
467                      /db_xref="MIM:604739"
468                      /translation="MADDIDIEAMLEAPYKKDENKLSSANGHEERSKKRKKSKSRSRS
469                      HERKRSKSKERKRSRDRERKKSKSRERKRSRSKERRRSRSRSRDRRFRGRYRSPYSGP
470                      KFNSAIRGKIGLPHSIKLSRRRSRSKSPFRKDKSPVREPIDNLTPEERDARTVFCMQL
471                      AARIRPRDLEEFFSTVGKVRDVRMISDRNSRRSKGIAYVEFVDVSSVPLAIGLTGQRV
472                      LGVPIIVQASQAEKNRAAAMANNLQKGSAGPMRLYVGSLHFNITEDMLRGIFEPFGRI
473                      ESIQLMMDSETGRSKGYGFITFSDSECAKKALEQLNGFELAGRPMKVGHVTERTDASS
474                      ASSFLDSDELERTGIDLGTTGRLQLMARLAEGTGLQIPPAAQQALQMSGSLAFGAVAE
475                      FSFVIDLQTRLSQQTEASALAAAASVQPLATQCFQLSNMFNPQTEEEVGWDTEIKDDV
476                      IEECNKHGGVIHIYVDKNSAQGNVYVKCPSIAAAIAAVNALHGRWFAGKMITAAYVPL
477                      PTYHNLFPDSMTATQLLVPSRR"
478      misc_feature    413..415
479                      /gene="RBM39"
480                      /gene_synonym="CAPER; CAPERalpha; FSAP59; HCC1; RNPC2"
481                      /experiment="experimental evidence, no additional details
482                      recorded"
483                      /note="N-acetylalanine; propagated from
484                      UniProtKB/Swiss-Prot (Q14498.2); acetylation site"
485      
486      exon            461..510
487                      /gene="RBM39"
488                      /gene_synonym="CAPER; CAPERalpha; FSAP59; HCC1; RNPC2"
489                      /inference="alignment:Splign:1.39.8"
490     
491      exon            1902..2874
492                      /gene="RBM39"
493                      /gene_synonym="CAPER; CAPERalpha; FSAP59; HCC1; RNPC2"
494                      /inference="alignment:Splign:1.39.8"
495      STS             1956..2182
496                      /gene="RBM39"
497                      /gene_synonym="CAPER; CAPERalpha; FSAP59; HCC1; RNPC2"
498                      /standard_name="REN58786"
499                      /db_xref="UniSTS:383586"
500      STS             2104..2148
501                      /gene="RBM39"
502                      /gene_synonym="CAPER; CAPERalpha; FSAP59; HCC1; RNPC2"
503                      /standard_name="D19S1033"
504                      /db_xref="UniSTS:154759"
505      STS             2145..2400
506                      /gene="RBM39"
507                      /gene_synonym="CAPER; CAPERalpha; FSAP59; HCC1; RNPC2"
508                      /standard_name="REN58785"
509                      /db_xref="UniSTS:383585"
510     
511      polyA_signal    2851..2856
512                      /gene="RBM39"
513                      /gene_synonym="CAPER; CAPERalpha; FSAP59; HCC1; RNPC2"
514      polyA_site      2874
515                      /gene="RBM39"
516                      /gene_synonym="CAPER; CAPERalpha; FSAP59; HCC1; RNPC2"
517     ORIGIN      
518         1 atttggagct tggggcagct tctcgcgaga gcccgtgctg agggctctgt gaggccccgt
519        61 gtgtttgtgt gtgtgtatgt gtgctggtga atgtgagtac agggaagcag cggccgccat
520       121 ttcagggagc ttgtcgacgc tgtcgcaggg gtggatcctg agctgccgaa gccgccgtcc
521       181 tgctctcccg cgtgggcttc tctaattcca ttgttttttt tagattctct cgggcctagc
522       241 cgtccttgga acccgatatt cgggctgggc ggttccgcgg cctgggccta ggggcttaac
523     
524     
525     
526     */
527     private EbiDbEntry() {
528     }
529
530     private void addCrossReference( final Accession accession ) {
531         if ( _cross_references == null ) {
532             _cross_references = new TreeSet<Accession>();
533         }
534         System.out.println( "XREF ADDED: " + accession );
535         _cross_references.add( accession );
536     }
537
538     @Override
539     public Object clone() throws CloneNotSupportedException {
540         throw new CloneNotSupportedException();
541     }
542
543     @Override
544     public String getAccession() {
545         return _pa;
546     }
547
548     @Override
549     public SortedSet<Accession> getCrossReferences() {
550         return _cross_references;
551     }
552
553     @Override
554     public String getGeneName() {
555         return _gene_name;
556     }
557
558     @Override
559     public SortedSet<GoTerm> getGoTerms() {
560         return null;
561     }
562
563     @Override
564     public String getProvider() {
565         return _provider;
566     }
567
568     @Override
569     public String getSequenceName() {
570         return _de;
571     }
572
573     @Override
574     public String getSequenceSymbol() {
575         return _symbol;
576     }
577
578     private void setSequenceSymbol( String symbol ) {
579         _symbol = symbol;
580     }
581
582     @Override
583     public String getTaxonomyIdentifier() {
584         return _tax_id;
585     }
586
587     @Override
588     public String getTaxonomyScientificName() {
589         return _os;
590     }
591
592     @Override
593     public boolean isEmpty() {
594         return ( ForesterUtil.isEmpty( getAccession() ) && ForesterUtil.isEmpty( getSequenceName() )
595                 && ForesterUtil.isEmpty( getTaxonomyScientificName() )
596                 && ForesterUtil.isEmpty( getTaxonomyIdentifier() ) && ForesterUtil.isEmpty( getSequenceSymbol() ) );
597     }
598
599     private void setSequenceName( final String rec_name ) {
600         if ( _de == null ) {
601             _de = rec_name;
602         }
603     }
604
605     private void setGeneName( final String gene_name ) {
606         if ( _gene_name == null ) {
607             _gene_name = gene_name;
608         }
609     }
610
611     private void setTaxonomyScientificName( final String os ) {
612         if ( _os == null ) {
613             _os = os;
614         }
615     }
616
617     private void setAccession( final String pa ) {
618         if ( _pa == null ) {
619             _pa = pa;
620         }
621     }
622
623     public void setProvider( final String provider ) {
624         _provider = provider;
625     }
626
627     private void setTaxId( final String tax_id ) {
628         if ( _tax_id == null ) {
629             _tax_id = tax_id;
630         }
631     }
632
633     @Override
634     public SortedSet<Annotation> getAnnotations() {
635         return _annotations;
636     }
637
638     private void addAnnotation( final Annotation annotation ) {
639         if ( _annotations == null ) {
640             _annotations = new TreeSet<Annotation>();
641         }
642         _annotations.add( annotation );
643     }
644 }