Class SAMHeaderHadoopUtils.SAMHeaderWriter

  • Enclosing class:
    SAMHeaderHadoopUtils

    public static class SAMHeaderHadoopUtils.SAMHeaderWriter
    extends Object
    This class allow to save the SAM header read by a mapper.
    • Constructor Detail

      • SAMHeaderWriter

        public SAMHeaderWriter​(String attemptId)
        Constructor.
        Parameters:
        attemptId - Hadoop task attempt Id
    • Method Detail

      • writeIfHeaderLine

        public boolean writeIfHeaderLine​(org.apache.hadoop.mapreduce.JobContext context,
                                         String line)
                                  throws IOException
        Write the line to the SAM header file if the line is a SAM header.
        Parameters:
        context - the Hadoop context
        line - the line read
        Returns:
        if the line is an header or an empty line
        Throws:
        IOException - if an error occurs while writing the SAM file header
      • close

        public void close​(org.apache.hadoop.mapreduce.JobContext context)
                   throws IOException
        Close the SAM file header.
        Parameters:
        context - the Hadoop context
        Throws:
        IOException - if an error occurs while writing the SAM file header