plotWSAFvsPLAF {DEploid.utils}R Documentation

Plot WSAF vs PLAF

Description

Plot allele frequencies within sample against population level.

Usage

plotWSAFvsPLAF(
  plaf,
  obsWSAF,
  expWSAF = c(),
  potentialOutliers = c(),
  title = "WSAF vs PLAF",
  cex.lab = 1,
  cex.main = 1,
  cex.axis = 1
)

Arguments

plaf

Numeric array of population level allele frequency.

obsWSAF

Numeric array of observed altenative allele frequencies within sample.

expWSAF

Numeric array of expected WSAF from model.

potentialOutliers

Potential outliers

title

Figure title, "WSAF vs PLAF" by default

cex.lab

Label size.

cex.main

Title size.

cex.axis

Axis text size.

Value

No return value called for side effects

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)
plafFile <- system.file("extdata", "labStrains.test.PLAF.txt", package = "DEploid.utils")
plaf <- extractPLAF(plafFile)
plotWSAFvsPLAF(plaf, obsWSAF)

# 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)
plafFile <- system.file("extdata", "labStrains.test.PLAF.txt", package = "DEploid.utils")
plaf <- extractPLAF(plafFile)
plotWSAFvsPLAF(plaf, obsWSAF)


[Package DEploid.utils version 0.0.1 Index]