org.utgenome.format.fasta
Class CompactFASTA
java.lang.Object
org.utgenome.format.fasta.CompactFASTA
public class CompactFASTA
- extends Object
CompactFASTA is a packed FASTA file, supporting random accesses to sub sequences of a specified chromosome.
- Author:
- leo
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PAC_FILE_SUFFIX
public static final String PAC_FILE_SUFFIX
- See Also:
- Constant Field Values
PAC_N_FILE_SUFFIX
public static final String PAC_N_FILE_SUFFIX
- See Also:
- Constant Field Values
PAC_INDEX_FILE_SUFFIX
public static final String PAC_INDEX_FILE_SUFFIX
- See Also:
- Constant Field Values
CompactFASTA
public CompactFASTA(String fastaFile)
throws org.xerial.core.XerialException,
IOException
- Parameters:
fastaFilePrefix
-
- Throws:
org.xerial.core.XerialException
IOException
getChrSet
public Set<String> getChrSet()
- Get the set of chromosome names
- Returns:
containsChr
public boolean containsChr(String chr)
- Test the specified chromosome name is in this FASTA
- Parameters:
chr
-
- Returns:
getSequenceLength
public int getSequenceLength(String chr)
loadIntoMemory
public static CompactFASTA loadIntoMemory(String fastaFilePrefix)
throws org.xerial.core.XerialException,
IOException
- Throws:
org.xerial.core.XerialException
IOException
close
public void close()
throws IOException
- Throws:
IOException
getSequence
public CompactACGT getSequence(String chr,
int start,
int end)
throws IOException,
UTGBException
- Retrieves a genome sequence of the specified range [start, end)
- Parameters:
chr
- sequence namestart
- start position on the genome (0-origin)end
- end position on genome (0-origin, exclusive)
- Returns:
- genome sequence of the specified range, or null if no entry found for the given sequence name
- Throws:
IOException
UTGBException
getSequence
public CompactACGT getSequence(String chr,
int start,
int end,
boolean isReverse)
throws IOException,
UTGBException
- Throws:
IOException
UTGBException
getSequence
public GenomeSequence getSequence(String chr,
int start)
throws IOException,
UTGBException
- Throws:
IOException
UTGBException
getSequence
public GenomeSequence getSequence(String chr)
throws IOException,
UTGBException
- Throws:
IOException
UTGBException
pickSequenceName
public static String pickSequenceName(String descriptionLine)
Copyright © 2007-2012 utgenome.org. All Rights Reserved.