10ca7ec8f50cdf1e2da95c3dfa112871188ae7b9
[jalview.git] / src / jalview / io / gff / SequenceOntologyI.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3  * Copyright (C) $$Year-Rel$$ The Jalview Authors
4  * 
5  * This file is part of Jalview.
6  * 
7  * Jalview is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License 
9  * as published by the Free Software Foundation, either version 3
10  * of the License, or (at your option) any later version.
11  *  
12  * Jalview is distributed in the hope that it will be useful, but 
13  * WITHOUT ANY WARRANTY; without even the implied warranty 
14  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
15  * PURPOSE.  See the GNU General Public License for more details.
16  * 
17  * You should have received a copy of the GNU General Public License
18  * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
19  * The Jalview Authors are detailed in the 'AUTHORS' file.
20  */
21 package jalview.io.gff;
22
23 import java.util.List;
24
25 public interface SequenceOntologyI
26 {
27   /*
28    * selected commonly used values for quick reference
29    */
30   // SO:0000104
31   public static final String POLYPEPTIDE = "polypeptide";
32
33   // SO:0000349
34   public static final String PROTEIN_MATCH = "protein_match";
35
36   // SO:0000347
37   public static final String NUCLEOTIDE_MATCH = "nucleotide_match";
38
39   // SO:0000316
40   public static final String CDS = "CDS";
41
42   // SO:0001060
43   public static final String SEQUENCE_VARIANT = "sequence_variant";
44
45   // SO:0001819
46   public static final String SYNONYMOUS_VARIANT = "synonymous_variant";
47
48   // SO:0001992
49   public static final String NONSYNONYMOUS_VARIANT = "nonsynonymous_variant";
50
51   // SO:0000147
52   public static final String EXON = "exon";
53
54   // SO:0000673
55   public static final String TRANSCRIPT = "transcript";
56
57   // SO:0001621 isA sequence_variant but used in Ensembl as a transcript
58   public static final String NMD_TRANSCRIPT_VARIANT = "NMD_transcript_variant";
59
60   // SO:0000704
61   public static final String GENE = "gene";
62
63   public boolean isA(String childTerm, String parentTerm);
64
65   /**
66    * Returns a sorted list of all valid terms queried for (i.e. terms processed
67    * which were valid in the SO), using the friendly description.
68    * 
69    * This can be used to check that any hard-coded stand-in for the full SO
70    * includes all the terms needed for correct processing.
71    * 
72    * @return
73    */
74   public List<String> termsFound();
75
76   /**
77    * Returns a sorted list of all invalid terms queried for (i.e. terms
78    * processed which were not found in the SO), using the friendly description.
79    * 
80    * This can be used to report any 'non-compliance' in data, and/or to report
81    * valid terms missing from any hard-coded stand-in for the full SO.
82    * 
83    * @return
84    */
85   public List<String> termsNotFound();
86 }