Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 4 CRAM compliance tests from htslib #1185

Merged
merged 5 commits into from
Oct 5, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/test/java/htsjdk/samtools/CRAMComplianceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,18 @@ public Object[][] getPartialVerificationData() {
{"c1#noseq"}, // unsigned attributes: https://github.com/samtools/htsjdk/issues/499
{"c1#unknown"}, // unsigned attributes: https://github.com/samtools/htsjdk/issues/499
{"ce#5b"}, // reads with no read bases: https://github.com/samtools/htsjdk/issues/509
{"ce#1000"}, // copied from htslib - need to investigate record mismatch
{"ce#tag_depadded"},// reads with no read bases: https://github.com/samtools/htsjdk/issues/509
{"ce#tag_padded"}, // reads with no read bases: https://github.com/samtools/htsjdk/issues/509
{"ce#unmap"}, // unmapped reads with non-zero MAPQ value that is not restored
// https://github.com/samtools/htsjdk/issues/714
{"xx#triplet"}, // the version 2.1 variant of this file has a bad insertSize, which is
// probably residual detritus from https://github.com/samtools/htsjdk/issues/364
{"xx#minimal"}, // cigar string "5H0M5H" is restored as "10H"
// https://github.com/samtools/htsjdk/issues/713
{"xx#repeated"}, // copied from htslib - need to investigate record mismatch
{"xx#tlen"}, // copied from htslib - need to investigate record mismatch
{"xx#tlen2"}, // copied from htslib - need to investigate record mismatch
{"xx#triplet"}, // the version 2.1 variant of this file has a bad insertSize, which is
// probably residual detritus from https://github.com/samtools/htsjdk/issues/364
};
}

Expand Down
Binary file not shown.
Binary file not shown.
1,005 changes: 1,005 additions & 0 deletions src/test/resources/htsjdk/samtools/cram/ce#1000.sam

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
7 changes: 7 additions & 0 deletions src/test/resources/htsjdk/samtools/cram/xx#repeated.sam
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@SQ SN:xx LN:20
S 67 xx 1 1 10M = 11 20 AAAAAAAAAA **********
S 131 xx 11 1 10M = 1 -20 TTTTTTTTTT **********
S 67 xx 1 1 10M = 11 20 AAAAAAAAAA **********
S 131 xx 11 1 10M = 1 -20 TTTTTTTTTT **********
S 67 xx 1 1 10M = 11 20 AAAAAAAAAA **********
S 131 xx 11 1 10M = 1 -20 TTTTTTTTTT **********
Binary file modified src/test/resources/htsjdk/samtools/cram/xx#tlen.2.1.cram
Binary file not shown.
Binary file modified src/test/resources/htsjdk/samtools/cram/xx#tlen.3.0.cram
Binary file not shown.
34 changes: 34 additions & 0 deletions src/test/resources/htsjdk/samtools/cram/xx#tlen.sam
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
@CO xx has been encoded using the SAM spec; leftmost to rightmost
@CO yy has been encoded using bwa/picard methods; 5' to 3'
@CO
@CO 00000000011111111112
@CO 12345678901234567890
@CO AAAAAAAAAATTTTTTTTTT
@CO 1>>>> <<<<2 x1
@CO
@CO 1>>>> x2
@CO <<<<2
@CO
@CO 1>>>> x3 (7..15 vs 10..11)
@CO <<<<2
@CO
@CO <<<<2 1>>>> x4 (1..20 vs 16..5)
@CO
@SQ SN:xx LN:20
@SQ SN:yy LN:20
x1 99 xx 1 1 5M = 16 20 AAAAA *****
x1 147 xx 16 1 5M = 1 -20 TTTTT *****
x2 99 xx 7 1 5M = 10 8 AAAAT *****
x2 147 xx 10 1 5M = 7 -8 ATTTT *****
x3 147 xx 7 1 5M = 10 8 AAAAT *****
x3 99 xx 10 1 5M = 7 -8 ATTTT *****
x4 147 xx 1 1 5M = 16 20 AAAAA *****
x4 99 xx 16 1 5M = 1 -20 TTTTT *****
y1 99 yy 1 1 5M = 16 20 AAAAA *****
y1 147 yy 16 1 5M = 1 -20 TTTTT *****
y2 99 yy 7 1 5M = 10 8 AAAAT *****
y2 147 yy 10 1 5M = 7 -8 ATTTT *****
y3 147 yy 7 1 5M = 10 -2 AAAAT *****
y3 99 yy 10 1 5M = 7 2 ATTTT *****
y4 147 yy 1 1 5M = 16 10 AAAAA *****
y4 99 yy 16 1 5M = 1 -10 TTTTT *****
Binary file modified src/test/resources/htsjdk/samtools/cram/xx#tlen2.2.1.cram
Binary file not shown.
Binary file modified src/test/resources/htsjdk/samtools/cram/xx#tlen2.3.0.cram
Binary file not shown.
36 changes: 36 additions & 0 deletions src/test/resources/htsjdk/samtools/cram/xx#tlen2.sam
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
@CO As per xx#tlen.sam but every read is unsorted with partner
@CO
@CO xx has been encoded using the SAM spec; leftmost to rightmost
@CO yy has been encoded using bwa/picard methods; 5' to 3'
@CO
@CO 00000000011111111112
@CO 12345678901234567890
@CO AAAAAAAAAATTTTTTTTTT
@CO 1>>>> <<<<2 x1
@CO
@CO 1>>>> x2
@CO <<<<2
@CO
@CO 1>>>> x3 (7..15 vs 10..11)
@CO <<<<2
@CO
@CO <<<<2 1>>>> x4 (1..20 vs 16..5)
@CO
@SQ SN:xx LN:20
@SQ SN:yy LN:20
x1 147 xx 16 1 5M = 1 -20 TTTTT *****
x1 99 xx 1 1 5M = 16 20 AAAAA *****
x2 147 xx 10 1 5M = 7 -8 ATTTT *****
x2 99 xx 7 1 5M = 10 8 AAAAT *****
x3 99 xx 10 1 5M = 7 -8 ATTTT *****
x3 147 xx 7 1 5M = 10 8 AAAAT *****
x4 99 xx 16 1 5M = 1 -20 TTTTT *****
x4 147 xx 1 1 5M = 16 20 AAAAA *****
y1 147 yy 16 1 5M = 1 -20 TTTTT *****
y1 99 yy 1 1 5M = 16 20 AAAAA *****
y2 147 yy 10 1 5M = 7 -8 ATTTT *****
y2 99 yy 7 1 5M = 10 8 AAAAT *****
y3 99 yy 10 1 5M = 7 2 ATTTT *****
y3 147 yy 7 1 5M = 10 -2 AAAAT *****
y4 99 yy 16 1 5M = 1 -10 TTTTT *****
y4 147 yy 1 1 5M = 16 10 AAAAA *****