Closed nroak closed 5 years ago
this should be possible if not, it's a bug.
might be only in latest release.
I will pull the latest release and test. The last error I got was it required either a ped or an alias file. I didn't have either so had to create a fake alias file.
Yeah, I think that was fixed in v0.1.3.
Yes, it works now. I just needed the newer version. Off topic, do you know a way to exclude samples from a multi-sample vcf where all the variants are homozygous reference?
glad to hear it. you can exclude all hom-ref variants with:
bcftools view -c 1
or with slivar using variant.num_het + variant.num_hom_alt > 0
Both these commands along with GATK SelectVariants filter out variants where none of the samples have an alternate allele. What I need to do is exclude samples where none of the variants is alternate allele. Something along these lines, https://gatkforums.broadinstitute.org/gatk/discussion/6500/how-to-get-sample-names-based-on-genotype-from-multi-sample-vcf-file
oh. I would just write a script to do that.
Yeah processed in R. Thanks Brent.
Can Slivar be used for just VCF filtering without using any expressions or gnotate options? Given the speed and ease in filtering on the INFO fields, it might be useful to just use a command like,
~/resources/slivar/slivar expr \ --vcf input.vcf \ --out-vcf out.vcf \ --pass-only \ --info 'variant.call_rate > 0.9 && INFO.gnomAD_genome_ALL < 0.01 && (INFO["ExonicFunc.refGene"]=="nonsynonymous_SNV" || INFO["ExonicFunc.refGene"]=="stopgain" || INFO["ExonicFunc.refGene"]=="frameshift_insertion" || INFO["ExonicFunc.refGene"]=="frameshift_deletion")'