edu.unc.csbio.util
Class VCFReader
java.lang.Object
edu.unc.csbio.util.VCFReader
public class VCFReader
- extends java.lang.Object
A VCFReader Parser conforms to VCF 4.0 (http://www.1000genomes.org/node/101)
- Version:
- 0.1
- Author:
- Shunping Huang , Jack Wang
Constructor Summary |
VCFReader(java.lang.String _dataFile,
java.lang.String _sampleName)
Initialize the buffer, skip the meta-information lines, and get
the column id of the selected sample. |
Method Summary |
void |
close()
Close the buffer |
Feature |
readNext()
Read the VCF file and return the next insertion/deletion object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dataFile
private static java.lang.String dataFile
sampleName
private static java.lang.String sampleName
sampleColumn
private static int sampleColumn
br
private static java.io.BufferedReader br
chrOffset
private static final int chrOffset
- See Also:
- Constant Field Values
posOffset
private static final int posOffset
- See Also:
- Constant Field Values
refOffset
private static final int refOffset
- See Also:
- Constant Field Values
altOffset
private static final int altOffset
- See Also:
- Constant Field Values
sampleOffset
private static final int sampleOffset
- See Also:
- Constant Field Values
FS
private static final java.lang.String FS
- See Also:
- Constant Field Values
altFS
private static final java.lang.String altFS
- See Also:
- Constant Field Values
REF
private static final java.lang.String REF
- See Also:
- Constant Field Values
VCFReader
public VCFReader(java.lang.String _dataFile,
java.lang.String _sampleName)
throws java.io.IOException
- Initialize the buffer, skip the meta-information lines, and get
the column id of the selected sample.
- Parameters:
_dataFile
- the file name of the VCF file_sampleName
- the selected sample name of the VCF file
- Throws:
java.io.IOException
readNext
public Feature readNext()
throws java.io.IOException
- Read the VCF file and return the next insertion/deletion object.
- Returns:
- A Feature object that is either a insertion or a deletion.
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Close the buffer
- Throws:
java.io.IOException