R/reads_length_distribution.R
reads_length_distribution.Rd
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
)
(character, path). The path to the fastq file
(individal, lane or chip).
Default: fq.file = "my-sample.fq.gz"
.
(integer) Enable parallel execution with the number of threads.
Default: parallel.core = parallel::detectCores() - 1
.
(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
.
The function returns a plot and a tibble with potential reads length thresholds and associated number of reads.
coming soon, just try it in the meantime...
if (FALSE) { # \dontrun{
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
)
} # }