@Test
  public void testSizeBeforeLoc() {
    GenomeLoc r1 = genomeLocParser.createGenomeLoc(contigOneName, 3, 5);
    GenomeLoc r2 = genomeLocParser.createGenomeLoc(contigOneName, 10, 12);
    GenomeLoc r3 = genomeLocParser.createGenomeLoc(contigOneName, 16, 18);
    mSortedSet.addAll(Arrays.asList(r1, r2, r3));

    testSizeBeforeLocX(2, 0);
    testSizeBeforeLocX(3, 0);
    testSizeBeforeLocX(4, 1);
    testSizeBeforeLocX(5, 2);
    testSizeBeforeLocX(6, 3);

    testSizeBeforeLocX(10, 3);
    testSizeBeforeLocX(11, 4);
    testSizeBeforeLocX(12, 5);
    testSizeBeforeLocX(13, 6);
    testSizeBeforeLocX(15, 6);

    testSizeBeforeLocX(16, 6);
    testSizeBeforeLocX(17, 7);
    testSizeBeforeLocX(18, 8);
    testSizeBeforeLocX(19, 9);
    testSizeBeforeLocX(50, 9);
    testSizeBeforeLocX(50, (int) mSortedSet.coveredSize());
  }
示例#2
0
 /**
  * Create a sorted genome location set from a list of GenomeLocs.
  *
  * @param locs the list<GenomeLoc>
  * @return the sorted genome loc list
  */
 public static GenomeLocSortedSet createSetFromList(GenomeLocParser parser, List<GenomeLoc> locs) {
   GenomeLocSortedSet set = new GenomeLocSortedSet(parser);
   set.addAll(locs);
   return set;
 }