| 1 |
@sniper |
| 2 |
Feature: VCF for Somatic Sniper |
| 3 |
|
| 4 |
Here we take a VCF line and parse the information given by Somatic Sniper. |
| 5 |
|
| 6 |
At this position the reference contains: AAAGAAAAGAAAAA (12A,2G) |
| 7 |
At this position the tumor contains: AAAAACACAA (8A,2C) |
| 8 |
|
| 9 |
rec.alt contains variants C,G. rec.tumor.bcount reflects the contents of the |
| 10 |
tumor (8A,2C) so rec.tumor.bcount[rec.alt] reflects the actual number of |
| 11 |
variants in the tumor. |
| 12 |
|
| 13 |
The mapping quality in the BAM file is 37/37 and base quality is 55/60 in normal |
| 14 |
and tumor respectively. |
| 15 |
|
| 16 |
For the second scenario: |
| 17 |
|
| 18 |
At this position the reference contains: (15A) |
| 19 |
At this position the tumor contains: AAAAAAAAATATTA (13A, 3T) |
| 20 |
|
| 21 |
Scenario: When parsing a record |
| 22 |
|
| 23 |
Given the somatic sniper vcf line |
| 24 |
""" |
| 25 |
1 27691244 . A C,G . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/2:0/2:14:0,12,0,2:12,0,2,0:14:35:14:14,35:37:37,37:1:. 0/1:0/1:10:0,8,0,2:8,2,0,0:18:35:18:20,51:37:37,37:2:33 |
| 26 |
""" |
| 27 |
When I parse the record |
| 28 |
Then I expect rec.chrom to contain "1" |
| 29 |
Then I expect rec.pos to contain 27691244 |
| 30 |
Then I expect rec.ref to contain "A" |
| 31 |
And I expect rec.alt to contain ["C","G"] |
| 32 |
And I expect rec.tumor.dp to be 10 |
| 33 |
And I expect rec.tumor.dp4 to be [0,8,0,2] |
| 34 |
And I expect rec.tumor.bcount.to_ary to be [8,2,0,0] |
| 35 |
And I expect rec.tumor.bcount[rec.alt] to be [2,0] |
| 36 |
And I expect rec.tumor.bcount["G"] to be 0 |
| 37 |
And I expect rec.tumor.bcount[1] to be 2 |
| 38 |
And I expect rec.tumor.bcount[3] to be 0 |
| 39 |
And I expect rec.tumor.bcount.sum to be 2 |
| 40 |
And I expect rec.tumor.bcount.max to be 2 |
| 41 |
And I expect rec.tumor.bq.to_ary to be [20,51] |
| 42 |
And I expect rec.tumor.bq["G"] to be 51 |
| 43 |
And I expect rec.tumor.bq[1] to be 51 |
| 44 |
And I expect rec.tumor.bq.min to be 20 |
| 45 |
And I expect rec.tumor.bq.max to be 51 |
| 46 |
And I expect rec.tumor.amq.to_ary to be [37,37] |
| 47 |
And I expect rec.tumor.mq to be 37 |
| 48 |
And I expect rec.tumor.ss to be 2 |
| 49 |
And I expect rec.tumor.ssc to be 33 |
| 50 |
And I expect rec.normal.ssc to be nil |
| 51 |
# The following are additional functions |
| 52 |
And I expect rec.call_diff to be [-4,2,-2,0] |
| 53 |
And I expect rec.call_nuc to be "C" |
| 54 |
And I expect rec.call_tumor_count to be 2 |
| 55 |
And I expect rec.call_normal_count to be 0 |
| 56 |
And I expect rec.call_tumor_relative_count to be 1.0 |
| 57 |
|
| 58 |
Given the somatic sniper vcf line |
| 59 |
""" |
| 60 |
1 27686841 . A T . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:15:3,12,0,0:15,0,0,0:66:37:0:25:37:37:0:. 0/1:0/1:16:2,11,0,3:13,0,0,3:30:37:30:34,55:37:37,37:2:37 |
| 61 |
""" |
| 62 |
When I parse the record |
| 63 |
Then I expect rec.chrom to contain "1" |
| 64 |
Then I expect rec.pos to contain 27686841 |
| 65 |
Then I expect rec.ref to contain "A" |
| 66 |
And I expect rec.alt to contain one ["T"] |
| 67 |
And I expect rec.tumor.dp to be 16 |
| 68 |
And I expect rec.tumor.dp4 to be [2,11,0,3] |
| 69 |
And I expect rec.tumor.bcount.to_ary to be [13,0,0,3] |
| 70 |
And I expect rec.tumor.bcount[rec.alt] to be one [3] |
| 71 |
And I expect rec.tumor.bcount["G"] to be 0 |
| 72 |
And I expect rec.tumor.bcount["T"] to be 3 |
| 73 |
And I expect rec.tumor.bcount[1] to be 0 |
| 74 |
And I expect rec.tumor.bcount[3] to be 3 |
| 75 |
And I expect rec.tumor.bcount.sum to be 3 |
| 76 |
And I expect rec.tumor.bcount.max to be 3 |
| 77 |
And I expect rec.tumor.bq.to_ary to be [34,55] |
| 78 |
And I expect rec.tumor.bq["T"] to be 34 |
| 79 |
And I expect rec.tumor.bq[1] to be 55 |
| 80 |
And I expect rec.tumor.bq.min to be 34 |
| 81 |
And I expect rec.tumor.bq.max to be 55 |
| 82 |
And I expect rec.tumor.amq.to_ary to be [37,37] |
| 83 |
And I expect rec.tumor.mq to be 37 |
| 84 |
And I expect rec.tumor.ss to be 2 |
| 85 |
|
| 86 |
|