Description Usage Arguments Value Examples
View source: R/generateStrandModel.R
Create a Strand Model
generateStrandModel Creates a model of a DNA strand in the form of a matrix (data frames are too slow) for further processing/plotting.
1 2 | generateStrandModel(startBase, endBase, fc, chr, strand, scaling = 1000,
updateProgressBar = NULL)
|
startBase |
The starting base pair number |
endBase |
The ending base pair number |
fc |
The featurecounts object from rsubread after counting your alignment |
chr |
Chromosome; Should match Chr in fc |
strand |
+ or - strand to generate models for |
scaling |
scaling factor in how many base pairs should be represented per index (ex. 1000) to reduce computational complexity when simulating physics/plotting |
updateProgressBar |
a function for linking with shiny's progress bar. This will be called if not NULL when progress bar is to be updated (every 1000 processed features) |
A matrix containing the strand model.
1 2 3 4 5 6 7 8 9 10 | ## Not run:
#featureCounts() is from RSubread package; only run this if that is installed
fc <- featureCounts(files=bamFile, annot.ext=annotation, useMetaFeatures=FALSE)
#replace fc with the one loaded from featureCounts if you are using your own data
sm <- generateStrandModel(startBase=1, endBase=195471971,
fc=musCh1fc, chr="chr1", strand="-", scaling=100000)
sm1 <- generateStrandModel(1, 195471971, musCh1fc, "chr1", "+")
sm2 <- generateStrandModel(3000000, 3217000, musCh1fc, "chr1", "-")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.