Learn R Programming

DEploid (version 0.5.4)

plotWSAFvsPLAF: 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

Index of potential outliers.

title

Figure title, "WSAF vs PLAF" by default

cex.lab

Label size.

cex.main

Title size.

cex.axis

Axis text size.

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

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

Run the code above in your browser using DataLab