Given a matrix with rows corresponding to transcripts and sample-specific GC bias models, bias the count matrix using the bias model.
add_gc_bias(readmat, gcbias, transcripts)
matrix of counts, with rows corresponding to features (transcripts) and columns corresponding to replicates
List of GC bias models to add to readmat. Must have length
equal to the number of columns of
Designed for internal use in
matrix of the same size as
readmat, but with counts for each
replicate biased according to
1 2 3 4 5 6 7 8 9 10 11 12 13
library(Biostrings) fastapath = system.file("extdata", "chr22.fa", package="polyester") numtx = count_transcripts(fastapath) transcripts = readDNAStringSet(fastapath) # create a count matrix: readmat = matrix(20, ncol=10, nrow=numtx) readmat[1:30, 1:5] = 40 # add biases randomly: use built-in bias models set.seed(137) biases = sample(0:7, 10, replace=TRUE) readmat_biased = add_gc_bias(readmat, as.list(biases), transcripts)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.