* If one alignment is protein and one nucleotide, with at least one
* sequence name in common, offer to open a linked alignment.
*/
- if (getAlignment().isNucleotide() != al.isNucleotide())
+ if (AlignmentUtils.isMappable(al, getAlignment()))
{
- // TODO: JAL-845 try a bit harder to link up imported sequences
- final Set<String> sequenceNames = getAlignment().getSequenceNames();
- sequenceNames.retainAll(al.getSequenceNames());
- if (!sequenceNames.isEmpty()) // at least one sequence name in both
+ if (openLinkedAlignment(al, title))
{
- if (openLinkedAlignment(al, title))
- {
- return;
- }
+ return;
}
}
// TODO: JAL-407 regardless of above - identical sequences (based on ID and