annotate commons/pyRepetUnit/align/hmmOutputParsing/HmmscanOutput2align.py @ 31:0ab839023fe4

Uploaded
author m-zytnicki
date Tue, 30 Apr 2013 14:33:21 -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 from commons.pyRepetUnit.hmmer.hmmOutput.HmmscanOutputProcessing import HmmscanOutputProcessing
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
2 ##data processor : read an output from hmmscan and transform it into .align file
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
3 #
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
4 class HmmscanOutput2align( object ):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
5
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
6 ## constructor
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
7 #
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
8 def __init__(self):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
9 self.hmmscanOutputProcess = HmmscanOutputProcessing()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
10 self._inputFile = ""
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
11 self._outputFile = ""
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
12
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
13 ## set input file
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
14 #
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
15 # @param input file input file
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
16 #
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
17 def setInputFile(self, input):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
18 self._inputFile = input
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
19 ## set output file
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
20 # @param output file output file
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
21 #
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
22 def setOutputFile(self, output):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
23 self._outputFile = output
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
24
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
25 ##read a hmmscan output file, parse it and, write the corresponding .align file
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
26 #
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
27 def run( self ):
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
28 self.hmmscanOutputProcess.readHmmOutputsAndWriteAlignFile( self._inputFile, self._outputFile )