import.gff {rtracklayer}R Documentation

Importing tracks

Description

These are the functions for importing trackSet instances from connections or text.

Usage

import.gff(con, version = c("1", "2", "3"), genome = "hg18")
import.gff1(con, ...)
import.gff2(con, ...)
import.gff3(con, ...)
import.bed(con, wig = FALSE, trackLine = !wig, genome = "hg18", ...)
import.wig(con, genome = "hg18", ...)
import.ucsc(con, subformat = c("auto", "gff1", "wig", "bed"),
            drop = FALSE, ...)

Arguments

con The connection from which to receive the input.
version The version of GFF ("1", "2" or "3").
genome The genome to set on the imported track.
wig Whether the BED lines are expected to be WIG formatted (not for public use).
trackLine Whether the BED data has a track line (it normally does though track lines are not mandatory).
subformat The expected subformat of the UCSC data. If "auto", automatic detection of the subformat is attempted.
drop If TRUE and there is only one track in the UCSC data, return the track instead of a list.
... For import.gff1, import.gff2 and import.gff3: arguments to pass to import.gff. For import.bed and import.wig: arguments to pass to methods. For import.ucsc: arguments to pass on to import.subformat.

Value

An instance of trackSet or one of its subclasses, except for import.ucsc, which returns a trackSets instance, unless there is one track and the drop parameter is TRUE.

Author(s)

Michael Lawrence

References

GFF1 and GFF2
http://www.sanger.ac.uk/Software/formats/GFF
GFF3
http://www.sequenceontology.org/gff3.shtml
BED
http://genome.ucsc.edu/goldenPath/help/customTrack.html#BED
WIG
http://genome.ucsc.edu/goldenPath/help/wiggle.html
UCSC
http://genome.ucsc.edu/goldenPath/help/customTrack.html

See Also

import for the high-level interface to these routines.

Examples

  # import a GFF V2 file
  gff <- import.gff(system.file("tests", "v2.gff", package = "rtracklayer"), version = "2")
  # or
  gff <- import.gff2(system.file("tests", "v2.gff", package = "rtracklayer"))

  # import a WIG file
  wig <- import.wig(system.file("tests", "bed.wig", package = "rtracklayer"))
  # or
  wig <- import.ucsc(system.file("tests", "bed.wig", package = "rtracklayer"),
                     subformat = "wig", drop = TRUE)

[Package rtracklayer version 1.2.2 Index]