Mercurial > repos > yufei-luo > s_mart
comparison SMART/Java/Python/clusterize.py @ 46:169d364ddd91
Uploaded
author | m-zytnicki |
---|---|
date | Mon, 30 Sep 2013 03:19:26 -0400 |
parents | 44d5973c188c |
children | 90f4b29d884f |
comparison
equal
deleted
inserted
replaced
45:e454402ba9d9 | 46:169d364ddd91 |
---|---|
102 progress = UnlimitedProgress(10000, "Reading input file", self.verbosity) | 102 progress = UnlimitedProgress(10000, "Reading input file", self.verbosity) |
103 parser = self.parser | 103 parser = self.parser |
104 else: | 104 else: |
105 progress = Progress(self.nbElementsPerChromosome[chromosome], "Checking chromosome %s" % (chromosome), self.verbosity) | 105 progress = Progress(self.nbElementsPerChromosome[chromosome], "Checking chromosome %s" % (chromosome), self.verbosity) |
106 parser = NCListFileUnpickle(self.splittedFileNames[chromosome], self.verbosity) | 106 parser = NCListFileUnpickle(self.splittedFileNames[chromosome], self.verbosity) |
107 transcripts = [] | 107 transcripts = [] |
108 self.nbElements = 0 | |
109 for newTranscript in parser.getIterator(): | 108 for newTranscript in parser.getIterator(): |
110 newTranscripts = [] | 109 newTranscripts = [] |
111 if newTranscript.__class__.__name__ == "Mapping": | 110 if newTranscript.__class__.__name__ == "Mapping": |
112 newTranscript = newTranscript.getTranscript() | 111 newTranscript = newTranscript.getTranscript() |
113 for oldTranscript in transcripts: | 112 for oldTranscript in transcripts: |
117 self._write(oldTranscript) | 116 self._write(oldTranscript) |
118 else: | 117 else: |
119 newTranscripts.append(oldTranscript) | 118 newTranscripts.append(oldTranscript) |
120 newTranscripts.append(newTranscript) | 119 newTranscripts.append(newTranscript) |
121 transcripts = newTranscripts | 120 transcripts = newTranscripts |
122 self.nbElements += 1 | |
123 progress.inc() | 121 progress.inc() |
124 for transcript in transcripts: | 122 for transcript in transcripts: |
125 self._write(transcript) | 123 self._write(transcript) |
126 progress.done() | 124 progress.done() |
127 | 125 |