Package org.snpeff.fileIterator
Class MarkerFileIterator<M extends Marker>
- java.lang.Object
-
- org.snpeff.fileIterator.FileIterator<M>
-
- org.snpeff.fileIterator.MarkerFileIterator<M>
-
- All Implemented Interfaces:
java.lang.Iterable<M>,java.util.Iterator<M>
- Direct Known Subclasses:
GenericMarkerFileIterator,Gff3FileIterator,MotifFileIterator,RegulationFileIterator,VariantFileIterator,VcfFileIterator,VcfHapMapFileIterator
public abstract class MarkerFileIterator<M extends Marker> extends FileIterator<M>
Opens a Marker file and iterates over all markers- Author:
- pcingola
-
-
Field Summary
Fields Modifier and Type Field Description protected booleancreateChromosprotected Genomegenomeprotected booleanignoreChromosomeErrorsprotected intinOffset
-
Constructor Summary
Constructors Constructor Description MarkerFileIterator(java.io.BufferedReader reader, int inOffset)MarkerFileIterator(java.lang.String fileName, int inOffset)MarkerFileIterator(java.lang.String fileName, Genome genome, int inOffset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChromosomegetChromosome(java.lang.String chromoName)Find chromosome 'chromoName'.GenomegetGenome()protected voidinit(java.lang.String fileName, int inOffset)InitializebooleanisIgnoreChromosomeErrors()MarkersloadMarkers()intparsePosition(java.lang.String posStr)Parse a string as a 'position'.voidsanityCheckChromo(java.lang.String chromoName, Chromosome chromo)Sanity checkvoidsetCreateChromos(boolean createChromos)voidsetIgnoreChromosomeErrors(boolean ignoreChromosomeErrors)voidsetInOffset(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
-
-
-
-
Field Detail
-
createChromos
protected boolean createChromos
-
genome
protected Genome genome
-
ignoreChromosomeErrors
protected boolean ignoreChromosomeErrors
-
inOffset
protected int inOffset
-
-
Constructor Detail
-
MarkerFileIterator
public MarkerFileIterator(java.io.BufferedReader reader, int inOffset)
-
MarkerFileIterator
public MarkerFileIterator(java.lang.String fileName, Genome genome, int inOffset)
-
MarkerFileIterator
public MarkerFileIterator(java.lang.String fileName, int inOffset)
-
-
Method Detail
-
getChromosome
public Chromosome getChromosome(java.lang.String chromoName)
Find chromosome 'chromoName'. If it does not exists and 'createChromos' is true, the chromosome is created
-
getGenome
public Genome getGenome()
-
init
protected void init(java.lang.String fileName, int inOffset)Initialize- Overrides:
initin classFileIterator<M extends Marker>- Parameters:
fileName- : Can be null (no file is opened)
-
isIgnoreChromosomeErrors
public boolean isIgnoreChromosomeErrors()
-
loadMarkers
public Markers loadMarkers()
-
parsePosition
public int parsePosition(java.lang.String posStr)
Parse a string as a 'position'. Note: It subtracts 'inOffset' so that all coordinates are zero-based
-
sanityCheckChromo
public void sanityCheckChromo(java.lang.String chromoName, Chromosome chromo)Sanity check
-
setCreateChromos
public void setCreateChromos(boolean createChromos)
-
setIgnoreChromosomeErrors
public void setIgnoreChromosomeErrors(boolean ignoreChromosomeErrors)
-
setInOffset
public void setInOffset(int inOffset)
-
-