*/
for (SequenceToSequenceMapping ssm : mappings)
{
- if (ssm.fromSeq == seq || ssm.fromSeq == seq.getDatasetSequence())
+ int mStart=ssm.getMapping().getMap().getFromLowest(),mEnd=ssm.getMapping().map.getFromHighest();
+ if ((ssm.fromSeq == seq || ssm.fromSeq == seq.getDatasetSequence())
+ && seq.getStart()>=mStart && seq.getEnd()<=mEnd)
{
for (SequenceI sourceAligned : al.getSequences())
{
*/
for (SequenceToSequenceMapping ssm : mappings)
{
- if (ssm.mapping.to == seq
+ int mStart=ssm.getMapping().getMap().getToLowest(),mEnd=ssm.getMapping().map.getToHighest();
+ if ((ssm.mapping.to == seq
|| ssm.mapping.to == seq.getDatasetSequence())
+ && seq.getStart()>=mStart && seq.getEnd()<=mEnd)
{
for (SequenceI sourceAligned : al.getSequences())
{