Package org.snpeff.fileIterator
Class MarkerFileIterator<M extends Marker>
java.lang.Object
org.snpeff.fileIterator.FileIterator<M>
org.snpeff.fileIterator.MarkerFileIterator<M>
- Direct Known Subclasses:
GenericMarkerFileIterator
,Gff3FileIterator
,MotifFileIterator
,RegulationFileIterator
,VariantFileIterator
,VcfFileIterator
,VcfHapMapFileIterator
Opens a Marker file and iterates over all markers
- Author:
- pcingola
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
protected Genome
protected boolean
protected int
-
Constructor Summary
ConstructorsConstructorDescriptionMarkerFileIterator
(BufferedReader reader, int inOffset) MarkerFileIterator
(String fileName, int inOffset) MarkerFileIterator
(String fileName, Genome genome, int inOffset) -
Method Summary
Modifier and TypeMethodDescriptiongetChromosome
(String chromoName) Find chromosome 'chromoName'.protected void
Initializeboolean
int
parsePosition
(String posStr) Parse a string as a 'position'.void
sanityCheckChromo
(String chromoName, Chromosome chromo) Sanity checkvoid
setCreateChromos
(boolean createChromos) void
setIgnoreChromosomeErrors
(boolean ignoreChromosomeErrors) void
setInOffset
(int inOffset) Methods inherited from class org.snpeff.fileIterator.FileIterator
close, countNewLineChars, getFilePointer, getLine, getLineNum, guessNewLineChars, hasNext, hasSeek, isDebug, iterator, load, next, readLine, readNext, ready, remove, seek, setAutoClose, setDebug, setVerbose, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
createChromos
protected boolean createChromos -
genome
-
ignoreChromosomeErrors
protected boolean ignoreChromosomeErrors -
inOffset
protected int inOffset
-
-
Constructor Details
-
MarkerFileIterator
-
MarkerFileIterator
-
MarkerFileIterator
-
-
Method Details
-
getChromosome
Find chromosome 'chromoName'. If it does not exists and 'createChromos' is true, the chromosome is created -
getGenome
-
init
Initialize- Overrides:
init
in classFileIterator<M extends Marker>
- Parameters:
fileName
- : Can be null (no file is opened)
-
isIgnoreChromosomeErrors
public boolean isIgnoreChromosomeErrors() -
loadMarkers
-
parsePosition
Parse a string as a 'position'. Note: It subtracts 'inOffset' so that all coordinates are zero-based -
sanityCheckChromo
Sanity check -
setCreateChromos
public void setCreateChromos(boolean createChromos) -
setIgnoreChromosomeErrors
public void setIgnoreChromosomeErrors(boolean ignoreChromosomeErrors) -
setInOffset
public void setInOffset(int inOffset)
-