Package picard.util

Class FifoBuffer


  • @DocumentedFeature
    public class FifoBuffer
    extends CommandLineProgram

    Summary

    Acts as a large memory buffer between processes that are connected with unix pipes for the case that one or more processes produces or consumes their input or output in bursts. By inserting a large memory buffer between such processes each process can run at full speed and the bursts can be smoothed out by the memory buffer.

    Example

       java -jar SamToFastq.jar \
          F=my.fastq \
          INTERLEAVE=true |
       java -jar FifoBuffer |
       bwa mem -t 8 -Y reference.fasta \dev\stdin output.bam
      
    • Field Detail

      • BUFFER_SIZE

        @Argument(doc="The size of the memory buffer in bytes.")
        public int BUFFER_SIZE
      • IO_SIZE

        @Argument(doc="The size, in bytes, to read/write atomically to the input and output streams.")
        public int IO_SIZE
      • DEBUG_FREQUENCY

        @Argument(doc="How frequently, in seconds, to report debugging statistics. Set to zero for never.")
        public int DEBUG_FREQUENCY
      • NAME

        @Argument(doc="Name to use for Fifo in debugging statements.",
                  optional=true)
        public String NAME
    • Constructor Detail

      • FifoBuffer

        public FifoBuffer​(InputStream in,
                          PrintStream out)
        Constructor that defaults to QUIET since Fifos don't do anything beyond buffering having their start/end information logged is often undesirable.
      • FifoBuffer

        public FifoBuffer()
        Constructor that defaults to QUIET since Fifos don't do anything beyond buffering having their start/end information logged is often undesirable.
    • Method Detail

      • main

        public static void main​(String[] args)
      • doWork

        protected int doWork()
        Description copied from class: CommandLineProgram
        Do the work after command line has been parsed. RuntimeException may be thrown by this method, and are reported appropriately.
        Specified by:
        doWork in class CommandLineProgram
        Returns:
        program exit status.