-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revamped line matching code to fix problems in gVCF merging
Previously gVCF blocks were correctly split but in some cases FORMAT fields would not be updated at split sites. This commit revamps the line matching code, adds comments and makes it more understandable. Fixes #1891 and revisits #1164
- Loading branch information
Showing
19 changed files
with
346 additions
and
177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
##fileformat=VCFv4.3 | ||
##FILTER=<ID=PASS,Description="All filters passed"> | ||
##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype"> | ||
##contig=<ID=1,assembly=b37,length=249250621> | ||
##reference=file:ref.fa | ||
#CHROM POS ID REF ALT QUAL FILTER INFO | ||
1 3000000 . C CCG . . . | ||
1 3000000 . C CAA . . . | ||
1 3000150 . CC C . . . | ||
1 3000150 . C CTT . . . | ||
1 3000152 . C A . . . | ||
1 3000152 . C CA . . . | ||
1 3000154 . C A . . . | ||
1 3000154 . C T . . . | ||
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT a b | ||
1 3000000 . C CCG . . . GT 0/1 ./. | ||
1 3000000 . C CAA . . . GT ./. 0/1 | ||
1 3000150 . CC C . . . GT 0/1 ./. | ||
1 3000150 . C CTT . . . GT ./. 0/1 | ||
1 3000152 . C A . . . GT 0/1 ./. | ||
1 3000152 . C CA . . . GT ./. 0/1 | ||
1 3000154 . C A . . . GT 0/1 ./. | ||
1 3000154 . C T . . . GT ./. 0/1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
##fileformat=VCFv4.3 | ||
##FILTER=<ID=PASS,Description="All filters passed"> | ||
##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype"> | ||
##contig=<ID=1,assembly=b37,length=249250621> | ||
##reference=file:ref.fa | ||
#CHROM POS ID REF ALT QUAL FILTER INFO | ||
1 3000000 . C CCG,CAA . . . | ||
1 3000150 . CC C,CTTC . . . | ||
1 3000152 . C A . . . | ||
1 3000152 . C CA . . . | ||
1 3000154 . C A,T . . . | ||
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT a b | ||
1 3000000 . C CCG,CAA . . . GT 0/1 0/2 | ||
1 3000150 . CC C,CTTC . . . GT 0/1 0/2 | ||
1 3000152 . C A . . . GT 0/1 ./. | ||
1 3000152 . C CA . . . GT ./. 0/1 | ||
1 3000154 . C A,T . . . GT 0/1 0/2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
##fileformat=VCFv4.3 | ||
##FILTER=<ID=PASS,Description="All filters passed"> | ||
##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype"> | ||
##contig=<ID=1,assembly=b37,length=249250621> | ||
##reference=file:ref.fa | ||
#CHROM POS ID REF ALT QUAL FILTER INFO | ||
1 3000000 . C CCG,CAA . . . | ||
1 3000150 . CC C,CTTC . . . | ||
1 3000152 . C A . . . | ||
1 3000152 . C CA . . . | ||
1 3000154 . C A . . . | ||
1 3000154 . C T . . . | ||
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT a b | ||
1 3000000 . C CCG,CAA . . . GT 0/1 0/2 | ||
1 3000150 . CC C . . . GT 0/1 ./. | ||
1 3000150 . C CTT . . . GT ./. 0/1 | ||
1 3000152 . C A . . . GT 0/1 ./. | ||
1 3000152 . C CA . . . GT ./. 0/1 | ||
1 3000154 . C A,T . . . GT 0/1 0/2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
##fileformat=VCFv4.3 | ||
##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype"> | ||
##contig=<ID=1,assembly=b37,length=249250621> | ||
##reference=file:ref.fa | ||
#CHROM POS ID REF ALT QUAL FILTER INFO | ||
1 3000000 . C CCG . . . | ||
1 3000150 . CC C . . . | ||
1 3000152 . C A . . . | ||
1 3000154 . C A . . . | ||
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT a | ||
1 3000000 . C CCG . . . GT 0/1 | ||
1 3000150 . CC C . . . GT 0/1 | ||
1 3000152 . C A . . . GT 0/1 | ||
1 3000154 . C A . . . GT 0/1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
##fileformat=VCFv4.3 | ||
##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype"> | ||
##contig=<ID=1,assembly=b37,length=249250621> | ||
##reference=file:ref.fa | ||
#CHROM POS ID REF ALT QUAL FILTER INFO | ||
1 3000000 . C CAA . . . | ||
1 3000150 . C CTT . . . | ||
1 3000152 . C CA . . . | ||
1 3000154 . C T . . . | ||
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT b | ||
1 3000000 . C CAA . . . GT 0/1 | ||
1 3000150 . C CTT . . . GT 0/1 | ||
1 3000152 . C CA . . . GT 0/1 | ||
1 3000154 . C T . . . GT 0/1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
##fileformat=VCFv4.2 | ||
##FILTER=<ID=PASS,Description="All filters passed"> | ||
##contig=<ID=chr1,length=248956422> | ||
##contig=<ID=chr2,length=248956422> | ||
##INFO=<ID=END,Number=1,Type=Integer,Description="Stop position of the interval"> | ||
#CHROM POS ID REF ALT QUAL FILTER INFO | ||
chr1 1 . A <*>,C . . END=2 | ||
##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype"> | ||
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT a b | ||
chr1 1 . A <*>,C . . END=2 GT 0/0 0/2 | ||
chr2 1 . A <*> . . END=2 GT 0/0 ./. | ||
chr2 3 . G C,<*>,A . . . GT 0/1 0/3 | ||
chr2 4 . T <*> . . END=6 GT 0/0 0/0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
##fileformat=VCFv4.2 | ||
##FILTER=<ID=PASS,Description="All filters passed"> | ||
##contig=<ID=chr1,length=248956422> | ||
##contig=<ID=chr2,length=248956422> | ||
##INFO=<ID=END,Number=1,Type=Integer,Description="Stop position of the interval"> | ||
#CHROM POS ID REF ALT QUAL FILTER INFO | ||
chr1 1 . A <*> . . END=2 | ||
chr1 1 . A C . . . | ||
##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype"> | ||
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT a b | ||
chr1 1 . A <*>,C . . END=2 GT 0/0 0/2 | ||
chr2 1 . A <*> . . END=2 GT 0/0 ./. | ||
chr2 3 . G C,<*> . . . GT 0/1 ./. | ||
chr2 3 . G A,<*> . . . GT ./. 0/1 | ||
chr2 4 . T <*> . . END=6 GT 0/0 0/0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
##fileformat=VCFv4.2 | ||
##FILTER=<ID=PASS,Description="All filters passed"> | ||
##contig=<ID=chr1,length=248956422> | ||
##contig=<ID=chr2,length=248956422> | ||
##INFO=<ID=END,Number=1,Type=Integer,Description="Stop position of the interval"> | ||
#CHROM POS ID REF ALT QUAL FILTER INFO | ||
chr1 1 . A <*>,C . . . | ||
chr1 2 . C <*> . . . | ||
##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype"> | ||
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT a b | ||
chr1 1 . A <*>,C . . . GT 0/0 0/2 | ||
chr1 2 . C <*> . . . GT 0/0 ./. | ||
chr2 1 . A <*> . . END=2 GT 0/0 ./. | ||
chr2 3 . G C,<*>,A . . . GT 0/1 0/3 | ||
chr2 4 . T <*> . . END=6 GT 0/0 0/0 | ||
chr2 7 . G <*> . . END=8 GT ./. 0/0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
##fileformat=VCFv4.2 | ||
##FILTER=<ID=PASS,Description="All filters passed"> | ||
##contig=<ID=chr1,length=248956422> | ||
##contig=<ID=chr2,length=248956422> | ||
##INFO=<ID=END,Number=1,Type=Integer,Description="Stop position of the interval"> | ||
#CHROM POS ID REF ALT QUAL FILTER INFO | ||
chr1 1 . A C . . . | ||
chr1 2 . C <*> . . . | ||
##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype"> | ||
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT a b | ||
chr1 1 . A <*>,C . . . GT 0/0 0/2 | ||
chr1 2 . C <*> . . . GT 0/0 ./. | ||
chr2 1 . A <*> . . END=2 GT 0/0 ./. | ||
chr2 3 . G C,<*> . . . GT 0/1 ./. | ||
chr2 3 . G A,<*> . . . GT ./. 0/1 | ||
chr2 4 . T <*> . . END=6 GT 0/0 0/0 | ||
chr2 7 . G <*> . . END=8 GT ./. 0/0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
##fileformat=VCFv4.2 | ||
##FILTER=<ID=PASS,Description="All filters passed"> | ||
##contig=<ID=chr1,length=248956422> | ||
##contig=<ID=chr2,length=248956422> | ||
##INFO=<ID=END,Number=1,Type=Integer,Description="Stop position of the interval"> | ||
#CHROM POS ID REF ALT QUAL FILTER INFO | ||
chr1 1 . A <*> . . END=2 | ||
##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype"> | ||
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT a | ||
chr1 1 . A <*> . . END=2 GT 0/0 | ||
chr2 1 . A <*> . . END=2 GT 0/0 | ||
chr2 3 . G C,<*> . . . GT 0/1 | ||
chr2 4 . T <*> . . END=6 GT 0/0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
##fileformat=VCFv4.2 | ||
##FILTER=<ID=PASS,Description="All filters passed"> | ||
##contig=<ID=chr1,length=248956422> | ||
#CHROM POS ID REF ALT QUAL FILTER INFO | ||
chr1 1 . A C . . . | ||
##contig=<ID=chr2,length=248956422> | ||
##INFO=<ID=END,Number=1,Type=Integer,Description="Stop position of the interval"> | ||
##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype"> | ||
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT b | ||
chr1 1 . A C . . . GT 0/1 | ||
chr2 3 . G A,<*> . . . GT 0/1 | ||
chr2 4 . T <*> . . END=8 GT 0/0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
>chr1 | ||
ACGT | ||
>chr2 | ||
ACGTACGT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
##fileformat=VCFv4.2 | ||
##FILTER=<ID=PASS,Description="All filters passed"> | ||
##ALT=<ID=NON_REF,Description="Represents any possible alternative allele at this location"> | ||
##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype"> | ||
##INFO=<ID=END,Number=1,Type=Integer,Description="Stop position of the interval"> | ||
##contig=<ID=chr22,length=10514891> | ||
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT 11 13 | ||
chr22 10510106 . T <NON_REF> . . END=10510112 GT 0/0 ./. | ||
chr22 10510113 . C <NON_REF>,T . . . GT 0/0 2/2 | ||
chr22 10510114 . N <NON_REF> . . END=10510117 GT 0/0 ./. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
##fileformat=VCFv4.2 | ||
##ALT=<ID=NON_REF,Description="Represents any possible alternative allele at this location"> | ||
##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype"> | ||
##INFO=<ID=END,Number=1,Type=Integer,Description="Stop position of the interval"> | ||
##contig=<ID=chr22,length=10514891> | ||
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT 11 | ||
chr22 10510106 . T <NON_REF> . . END=10510117 GT 0/0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
##fileformat=VCFv4.2 | ||
##ALT=<ID=NON_REF,Description="Represents any possible alternative allele at this location"> | ||
##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype"> | ||
##INFO=<ID=END,Number=1,Type=Integer,Description="Stop position of the interval"> | ||
##contig=<ID=chr22,length=10514891> | ||
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT 13 | ||
chr22 10510113 . C T,<NON_REF> . . . GT 1/1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.