Mercurial > repos > yufei-luo > s_mart
comparison commons/launcher/MafftClusterLauncher.py @ 31:0ab839023fe4
Uploaded
author | m-zytnicki |
---|---|
date | Tue, 30 Apr 2013 14:33:21 -0400 |
parents | 94ab73e8a190 |
children |
comparison
equal
deleted
inserted
replaced
30:5677346472b5 | 31:0ab839023fe4 |
---|---|
1 #!/usr/bin/env python | |
2 | |
3 ##@file | |
4 # Launch MafftProgramLauncher on several files in parallel on a cluster. | |
5 | |
6 | |
7 from pyRepet.launcher.AbstractClusterLauncher import * | |
8 from commons.launcher.MafftProgramLauncher import MafftProgramLauncher | |
9 | |
10 | |
11 class MafftClusterLauncher( AbstractClusterLauncher ): | |
12 """ | |
13 Launch Mafft on several files in parallel on a cluster. | |
14 """ | |
15 | |
16 def __init__( self ): | |
17 """ | |
18 Constructor. | |
19 """ | |
20 AbstractClusterLauncher.__init__( self ) | |
21 AbstractClusterLauncher.setAcronym( self, "Mafft" ) | |
22 | |
23 self._cmdLineSpecificOptions = "p:" | |
24 | |
25 self._exeWrapper = "MafftProgramLauncher.py" | |
26 self._prgLauncher = None | |
27 self._prgLauncher = self.getProgramLauncherInstance() | |
28 | |
29 | |
30 def getSpecificHelpAsString( self ): | |
31 """ | |
32 Return the specific help as a string. | |
33 """ | |
34 string = "" | |
35 string += "\nspecific options:" | |
36 string += "\n -p: parameters for 'mafft' (default='--auto')" | |
37 return string | |
38 | |
39 | |
40 def getProgramParameters( self ): | |
41 return self._prgLauncher.getProgramParameters() | |
42 | |
43 | |
44 def getProgramLauncherInstance( self ): | |
45 if self._prgLauncher == None: | |
46 self._prgLauncher = MafftProgramLauncher() | |
47 self._prgLauncher.setInputFile( GENERIC_IN_FILE ) | |
48 self._prgLauncher.setOutputFile( "%s.fa_aln" % ( GENERIC_IN_FILE ) ) | |
49 self._prgLauncher.setClean() | |
50 self._prgLauncher.setVerbosityLevel( 1 ) | |
51 self._prgLauncher.setListFilesToKeep() | |
52 self._prgLauncher.setListFilesToRemove() | |
53 return self._prgLauncher | |
54 | |
55 | |
56 if __name__ == "__main__": | |
57 i = MafftClusterLauncher() | |
58 i.setAttributesFromCmdLine() | |
59 i.run() |