Learn R Programming

WhopGenome (version 0.9.4)

fai_build: Build a .fai-index for the given FASTA file.

Description

Build a .fai-index for the given FASTA file.

Usage

fai_build( filename )

Arguments

filename
Name of the FASTA file for which an index file should be built.

Value

TRUE if call succeeds, FALSE if it fails.

Details

Use .Call("FAI_build", filename ) to eliminate the overhead of using the R wrapper function.

See Also

fai_open

Examples

Run this code

##
##	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