##
## Example :
##
faifile <- system.file("extdata", "ex.fasta", package = "WhopGenome")
faiindexfile <- paste( sep="", faifile, ".fai" ) # construct name of index file
file.remove( faiindexfile ) # remove existing index
fai_build( faifile ) # re-create index
stopifnot( file.exists(faiindexfile) ) # check whether index file exists
print( "All OK" )
Run the code above in your browser using DataLab