Description Usage Arguments Value Examples
kmer counting from fastq or fasta format file and return kmer table
1 | kmer_strm(x, k, n, resfmt)
|
x |
An input fastq file path or DNAStrinset object. |
k |
integer: Length of kmer |
n |
integer: chunk size for splitting fastq data. The default value is 1L for no splitting. |
resfmt |
character: "total" as total k-mer, or "pos" as k-mer contents at read position. |
kmer table or kmer count at position
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Not run:
# fastq which reads are same length
fq <- list.files(system.file("extdata/E-MTAB-1147", package = "ShortRead"), full.names = TRUE)
# k-mer table
kmer_tab <- rskoseq::kmer_strm(fq[1], 7)
# k-mer table with parallel processing
kmer_tab <- rskoseq::kmer_strm(fq[1], 7, 5000)
# k-mer contents at read position
kmer_content <- rskoseq::kmer_strm(fq[1], 7, 5000, "pos")
# A DNAStringset object as input which reads are different length
fa <- ShortRead::readFastq(fq[1]) %>%
ShortRead::trimTails(., k = 2, a = "4", halfwidth = 2) %>%
ShortRead::sread()
res <- rskoseq::kmer_strm(fa, 7, 5000)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.