svAF | R Documentation |
normalBam
and retuns the minor allele frequency at these positions in a bam file
specified by tumorBam
.Compute allele frequencies at germline heterozygous positions
Given a set of genomic coordinates this function identifies heterozygous positions in a bam file
given by normalBam
and retuns the minor allele frequency at these positions in a bam file
specified by tumorBam
.
svAF(
normalBam,
tumorBam,
genome,
positions,
region,
n = 50000,
minCovNormal = 20,
minCovTumor = 20,
minMafNormal = 0.3,
minMafTumor = 0,
min_base_quality = 0
)
normalBam |
The path to a bam file |
tumorBam |
The path to a bam file |
genome |
The genome build of |
positions |
A |
region |
If |
n |
The number of positions to use for pileup in |
minCovNormal |
The minimum coverage of a position in |
minCovTumor |
The minimum coverage of a position in |
minMafNormal |
The minimum minor allele frequency (MAF) in order to consider a position
as heterozygous in |
minMafTumor |
The minimum minor allele frequency (MAF) in order to consider a position
as heterozygous in |
min_base_quality |
The minimum Phred score of a base for it to be counted |
If using this function to generate allele frequencies in a tumor
sample at germline heterozygous positions identified in a matched normal sample then
tumorBam
should point to the bam file for the tumor sample and normalBam
should point to the bam file for its matched normal.
A data.frame with the following columns:
Chrom: The chromosome of the event
Pos: The coordinate of the event
RefBase: The base in the reference genome (corresponds to the refUCSC column in dbSNP build 150)
AltBase: The other observed base
Normal.Mut.Count: The coverage of AltBase in normalBam
Normal.Coverage: The distinct coverage of RefBase + AltBase in normalBam
Tumor.Mut.Count: The coverage of AltBase in tumorBam
Tumor.Coverage: The distinct coverage of RefBase + AltBase in tumorBam
Tumor.MAF: The minor allele frequency of the event in tumorBam
extdir <- system.file("extdata", package="svbams")
bam1 <- file.path(extdir, "cgov10t.bam")
bam2 <- file.path(extdir, "cgov44t_revised.bam")
data(snps, package = "svfilters.hg19")
snps <- keepSeqlevels(snps, c("chr3", "chr5"), pruning.mode = "coarse")
## Not run:
svAF(normalBam=bam1,
tumorBam=bam2,
genome="hg19",
positions = snps,
n = 1000,
minCovNormal = 10,
minCovTumor = 10,
minMafNormal = 0.3,
minMafTumor = 0)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.