Mercurial > repos > yufei-luo > s_mart
diff commons/launcher/RepeatMaskerClusterLauncher.py @ 18:94ab73e8a190
Uploaded
author | m-zytnicki |
---|---|
date | Mon, 29 Apr 2013 03:20:15 -0400 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/commons/launcher/RepeatMaskerClusterLauncher.py Mon Apr 29 03:20:15 2013 -0400 @@ -0,0 +1,77 @@ +#!/usr/bin/env python + +##@file +# Launch RepeatMaskerProgramLauncher on several files in parallel on a cluster. + + +import os +import sys +import getopt +import exceptions + +from pyRepet.launcher.AbstractClusterLauncher import * +from commons.launcher.RepeatMaskerProgramLauncher import RepeatMaskerProgramLauncher + + +class RepeatMaskerClusterLauncher( AbstractClusterLauncher ): + """ + Launch RepeatMasker on several files in parallel on a cluster. + """ + + def __init__( self ): + """ + Constructor. + """ + AbstractClusterLauncher.__init__( self ) + AbstractClusterLauncher.setAcronym( self, "RM" ) + + self._cmdLineSpecificOptions = "s:n:gbl" + + self._exeWrapper = "RepeatMaskerProgramLauncher.py" + self._prgLauncher = RepeatMaskerProgramLauncher() + self._prgLauncher.setInputFile( GENERIC_IN_FILE ) + self._prgLauncher.setOutputFile( GENERIC_IN_FILE ) + self._prgLauncher.setClean() + self._prgLauncher.setVerbosityLevel( 1 ) + self._prgLauncher.setListFilesToKeep() + self._prgLauncher.setListFilesToRemove() + + + def getSpecificHelpAsString( self ): + """ + Return the specific help as a string. + """ + string = "" + string += "\nspecific options:" + string += "\n -s: name of the subject file (repeats, format='fasta')" + string += "\n -n: nb of processors to use in parallel (default=1)" + string += "\n -g: calculate the GC content" + string += "\n -b: skip bacterial insertion element check" + string += "\n -l: mask low-complexity DNA or simple repeats" + return string + + + def getSubjectFile( self ): + return self._prgLauncher.getSubjectFile() + + + def getNbProcessors( self ): + return self._prgLauncher.getNbProcessors() + + + def getCalculateGCcontent( self ): + return self._prgLauncher.getCalculateGCcontent() + + + def getSkipBacterialIsCheck( self ): + return self._prgLauncher.getSkipBacterialIsCheck() + + + def getMaskSsr( self ): + return self._prgLauncher.getMaskSsr() + + +if __name__ == "__main__": + i = RepeatMaskerClusterLauncher() + i.setAttributesFromCmdLine() + i.run()