tabix_read: Read a line from a tabix_open()'ed file

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/tabix.R

Description

Read a line from a tabix_open()'ed file

Usage

1
2
tabix_read( tabfh )
tabix_readraw( tabfh )

Arguments

tabfh

Tabix file handle as returned by tabix_open

Details

Instead of tabix_readraw() you can use .Call("tabix_readLine", tabfh ) to eliminate the slight overhead of using the R wrapper function.

Value

A line of data from the indexed data file. tabix_read splits the line up into its fields and returns a vector. tabix_readraw returns the line as stored in the file.

Author(s)

Ulrich Wittelsbuerger

See Also

tabix_open

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
##
##	Example : (NOT RUN)
##

print("Opening and reading")
gffgzfile  <- system.file("extdata", "ex.gff3.gz", package = "WhopGenome" )
if( file.exists(gffgzfile) )
{
 gffgzfile
 gffh <- tabix_open( gffgzfile )
 gffh
 stopifnot( !is.null(gffh) )
 tabix_read( gffh )
 tabix_close( gffh )
 gffh
}

WhopGenome documentation built on May 1, 2019, 10:12 p.m.