import jalview.datamodel.Sequence;
import jalview.datamodel.SequenceFeature;
import jalview.datamodel.SequenceI;
+import jalview.util.DBRefUtils;
+import jalview.util.MapList;
import java.util.Hashtable;
import java.util.Map.Entry;
* don't return any translated protein sequences marked in features
* @return dataset sequences with DBRefs and features - DNA always comes first
*/
- public jalview.datamodel.SequenceI[] getSequences(boolean noNa,
+ public SequenceI[] getSequences(boolean noNa,
boolean noPeptide, String sourceDb)
{ // TODO: ensure emblEntry.getSequences behaves correctly for returning all
// cases of noNa and noPeptide
{
boolean isEmblCdna = sourceDb.equals(DBRefSource.EMBLCDS);
// extract coding region(s)
- jalview.datamodel.Mapping map = null;
+ Mapping map = null;
int[] exon = null;
if (feature.locations != null)
{
// marked.
exon = new int[]
{ dna.getStart() + (prstart - 1), dna.getEnd() };
- map = new jalview.datamodel.Mapping(product, exon, new int[]
+ map = new Mapping(product, exon, new int[]
{ 1, prseq.length() }, 3, 1);
}
if ((prseq.length() + 1) * 3 == (1 - prstart + dna.getSequence().length))
.println("Allowing for additional stop codon at end of cDNA fragment... will probably cause an error in VAMSAs!");
exon = new int[]
{ dna.getStart() + (prstart - 1), dna.getEnd() - 3 };
- map = new jalview.datamodel.Mapping(product, exon, new int[]
+ map = new Mapping(product, exon, new int[]
{ 1, prseq.length() }, 3, 1);
}
}
{
// final product length trunctation check
- map = new jalview.datamodel.Mapping(product,
+ map = new Mapping(product,
adjustForProteinLength(prseq.length(), exon), new int[]
{ 1, prseq.length() }, 3, 1);
// reconstruct the EMBLCDS entry
pcdnaref.setAccessionId(prid);
pcdnaref.setSource(DBRefSource.EMBLCDS);
pcdnaref.setVersion(getVersion()); // same as parent EMBL version.
- jalview.util.MapList mp = new jalview.util.MapList(new int[]
+ MapList mp = new MapList(new int[]
{ 1, prseq.length() }, new int[]
{ 1 + (prstart - 1), (prstart - 1) + 3 * prseq.length() }, 1, 3);
// { 1 + (prstart - 1) * 3,
{
for (DBRefEntry ref : feature.dbRefs)
{
- ref.setSource(jalview.util.DBRefUtils.getCanonicalName(ref
+ ref.setSource(DBRefUtils.getCanonicalName(ref
.getSource()));
// Hard code the kind of protein product accessions that EMBL cite
- if (ref.getSource().equals(jalview.datamodel.DBRefSource.UNIPROT))
+ if (ref.getSource().equals(DBRefSource.UNIPROT))
{
ref.setMap(map);
if (map != null && map.getTo() != null)
if (map.getTo().getName().indexOf(prid) == 0)
{
map.getTo().setName(
- jalview.datamodel.DBRefSource.UNIPROT + "|"
+ DBRefSource.UNIPROT + "|"
+ ref.getAccessionId());
}
}