From cd9395fa14f1cec889a55bc19915c4d0e134fbe6 Mon Sep 17 00:00:00 2001 From: chartl Date: Wed, 28 Jul 2010 15:09:19 +0000 Subject: [PATCH] Since Picard's FixMateInformation merges, fixes mates, and sorts, allow it to be used as a gather function. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3891 348d0f76-0448-11de-a6fe-93d51630548a --- .../scattergather/FixMatesGatherFunction.scala | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 scala/src/org/broadinstitute/sting/queue/function/scattergather/FixMatesGatherFunction.scala diff --git a/scala/src/org/broadinstitute/sting/queue/function/scattergather/FixMatesGatherFunction.scala b/scala/src/org/broadinstitute/sting/queue/function/scattergather/FixMatesGatherFunction.scala new file mode 100644 index 000000000..cc4d1e828 --- /dev/null +++ b/scala/src/org/broadinstitute/sting/queue/function/scattergather/FixMatesGatherFunction.scala @@ -0,0 +1,17 @@ +package org.broadinstitute.sting.queue.function.scattergather + +import java.io.File +import org.broadinstitute.sting.commandline.Input + +class BamGatherFunction extends GatherFunction { + type GatherType = File + + @Input(doc="Picard FixMateInformation.jar. At the Broad this can be found at /seq/software/picard/current/bin/FixMateInformation.jar. Outside the broad see http://picard.sourceforge.net/") + var picardFixMatesJar: String = _ + + @Input(doc="Compression level 1-9", required=false) + var picardMergeCompressionLevel: Option[Int] = None + + def commandLine = "java -Djava.io.tmpdir=/broad/shptmp/queue -jar %s%s%s%s".format(picardFixMatesJar, + optional(" COMPRESSION_LEVEL=", picardMergeCompressionLevel), " VALIDATION_STRINGENCY=SILENT SO=coordinate OUTPUT=" + originalOutput, repeat(" INPUT=", gatherParts)) +}