View source: R/processForSegmentation.R
processForSegmentation | R Documentation |
processForSegmentation
is a wrapper function that reads in BAM
files and carries out binning, filtering, bias correcting, smoothing and
normalizing of the read counts using functions of the QDNAseq
package.
processForSegmentation(bamfiles = NULL, bamnames = NULL,
refSamples = NULL, pathToBams = NULL, ext = "bam", binSize = NULL,
genome = "hg19", outputType = "CNAclinicData",
typeOfPreMadeBins = "SR50", userMadeBins = NULL,
cache = getOption("QDNAseq::cache", FALSE), minMapq = 20,
pairedEnds = NULL, isPaired = NA, isProperPair = NA,
isUnmappedQuery = FALSE, hasUnmappedMate = NA, isMinusStrand = NA,
isMateMinusStrand = NA, isFirstMateRead = NA, isSecondMateRead = NA,
isSecondaryAlignment = NA, isDuplicate = FALSE, residualFilter = TRUE,
blacklistFilter = TRUE, mappabilityFilter = 15,
chromosomesFilter = c("X", "Y", "M", "MT"), spanForLoess = 0.65,
familyForLoess = "symmetric", maxIterForCorrection = 1,
cutoffForCorrection = 4, variablesForCorrection = c("gc", "mappability"),
methodOfCorrection = "ratio", methodOfNormalization = "median",
logTransformForSmoothing = TRUE, skipMedianNormalization = FALSE,
skipOutlierSmoothing = FALSE, saveCountData = FALSE,
filename = "corrected_QDNAseqCopyNumbers")
bamfiles |
A |
bamnames |
An optional |
refSamples |
An optional |
pathToBams |
If |
ext |
Input files extension. Defaults to "bam". |
binSize |
A |
genome |
Genome build used to align sequencing reads.
Currently, CNAclinic only allows |
outputType |
Return an object of class |
typeOfPreMadeBins |
A |
userMadeBins |
An optional data.frame or
an |
cache |
Whether to read and write intermediate cache files, which speeds up subsequent analyses of the same files. Requires packages R.cache and digest (both available on CRAN) to be installed. Defaults to getOption("QDNAseq::cache", FALSE) |
minMapq |
If quality scores exists, the minimum quality score required in order to keep a read (20, default). |
pairedEnds |
A boolean value or vector specifying whether the BAM files contain paired-end data or not. |
isPaired |
A |
isProperPair |
A |
isUnmappedQuery |
A |
hasUnmappedMate |
A |
isMinusStrand |
A |
isMateMinusStrand |
A |
isFirstMateRead |
A |
isSecondMateRead |
A |
isSecondaryAlignment |
A |
isDuplicate |
A |
residualFilter |
Either a |
blacklistFilter |
Either a |
mappabilityFilter |
A |
chromosomesFilter |
A |
spanForLoess |
For @see "stats::loess", the parameter alpha which controls the degree of smoothing. |
familyForLoess |
For @see "stats::loess", if "gaussian" fitting is by least-squares, and if "symmetric" a re-descending M estimator is used with Tukey's biweight function. |
maxIterForCorrection |
An integer(1) specifying the maximum number of
iterations to perform, default is 1. If larger, after the first loess fit, bins
with median residuals larger than |
cutoffForCorrection |
A numeric(1) specifying the number of standard
deviations (as estimated with @see "matrixStats::madDiff") the cutoff for
removal of bins with median residuals larger than the cutoff. Not used if
|
variablesForCorrection |
A character vector specifying which variables to include in the correction. Can be c("gc", "mappability") (the default) or "gc", or "mappability". |
methodOfCorrection |
A |
methodOfNormalization |
A |
logTransformForSmoothing |
If TRUE (default), data will be log2-transformed for smoothing. |
skipMedianNormalization |
Skip this step if TRUE. Recommended when normalizing by refSamples |
skipOutlierSmoothing |
Skip this specific step if TRUE. |
saveCountData |
Save an object of class QDNAseqCopyNumbers after the GC/mappability correction step. default is FALSE |
filename |
Filename to save the before mentioned object. |
Returns an object of class CNAclinicData (default) or QDNAseqCopyNumbers
Dineika Chandrananda
Internally, the following functions of the QDNAseq
package are used: getBinAnnotations
,
binReadCounts
, applyFilters
,
estimateCorrection
, correctBins
,
normalizeBins
, smoothOutlierBins
and
compareToReference
## Not run:
vignette("CNAclinic")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.