fai_query2( faifh, regionstring )
fai_query3( faifh, regionstring , resultstring )
Use .Call("FAI_query2", faifh, regionstring ) to eliminate the overhead of using the R wrapper function. Use this function in combination with a while( ( seq = fai_query2(F,region) ) != FALSE ) if you need to loop. Only the string "FALSE" has a boolean value of FALSE, all others have a boolean value of TRUE.
##
## Example :
##
faifile <- system.file("extdata", "ex.fasta", package = "WhopGenome")
faifh <- fai_open( faifile )
stopifnot( faifh != NULL )
result = fai_query2( faifh , "1:100-200" )
if( result != FALSE )
{
print( result )
}
fai_close( faifh )
Run the code above in your browser using DataLab