bf2Vcf: Function to create a 'VCF' object with variant calls from an...

Description Usage Arguments Value Note Author(s)

View source: R/shearwater-functions.R

Description

This function thresholds the Bayes factors computed by the shearwater algorithm and creates a VCF object as output.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
bf2Vcf(
  BF,
  counts,
  regions,
  samples = 1:nrow(counts),
  err = NULL,
  mu = NULL,
  cutoff = 0.05,
  prior = 0.5,
  mvcf = TRUE
)

Arguments

BF

array of Bayes factors from bbb.

counts

array of counts from loadAllData.

regions

GRanges with the regions corresponding to counts and BF.

samples

vector of samples names.

err

Optional matrix of error rates, otherwise recomputed from counts.

mu

Optional matrix of relative frequencies, otherwise recomputed from counts.

cutoff

Cutoff for the posterior artifact probability below which a variant is considered to be true (default = 0.05)

prior

matrix of prior probabilities for finding a true call, typically from makePrior. Alternatively a single fixed number.

mvcf

boolean flag, if TRUE compute a large VCF with as many genotype columns as samples. Default TRUE. Otherwise use duplicate rows and only one genotype column. The sample is then provided by the info:PD field. Can be inefficient for large sample sizes.

Value

A VCF object

Note

Experimental code, subject to changes

Author(s)

mg14


deepSNV documentation built on Nov. 8, 2020, 8:01 p.m.