/**
* Calls the /lookup/id REST service, parses the response for gene
- * coordinates, and if successful, adds these to the sequence
+ * coordinates, and if successful, adds these to the sequence. If this fails,
+ * fall back on trying to parse the sequence description in case it is in
+ * Ensembl-gene format e.g. chromosome:GRCh38:17:45051610:45109016:1.
*
* @param seq
* @param geneId
*/
void findGeneLoci(SequenceI seq, String geneId)
{
- /*
- * if sequence description is in gene loci format, parse this
- * - but try remote lookup anyway as 'better' if available
- */
- parseChromosomeLocations(seq);
-
GeneLociI geneLoci = new EnsemblLookup(getDomain()).getGeneLoci(geneId);
if (geneLoci != null)
{
seq.setGeneLoci(geneLoci.getSpeciesId(), geneLoci.getAssemblyId(),
geneLoci.getChromosomeId(), geneLoci.getMap());
}
+ else
+ {
+ parseChromosomeLocations(seq);
+ }
}
/**