Better version of MergeBAMBatch -- more options for creating the file

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@787 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
depristo 2009-05-21 22:26:19 +00:00
parent 65995887fc
commit 04e51c8d1d
2 changed files with 8 additions and 3 deletions

View File

@ -22,6 +22,9 @@ if __name__ == "__main__":
parser.add_option("-i", "--ignoreExistingFiles", dest="ignoreExistingFiles",
action='store_true', default=False,
help="Ignores already written files, if present")
parser.add_option("-m", "--mergeBin", dest="mergeBin",
type="string", default=MERGE_BIN,
help="Path to merge binary")
(OPTIONS, args) = parser.parse_args()
if len(args) != 1:
@ -45,7 +48,7 @@ if __name__ == "__main__":
sources = reduce( operator.__add__, map( glob.glob, s[1:] ), [] )
if OPTIONS.ignoreExistingFiles or not os.path.exists(output_filename):
cmd = 'java -Xmx4096m -jar ' + MERGE_BIN + ' AS=true SO=coordinate O=' + output_filename + ' VALIDATION_STRINGENCY=SILENT ' + ' I=' + (' I='.join(sources))
cmd = 'java -Xmx4096m -jar ' + OPTIONS.mergeBin + ' MSD=true AS=true SO=coordinate O=' + output_filename + ' VALIDATION_STRINGENCY=SILENT ' + ' I=' + (' I='.join(sources))
print cmd
farm_commands.cmd(cmd, OPTIONS.farmQueue, output)

View File

@ -3,7 +3,7 @@
import os
#justPrintCommands = False
def cmd(cmd_str, farm_queue=False, output_head=None, just_print_commands=False, outputFile = None):
def cmd(cmd_str_from_user, farm_queue=False, output_head=None, just_print_commands=False, outputFile = None):
# if farm_queue is non-False, submits to queue, other
if farm_queue:
@ -14,12 +14,14 @@ def cmd(cmd_str, farm_queue=False, output_head=None, just_print_commands=False,
else:
farm_stdout = None
cmd_str = "bsub -q "+farm_queue+" "+cmd_str
cmd_str = "bsub -q "+farm_queue
if farm_stdout <> None:
cmd_str += " -o " + farm_stdout
cmd_str += " "+cmd_str_from_user
print ">>> Farming via "+cmd_str
else:
cmd_str = cmd_str_from_user
print ">>> Executing "+cmd_str
if just_print_commands or (globals().has_key("justPrintCommands") and globals().justPrintCommands):