Skip to contents

Simulates a single-end FASTQ file from a genome and a gene annotation. The distribution of reads is randomly selected following a negative binomial distribution.

Usage

tx_generateSingleEndFASTQ(
  genome,
  geneAnnot,
  readLen,
  libSize,
  fileName,
  TPM = NULL,
  NB_r = 5,
  NB_mu = 500,
  nCores
)

Arguments

genome

list. The full reference genome sequences, as loaded by tx_load_genome() or prepackaged by BSgenome, see ?BSgenome::available.genomes

geneAnnot

GRanges. Gene annotation as loaded by tx_load_bed().

readLen

integer. Length of simulated reads

libSize

integer. Size of simulated FASTQ file

fileName

character. Name of output file.

TPM

numeric. Proportion of reads per gene in gene annotation

NB_r

numeric. Target r dispersion parameter. Bigger values of r tend to generate a normal distribution. See ?stats::rnbinom()

NB_mu

numeric. Target mean of the resulting distribution

nCores

integer. Number of cores to run the function with. Multicore capability not available in Windows OS.

Value

Writes FASTQ fileName