annotate commons/launcher/RepeatMaskerClusterLauncher.py @ 19:9bcfa7936eec

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