Package: v-tools
vtoolsLittle toolset operating over VCF files. Uses cyvcf2 and cython under
the hood for speed.InstallationPyPIvtools is now on pip! Since the 'vtools' name is already taken by another
package, installingthisvtools requires installing the following:pipinstallv-toolsAfter installation, tools will still be calledvtools-<tool>. Programmatic
access also simply works withimportvtoolsCondacondainstall-cbiocondavtoolsToolsvtools-filterFilter VCF files based on a few criteria. Will output both a filtered VCF
file, and a VCF file containing all the filtered-out variants.Filter criterianamemeaningoptionalNON_CANONICALNon-canonical chromosomeYesINDEX_UNCALLEDIndex uncalled or homozygous referenceYesTOO_HIGH_GONL_AFToo high GonL allele frequencyYesTOO_HIGH_GNOMAD_AFToo high GnomAD allele frequencyYesLOW_GQToo low GQ on index sampleYesDELETED_ALLELEThe only ALT allele is a deleted alleleNoConfigurationConfiguration of filters goes by a little JSON file.
Seeherefor an example.UsageUsage:vtools-filter[OPTIONS]Options:-i,--inputPATHPathtoinputVCFfile[required]-o,--outputPATHPathtooutput(filtered)VCFfile[required]-t,--trashPATHPathtotrashVCFfile[required]-p,--params-filePATHPathtofilterparamsjson[required]--index-sampleTEXTNameofindexsample[required]--immediate-return/--no-immediate-returnImmediatelywritefilterstofileuponhittingonefiltercriterium.Default=True--helpShowthismessageandexit.vtools-statsCollects some general statistics about a VCF file, and writes a json to
stdout.UsageUsage:vtools-stats[OPTIONS]Options:-i,--inputFILEInputVCFfile[required]--helpShowthismessageandexit.vtools-gcoverageCollect coverage metrics over a gVCF file for every exon or every transcript
in a refFlat file. This assumes the input VCF file is at least similar to
GATK's gVCF files. gVCF files are only expected to have one sample; if
your input file contains multiple samples, we simply take the first only.Output is a simple TSV file with the following columnscolumnmeaningexonexon numbergenegene name / symbol / idmean_dpmean DP value over the exonmean_gqmean GQ value over the exon*median_dpmedian DP value over the exonmedian_gqmedian GQ value over the exonperc_at_least_{10, 20, 30, 50, 100}_dpPercentage of exon with DP value over valueperc_at_least_{10, 29, 30, 50, 90}_gqPercentage of exon with GQ value over exontranscripttranscript name / symbol / id*: mean GQ value is computed by first calculating the P-value of all GQ
values, then calculating the mean over these P-values, and lastly
converting this number back to a phred score.UsageUsage:vtools-gcoverage[OPTIONS]Options:-I,--input-gvcfPATHPathtoinputVCFfile[required]-R,--refflat-filePATHPathtorefFlatfile[required]--per-exon/--per-transcriptCollectmetricsperexonorpertranscript--helpShowthismessageandexit.vtools-evaluateEvaluate a VCF file to a baseline VCF file containing true positives.
We only consider variants that are present in both VCF files. This makes
it useful when the two VCF files have been produced by wildly different
technologies. E.g, when comparing a WES VCF file vs a SNP array, this
tool can be quite useful.Output is a simple JSON file listing counts of concordant and discordant
alleles and some other metrics. It is also possible to output the discordant
VCF records.Multisample VCF files are allowed; the samples to be evaluated have to be set
through a CLI argument.Variants from the--call-vcfare filtered to have a Genotype Quality (GQ) of
at least 30 by default. This can be overruled by specifying--min-qual 0.
The optional flag--min-depthcan be used to set the minimum read coverage.UsageUsage:vtools-evaluate[OPTIONS]Options:-c,--call-vcfPATHPathtoVCFwithcallstobeevaluated[required]-p,--positive-vcfPATHPathtoVCFwithknowncalls[required]-cs,--call-samplesTEXTSample(s)incall-vcftoconsider.Maybecalledmultipletimes[required]-ps,--positive-samplesTEXTSample(s)inpositive-vcftoconsider.Maybecalledmultipletimes[required]-s,--statsPATHPathtooutputstatsjsonfile-dc,--discordantPATHPathtooutputgzippeddiscordantvcffile-mq,--min-qualFLOATMinimumqualityofvariantstoconsider-md,--min-depthINTEGERMinimumdepthofvariantstoconsider--helpShowthismessageandexit.LicenseMIT