Description Usage Arguments Value Author(s) Examples
This function generates path counts and bam files with simulated paired end reads according to given read start distribution, fragment length distribution and gene and variant expressions.
1 2 |
islandid |
Island ID's from the genomeDB object to simulate reads |
nSimReads |
Named numeric vector with number of fragments to simulate in each island. |
pis |
Named numeric vector with relative expression of transcripts. Expressions add up to one for each island to simulate. |
rl |
Read length |
seed |
Seed of the random numbers generator |
writeBam |
Set to 1 to generate bam files with the simulated reads |
distrs |
Object of class 'readDistrs' with read start and fragment length distributions |
genomeDB |
Object of class 'annotatedGenome' with the genome to genererate reads from |
repSims |
Set to TRUE to return relative read starts and fragment lengths from the simulation |
bamFile |
Name of the bam file to write reads to. Must end with '.bam' |
stranded |
Set to TRUE to preserve gene strand when generating reads. The 'XS' tag will be added to reads in the bam file and the returned 'pc' object will be stranded |
verbose |
Set to |
chr |
Characters vector with chromosomes to simulate. Defaults to whole genome simulations. |
mc.cores |
Number of cores to use in function |
Nsim |
Numerical vector with the number of reads simulated for each island. |
pc |
Object of class 'pathCounts' with simulated path counts |
sims |
Only if 'repSims' is set to TRUE. List with vectors of length 'n' with the following elements: -'varl': Length of variant for corresponding read -'st' Start of fragment relative to variant start (not in genomic coordinates) -len:Fragment length -'strand':Strand of gene for simulated read |
Camille Stephan-Otto Attolini
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | data(hg19DB)
data(K562.r1l1)
distrs <- getDistrs(hg19DB,bam=K562.r1l1,readLength=75)
islandid <- c('10319','463')
txs <- unlist(lapply(hg19DB@transcripts[islandid], names))
pis <- vector(mode='numeric', length=length(txs))
npis <- sapply(hg19DB@transcripts[islandid],length)
pis[1:npis[1]] <- rep(1/npis[1],npis[1])
pis[-1:-npis[1]] <- rep(1/npis[2],npis[2])
names(pis) <- txs
nSimReads <- c(100, 100)
names(nSimReads) <- islandid
simpc <- simReads(islandid=islandid, nSimReads=nSimReads, pis=pis,
rl=75, repSims=TRUE, seed=1, writeBam=FALSE, distrs=distrs,genomeDB=hg19DB)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.