Description Usage Arguments Value Author(s) Examples
View source: R/readXStringColumns.R
This function allows short read data components such as DNA sequence,
quality scores, and read names to be read in to XStringSet
(e.g., DNAStringSet, BStringSet) objects. One or several
files of identical layout can be specified.
1 2 3 4 |
dirPath |
A character vector giving the directory path (relative or absolute) of files to be read. |
pattern |
The ( |
colClasses |
A list of length equal to the number of columns in
a file. Columns with corresponding |
nrows |
A length 1 integer vector describing the maximum number
of |
skip |
A length 1 integer vector describing how many lines to skip at the start of each file. |
sep |
A length 1 character vector describing the column separator. |
header |
A length 1 logical vector indicating whether files include a header line identifying columns. If present, the header of the first file is used to name the returned values. |
comment.char |
A length 1 character vector, with a single character that, when appearing at the start of a line, indicates that the entire line should be ignored. Currently there is no way to use comment characters in other than the first position of a line. |
A list, with each element containing an XStringSet object of
the type corresponding to the non-NULL elements of colClasses.
Martin Morgan <mtmorgan@fhcrc.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## valid character strings for colClasses
names(slot(getClass("XString"), "subclasses"))
dirPath <- system.file('extdata', 'maq', package='ShortRead')
colClasses <- rep(list(NULL), 16)
colClasses[c(1, 15, 16)] <- c("BString", "DNAString", "BString")
## read one file
readXStringColumns(dirPath, "out.aln.1.txt", colClasses=colClasses)
## read all files into a single object for each column
res <- readXStringColumns(dirPath, colClasses=colClasses)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.