+ if (alignment != null)
+ {
+ for (SequenceI otherseq : alignment.getSequences())
+ {
+ if (otherseq == sequence
+ || (otherseq.getDatasetSequence() != null && (otherseq
+ .getDatasetSequence() == sequence || otherseq
+ .getDatasetSequence() == sequence
+ .getDatasetSequence())))
+ {
+ // skip sequences in subset which directly relate to sequence
+ continue;
+ }
+ if (mapping.involvesSequence(otherseq))
+ {
+ // selected a mapping contained in subselect alignment
+ result.add(mapping);
+ break;
+ }
+ }
+ }
+ else
+ {
+ result.add(mapping);
+ }