Introduces random mutations in read sequences given a specified error rate. Useful to simulate read mismapping under given error constrains.

mutateReads(BSgenome = NULL, reads, tes = NULL, paired = NULL,
  n_reads = NULL, outdir = NULL, prefix = "aligned_reads",
  which = GRanges(), error_rate = NULL, seed = 19)

Arguments

BSgenome

BSgenome. BSgenome to query sequences, e.g. Hsapiens.

tes

GRanges. GRanges object containing TE coordinates

outdir

Character. Specifies where to store output fastq files. If NULL (the default), same directory as input bam file.

bam_path

Character. Path to input BAM file.

multi_mapper

Logical. if FALSE (currently only supported), throws reads mapping to multiple position in the genome (NH:i tag).

Value

Returns GRanges object containing seqs column