1 package jalview.datamodel;
3 import jalview.util.MapList;
6 * A specialisation of DBRefEntry used to hold the chromosomal coordinates for a
7 * (typically gene) sequence
9 * <li>field <code>source</code> is used to hold a species id e.g. human</li>
10 * <li>field <code>version</code> is used to hold assembly id e.g GRCh38</li>
11 * <li>field <code>accession</code> is used to hold the chromosome id</li>
12 * <li>field <code>map</code> is used to hold the mapping from sequence to
13 * chromosome coordinates</li>
19 public class GeneLocus extends DBRefEntry implements GeneLociI
22 * Constructor adapts species, assembly, chromosome to DBRefEntry source,
23 * version, accession, respectively, and saves the mapping of sequence to
24 * chromosomal coordinates
31 public GeneLocus(String speciesId, String assemblyId, String chromosomeId,
34 super(speciesId, assemblyId, chromosomeId, mapping);
44 public GeneLocus(String speciesId, String assemblyId, String chromosomeId)
46 this(speciesId, assemblyId, chromosomeId, null);
50 public boolean equals(Object o)
52 return o instanceof GeneLocus && super.equals(o);
56 public MapList getMapping()
58 return map == null ? null : map.getMap();
62 * Answers the species identifier e.g. "human", stored as field <code>source</code> of
66 public String getSpeciesId()
72 * Answers the genome assembly id e.g. "GRCh38", stored as field
73 * <code>version</code> of DBRefEntry
76 public String getAssemblyId()
82 * Answers the chromosome identifier e.g. "X", stored as field
83 * <code>accession</code> of DBRefEntry
86 public String getChromosomeId()
88 return getAccessionId();