sim_fq: sim_fq: Performs an experimental series of separation...

Description Usage Arguments Details Value Author(s) Examples

View source: R/simFunctions.R

Description

Writes compressed FASTQ files where sequence sections contain concatenated k-mers which are uniformly distributed in the range of k-mers for given k. The function first writes a batch of randomly FASTQ files containing randomly simulated DNA sequence. In a second step the function repeatedly writes FASTQ files with random DNA sequence where a fraction of the reads is 'contaminated' with given DNA k-mers. In a third step, for each set of simulated and contaminated files, a hierarchical cluster (HC) tree based on DNA k-mers is calculated. For each set of files, the size of the smaller fraction in the first half of the tree is counted (perc). The value can be used as measure for separation capability of the HC algorithm.

Usage

1
2
sim_fq(nRep=2, nContamVec=c(100, 1000), grSize=20, nSeq=1e4,
    k=6, kIndex=1365, pos=20)

Arguments

nRep

numeric. Number of replicates for each combination of each nContamVec value

nContamVec

numeric. Vector with nContam (absolute number of contaminated reads) values.

grSize

numeric. Number FASTQ files in control and contamination group.

nSeq

numeric. Number of reads per FASTQ file.

k

numeric. k value used in fastqq function.

kIndex

numeric. k-mer index of inserted k-mer(s). The k-mer index can be retreaved for a given k-mer with 'kMerIndex'. Default value is 1365 (="CCCCCC").

pos

numeric. Determines at which position in sequence the k-mer is inserted. 1-based (1=first position).

Details

The function is intended to be used as explorative tool (not for routine quality assessment). There are some files written and there will be a lot of output on the terminal. It is therefore recommended to switch to a separate working directory and to run this function on a separate terminal. The function is not exported.

Value

data.frame containing results of the counted perc values for each repetition of the simulation.

Author(s)

Wolfgang Kaisers

Examples

1
2
3
4
kMerIndex("CCCCCC")
## Not run: res <- seqTools:::sim_fq(nRep=2, nContamVec=c(10, 100),
                    grSize=4, nSeq=1e2)
## End(Not run)

seqTools documentation built on Nov. 8, 2020, 5:20 p.m.