TENxFileList-class: TENxFileList: A list-like representation for TENxFiles

TENxFileList-classR Documentation

TENxFileList: A list-like representation for TENxFiles

Description

This class was designed to mainly handle tarballs from 10X Genomics. The typical file extension for these tarballs is .tar.gz.

Usage

## S4 method for signature 'TENxFileList'
path(object, ...)

## S4 method for signature 'TENxFileList'
decompress(manager, con, ...)

## S4 method for signature 'TENxFileList,ANY,ANY'
import(con, format, text, ...)

## S4 method for signature 'TENxFileList'
metadata(x, ...)

Arguments

object

An object containing paths. Even though it will typically contain a single path, object can actually contain an arbitrary number of paths.

...

Additional arguments (not used)

manager

A ConnectionManager internal instance; currently not used.

con

The connection from which data is loaded or to which data is saved. If this is a character vector, 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 con is a file name, the format is derived from the file extension. This argument is unnecessary when con is a derivative of BiocFile.

text

If con is 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:

  1. matrix.mtx.gz - the counts matrix

  2. features.tsv.gz - row metadata usually represented as rowData

  3. barcodes.tsv.gz - column names corresponding to cell barcode identifiers Note that version '2' includes genes.tsv.gz instead of features.tsv.gz in 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.

Value

A TENxFileList class object

Functions

  • path(TENxFileList): Obtain file paths for all files in the object as a vector

  • decompress(TENxFileList): An intermediate method for decompressing (via untar) the contents of a .tar.gz file list

  • import(con = TENxFileList, format = ANY, text = ANY): Recursively import files within a TENxFileList

  • metadata(TENxFileList): metadata method for TENxFileList objects

Slots

listData

list() The data in list format

extension

character() A vector of file extensions for each file

compressed

logical(1) Whether the file is compressed as .tar.gz

version

character(1) The version number of the tarball usually either '2' or '3'


LiNk-NY/TENxIO documentation built on Dec. 6, 2024, 8:38 a.m.