simfastq_map_error_repeated: Calculation of error rates with repeated sampling

Description Usage Arguments Value Examples

Description

This function simulates paired fastq-files, maps these to the reference genomes and calculates mapping and error rates. The whole procedure is repeated multiple times which yields the absolute value and range of the mapping and error rates.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
simfastq_map_error_repeated(
  file_indices,
  iterations,
  read_counts,
  start_positions_and_read_lengths,
  seed,
  reference_genome_index_bowtie2.directory,
  mapq_filter_threshold,
  threads
)

Arguments

file_indices

Indices of the mapped sam-files belonging to the simulated paired fastq-files

iterations

Number of paired fastq-files to simulate, map and calculate mapping and error rates.

read_counts

If the number of reads are "original", the number of reads generated per virus is identical to the read counts of the sam-file. By specifying the parameter as "density", there is the possibility to change the number of reads generated randomly based on a kernel density estimation of the original number of reads mapped to the species. In the latter case, the number of reads of the mapped species which are to be generated differs slightly from the original distribution.

start_positions_and_read_lengths

If the start positions and read lengths are "original", the start positions and read lengths are taken from the original sam-files so that every read is used exactly once. In contrary, if the parameter setting is "random", the reads are sampled with replacement so that some reads may be used multiple or zero times.

seed

Seed of the random number generator used to simulate paired fastq-files

reference_genome_index_bowtie2.directory

# Prefix (folder) of bowtie2 index files

mapq_filter_threshold

# Reads with a mapping quality below this threshold will be deleted from the sam-files.

threads

Number of threads that are used for mapping

Value

None

Examples

1
2
3
4
5
6
7
library(rChoiceDialogs)
reference_genome_index_bowtie2.directory = rchoose.dir() # Choose prefix (folder) of reference genome bowtie2 index files
my.prefix = gsub("\\\\","/",reference_genome_index_bowtie2.directory)
my.prefix = paste0(my.prefix,"/")
## Not run: simfastq_map_error_repeated ( file_indices = 1 , iterations = 10 , read_counts = "density", start_positions_and_read_lengths = "random" , seed = 42 ,
reference_genome_index_bowtie2.directory = my.prefix , mapq_filter_threshold = 2 , threads = 2 )
## End(Not run)

Moritz-Kohls/virDisco2 documentation built on Feb. 13, 2020, 12:32 a.m.