Learn R Programming

DEploid (version 0.5.4)

computeObsWSAF: Compute observed WSAF

Description

Compute observed allele frequency within sample from the allele counts.

Usage

computeObsWSAF(alt, ref)

Value

Numeric array of observed allele frequency within sample.

Arguments

alt

Numeric array of alternative allele count.

ref

Numeric array of reference allele count.

See Also

histWSAF for histogram.

Examples

Run this code
# Example 1
refFile = system.file("extdata", "PG0390-C.test.ref", package = "DEploid")
altFile = system.file("extdata", "PG0390-C.test.alt", package = "DEploid")
PG0390CoverageT = extractCoverageFromTxt(refFile, altFile)
obsWSAF = computeObsWSAF(PG0390CoverageT$altCount, PG0390CoverageT$refCount)

# Example 2
vcfFile = system.file("extdata", "PG0390-C.test.vcf.gz", package = "DEploid")
PG0390CoverageV = extractCoverageFromVcf(vcfFile)
obsWSAF = computeObsWSAF(PG0390CoverageV$altCount, PG0390CoverageV$refCount)

Run the code above in your browser using DataLab