AlignmentI geneFeatures = gffFetcher.getSequenceRecords(accId,
features);
if (geneFeatures != null && geneFeatures.getHeight() > 0)
{
genomicSequence = geneFeatures.getSequenceAt(0);
}
AlignmentI geneFeatures = gffFetcher.getSequenceRecords(accId,
features);
if (geneFeatures != null && geneFeatures.getHeight() > 0)
{
genomicSequence = geneFeatures.getSequenceAt(0);
}
if (genomicSequence != null)
{
/*
* transfer features to the query sequence
*/
SequenceI querySeq = alignment.findName(accId, true);
if (genomicSequence != null)
{
/*
* transfer features to the query sequence
*/
SequenceI querySeq = alignment.findName(accId, true);
* fetch and map protein product, and add it as a cross-reference
* of the retrieved sequence
*/
* fetch and map protein product, and add it as a cross-reference
* of the retrieved sequence
*/
EnsemblXref xrefFetcher = new EnsemblXref(getDomain(), getDbSource(),
getEnsemblDataVersion());
List<DBRefEntry> xrefs = xrefFetcher.getCrossReferences(seq.getName());
for (int i = 0, n = xrefs.size(); i < n; i++)
{
EnsemblXref xrefFetcher = new EnsemblXref(getDomain(), getDbSource(),
getEnsemblDataVersion());
List<DBRefEntry> xrefs = xrefFetcher.getCrossReferences(seq.getName());
for (int i = 0, n = xrefs.size(); i < n; i++)
{
// BH 2019.01.25 this next method was taking 174 ms PER addition for a 266-reference example.
// DBRefUtils.ensurePrimaries(seq)
// was at the end of seq.addDBRef, so executed after ever addition!
// This method was moved to seq.getPrimaryDBRefs()
seq.addDBRef(xrefs.get(i));
}
// BH 2019.01.25 this next method was taking 174 ms PER addition for a 266-reference example.
// DBRefUtils.ensurePrimaries(seq)
// was at the end of seq.addDBRef, so executed after ever addition!
// This method was moved to seq.getPrimaryDBRefs()
seq.addDBRef(xrefs.get(i));
}
* for now, assumes only one sequence returned; refactor if needed
* in future to handle a JSONArray with more than one
*/
* for now, assumes only one sequence returned; refactor if needed
* in future to handle a JSONArray with more than one
*/
Map<String, Object> val = (Map<String, Object>) getJSON(null, ids, -1, MODE_MAP, null);
if (val == null)
return null;
Map<String, Object> val = (Map<String, Object>) getJSON(null, ids, -1, MODE_MAP, null);
if (val == null)
return null;