4 import static org.testng.AssertJUnit.assertEquals;
5 import static org.testng.AssertJUnit.assertSame;
6 import static org.testng.AssertJUnit.assertTrue;
8 import jalview.api.AlignViewportI;
9 import jalview.datamodel.AlignedCodonFrame;
10 import jalview.datamodel.AlignmentI;
11 import jalview.datamodel.ColumnSelection;
12 import jalview.datamodel.SearchResults;
13 import jalview.datamodel.SearchResults.Match;
14 import jalview.datamodel.Sequence;
15 import jalview.datamodel.SequenceGroup;
16 import jalview.datamodel.SequenceI;
17 import jalview.gui.AlignViewport;
18 import jalview.io.AppletFormatAdapter;
19 import jalview.io.FormatAdapter;
21 import java.awt.Color;
22 import java.io.IOException;
23 import java.util.Arrays;
24 import java.util.Collections;
25 import java.util.HashSet;
26 import java.util.List;
29 import org.testng.annotations.Test;
31 public class MappingUtilsTest
33 private AlignViewportI dnaView;
34 private AlignViewportI proteinView;
37 * Simple test of mapping with no intron involved.
39 @Test(groups ={ "Functional" })
40 public void testBuildSearchResults()
42 final Sequence seq1 = new Sequence("Seq1", "C-G-TA-GC");
43 seq1.createDatasetSequence();
45 final Sequence aseq1 = new Sequence("Seq1", "-P-R");
46 aseq1.createDatasetSequence();
49 * Map dna bases 1-6 to protein residues 1-2
51 AlignedCodonFrame acf = new AlignedCodonFrame();
52 MapList map = new MapList(new int[]
55 acf.addMap(seq1.getDatasetSequence(), aseq1.getDatasetSequence(), map);
56 Set<AlignedCodonFrame> acfList = Collections.singleton(acf);
59 * Check protein residue 1 maps to codon 1-3, 2 to codon 4-6
61 SearchResults sr = MappingUtils.buildSearchResults(aseq1, 1, acfList);
62 assertEquals(1, sr.getResults().size());
63 Match m = sr.getResults().get(0);
64 assertEquals(seq1.getDatasetSequence(), m.getSequence());
65 assertEquals(1, m.getStart());
66 assertEquals(3, m.getEnd());
67 sr = MappingUtils.buildSearchResults(aseq1, 2, acfList);
68 assertEquals(1, sr.getResults().size());
69 m = sr.getResults().get(0);
70 assertEquals(seq1.getDatasetSequence(), m.getSequence());
71 assertEquals(4, m.getStart());
72 assertEquals(6, m.getEnd());
75 * Check inverse mappings, from codons 1-3, 4-6 to protein 1, 2
77 for (int i = 1; i < 7; i++)
79 sr = MappingUtils.buildSearchResults(seq1, i, acfList);
80 assertEquals(1, sr.getResults().size());
81 m = sr.getResults().get(0);
82 assertEquals(aseq1.getDatasetSequence(), m.getSequence());
83 int residue = i > 3 ? 2 : 1;
84 assertEquals(residue, m.getStart());
85 assertEquals(residue, m.getEnd());
90 * Simple test of mapping with introns involved.
92 @Test(groups ={ "Functional" })
93 public void testBuildSearchResults_withIntron()
95 final Sequence seq1 = new Sequence("Seq1", "C-G-TAGA-GCAGCTT");
96 seq1.createDatasetSequence();
98 final Sequence aseq1 = new Sequence("Seq1", "-P-R");
99 aseq1.createDatasetSequence();
102 * Map dna bases [2, 4, 5], [7, 9, 11] to protein residues 1 and 2
104 AlignedCodonFrame acf = new AlignedCodonFrame();
105 MapList map = new MapList(new int[]
106 { 2, 2, 4, 5, 7, 7, 9, 9, 11, 11 }, new int[]
108 acf.addMap(seq1.getDatasetSequence(), aseq1.getDatasetSequence(), map);
109 Set<AlignedCodonFrame> acfList = Collections.singleton(acf);
112 * Check protein residue 1 maps to [2, 4, 5]
114 SearchResults sr = MappingUtils.buildSearchResults(aseq1, 1, acfList);
115 assertEquals(2, sr.getResults().size());
116 Match m = sr.getResults().get(0);
117 assertEquals(seq1.getDatasetSequence(), m.getSequence());
118 assertEquals(2, m.getStart());
119 assertEquals(2, m.getEnd());
120 m = sr.getResults().get(1);
121 assertEquals(seq1.getDatasetSequence(), m.getSequence());
122 assertEquals(4, m.getStart());
123 assertEquals(5, m.getEnd());
126 * Check protein residue 2 maps to [7, 9, 11]
128 sr = MappingUtils.buildSearchResults(aseq1, 2, acfList);
129 assertEquals(3, sr.getResults().size());
130 m = sr.getResults().get(0);
131 assertEquals(seq1.getDatasetSequence(), m.getSequence());
132 assertEquals(7, m.getStart());
133 assertEquals(7, m.getEnd());
134 m = sr.getResults().get(1);
135 assertEquals(seq1.getDatasetSequence(), m.getSequence());
136 assertEquals(9, m.getStart());
137 assertEquals(9, m.getEnd());
138 m = sr.getResults().get(2);
139 assertEquals(seq1.getDatasetSequence(), m.getSequence());
140 assertEquals(11, m.getStart());
141 assertEquals(11, m.getEnd());
144 * Check inverse mappings, from codons to protein
146 for (int i = 1; i < 14; i++)
148 sr = MappingUtils.buildSearchResults(seq1, i, acfList);
149 int residue = (i == 2 || i == 4 || i == 5) ? 1 : (i == 7 || i == 9
153 assertEquals(0, sr.getResults().size());
156 assertEquals(1, sr.getResults().size());
157 m = sr.getResults().get(0);
158 assertEquals(aseq1.getDatasetSequence(), m.getSequence());
159 assertEquals(residue, m.getStart());
160 assertEquals(residue, m.getEnd());
165 * Test mapping a sequence group made of entire sequences.
167 * @throws IOException
169 @Test(groups ={ "Functional" })
170 public void testMapSequenceGroup_sequences() throws IOException
173 * Set up dna and protein Seq1/2/3 with mappings (held on the protein
176 AlignmentI cdna = loadAlignment(">Seq1\nACG\n>Seq2\nTGA\n>Seq3\nTAC\n",
178 cdna.setDataset(null);
179 AlignmentI protein = loadAlignment(">Seq1\nK\n>Seq2\nL\n>Seq3\nQ\n",
181 protein.setDataset(null);
182 AlignedCodonFrame acf = new AlignedCodonFrame();
183 MapList map = new MapList(new int[]
186 for (int seq = 0; seq < 3; seq++)
188 acf.addMap(cdna.getSequenceAt(seq).getDatasetSequence(), protein
189 .getSequenceAt(seq).getDatasetSequence(), map);
191 Set<AlignedCodonFrame> acfList = Collections.singleton(acf);
193 AlignViewportI dnaView = new AlignViewport(cdna);
194 AlignViewportI proteinView = new AlignViewport(protein);
195 protein.setCodonFrames(acfList);
198 * Select Seq1 and Seq3 in the protein (startRes=endRes=0)
200 SequenceGroup sg = new SequenceGroup();
201 sg.setColourText(true);
202 sg.setIdColour(Color.GREEN);
203 sg.setOutlineColour(Color.LIGHT_GRAY);
204 sg.addSequence(protein.getSequenceAt(0), false);
205 sg.addSequence(protein.getSequenceAt(2), false);
208 * Verify the mapped sequence group in dna
210 SequenceGroup mappedGroup = MappingUtils.mapSequenceGroup(sg, proteinView, dnaView);
211 assertTrue(mappedGroup.getColourText());
212 assertSame(sg.getIdColour(), mappedGroup.getIdColour());
213 assertSame(sg.getOutlineColour(), mappedGroup.getOutlineColour());
214 assertEquals(2, mappedGroup.getSequences().size());
215 assertSame(cdna.getSequenceAt(0), mappedGroup.getSequences().get(0));
216 assertSame(cdna.getSequenceAt(2), mappedGroup.getSequences().get(1));
217 assertEquals(0, mappedGroup.getStartRes());
218 assertEquals(2, mappedGroup.getEndRes());
221 * Verify mapping sequence group from dna to protein
224 sg.addSequence(cdna.getSequenceAt(1), false);
225 sg.addSequence(cdna.getSequenceAt(0), false);
228 mappedGroup = MappingUtils.mapSequenceGroup(sg, dnaView, proteinView);
229 assertTrue(mappedGroup.getColourText());
230 assertSame(sg.getIdColour(), mappedGroup.getIdColour());
231 assertSame(sg.getOutlineColour(), mappedGroup.getOutlineColour());
232 assertEquals(2, mappedGroup.getSequences().size());
233 assertSame(protein.getSequenceAt(1), mappedGroup.getSequences().get(0));
234 assertSame(protein.getSequenceAt(0), mappedGroup.getSequences().get(1));
235 assertEquals(0, mappedGroup.getStartRes());
236 assertEquals(0, mappedGroup.getEndRes());
240 * Helper method to load an alignment and ensure dataset sequences are set up.
246 * @throws IOException
248 protected AlignmentI loadAlignment(final String data, String format)
251 AlignmentI a = new FormatAdapter().readFile(data,
252 AppletFormatAdapter.PASTE, format);
258 * Test mapping a column selection in protein to its dna equivalent
260 * @throws IOException
262 @Test(groups ={ "Functional" })
263 public void testMapColumnSelection_proteinToDna() throws IOException
265 setupMappedAlignments();
267 ColumnSelection colsel = new ColumnSelection();
270 * Column 0 in protein picks up Seq2/L, Seq3/G which map to cols 0-4 and 0-3
271 * in dna respectively, overall 0-4
273 colsel.addElement(0);
274 ColumnSelection cs = MappingUtils.mapColumnSelection(colsel,
275 proteinView, dnaView);
276 assertEquals("[0, 1, 2, 3, 4]", cs.getSelected().toString());
279 * Column 1 in protein picks up Seq1/K which maps to cols 0-3 in dna
282 colsel.addElement(1);
283 cs = MappingUtils.mapColumnSelection(colsel, proteinView, dnaView);
284 assertEquals("[0, 1, 2, 3]", cs.getSelected().toString());
287 * Column 2 in protein picks up gaps only - no mapping
290 colsel.addElement(2);
291 cs = MappingUtils.mapColumnSelection(colsel, proteinView, dnaView);
292 assertEquals("[]", cs.getSelected().toString());
295 * Column 3 in protein picks up Seq1/P, Seq2/Q, Seq3/S which map to columns
296 * 6-9, 6-10, 5-8 respectively, overall to 5-10
299 colsel.addElement(3);
300 cs = MappingUtils.mapColumnSelection(colsel, proteinView, dnaView);
301 assertEquals("[5, 6, 7, 8, 9, 10]", cs.getSelected().toString());
304 * Combine selection of columns 1 and 3 to get a discontiguous mapped
308 colsel.addElement(1);
309 colsel.addElement(3);
310 cs = MappingUtils.mapColumnSelection(colsel, proteinView, dnaView);
311 assertEquals("[0, 1, 2, 3, 5, 6, 7, 8, 9, 10]", cs.getSelected()
316 * @throws IOException
318 protected void setupMappedAlignments() throws IOException
321 * Set up dna and protein Seq1/2/3 with mappings (held on the protein
322 * viewport). Lower case for introns.
324 AlignmentI cdna = loadAlignment(">Seq1\nAC-GctGtC-T\n"
325 + ">Seq2\nTc-GA-G-T-Tc\n" + ">Seq3\nTtTT-AaCGg-\n",
327 cdna.setDataset(null);
328 AlignmentI protein = loadAlignment(
329 ">Seq1\n-K-P\n>Seq2\nL--Q\n>Seq3\nG--S\n",
331 protein.setDataset(null);
332 AlignedCodonFrame acf = new AlignedCodonFrame();
333 MapList map = new MapList(new int[]
334 { 1, 3, 6, 6, 8, 9 }, new int[]
336 acf.addMap(cdna.getSequenceAt(0).getDatasetSequence(), protein
337 .getSequenceAt(0).getDatasetSequence(), map);
338 map = new MapList(new int[]
339 { 1, 1, 3, 4, 5, 7 }, new int[]
341 acf.addMap(cdna.getSequenceAt(1).getDatasetSequence(), protein
342 .getSequenceAt(1).getDatasetSequence(), map);
343 map = new MapList(new int[]
344 { 1, 1, 3, 4, 5, 5, 7, 8 }, new int[]
346 acf.addMap(cdna.getSequenceAt(2).getDatasetSequence(), protein
347 .getSequenceAt(2).getDatasetSequence(), map);
348 Set<AlignedCodonFrame> acfList = Collections.singleton(acf);
350 dnaView = new AlignViewport(cdna);
351 proteinView = new AlignViewport(protein);
352 protein.setCodonFrames(acfList);
356 * Test mapping a column selection in dna to its protein equivalent
358 * @throws IOException
360 @Test(groups ={ "Functional" })
361 public void testMapColumnSelection_dnaToProtein() throws IOException
363 setupMappedAlignments();
365 ColumnSelection colsel = new ColumnSelection();
368 * Column 0 in dna picks up first bases which map to residue 1, columns 0-1
371 colsel.addElement(0);
372 ColumnSelection cs = MappingUtils.mapColumnSelection(colsel, dnaView,
374 assertEquals("[0, 1]", cs.getSelected().toString());
377 * Columns 3-5 in dna map to the first residues in protein Seq1, Seq2, and
378 * the first two in Seq3. Overall to columns 0, 1, 3 (col2 is all gaps).
380 colsel.addElement(3);
381 colsel.addElement(4);
382 colsel.addElement(5);
383 cs = MappingUtils.mapColumnSelection(colsel, dnaView, proteinView);
384 assertEquals("[0, 1, 3]", cs.getSelected().toString());
387 @Test(groups ={ "Functional" })
388 public void testMapColumnSelection_null() throws IOException
390 setupMappedAlignments();
391 ColumnSelection cs = MappingUtils.mapColumnSelection(null, dnaView,
393 assertTrue("mapped selection not empty", cs.getSelected().isEmpty());
397 * Tests for the method that converts a series of [start, end] ranges to
400 @Test(groups ={ "Functional" })
401 public void testFlattenRanges()
403 assertEquals("[1, 2, 3, 4]",
404 Arrays.toString(MappingUtils.flattenRanges(new int[]
406 assertEquals("[1, 2, 3, 4]",
407 Arrays.toString(MappingUtils.flattenRanges(new int[]
409 assertEquals("[1, 2, 3, 4]",
410 Arrays.toString(MappingUtils.flattenRanges(new int[]
411 { 1, 1, 2, 2, 3, 3, 4, 4 })));
412 assertEquals("[1, 2, 3, 4, 7, 8, 9, 12]",
413 Arrays.toString(MappingUtils.flattenRanges(new int[]
414 { 1, 4, 7, 9, 12, 12 })));
415 // unpaired start position is ignored:
416 assertEquals("[1, 2, 3, 4, 7, 8, 9, 12]",
417 Arrays.toString(MappingUtils.flattenRanges(new int[]
418 { 1, 4, 7, 9, 12, 12, 15 })));
422 * Test mapping a sequence group made of entire columns.
424 * @throws IOException
426 @Test(groups ={ "Functional" })
427 public void testMapSequenceGroup_columns() throws IOException
430 * Set up dna and protein Seq1/2/3 with mappings (held on the protein
433 AlignmentI cdna = loadAlignment(
434 ">Seq1\nACGGCA\n>Seq2\nTGACAG\n>Seq3\nTACGTA\n",
436 cdna.setDataset(null);
437 AlignmentI protein = loadAlignment(">Seq1\nKA\n>Seq2\nLQ\n>Seq3\nQV\n",
439 protein.setDataset(null);
440 AlignedCodonFrame acf = new AlignedCodonFrame();
441 MapList map = new MapList(new int[]
444 for (int seq = 0; seq < 3; seq++)
446 acf.addMap(cdna.getSequenceAt(seq).getDatasetSequence(), protein
447 .getSequenceAt(seq).getDatasetSequence(), map);
449 Set<AlignedCodonFrame> acfList = Collections.singleton(acf);
451 AlignViewportI dnaView = new AlignViewport(cdna);
452 AlignViewportI proteinView = new AlignViewport(protein);
453 protein.setCodonFrames(acfList);
456 * Select all sequences, column 2 in the protein
458 SequenceGroup sg = new SequenceGroup();
459 sg.setColourText(true);
460 sg.setIdColour(Color.GREEN);
461 sg.setOutlineColour(Color.LIGHT_GRAY);
462 sg.addSequence(protein.getSequenceAt(0), false);
463 sg.addSequence(protein.getSequenceAt(1), false);
464 sg.addSequence(protein.getSequenceAt(2), false);
469 * Verify the mapped sequence group in dna
471 SequenceGroup mappedGroup = MappingUtils.mapSequenceGroup(sg, proteinView, dnaView);
472 assertTrue(mappedGroup.getColourText());
473 assertSame(sg.getIdColour(), mappedGroup.getIdColour());
474 assertSame(sg.getOutlineColour(), mappedGroup.getOutlineColour());
475 assertEquals(3, mappedGroup.getSequences().size());
476 assertSame(cdna.getSequenceAt(0), mappedGroup.getSequences().get(0));
477 assertSame(cdna.getSequenceAt(1), mappedGroup.getSequences().get(1));
478 assertSame(cdna.getSequenceAt(2), mappedGroup.getSequences().get(2));
479 assertEquals(3, mappedGroup.getStartRes());
480 assertEquals(5, mappedGroup.getEndRes());
483 * Verify mapping sequence group from dna to protein
486 sg.addSequence(cdna.getSequenceAt(0), false);
487 sg.addSequence(cdna.getSequenceAt(1), false);
488 sg.addSequence(cdna.getSequenceAt(2), false);
489 // select columns 2 and 3 in DNA which span protein columns 0 and 1
492 mappedGroup = MappingUtils.mapSequenceGroup(sg, dnaView, proteinView);
493 assertTrue(mappedGroup.getColourText());
494 assertSame(sg.getIdColour(), mappedGroup.getIdColour());
495 assertSame(sg.getOutlineColour(), mappedGroup.getOutlineColour());
496 assertEquals(3, mappedGroup.getSequences().size());
497 assertSame(protein.getSequenceAt(0), mappedGroup.getSequences().get(0));
498 assertSame(protein.getSequenceAt(1), mappedGroup.getSequences().get(1));
499 assertSame(protein.getSequenceAt(2), mappedGroup.getSequences().get(2));
500 assertEquals(0, mappedGroup.getStartRes());
501 assertEquals(1, mappedGroup.getEndRes());
505 * Test mapping a sequence group made of a sequences/columns region.
507 * @throws IOException
509 @Test(groups ={ "Functional" })
510 public void testMapSequenceGroup_region() throws IOException
513 * Set up gapped dna and protein Seq1/2/3 with mappings (held on the protein
516 AlignmentI cdna = loadAlignment(
517 ">Seq1\nA-CG-GC--AT-CA\n>Seq2\n-TG-AC-AG-T-AT\n>Seq3\n-T--ACG-TAAT-G\n",
519 cdna.setDataset(null);
520 AlignmentI protein = loadAlignment(
521 ">Seq1\n-KA-S\n>Seq2\n--L-QY\n>Seq3\nQ-V-M\n", "FASTA");
522 protein.setDataset(null);
523 AlignedCodonFrame acf = new AlignedCodonFrame();
524 MapList map = new MapList(new int[]
527 for (int seq = 0; seq < 3; seq++)
529 acf.addMap(cdna.getSequenceAt(seq).getDatasetSequence(), protein
530 .getSequenceAt(seq).getDatasetSequence(), map);
532 Set<AlignedCodonFrame> acfList = Collections.singleton(acf);
534 AlignViewportI dnaView = new AlignViewport(cdna);
535 AlignViewportI proteinView = new AlignViewport(protein);
536 protein.setCodonFrames(acfList);
539 * Select Seq1 and Seq2 in the protein, column 1 (K/-). Expect mapped
540 * sequence group to cover Seq1, columns 0-3 (ACG). Because the selection
541 * only includes a gap in Seq2 there is no mappable selection region in the
544 SequenceGroup sg = new SequenceGroup();
545 sg.setColourText(true);
546 sg.setIdColour(Color.GREEN);
547 sg.setOutlineColour(Color.LIGHT_GRAY);
548 sg.addSequence(protein.getSequenceAt(0), false);
549 sg.addSequence(protein.getSequenceAt(1), false);
554 * Verify the mapped sequence group in dna
556 SequenceGroup mappedGroup = MappingUtils.mapSequenceGroup(sg, proteinView, dnaView);
557 assertTrue(mappedGroup.getColourText());
558 assertSame(sg.getIdColour(), mappedGroup.getIdColour());
559 assertSame(sg.getOutlineColour(), mappedGroup.getOutlineColour());
560 assertEquals(1, mappedGroup.getSequences().size());
561 assertSame(cdna.getSequenceAt(0), mappedGroup.getSequences().get(0));
562 // Seq2 in protein has a gap in column 1 - ignored
563 // Seq1 has K which should map to columns 0-3 in Seq1
564 assertEquals(0, mappedGroup.getStartRes());
565 assertEquals(3, mappedGroup.getEndRes());
568 * Now select cols 2-4 in protein. These cover Seq1:AS Seq2:LQ Seq3:VM which
569 * extend over DNA columns 3-12, 1-7, 6-13 respectively, or 1-13 overall.
573 mappedGroup = MappingUtils.mapSequenceGroup(sg, proteinView, dnaView);
574 assertEquals(1, mappedGroup.getStartRes());
575 assertEquals(13, mappedGroup.getEndRes());
578 * Verify mapping sequence group from dna to protein
581 sg.addSequence(cdna.getSequenceAt(0), false);
583 // select columns 4,5 - includes Seq1:codon2 (A) only
586 mappedGroup = MappingUtils.mapSequenceGroup(sg, dnaView, proteinView);
587 assertEquals(2, mappedGroup.getStartRes());
588 assertEquals(2, mappedGroup.getEndRes());
590 // add Seq2 to dna selection cols 4-5 include codons 1 and 2 (LQ)
591 sg.addSequence(cdna.getSequenceAt(1), false);
592 mappedGroup = MappingUtils.mapSequenceGroup(sg, dnaView, proteinView);
593 assertEquals(2, mappedGroup.getStartRes());
594 assertEquals(4, mappedGroup.getEndRes());
596 // add Seq3 to dna selection cols 4-5 include codon 1 (Q)
597 sg.addSequence(cdna.getSequenceAt(2), false);
598 mappedGroup = MappingUtils.mapSequenceGroup(sg, dnaView, proteinView);
599 assertEquals(0, mappedGroup.getStartRes());
600 assertEquals(4, mappedGroup.getEndRes());
603 @Test(groups ={ "Functional" })
604 public void testFindMappingsForSequence()
606 SequenceI seq1 = new Sequence("Seq1", "ABC");
607 SequenceI seq2 = new Sequence("Seq2", "ABC");
608 SequenceI seq3 = new Sequence("Seq3", "ABC");
609 SequenceI seq4 = new Sequence("Seq4", "ABC");
610 seq1.createDatasetSequence();
611 seq2.createDatasetSequence();
612 seq3.createDatasetSequence();
613 seq4.createDatasetSequence();
616 * Create mappings from seq1 to seq2, seq2 to seq1, seq3 to seq1
618 AlignedCodonFrame acf1 = new AlignedCodonFrame();
619 MapList map = new MapList(new int[]
622 acf1.addMap(seq1.getDatasetSequence(), seq2.getDatasetSequence(), map);
623 AlignedCodonFrame acf2 = new AlignedCodonFrame();
624 acf2.addMap(seq2.getDatasetSequence(), seq1.getDatasetSequence(), map);
625 AlignedCodonFrame acf3 = new AlignedCodonFrame();
626 acf3.addMap(seq3.getDatasetSequence(), seq1.getDatasetSequence(), map);
628 Set<AlignedCodonFrame> mappings = new HashSet<AlignedCodonFrame>();
634 * Seq1 has three mappings
636 List<AlignedCodonFrame> result = MappingUtils.findMappingsForSequence(
638 assertEquals(3, result.size());
639 assertTrue(result.contains(acf1));
640 assertTrue(result.contains(acf2));
641 assertTrue(result.contains(acf3));
644 * Seq2 has two mappings
646 result = MappingUtils.findMappingsForSequence(seq2, mappings);
647 assertEquals(2, result.size());
648 assertTrue(result.contains(acf1));
649 assertTrue(result.contains(acf2));
652 * Seq3 has one mapping
654 result = MappingUtils.findMappingsForSequence(seq3, mappings);
655 assertEquals(1, result.size());
656 assertTrue(result.contains(acf3));
659 * Seq4 has no mappings
661 result = MappingUtils.findMappingsForSequence(seq4, mappings);
662 assertEquals(0, result.size());
664 result = MappingUtils.findMappingsForSequence(null, mappings);
665 assertEquals(0, result.size());
667 result = MappingUtils.findMappingsForSequence(seq1, null);
668 assertEquals(0, result.size());
670 result = MappingUtils.findMappingsForSequence(null, null);
671 assertEquals(0, result.size());