Description Usage Arguments Value Author(s) Examples
View source: R/selectVDVreads.R
The function does the following:
Selects VDV readsThis is done using FilterBACreads
Estimate BAC sizeThe size of the insert sequence is estimated using estimateBACsizeFromVDV
Select VDV reads of the right sizeVDV reads within +/- SizeTolerance
% of the estimated size are selected
Plot VDV read sizeThe plot illustrates the size of all VDV reads and the selection process
By default, if alignment to the host genome is provided in the ReadClass
object (column HostAlign
),
then the selected VDV reads do not align to the host genome.
The function allows the user to exclude reads from the analysis.
1 2 3 4 5 6 7 8 9 10 |
ReadClass |
Either a tibble obtained with the |
SizeTolerance |
A single number in [0,1[.
Reads with a size corresponding to the estimated size +/- |
WithGeneA |
Logical. Should the VDV reads align with GeneA? Default is NULL, i.e. no filtering on GeneA alignment |
WithGeneB |
Logical. Should the VDV reads align with GeneB? Default is NULL, i.e. no filtering on GeneB alignment |
ignoredReads |
(optional) vector of read names that should be ignored. |
MaxClusters |
Integer. Maximum number of clusters to make with VDV reads to estimate the size of the DNA insert. Default to 10 which in our hands works in most situations. |
makePlot |
Logical. Should a plot be produced (and saved in the result) |
plotVar |
Character string. Variable to plot: either |
A list with the following objects:
VDVreadsA tibble with info on VDV reads: name, length, selection by the procedure, cluster
InsertSizeEstimateA list with result from the estimateBACsizeFromVDV
function
if makePlot is TRUE, then the list also contains:
VDVlengthPlotThe plot (ggplot2 object)
PlotTypeThe variable used to make the plot, i.e. the plotVar argument that was used to create the object
xcoordThe x coordinates of the points (obtained using geom_jitter) in order to reproduce the plot easily
Pascal GP Martin
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Path to file (.rds) created with the AnnotateBACreads function
pathRC <- system.file("extdata", "BAC02_ReadClass.rds", package = "NanoBAC")
## Import the data
annotatedReads <- readRDS(pathRC)
## Select VDV reads that contain alignment to GeneA and GeneB
myVDVreads <- selectVDVreads(ReadClass = annotatedReads,
WithGeneA = TRUE,
WithGeneB = TRUE)
## Same but making less clusters and producing a plot on insert length rather than read length
myVDVreads <- selectVDVreads(ReadClass = annotatedReads,
WithGeneA = TRUE,
WithGeneB = TRUE,
MaxClusters = 8,
plotVar = "InsertLength")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.