use of htsjdk.samtools.util.BufferedLineReader in project gatk by broadinstitute.
the class ReferenceUtils method loadFastaDictionary.
/**
* Given an InputStream connected to a fasta dictionary, returns its sequence dictionary
*
* Note: does not close the InputStream it's passed
*
* @param fastaDictionaryStream InputStream connected to a fasta dictionary
* @return the SAMSequenceDictionary from the fastaDictionaryStream
*/
public static SAMSequenceDictionary loadFastaDictionary(final InputStream fastaDictionaryStream) {
// Don't close the reader when we're done, since we don't want to close the client's InputStream for them
final BufferedLineReader reader = new BufferedLineReader(fastaDictionaryStream);
final SAMTextHeaderCodec codec = new SAMTextHeaderCodec();
final SAMFileHeader header = codec.decode(reader, fastaDictionaryStream.toString());
return header.getSequenceDictionary();
}
use of htsjdk.samtools.util.BufferedLineReader in project gatk by broadinstitute.
the class BasicInputParser method advanceFile.
protected void advanceFile() {
currentFileName = !fileNames.isEmpty() ? fileNames.remove(0) : null;
nextLineNumber = 0;
nextLine = null;
reader = new BufferedLineReader(inputs.remove(0));
}
Aggregations