public class GeneLoci
{
/*
- * implemented as an adapter over DBRefEntry with
- * source -> species id
- * version -> reference
- * accession -> chromosome
+ * an identifier for the species
*/
- private DBRefEntry loci;
+ public final String species;
- boolean forwardStrand;
-
- /**
- * Constructor
- *
- * @param taxon
- * @param ref
- * @param chrId
- * @param map
- * @param forward
- */
- public GeneLoci(String taxon, String ref, String chrId, MapList map,
- boolean forward)
- {
- loci = new DBRefEntry(taxon, ref, chrId, new Mapping(map));
- forwardStrand = forward;
- }
-
- /**
- * Answers the identifier for the species
- *
- * @return
+ /*
+ * an identifier for a genome assembly, e.g. GRCh38
*/
- public String getSpecies()
- {
- return loci.getSource();
- }
+ public final String assembly;
- /**
- * Answers the identifier for the genomic reference assembly
+ /*
+ * a chromosome identifier, e.g. "5" or "X"
*/
- public String getReference()
- {
- return loci.getVersion();
- }
+ public final String chromosome;
- /**
- * Answers the chromosome identifier
- *
- * @return
+ /*
+ * mapping from sequence positions to chromosome locations;
+ * any regions with start > end are on the reverse strand
*/
- public String getChromosome()
- {
- return loci.getAccessionId();
- }
+ public final MapList mapping;
/**
- * Answers the mapping from sequence positions (in sequence start..end
- * coordinates) to the corresponding loci in the chromosome (in reference
- * assembly coordinates, base 1)
+ * Constructor
*
- * @return
+ * @param taxon
+ * @param ref
+ * @param chrId
+ * @param map
*/
- public MapList getMapping()
- {
- return loci.getMap().getMap();
- }
-
- public boolean isForwardStrand()
+ public GeneLoci(String taxon, String ref, String chrId, MapList map)
{
- return forwardStrand;
+ species = taxon;
+ assembly = ref;
+ chromosome = chrId;
+ mapping = map;
}
}