PureCN (version 1.0.3)

filterVcfBasic: Basic VCF filter function

Description

Function to remove artifacts and low confidence/quality variant calls.

Usage

filterVcfBasic(vcf, tumor.id.in.vcf = NULL, use.somatic.status = TRUE, 
    snp.blacklist = NULL, af.range = c(0.03, 0.97), 
    contamination.cutoff = c(0.05, 0.075), coverage.cutoff = 20, 
    min.supporting.reads = 3, verbose = TRUE)

Arguments

vcf
CollapsedVCF object, read in with the readVcf function from the VariantAnnotation package.
tumor.id.in.vcf
The tumor id in the CollapsedVCF (optional).
use.somatic.status
If somatic status and germline data is available, then use this information to remove non-heterozygous germline SNPs or germline SNPS with biased allelic fractions.
snp.blacklist
CSV file with SNP ids with expected allelic fraction significantly different from 0.5 in diploid genomes. Can be an array of lists. The function createSNPBlacklist can provide appropriate black lists.
af.range
Exclude SNPs with allelic fraction smaller or greater than the two values, respectively.
contamination.cutoff
Count SNPs in dbSNP with allelic fraction smaller than the first value, if found on most chromosomes, remove all with AF smaller than the second value.
coverage.cutoff
Minimum coverage in tumor. Variants with lower coverage are ignored.
min.supporting.reads
Minimum number of reads supporting the alt allele.
verbose

Value

  • A list with elements
  • vcfThe filtered CollapsedVCF object.
  • flagA flag (TRUE/FALSE) if problems were identified.
  • flag_commentA comment describing the flagging.

Examples

Run this code
# This function is typically only called by runAbsolute via the 
# fun.filterVcf and args.filterVcf comments.
library(VariantAnnotation)    
vcf.file <- system.file("extdata", "example_vcf.vcf", package="PureCN")
vcf <- readVcf(vcf.file, "hg19")
vcf.filtered <- filterVcfBasic(vcf)

Run the code above in your browser using DataCamp Workspace