TENxTSV-class: TENxTSV: A class to represent 10x tab separated values files

TENxTSV-classR Documentation

TENxTSV: A class to represent 10x tab separated values files

Description

This class is general purpose for reading in tabular data from the 10x Genomics website with the .tsv file extension. The class also supports compressed files, i.e., those with the .tsv.gz extension.

Usage

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

TENxTSV(resource, compressed = FALSE, ...)

Arguments

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.

...

Parameters to pass to the format-specific method.

resource

character(1) The path to the file

compressed

logical(1) Whether the resource file is compressed (default FALSE)

Details

Typical .tsv files obtained from the 10X website are compressed and contain information relevant to 'barcodes' and 'features'. Currently, the code only supports files such as ⁠features.tsv.*⁠ and ⁠barcodes.tsv.*⁠.

Value

A TENxTSV class object; a tibble for the import method

Functions

  • import(con = TENxTSV, format = ANY, text = ANY): General import method for tsv files from 10x; using readr::read_tsv and returning a tibble representation


LiNk-NY/TENxIO documentation built on May 3, 2024, 11:08 p.m.