Mercurial > repos > yufei-luo > s_mart
comparison commons/launcher/RepeatMaskerClusterLauncher.py @ 18:94ab73e8a190
Uploaded
author | m-zytnicki |
---|---|
date | Mon, 29 Apr 2013 03:20:15 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
17:b0e8584489e6 | 18:94ab73e8a190 |
---|---|
1 #!/usr/bin/env python | |
2 | |
3 ##@file | |
4 # Launch RepeatMaskerProgramLauncher on several files in parallel on a cluster. | |
5 | |
6 | |
7 import os | |
8 import sys | |
9 import getopt | |
10 import exceptions | |
11 | |
12 from pyRepet.launcher.AbstractClusterLauncher import * | |
13 from commons.launcher.RepeatMaskerProgramLauncher import RepeatMaskerProgramLauncher | |
14 | |
15 | |
16 class RepeatMaskerClusterLauncher( AbstractClusterLauncher ): | |
17 """ | |
18 Launch RepeatMasker on several files in parallel on a cluster. | |
19 """ | |
20 | |
21 def __init__( self ): | |
22 """ | |
23 Constructor. | |
24 """ | |
25 AbstractClusterLauncher.__init__( self ) | |
26 AbstractClusterLauncher.setAcronym( self, "RM" ) | |
27 | |
28 self._cmdLineSpecificOptions = "s:n:gbl" | |
29 | |
30 self._exeWrapper = "RepeatMaskerProgramLauncher.py" | |
31 self._prgLauncher = RepeatMaskerProgramLauncher() | |
32 self._prgLauncher.setInputFile( GENERIC_IN_FILE ) | |
33 self._prgLauncher.setOutputFile( GENERIC_IN_FILE ) | |
34 self._prgLauncher.setClean() | |
35 self._prgLauncher.setVerbosityLevel( 1 ) | |
36 self._prgLauncher.setListFilesToKeep() | |
37 self._prgLauncher.setListFilesToRemove() | |
38 | |
39 | |
40 def getSpecificHelpAsString( self ): | |
41 """ | |
42 Return the specific help as a string. | |
43 """ | |
44 string = "" | |
45 string += "\nspecific options:" | |
46 string += "\n -s: name of the subject file (repeats, format='fasta')" | |
47 string += "\n -n: nb of processors to use in parallel (default=1)" | |
48 string += "\n -g: calculate the GC content" | |
49 string += "\n -b: skip bacterial insertion element check" | |
50 string += "\n -l: mask low-complexity DNA or simple repeats" | |
51 return string | |
52 | |
53 | |
54 def getSubjectFile( self ): | |
55 return self._prgLauncher.getSubjectFile() | |
56 | |
57 | |
58 def getNbProcessors( self ): | |
59 return self._prgLauncher.getNbProcessors() | |
60 | |
61 | |
62 def getCalculateGCcontent( self ): | |
63 return self._prgLauncher.getCalculateGCcontent() | |
64 | |
65 | |
66 def getSkipBacterialIsCheck( self ): | |
67 return self._prgLauncher.getSkipBacterialIsCheck() | |
68 | |
69 | |
70 def getMaskSsr( self ): | |
71 return self._prgLauncher.getMaskSsr() | |
72 | |
73 | |
74 if __name__ == "__main__": | |
75 i = RepeatMaskerClusterLauncher() | |
76 i.setAttributesFromCmdLine() | |
77 i.run() |