computeObsWSAF {DEploid.utils} | R Documentation |
Compute observed WSAF
Description
Compute observed allele frequency within sample from the allele counts.
Usage
computeObsWSAF(alt, ref)
Arguments
alt |
Numeric array of alternative allele count. |
ref |
Numeric array of reference allele count. |
Value
Numeric array of observed allele frequency within sample.
See Also
histWSAF
for histogram.
Examples
# Example 1
refFile <- system.file("extdata", "PG0390-C.test.ref", package = "DEploid.utils")
altFile <- system.file("extdata", "PG0390-C.test.alt", package = "DEploid.utils")
PG0390CoverageTxt <- extractCoverageFromTxt(refFile, altFile)
obsWSAF <- computeObsWSAF(PG0390CoverageTxt$altCount, PG0390CoverageTxt$refCount)
# Example 2
vcfFile <- system.file("extdata", "PG0390-C.test.vcf.gz", package = "DEploid.utils")
PG0390CoverageVcf <- extractCoverageFromVcf(vcfFile, "PG0390-C")
obsWSAF <- computeObsWSAF(PG0390CoverageVcf$altCount, PG0390CoverageVcf$refCount)
[Package DEploid.utils version 0.0.1 Index]