R/tabix.R

Defines functions tabix_open tabix_close tabix_reopen tabix_getregion tabix_restartregion tabix_setregion tabix_readraw tabix_read tabix_build

Documented in tabix_build tabix_close tabix_getregion tabix_open tabix_read tabix_readraw tabix_reopen tabix_restartregion tabix_setregion

###
###
###		Access to any-format tabix-indexed files
###
###
###
###
###


##
##	Tabix : file
##
tabix_open <- function( filename )	.Call("tabix_open",filename,PACKAGE="WhopGenome" )
tabix_close <- function( tabfh )	.Call("tabix_close",tabfh,PACKAGE="WhopGenome" )
tabix_reopen <- function( tabfh )	.Call("tabix_reopen",tabfh,PACKAGE="WhopGenome" )

##
##	Tabix : regions
##
tabix_getregion <- function( tabfh )	.Call("tabix_getRegion",tabfh,PACKAGE="WhopGenome" )
tabix_restartregion <- function( tabfh )	.Call("tabix_restartRegion",tabfh,PACKAGE="WhopGenome" )
tabix_setregion <- function( tabfh, tid, beginpos, endpos ) .Call("tabix_setRegion",tabfh,tid,beginpos,endpos,PACKAGE="WhopGenome" )


##
##	Tabix : read
##
tabix_readraw <- function( tabfh ) return( .Call("tabix_readLine",tabfh,PACKAGE="WhopGenome") )
tabix_read <- function( tabfh )
{
	ln <- .Call("tabix_readLine",tabfh,PACKAGE="WhopGenome")
	ln <- strsplit(ln,"\t")[[1]]
	flds <- strsplit(ln[9],";")[[1]]
	flds <- unlist( strsplit(flds,"=") )
	return(ln)
}

##
##
##


##
##
##
tabix_build <- function( filename, sc, bc, ec, meta, lineskip ) .Call("tabix_build", filename, sc, bc, ec, meta, lineskip, PACKAGE="WhopGenome")

Try the WhopGenome package in your browser

Any scripts or data that you put into this service are public.

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