Class SAMHeaderHadoopUtils.SAMHeaderWriter
- java.lang.Object
-
- fr.ens.biologie.genomique.eoulsan.modules.mapping.hadoop.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 Summary
Constructors Constructor Description SAMHeaderWriter(String attemptId)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close(org.apache.hadoop.mapreduce.JobContext context)
Close the SAM file header.boolean
writeIfHeaderLine(org.apache.hadoop.mapreduce.JobContext context, String line)
Write the line to the SAM header file if the line is a SAM header.
-
-
-
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 contextline
- 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
-
-