simulateRPF {ribosomeProfilingQC} | R Documentation

## Simulation function

### Description

Simulate the RPFs reads in CDS, 5'UTR and 3'UTR

### Usage

    simulateRPF(
      txdb,
      outPath,
      genome,
      samples = 6,
      group1 = c(1, 2, 3),
      group2 = c(4, 5, 6),
      readsPerSample = 1e+06,
      readsLen = 28,
      psite = 13,
      frame0 = 0.9,
      frame1 = 0.05,
      frame2 = 0.05,
      DEregions = GRanges(),
      size = 1,
      sd = 0.02,
      minDElevel = log2(2),
      includeReadsSeq = FALSE
    )

### Arguments

`txdb` | A TxDb object
`outPath` | Output folder for the bam files
`genome` | A BSgenome object
`samples` | Total samples to simulate.
`group1, group2` | Numeric to index the sample groups.
`readsPerSample` | Total reads number per sample.
`readsLen` | Reads length, default 100bp.
`psite` | P-site position. default 13.
`frame0, frame1, frame2` | Percentage of reads distribution in frame0, frame1 and frame2
`DEregions` | The regions with differential reads in exon, utr5 and utr3.
`size` | Dispersion parameter. Must be strictly positive.
`sd` | Standard deviations.
`minDElevel` | Minimal differential level. default: log2(2).
`includeReadsSeq` | logical(1). Include reads sequence or not.

### Value

An invisible list of GAlignments.

### Examples

    library(GenomicFeatures)
    txdb_file <- system.file("extdata", "Biomart_Ensembl_sample.sqlite",
                             package="GenomicFeatures")
    txdb <- loadDb(txdb_file)
    simulateRPF(txdb, samples=1, readsPerSample = 1e3)
    ## Not run:
    cds <- prepareCDS(txdb, withUTR = TRUE)
    cds <- cds[width(cds)>200]
    DEregions <- cds[sample(seq_along(cds), 10)]
    simulateRPF(txdb, samples=6, readsPerSample = 1e5, DEregions=DEregions)

    ## End(Not run)

[Package ribosomeProfilingQC version 1.0.6 Index]