import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.DBRefEntry;
+import jalview.datamodel.DBRefSource;
import jalview.datamodel.Mapping;
import jalview.datamodel.Sequence;
import jalview.datamodel.SequenceFeature;
findXrefSourcesForSequence(seq, dna, sources);
}
}
+ sources.remove(DBRefSource.EMBL); // hack to prevent EMBL xrefs resulting in
+ // redundant datasets
+ if (dna)
+ {
+ sources.remove(DBRefSource.ENSEMBL); // hack to prevent Ensembl and
+ // EnsemblGenomes xref option shown
+ // from cdna panel
+ sources.remove(DBRefSource.ENSEMBLGENOMES);
+ }
+ // redundant datasets
return sources;
}
rseqs = new ArrayList<SequenceI>();
AlignedCodonFrame cf = new AlignedCodonFrame();
- matcher = new SequenceIdMatcher(
- dataset.getSequences());
+ matcher = new SequenceIdMatcher(dataset.getSequences());
for (SequenceI seq : fromSeqs)
{
* duplication (e.g. same variation from two
* transcripts)
*/
- SequenceFeature[] sfs = ms.getSequenceFeatures();
- if (sfs != null)
+ List<SequenceFeature> sfs = ms.getFeatures()
+ .getAllFeatures();
+ for (SequenceFeature feat : sfs)
{
- for (SequenceFeature feat : sfs)
+ /*
+ * make a flyweight feature object which ignores Parent
+ * attribute in equality test; this avoids creating many
+ * otherwise duplicate exon features on genomic sequence
+ */
+ SequenceFeature newFeature = new SequenceFeature(feat)
{
- /*
- * make a flyweight feature object which ignores Parent
- * attribute in equality test; this avoids creating many
- * otherwise duplicate exon features on genomic sequence
- */
- SequenceFeature newFeature = new SequenceFeature(
- feat)
+ @Override
+ public boolean equals(Object o)
{
- @Override
- public boolean equals(Object o)
- {
- return super.equals(o, true);
- }
- };
- matched.addSequenceFeature(newFeature);
- }
+ return super.equals(o, true);
+ }
+ };
+ matched.addSequenceFeature(newFeature);
}
-
}
cf.addMap(retrievedSequence, map.getTo(), map.getMap());
} catch (Exception e)
}
return imported;
}
+
/**
* Sets the inverse sequence mapping in the corresponding dbref of the mapped
* to sequence (if any). This is used after fetching a cross-referenced
MapList mapping = null;
SequenceI dsmapFrom = mapFrom.getDatasetSequence() == null ? mapFrom
: mapFrom.getDatasetSequence();
- SequenceI dsmapTo = mapTo.getDatasetSequence() == null ? mapTo
- : mapTo.getDatasetSequence();
+ SequenceI dsmapTo = mapTo.getDatasetSequence() == null ? mapTo : mapTo
+ .getDatasetSequence();
/*
* look for a reverse mapping, if found make its inverse.
* Note - we do this on dataset sequences only.