Usage
"import"(con, format, text, which = if (is.na(genome)) NULL else as(seqinfoForGenome(genome), "GenomicRanges"), genome = NA, header = TRUE, ...)
"import"(con, format, text, ...)
exportToTabix(object, con, ...)
Arguments
con
For import
, a TabixFile
object;
for exportToTabix
, a string naming the destination file.
object
The object to export. It is coerced to a
data.frame
, written to a tab-separated file, and indexed with
tabix for efficient range-based retrieval of the data using
import
.
format
If any known format, like bed or gff
(or one of their variants), then the appropriate parser is
applied. If any other value, then the tabix header is consulted for
the format. By default, this is taken from the file extension.
which
A range data structure coercible to RangesList
,
like a GRanges
. Only the intervals in the file overlapping the
given ranges are returned. The default is to use the range over the
entire genome given by genome
, if specified.
genome
The identifier of a genome, or NA
if
unknown. Typically, this is a UCSC identifier like hg19. An
attempt will be made to derive the seqinfo
on the return
value using either an installed BSgenome package or UCSC, if network
access is available.
header
If TRUE
, then the header in the indexed file,
which might include a track line, is sent to the parser. Otherwise,
the initial lines are skipped, according to the skip
field in
the tabix index header.
...
Extra arguments to pass to the underlying import routine,
which for non-standard formats is read.table
or
write.table
.