public final class FastaSequenceIndexCreator
extends java.lang.Object
FastaSequenceIndex.| Modifier and Type | Method and Description |
|---|---|
static FastaSequenceIndex |
buildFromFasta(java.nio.file.Path fastaFile)
Builds a FastaSequenceIndex on the fly from a FASTA file.
|
static void |
create(java.nio.file.Path fastaFile,
boolean overwrite)
Creates a FASTA .fai index for the provided FASTA.
|
public static void create(java.nio.file.Path fastaFile,
boolean overwrite)
throws java.io.IOException
fastaFile - the file to build the index from.overwrite - if the .fai index already exists override it if true; otherwise, throws a SAMException.SAMException - if the fai file already exists or the file is malformed.java.io.IOException - if an IO error occurs.public static FastaSequenceIndex buildFromFasta(java.nio.file.Path fastaFile) throws java.io.IOException
Note: this also allows to create an index for a compressed file, but does not generate the
.gzi index required for use it with samtools. To generate that index, use
GZIIndex.buildIndex(Path).
fastaFile - the FASTA file.SAMException - for formatting errors.java.io.IOException - if an IO error occurs.