generated from ydeng/python-program
Fixed '--only' issue
Some checks failed
ydeng/modvcfsamples/pipeline/head There was a failure building this commit
Some checks failed
ydeng/modvcfsamples/pipeline/head There was a failure building this commit
This commit is contained in:
parent
c25f4ab9a1
commit
9245b3f68e
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@ -12,6 +12,7 @@
|
|||||||
"cSpell.words": [
|
"cSpell.words": [
|
||||||
"bioconda",
|
"bioconda",
|
||||||
"CHROM",
|
"CHROM",
|
||||||
|
"modvcfsamples",
|
||||||
"pytest",
|
"pytest",
|
||||||
"pyvcf",
|
"pyvcf",
|
||||||
"vcfpy",
|
"vcfpy",
|
||||||
|
17
out/test_files_shortened_haploid.vcf
Normal file
17
out/test_files_shortened_haploid.vcf
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
##fileformat=VCFv4.1
|
||||||
|
##fileDate=10122015_22h01m13s
|
||||||
|
##source=SHAPEIT2.v837
|
||||||
|
##log_file=shapeit_10122015_22h01m13s_3f764d75-2fbb-42df-ab75-8c2dfd5731ce.log
|
||||||
|
##FORMAT=<ID=GT,Number=1,Type=String,Description="Phased Genotype">
|
||||||
|
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT Gambian Chinese French Brazilian Nigerian Pakistani English Colombian Indian Japanese
|
||||||
|
1 846808 rs4475691 C T 100 . AC=1276;AN=5008;DP=20368 GT:GQ:DP 1|1|1|1:70:60 0|0|0|0:30:10 0|0|0|0:20:40 ./.:0:0 0|0|0|0:70:60 0|0|0|0:90:30 0|0|0|0:80:70 0|0|0|0:50:80 ./.:0:0 0|0|0|0:100:80
|
||||||
|
1 846854 rs111957712 G A 100 . AC=114;AN=5008;DP=20538 GT:GQ:DP ./.:0:0 0|0|0|0:40:30 0|0|0|0:80:30 0|0|0|0:0:20 0|0|0|0:40:80 0|0|0|0:10:30 ./.:0:0 ./.:0:0 0|0|0|0:70:0 0|0|0|0:90:30
|
||||||
|
1 846864 rs950122 G C 100 . AC=1116;AN=5008;DP=20582 GT:GQ:DP 1|1|1|1:60:0 0|0|0|0:20:0 0|0|0|0:90:70 0|0|0|0:80:50 0|0|0|0:80:30 0|0|0|0:10:80 0|0|0|0:100:20 0|0|0|0:30:40 ./.:0:0 0|0|0|0:30:90
|
||||||
|
1 847228 rs3905286 C T 100 . AC=1215;AN=5008;DP=20731 GT:GQ:DP 1|1|1|1:70:80 0|0|0|0:90:80 0|0|0|0:60:50 0|0|0|0:60:90 0|0|0|0:30:40 0|0|0|0:70:10 0|0|0|0:100:80 0|0|0|0:100:50 0|0|0|0:70:100 0|0|0|0:40:40
|
||||||
|
1 847297 rs11507768 G A 100 . AC=359;AN=5008;DP=20809 GT:GQ:DP 1|1|1|1:0:60 0|0|0|0:10:30 0|0|0|0:80:60 ./.:0:0 0|0|0|0:10:100 0|0|0|0:10:100 ./.:0:0 0|0|0|0:100:40 0|0|0|0:20:20 0|0|0|0:10:0
|
||||||
|
1 847491 rs28407778 G A 100 . AC=1262;AN=5008;DP=16939 GT:GQ:DP 1|1|1|1:0:100 0|0|0|0:70:40 0|0|0|0:0:60 0|0|0|0:90:90 0|0|0|0:90:90 ./.:0:0 0|0|0|0:70:60 0|0|0|0:70:0 0|0|0|0:90:100 0|0|0|0:60:60
|
||||||
|
1 848023 rs144407116 C A 100 . AC=52;AN=5008;DP=22562 GT:GQ:DP 0|0|0|0:10:60 0|0|0|0:20:80 0|0|0|0:20:50 0|0|0|0:20:90 0|0|0|0:90:10 0|0|0|0:70:60 0|0|0|0:40:30 0|0|0|0:60:0 0|0|0|0:40:40 0|0|0|0:10:10
|
||||||
|
1 848090 rs4246505 G A 100 . AC=857;AN=5008;DP=19301 GT:GQ:DP 0|0|0|0:70:70 0|0|0|0:90:30 0|0|0|0:40:10 0|0|0|0:80:20 0|0|0|0:50:50 0|0|0|0:10:30 ./.:0:0 0|0|0|0:20:60 ./.:0:0 0|0|0|0:90:0
|
||||||
|
1 848445 rs4626817 G A 100 . AC=1255;AN=5008;DP=18444 GT:GQ:DP 1|1|1|1:100:40 0|0|0|0:80:90 0|0|0|0:30:100 0|0|0|0:100:60 0|0|0|0:40:90 0|0|0|0:20:30 0|0|0|0:70:100 ./.:0:0 ./.:0:0 0|0|0|0:80:30
|
||||||
|
1 848456 rs11507767 A G 100 . AC=1266;AN=5008;DP=18137 GT:GQ:DP 1|1|1|1:40:30 ./.:0:0 0|0|0|0:60:90 0|0|0|0:60:40 0|0|0|0:100:80 0|0|0|0:50:50 0|0|0|0:0:10 0|0|0|0:60:0 0|0|0|0:100:100 ./.:0:0
|
||||||
|
1 848738 rs3829741 C T 100 . AC=855;AN=5008;DP=16663 GT:GQ:DP 0|0|0|0:50:90 0|0|0|0:50:50 0|0|0|0:50:30 0|0|0|0:60:60 0|0|0|0:80:40 0|0|0|0:50:80 0|0|0|0:0:80 0|0|0|0:0:30 0|0|0|0:10:0 0|0|0|0:70:30
|
@ -8,7 +8,7 @@ def run(vcfs: list[str], only: list[str], gt: Union[int, None], output_dir: str)
|
|||||||
vcf_records, header = sample.get_records_from_vcf(vcf)
|
vcf_records, header = sample.get_records_from_vcf(vcf)
|
||||||
modified_vcfs = vcf_records
|
modified_vcfs = vcf_records
|
||||||
modified_header = header
|
modified_header = header
|
||||||
if len(only) > 1:
|
if len(only) > 0:
|
||||||
modified_vcfs, modified_header = sample.keep_specific_call_data(modified_vcfs, modified_header, *only)
|
modified_vcfs, modified_header = sample.keep_specific_call_data(modified_vcfs, modified_header, *only)
|
||||||
if gt is not None:
|
if gt is not None:
|
||||||
modified_vcfs, modified_header = sample.normalize_gt_to_length(modified_vcfs, modified_header, gt)
|
modified_vcfs, modified_header = sample.normalize_gt_to_length(modified_vcfs, modified_header, gt)
|
||||||
|
Loading…
Reference in New Issue
Block a user