Description Usage Arguments Value Author(s) Examples
View source: R/splitDVDreads.R
The function does the following:
Selects DVD readsThis is done using FilterBACreads
Split the read sequence in DV and VDBased on vector alignment, split the read sequence in DV and VD
Filter based on sizeKeep only the split reads with a DNA fragment that is at least MinDNAlength
bp long
reverse complement reads on minus strandstrand is determined based on vector alignment
Return the split readsThe split reads are returned as a DNAString object
By default, if alignemnt to the host genome is provided in the ReadClass
object (column HostAlign
),
then the selected DVD reads are selected to not show any significant alignment to the host genome
1 2 3 4 5 6 7 8 |
ReadClass |
Either a tibble obtained with the |
blastvec |
Either a table imported with |
FastaFile |
Either a |
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 |
MinDNAlength |
Integer. Minimum length of the DNA fragment to keep the reads in the results |
A list with:
ReadDefinition a DNAStringSet
with the split reads
ReadSequence a GRanges
object with the definition of the DV/VD reads
Note that reads with alignment on the opposite strand of the vector ("-" strand) are automatically reverse complemented If no reads are selected, the function returns NULL and a warning.
Pascal GP Martin
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ## For simplicity (and to limit file size) we only keep the data for 5 pre-selected DVD reads
## Path to file (.rds) created with the AnnotateBACreads function
pathRC <- system.file("extdata", "BAC02_ReadClass.rds", package = "NanoBAC")
RC <- readRDS(pathRC)
selectedReads <- c("BAC02R5572", "BAC02R21438", "BAC02R1152",
"BAC02R20794", "BAC02R6278" )
RC <- RC[RC$ReadName %in% selectedReads,]
## Path to a fasta file containing the sequence of the 5 DVD reads
pathFasta <- system.file("extdata", "BAC02_5DVDreads.fa", package = "NanoBAC")
## Path to the file containing the result from the Blast alignment of the vector on the reads
pathBlast <- system.file("extdata", "BAC02_BlastVector.res", package = "NanoBAC")
## Select DVD reads and split the reads
myDVDreads <- splitDVDreads(ReadClass = RC,
blastvec = pathBlast,
FastaFile = pathFasta,
WithGeneA = TRUE,
WithGeneB = TRUE,
MinDNAlength = 35000)
## Read sequences:
myDVDreads$ReadSequence
## Read definitions:
myDVDreads$ReadDefinition
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.