-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #483 from genomic-medicine-sweden/fp_cnvkit_html
feat: Added an FP-flag to the html report
- Loading branch information
Showing
12 changed files
with
1,095 additions
and
39 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
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
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
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,18 @@ | ||
from pysam import VariantFile | ||
|
||
|
||
def add_fp_header(in_vcf_filename, out_vcf_filename): | ||
variants = VariantFile(in_vcf_filename) | ||
header = variants.header | ||
header.add_meta( | ||
'INFO', items=[('ID', "FP_FLAG"), ('Number', "1"), ('Type', 'String'), ('Description', 'CNV false positive flag')] | ||
) | ||
out_vcf = VariantFile(out_vcf_filename, "w", header=header) | ||
for variant in variants.fetch(): | ||
out_vcf.write(variant) | ||
|
||
|
||
if __name__ == "__main__": | ||
in_vcf_filename = snakemake.input.vcf | ||
out_vcf_filename = snakemake.output.vcf | ||
add_fp_header(in_vcf_filename, out_vcf_filename) |
Oops, something went wrong.