Description Usage Arguments Details Value Examples
Given a matrix with rows corresponding to transcripts and samplespecific GC bias models, bias the count matrix using the bias model.
1  add_gc_bias(readmat, gcbias, transcripts)

readmat 
matrix of counts, with rows corresponding to features (transcripts) and columns corresponding to replicates 
gcbias 
List of GC bias models to add to readmat. Must have length
equal to the number of columns of 
transcripts 

Designed for internal use in simulate_experiment
functions.
matrix of the same size as readmat
, but with counts for each
replicate biased according to gcbias
.
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 builtin 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.