Browse code

add seqTools package

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/seqTools@95415 bc3139a8-67e5-0310-9ffc-ced21a209358

Herve Pages authored on 13/10/2014 19:02:34
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,54 @@
1
+\name{fastqKmerLocs}
2
+%
3
+\alias{fastqKmerLocs}
4
+%
5
+\title{
6
+fastqKmerLocs function: Counts DNA k-mers position wise from FASTQ files.
7
+}
8
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %
9
+% Description
10
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %
11
+\description{Reads (compressed) FASTQ files and counts for DNA k-mers
12
+    for each position in sequence.}
13
+%
14
+\usage{fastqKmerLocs(filenames, k=4)}
15
+%
16
+\arguments{
17
+    \item{filenames}{Vector of FASTQ file names. Files can be gz compressed.}
18
+    %
19
+    \item{k}{Length of counted DNA k-mers.}
20
+}
21
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %
22
+% Details
23
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %
24
+\details{Maximal allowed value for k is 12.}
25
+\value{\code{list}. The length of the list equals the number of given
26
+    filenames. 
27
+    Contains for each given file a matrix with 4^k rows and 
28
+    (maxSeqLen - k + 1) columns (maxSeqLen= maximum read length).
29
+    The matrix contains for each k-mer and 
30
+    k-mer-start position the counted values.}
31
+%
32
+\references{
33
+Cock PJA, Fields CJ, Goto N, Heuer ML, Rice PM
34
+The sanger FASTQ file format for sequences with quality scores and 
35
+    the Solexa/Illumina FASTQ variants.
36
+Nucleic Acids Research 2010 Vol.38 No.6 1767-1771
37
+}
38
+\author{
39
+Wolfgang Kaisers
40
+}
41
+\note{The static size of the retured k-mer array is 4^k.}
42
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %
43
+% Examples
44
+% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %
45
+\examples{
46
+basedir <- system.file("extdata", package="seqTools")
47
+setwd(basedir)
48
+res <- fastqKmerLocs("test_l10_ATCGN.fq", k=2)
49
+res <- fastqKmerLocs("test_l10_atcg.fq", k=2)
50
+res <- fastqKmerLocs("test_l10_ATCGN.fq", k=2)
51
+res <- fastqKmerLocs("test_l6_multi_line.fq", k=2)
52
+}
53
+\keyword{fastqKmerLocs}
54
+\keyword{kmer}