Class HadoopBamUtils
java.lang.Object
fr.ens.biologie.genomique.eoulsan.modules.mapping.hadoop.HadoopBamUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic htsjdk.samtools.SamFileHeaderMergergetSAMHeaderMerger(org.apache.hadoop.conf.Configuration conf) Computes the merger of the SAM headers in the files listed in HEADERMERGER_INPUTS_PROPERTY.static voidmergeInto(OutputStream out, org.apache.hadoop.fs.Path directory, String basePrefix, String basePostfix, org.apache.hadoop.conf.Configuration conf, String commandName) Merges the files in the given directory that have names given by getMergeableWorkFile() into out.static voidmergeSAMInto(org.apache.hadoop.fs.Path out, org.apache.hadoop.fs.Path directory, String basePrefix, String basePostfix, org.seqdoop.hadoop_bam.SAMFormat format, org.apache.hadoop.conf.Configuration conf, String commandName) Merges the files in the given directory that have names given by getMergeableWorkFile() into out in the given SAMFormat, using getSAMHeaderMerger().getMergedHeader() as the header.
-
Constructor Details
-
HadoopBamUtils
public HadoopBamUtils()
-
-
Method Details
-
getSAMHeaderMerger
public static htsjdk.samtools.SamFileHeaderMerger getSAMHeaderMerger(org.apache.hadoop.conf.Configuration conf) throws IOException Computes the merger of the SAM headers in the files listed in HEADERMERGER_INPUTS_PROPERTY. The sort order of the result is set according to the last call to setHeaderMergerSortOrder, or otherwise to "unsorted". The result is cached locally to prevent it from being recomputed too often.- Parameters:
conf- Hadoop configuration- Returns:
- a SamFileHeaderMerger object
- Throws:
IOException- if an error occurs while getting the Header
-
mergeSAMInto
public static void mergeSAMInto(org.apache.hadoop.fs.Path out, org.apache.hadoop.fs.Path directory, String basePrefix, String basePostfix, org.seqdoop.hadoop_bam.SAMFormat format, org.apache.hadoop.conf.Configuration conf, String commandName) throws IOException Merges the files in the given directory that have names given by getMergeableWorkFile() into out in the given SAMFormat, using getSAMHeaderMerger().getMergedHeader() as the header. Outputs progress reports if commandName is non-null.- Parameters:
out- output filedirectory- directorybasePrefix- base prefixbasePostfix- base postfixformat- SAM formatconf- Hadoop configurationcommandName- command name- Throws:
IOException- if an error occurs while merging
-
mergeInto
public static void mergeInto(OutputStream out, org.apache.hadoop.fs.Path directory, String basePrefix, String basePostfix, org.apache.hadoop.conf.Configuration conf, String commandName) throws IOException Merges the files in the given directory that have names given by getMergeableWorkFile() into out. Outputs progress reports if commandName is non-null.- Parameters:
out- output filedirectory- directorybasePrefix- base prefixbasePostfix- base postfixconf- Hadoop configurationcommandName- command name- Throws:
IOException- if an error occurs while merging
-