Skip to content

Commit

Permalink
Added another long ref check.
Browse files Browse the repository at this point in the history
This checks various boundary locations rather than just +10Gb to all
and also validates fixmates generation of PNEXT and TLEN as well as
samtools sort.
  • Loading branch information
jkbonfield authored and valeriuo committed Oct 30, 2019
1 parent f38fa56 commit 1678d94
Show file tree
Hide file tree
Showing 3 changed files with 134 additions and 0 deletions.
64 changes: 64 additions & 0 deletions test/large_pos/longref3.expected.sam
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
@HD VN:1.4 SO:coordinate
@SQ SN:1 LN:11000000000
@SQ SN:2 LN:11000000000
@CO s1=short templates spanning 1Gb boundies
@CO l1=long templates 3Gb apart
@CO x1=templates crossing chromosomes
p1 99 1 1073741724 66 10M = 1073741924 210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
l1 99 1 1073741725 66 10M = 2073741925 1000000210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
L1 99 1 1073741726 66 10M = 8073741926 7000000210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
x1 97 1 1073741727 66 10M 2 4073741927 0 GAAAAAAAAC * MQ:i:66 MC:Z:10M
p1 147 1 1073741924 66 10M = 1073741724 -210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
l1 147 1 2073741925 66 10M = 1073741725 -1000000210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
p2 99 1 2147483548 66 10M = 2147483748 210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
l2 99 1 2147483549 66 10M = 3147483749 1000000210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
L2 99 1 2147483550 66 10M = 9147483750 7000000210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
x2 97 1 2147483551 66 10M 2 5147483751 0 GAAAAAAAAC * MQ:i:66 MC:Z:10M
p2 147 1 2147483748 66 10M = 2147483548 -210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
l2 147 1 3147483749 66 10M = 2147483549 -1000000210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
p3 99 1 3221225372 66 10M = 3221225572 210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
l3 99 1 3221225373 66 10M = 4221225573 1000000210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
L3 99 1 3221225374 66 10M = 10221225574 7000000210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
x3 97 1 3221225375 66 10M 2 6221225575 0 GAAAAAAAAC * MQ:i:66 MC:Z:10M
p3 147 1 3221225572 66 10M = 3221225372 -210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
l3 147 1 4221225573 66 10M = 3221225373 -1000000210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
p4 99 1 4294967196 66 10M = 4294967396 210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
l4 99 1 4294967197 66 10M = 5294967397 1000000210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
x4 97 1 4294967199 66 10M 2 7294967399 0 GAAAAAAAAC * MQ:i:66 MC:Z:10M
p4 147 1 4294967396 66 10M = 4294967196 -210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
l4 147 1 5294967397 66 10M = 4294967197 -1000000210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
p5 99 1 5368709020 66 10M = 5368709220 210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
l5 99 1 5368709021 66 10M = 6368709221 1000000210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
x5 97 1 5368709023 66 10M 2 8368709223 0 GAAAAAAAAC * MQ:i:66 MC:Z:10M
p5 147 1 5368709220 66 10M = 5368709020 -210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
l5 147 1 6368709221 66 10M = 5368709021 -1000000210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
p6 99 1 6442450844 66 10M = 6442451044 210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
l6 99 1 6442450845 66 10M = 7442451045 1000000210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
x6 97 1 6442450847 66 10M 2 9442451047 0 GAAAAAAAAC * MQ:i:66 MC:Z:10M
p6 147 1 6442451044 66 10M = 6442450844 -210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
l6 147 1 7442451045 66 10M = 6442450845 -1000000210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
p7 99 1 7516192668 66 10M = 7516192868 210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
l7 99 1 7516192669 66 10M = 8516192869 1000000210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
x7 97 1 7516192671 66 10M 2 10516192871 0 GAAAAAAAAC * MQ:i:66 MC:Z:10M
p7 147 1 7516192868 66 10M = 7516192668 -210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
L1 147 1 8073741926 66 10M = 1073741726 -7000000210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
l7 147 1 8516192869 66 10M = 7516192669 -1000000210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
p8 99 1 8589934492 66 10M = 8589934692 210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
l8 99 1 8589934493 66 10M = 9589934693 1000000210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
p8 147 1 8589934692 66 10M = 8589934492 -210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
L2 147 1 9147483750 66 10M = 2147483550 -7000000210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
l8 147 1 9589934693 66 10M = 8589934493 -1000000210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
p9 99 1 9663676316 66 10M = 9663676516 210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
l9 99 1 9663676317 66 10M = 10663676517 1000000210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
p9 147 1 9663676516 66 10M = 9663676316 -210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
L3 147 1 10221225574 66 10M = 3221225374 -7000000210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
l9 147 1 10663676517 66 10M = 9663676317 -1000000210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
p10 99 1 10737418140 66 10M = 10737418340 210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
p10 147 1 10737418340 66 10M = 10737418140 -210 GAAAAAAAAC * MQ:i:66 MC:Z:10M
x1 145 2 4073741927 66 10M 1 1073741727 0 GAAAAAAAAC * MQ:i:66 MC:Z:10M
x2 145 2 5147483751 66 10M 1 2147483551 0 GAAAAAAAAC * MQ:i:66 MC:Z:10M
x3 145 2 6221225575 66 10M 1 3221225375 0 GAAAAAAAAC * MQ:i:66 MC:Z:10M
x4 145 2 7294967399 66 10M 1 4294967199 0 GAAAAAAAAC * MQ:i:66 MC:Z:10M
x5 145 2 8368709223 66 10M 1 5368709023 0 GAAAAAAAAC * MQ:i:66 MC:Z:10M
x6 145 2 9442451047 66 10M 1 6442450847 0 GAAAAAAAAC * MQ:i:66 MC:Z:10M
x7 145 2 10516192871 66 10M 1 7516192671 0 GAAAAAAAAC * MQ:i:66 MC:Z:10M
64 changes: 64 additions & 0 deletions test/large_pos/longref3.sam
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
@HD VN:1.4 SO:unsorted
@SQ SN:1 LN:11000000000
@SQ SN:2 LN:11000000000
@CO s1=short templates spanning 1Gb boundies
@CO l1=long templates 3Gb apart
@CO x1=templates crossing chromosomes
p1 99 1 1073741724 66 10M * 0 0 GAAAAAAAAC *
p1 147 1 1073741924 66 10M * 0 0 GAAAAAAAAC *
p2 99 1 2147483548 66 10M * 0 0 GAAAAAAAAC *
p2 147 1 2147483748 66 10M * 0 0 GAAAAAAAAC *
p3 99 1 3221225372 66 10M * 0 0 GAAAAAAAAC *
p3 147 1 3221225572 66 10M * 0 0 GAAAAAAAAC *
p4 99 1 4294967196 66 10M * 0 0 GAAAAAAAAC *
p4 147 1 4294967396 66 10M * 0 0 GAAAAAAAAC *
p5 99 1 5368709020 66 10M * 0 0 GAAAAAAAAC *
p5 147 1 5368709220 66 10M * 0 0 GAAAAAAAAC *
p6 99 1 6442450844 66 10M * 0 0 GAAAAAAAAC *
p6 147 1 6442451044 66 10M * 0 0 GAAAAAAAAC *
p7 99 1 7516192668 66 10M * 0 0 GAAAAAAAAC *
p7 147 1 7516192868 66 10M * 0 0 GAAAAAAAAC *
p8 99 1 8589934492 66 10M * 0 0 GAAAAAAAAC *
p8 147 1 8589934692 66 10M * 0 0 GAAAAAAAAC *
p9 99 1 9663676316 66 10M * 0 0 GAAAAAAAAC *
p9 147 1 9663676516 66 10M * 0 0 GAAAAAAAAC *
p10 99 1 10737418140 66 10M * 0 0 GAAAAAAAAC *
p10 147 1 10737418340 66 10M * 0 0 GAAAAAAAAC *
l1 99 1 1073741725 66 10M * 0 0 GAAAAAAAAC *
l1 147 1 2073741925 66 10M * 0 0 GAAAAAAAAC *
l2 99 1 2147483549 66 10M * 0 0 GAAAAAAAAC *
l2 147 1 3147483749 66 10M * 0 0 GAAAAAAAAC *
l3 99 1 3221225373 66 10M * 0 0 GAAAAAAAAC *
l3 147 1 4221225573 66 10M * 0 0 GAAAAAAAAC *
l4 99 1 4294967197 66 10M * 0 0 GAAAAAAAAC *
l4 147 1 5294967397 66 10M * 0 0 GAAAAAAAAC *
l5 99 1 5368709021 66 10M * 0 0 GAAAAAAAAC *
l5 147 1 6368709221 66 10M * 0 0 GAAAAAAAAC *
l6 99 1 6442450845 66 10M * 0 0 GAAAAAAAAC *
l6 147 1 7442451045 66 10M * 0 0 GAAAAAAAAC *
l7 99 1 7516192669 66 10M * 0 0 GAAAAAAAAC *
l7 147 1 8516192869 66 10M * 0 0 GAAAAAAAAC *
l8 99 1 8589934493 66 10M * 0 0 GAAAAAAAAC *
l8 147 1 9589934693 66 10M * 0 0 GAAAAAAAAC *
l9 99 1 9663676317 66 10M * 0 0 GAAAAAAAAC *
l9 147 1 10663676517 66 10M * 0 0 GAAAAAAAAC *
L1 99 1 1073741726 66 10M * 0 0 GAAAAAAAAC *
L1 147 1 8073741926 66 10M * 0 0 GAAAAAAAAC *
L2 99 1 2147483550 66 10M * 0 0 GAAAAAAAAC *
L2 147 1 9147483750 66 10M * 0 0 GAAAAAAAAC *
L3 99 1 3221225374 66 10M * 0 0 GAAAAAAAAC *
L3 147 1 10221225574 66 10M * 0 0 GAAAAAAAAC *
x1 97 1 1073741727 66 10M * 0 0 GAAAAAAAAC *
x1 145 2 4073741927 66 10M * 0 0 GAAAAAAAAC *
x2 97 1 2147483551 66 10M * 0 0 GAAAAAAAAC *
x2 145 2 5147483751 66 10M * 0 0 GAAAAAAAAC *
x3 97 1 3221225375 66 10M * 0 0 GAAAAAAAAC *
x3 145 2 6221225575 66 10M * 0 0 GAAAAAAAAC *
x4 97 1 4294967199 66 10M * 0 0 GAAAAAAAAC *
x4 145 2 7294967399 66 10M * 0 0 GAAAAAAAAC *
x5 97 1 5368709023 66 10M * 0 0 GAAAAAAAAC *
x5 145 2 8368709223 66 10M * 0 0 GAAAAAAAAC *
x6 97 1 6442450847 66 10M * 0 0 GAAAAAAAAC *
x6 145 2 9442451047 66 10M * 0 0 GAAAAAAAAC *
x7 97 1 7516192671 66 10M * 0 0 GAAAAAAAAC *
x7 145 2 10516192871 66 10M * 0 0 GAAAAAAAAC *
6 changes: 6 additions & 0 deletions test/test.pl
Original file line number Diff line number Diff line change
Expand Up @@ -2494,6 +2494,12 @@ sub test_large_positions
# tview
test_cmd($opts, out => 'large_pos/tview.expected.out',
cmd => "$$opts{bin}/samtools tview -d T -p CHROMOSOME_I:10000000000 $longref");

# Sort and fixmates
test_cmd($opts, out => 'large_pos/longref3.expected.sam',
cmd => "$$opts{bin}/samtools sort -O sam --no-PG -n test/large_pos/longref3.sam |
$$opts{bin}/samtools fixmate -O sam --no-PG - - |
$$opts{bin}/samtools sort -O sam --no-PG");
}

# Test samtools cat.
Expand Down

0 comments on commit 1678d94

Please sign in to comment.