Description Usage Arguments Value Note Author(s) References See Also Examples
Take in the heterozygous sites and coverage information, use different models (normal, monosomy, mitotic trisomy, meiotic trisomy, loss of heterozygosity) to fit the data, and select the model fit the data best according to BIC value and return estimation of the fraction of aneuploid cells.
1 2 3 |
hetero |
A |
coverage |
A |
target_chr |
A |
adapt |
A |
burnin |
A |
nChain |
A |
nStep |
A |
thinSteps |
A |
checkConvergence |
A |
plot |
A |
An S4 object of class MadSeq
containing the posterior
distribution for the selected model, and deltaBIC between five models.
1.If you didn't write normalized coverage into file, please subset the
normalized coverage GRanges
object from the GRangesList
object returned from the normalizeCoverage
funciton.
2. When specify target_chr
, please make sure it consist with the
contig names in your sequencing data, example: "chr1" and "1".
3. If checkConvergence
set to TRUE, the nChain
has to be >2
4. If it shows that your chains are not converged,
helpful options are increasing the adapt and burnin steps.
5. Because the model is an MCMC sampling process, it can take a very long
time to finish. Running in the background or HPC is recommended.
Yu Kong
Martyn Plummer (2016). rjags: Bayesian Graphical Models using
MCMC. R package version 4-6.
https://CRAN.R-project.org/package=rjags
MadSeq
, plotMadSeq
,
plotFraction
, plotMixture
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | ## ------------------------------------------------------------------------
## The following example is for the case that normalized coverage and
## processed heterozygous sites have not been written to files. For more
## examples, please check the documentation.
## ------------------------------------------------------------------------
##------Prepare Heterozygous Sites
## specify the path to the vcf.gz file for the aneuploidy sample
aneuploidy_vcf = system.file("extdata","aneuploidy.vcf.gz",package="MADSEQ")
## specify the path to the bed file containing targeted region
target = system.file("extdata","target.bed",package="MADSEQ")
## prepare heterozygous sites
aneuploidy_hetero = prepareHetero(aneuploidy_vcf,target, writeToFile=FALSE)
##------Prepare Normalized Coverage
## specify the path to the bam file
aneuploidy_bam = system.file("extdata","aneuploidy.bam",package="MADSEQ")
normal_bam = system.file("extdata","normal.bam",package="MADSEQ")
## prepare coverage data for the samples
aneuploidy_cov_gc = prepareCoverageGC(target,aneuploidy_bam,"hg19")
normal_cov_gc = prepareCoverageGC(target,normal_bam,"hg19")
## normalize the coverage
normed = normalizeCoverage(aneuploidy_cov_gc,
control=normal_cov_gc,writeToFile=FALSE)
##------subset normalized coverage GRanges object
aneuploidy_normed_cov = normed[["aneuploidy_cov_gc"]]
## check chromosome18
## (to speed up the example, we only run one chain and less steps here,
## but default settings are recommended in real case)
aneuploidy_chr18 = runMadSeq(aneuploidy_hetero, aneuploidy_normed_cov,
target_chr="chr18", adapt=100, burnin=200,
nChain =1, nStep = 1000, thinSteps=1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.