Class FastqFileIterator

  • All Implemented Interfaces:
    java.lang.Iterable<org.biojava.nbio.genome.io.fastq.Fastq>, java.util.Iterator<org.biojava.nbio.genome.io.fastq.Fastq>

    public class FastqFileIterator
    extends java.lang.Object
    implements java.lang.Iterable<org.biojava.nbio.genome.io.fastq.Fastq>, java.util.Iterator<org.biojava.nbio.genome.io.fastq.Fastq>
    Opens a fastq file and iterates over all fastq sequences in the file Unlike BioJava's version, this one does NOT load all sequences in memory. Thus it allows to process much larger files
    Author:
    pcingola
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static boolean debug  
    • Constructor Summary

      Constructors 
      Constructor Description
      FastqFileIterator​(java.io.InputStream inStream, org.biojava.nbio.genome.io.fastq.FastqVariant variant)  
      FastqFileIterator​(java.lang.String fastqFileName)  
      FastqFileIterator​(java.lang.String fastqFileName, org.biojava.nbio.genome.io.fastq.FastqVariant variant)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Close file
      int getLineNum()  
      boolean hasNext()  
      java.util.Iterator<org.biojava.nbio.genome.io.fastq.Fastq> iterator()  
      org.biojava.nbio.genome.io.fastq.Fastq next()  
      void remove()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
      • Methods inherited from interface java.util.Iterator

        forEachRemaining
    • Field Detail

      • debug

        public static boolean debug
    • Constructor Detail

      • FastqFileIterator

        public FastqFileIterator​(java.io.InputStream inStream,
                                 org.biojava.nbio.genome.io.fastq.FastqVariant variant)
      • FastqFileIterator

        public FastqFileIterator​(java.lang.String fastqFileName)
      • FastqFileIterator

        public FastqFileIterator​(java.lang.String fastqFileName,
                                 org.biojava.nbio.genome.io.fastq.FastqVariant variant)
    • Method Detail

      • close

        public void close()
        Close file
      • getLineNum

        public int getLineNum()
      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface java.util.Iterator<org.biojava.nbio.genome.io.fastq.Fastq>
      • iterator

        public java.util.Iterator<org.biojava.nbio.genome.io.fastq.Fastq> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<org.biojava.nbio.genome.io.fastq.Fastq>
      • next

        public org.biojava.nbio.genome.io.fastq.Fastq next()
        Specified by:
        next in interface java.util.Iterator<org.biojava.nbio.genome.io.fastq.Fastq>
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<org.biojava.nbio.genome.io.fastq.Fastq>