Thank you, that seemed to do the trick! I'll have to brush up on my regex :)
• 0 views
•
link
Hi all,
I am trying to subset my extremely large vcf file of around 11,000 samples based on the string "pathogenic". I tried the following:
bcftools view -i 'CSQ="Pathogenic"' -o PathOnlyClinVar.vcf Merged.vcf.gz
which I believe should have worked, but it only returned the header without any other information. I mainly want to safely subset my vcf file with ClinVar information that contains the string "Pathogenic".
Thanks!
https://samtools.github.io/bcftools/bcftools.html#expressions
regex operators "~" and its negation "!~". The expressions are case sensitive unless "/i" is added.
bcftools view -i 'CSQ ~ "Pathogenic"' -o PathOnlyClinVar.vcf Merged.vcf.gz
Thank you, that seemed to do the trick! I'll have to brush up on my regex :)
Log in to answer this question.