TENxFileList: A list-like representation for TENxFiles
Source:R/TENxFileList-class.R
TENxFileList-class.RdThis class was designed to mainly handle tarballs from
10X Genomics. The typical file extension for these tarballs is .tar.gz.
Usage
# S4 method for class 'TENxFileList'
path(object, ...)
# S4 method for class 'TENxFileList'
decompress(manager, con, ...)
# S4 method for class 'TENxFileList,ANY,ANY'
import(con, format, text, ...)
# S4 method for class 'TENxFileList'
metadata(x, ...)Arguments
- object
An object containing paths. Even though it will typically contain a single path,
objectcan actually contain an arbitrary number of paths.- ...
Additional arguments (not used)
- manager
A
ConnectionManagerinternal instance; currently not used.- con
The connection from which data is loaded or to which data is saved. If this is a
charactervector, it is assumed to be a file name and a corresponding file connection is created and then closed after exporting the object. If it is a BiocFile derivative, the data is loaded from or saved to the underlying resource. If missing, the function will return the output as a character vector, rather than writing to a connection.- format
The format of the output. If missing and
conis a file name, the format is derived from the file extension. This argument is unnecessary whenconis a derivative of BiocFile.- text
If
conis missing, this can be a character vector directly providing the string data to import.- x
An object of class
TENxFile,TENxFileList,TENxMTX,TENxH5,TENxPeaks,TENxTSV, or derivatives
Details
These tarballs usually contain three files:
matrix.mtx.gz- the counts matrixfeatures.tsv.gz- row metadata usually represented asrowDatabarcodes.tsv.gz- column names corresponding to cell barcode identifiers Note that version '2' includesgenes.tsv.gzinstead offeatures.tsv.gzin version '3'.
An additional ref argument can be provided when the file contains
multiple feature_type in the file or "Type" in the rowData. By default,
the first type reported in table() is set as the mainExpName in the
SingleCellExperiment object.
Functions
path(TENxFileList): Obtain file paths for all files in the object as a vectordecompress(TENxFileList): An intermediate method for decompressing (via untar) the contents of a.tar.gzfile listimport(con = TENxFileList, format = ANY, text = ANY): Recursively import files within aTENxFileListmetadata(TENxFileList):metadatamethod forTENxFileListobjects