This function reads the fastq file of an individual, lane or chip and generate the read length distribution to help decide the threshold to cut the reads to a specific length.

reads_length_distribution(
  fq.file,
  parallel.core = parallel::detectCores() - 1,
  with.future = FALSE
)

Arguments

fq.file

(character, path). The path to the fastq file (individal, lane or chip). Default: fq.file = "my-sample.fq.gz".

parallel.core

(integer) Enable parallel execution with the number of threads. Default: parallel.core = parallel::detectCores() - 1.

with.future

(logical) When TRUE will use future package to run the code in parallel. Set parallel.core to the number of physical, not logical, cores. See example below. Default: with.future = FALSE.

Value

The function returns a plot and a tibble with potential reads length thresholds and associated number of reads.

Details

coming soon, just try it in the meantime...

Examples

if (FALSE) { require(ShortRead) reads.length.info <- stackr::reads_length_distribution( fq.file = "my-sample.fq.gz") # with future package to get faster results: require(future) require(listenv) reads.length.info <- stackr::reads_length_distribution( fq.file = "my-sample.fq.gz", with.future = TRUE ) }