Skip to content

Commit 6ba8539

Browse files
committed
Remove unused IlluminaFastqHeader and CheckAfterCompleteMixin
1 parent dd711b6 commit 6ba8539

File tree

1 file changed

+0
-39
lines changed

1 file changed

+0
-39
lines changed

rnaseq_pipeline/utils.py

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,6 @@
55

66
logger = logging.getLogger(__name__)
77

8-
class IlluminaFastqHeader:
9-
@classmethod
10-
def parse(cls, s):
11-
pieces = s.split(':')
12-
if len(pieces) == 5:
13-
device, flowcell_lane, tile, x, y = pieces
14-
return cls(device, flowcell_lane=flowcell_lane, tile=tile, x=x, y=y)
15-
elif len(pieces) == 7:
16-
return cls(*pieces)
17-
else:
18-
raise TypeError('Unsupported Illumina FASTQ header format {}.'.format(s))
19-
20-
def __init__(self, device, run=None, flowcell=None, flowcell_lane=None, tile=None, x=None, y=None):
21-
self.device = device
22-
self.run = run
23-
self.flowcell = flowcell
24-
self.flowcell_lane = flowcell_lane
25-
self.tile = tile
26-
self.x = x
27-
self.y = y
28-
29-
@property
30-
def batch_factor(self):
31-
if self.flowcell is None:
32-
return self.device, self.flowcell_lane
33-
return self.device, self.flowcell, self.flowcell_lane
34-
35-
def parse_illumina_fastq_header(s):
36-
return IlluminaFastqHeader(*s.split(':'))
37-
388
def max_retry(count):
399
"""
4010
Set the maximum number of time a task can be retried before being disabled
@@ -68,15 +38,6 @@ def run(self):
6838
def complete(self):
6939
return (not self.rerun or self._has_rerun) and super().complete()
7040

71-
class CheckAfterCompleteMixin(luigi.Task):
72-
"""Ensures that a task is completed after a successful run()."""
73-
74-
def run(self):
75-
ret = super().run()
76-
if not self.complete():
77-
raise RuntimeError('{} is not completed after successful run().'.format(repr(self)))
78-
return ret
79-
8041
def remove_task_output(task):
8142
logger.info('Cleaning up %s...', repr(task))
8243
for out in flatten_output(task):

0 commit comments

Comments
 (0)