RTLFile-class {rtracklayer} | R Documentation

## RTLFile objects

### Description

A `RTLFile` object is the base class for classes representing files accessible with rtracklayer. It wraps a resource (either a path, URL or connection). We can represent a list of `RTLFile` objects with a `RTLFileList`.

### Accessor Methods

In the code snippets below, `x` represents a `RTLFile` object.

  `path(x)`: Gets the path, as a `character` vector, to the resource represented by the `RTLFile` object, if possible.

  `resource(x)`: Gets the low-level resource, either a character vector (a path or URL) or a connection.

  `fileFormat(x)`: Gets a string identifying the file format. Can also be called directly on a character file path, in which case it uses a heuristic based on the file extension.

### Coercion

  `as.character(x)`: Returns the path of the file as a character vector.

### Related functions

  `FileForFormat(path, format = file_ext(path))`: Determines the file type of `path` and returns a high-level file object such as BamFile, BEDFile, BigWigFile etc..

### Author(s)

Michael Lawrence

### See Also

Implementing classes include: `BigWigFile`, `TwoBitFile`, `BEDFile`, `GFFFile`, and `WIGFile`.

[Package rtracklayer version 1.49.5 Index]