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