Description Usage Arguments Details Value Author(s) Examples
This function implements a simple paired variant calling strategy based on the fisher test
1 | callVariantsPairedFisher(data, sampledata, pValCutOff = 0.05, minCoverage = 5, mergeDels = TRUE, mergeAggregator = mean)
|
data |
A |
sampledata |
A |
pValCutOff |
Maximum allowed p-Value for the fisher test on contingency matrix |
minCoverage |
Required coverage in both sample for a call to be made |
mergeDels |
Boolean flag specifying whether adjacent deletions should be merged |
mergeAggregator |
Which function to use for aggregating the values associated with adjacent deletions that are being merged |
data
is a list which has to at least contain the
Counts
, Coverages
and Reference
datasets. This list will usually be
generated by a call to the h5dapply
function in which the tally
file, chromosome, datasets and regions within the datasets would be
specified. See h5dapply
for specifics.
callVariantsPairedFisher
implements a simple pairwise variant
callign approach based on using the fisher.test
on the following contingency matrix:
caseSupport | caseCoverage - caseSupport |
conttrolSupport | controlCoverage - controlSupport |
The results are filtered by pValCutOff
and minCoverage
.
The return value is a data.frame
with the following slots:
Chrom |
The chromosome the potential variant is on |
Start |
The starting position of the variant |
End |
The end position of the variant |
Sample |
The |
refAllele |
The reference allele |
altAllele |
The alternate allele |
caseCount |
Support for the variant in the |
caseCoverage |
Coverage of the variant position in the |
controlCount |
Support for the variant in the |
controlCoverage |
Coverage of the variant position in the |
pValue |
The |
Paul Pyl
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | library(h5vc) # loading library
tallyFile <- system.file( "extdata", "example.tally.hfs5", package = "h5vcData" )
sampleData <- getSampleData( tallyFile, "/ExampleStudy/16" )
position <- 29979629
windowsize <- 2000
vars <- h5dapply( # Calling Variants
filename = tallyFile,
group = "/ExampleStudy/16",
blocksize = 1000,
FUN = callVariantsPairedFisher,
sampledata = sampleData,
pValCutOff = 0.1,
names = c("Coverages", "Counts", "Reference"),
range = c(position - windowsize, position + windowsize),
verbose = TRUE
)
vars <- do.call(rbind, vars)
vars
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.