{
alseqs[i] = seqs[i];
if (seqs[i].getDatasetSequence() != null)
+ {
ds[i] = seqs[i].getDatasetSequence();
+ }
else
+ {
ds[i] = seqs[i];
+ }
}
this.dataset = ds;
// TODO Jalview 2.5 lots of this code should be in the gui package!
sequence.getSequenceAsString()).toUpperCase();
int absStart = entrySeq.indexOf(nonGapped);
- int mapStart = entry.getStart();
- jalview.datamodel.Mapping mp;
+ Mapping mp;
+ final int sequenceStart = sequence.getStart();
if (absStart == -1)
{
// Is local sequence contained in dataset sequence?
// create valid mapping between matching region of local sequence and
// the mapped sequence
mp = new Mapping(null, new int[] {
- sequence.getStart() + absStart,
- sequence.getStart() + absStart + entrySeq.length() - 1 },
+ sequenceStart + absStart,
+ sequenceStart + absStart + entrySeq.length() - 1 },
new int[] { entry.getStart(),
entry.getStart() + entrySeq.length() - 1 }, 1, 1);
updateRefFrame = false; // mapping is based on current start/end so
if (sequence.getSequenceFeatures() != null)
{
SequenceFeature[] sf = sequence.getSequenceFeatures();
- int start = sequence.getStart();
+ int start = sequenceStart;
int end = sequence.getEnd();
int startShift = 1 - absStart - start; // how much the features
// are
+ " from " + dbSource + " sequence : " + entry.getName());
sequence.transferAnnotation(entry, mp);
// unknownSequences.remove(sequence);
- int absEnd = absStart + nonGapped.length();
- absStart += 1;
+ absStart += entry.getStart();
+ int absEnd = absStart + nonGapped.length() - 1;
if (!trimDatasetSeqs)
{
// insert full length sequence from record