Skip to content

Commit 2b1e4e9

Browse files
Removed TODOs
1 parent 632c366 commit 2b1e4e9

File tree

6 files changed

+1
-79
lines changed

6 files changed

+1
-79
lines changed

qp_klp/Assays.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,6 @@ def post_process_raw_fastq_output(self):
215215
copyfile(raw_fastq_file, new_path)
216216

217217
def generate_reports(self):
218-
"""
219-
TODO
220-
:return:
221-
"""
222218
config = self.pipeline.get_software_configuration('fastqc')
223219
job = FastQCJob(self.pipeline.run_dir,
224220
self.pipeline.output_path,
@@ -241,10 +237,6 @@ def generate_reports(self):
241237
job.run(callback=self.status_update_callback)
242238

243239
def generate_prep_file(self):
244-
"""
245-
TODO
246-
:return:
247-
"""
248240
config = self.pipeline.get_software_configuration('seqpro')
249241

250242
# NB: For amplicon runs, the executable used is currently a variant
@@ -309,10 +301,6 @@ def update_prep_templates(self):
309301
return results
310302

311303
def load_preps_into_qiita(self):
312-
"""
313-
TODO
314-
:return:
315-
"""
316304
atype = 'FASTQ'
317305

318306
data = []

qp_klp/SequencingTech.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -107,17 +107,11 @@ def convert_raw_to_fastq(self):
107107
config['sing_script_path'],
108108
config['tellread_cores'])
109109

110-
# TODO: Set this path just liek for oillumina and then have
111-
# subsequent steps use it instead of hardcode assuming.
112110
self.raw_fastq_files_path = join(self.pipeline.output_path, 'Full')
113111

114112
job.run(callback=self.status_update_callback)
115113

116-
# audit the results to determine which samples failed to convert
117-
# properly. Append these to the failed-samples report and also
118-
# return the list directly to the caller.
119-
# TODO: TELLREADJOB needs an audit method
120-
# failed_samples = job.audit(self.pipeline.get_sample_ids())
114+
self.pipeline.get_sample_ids()
121115
failed_samples = []
122116
if hasattr(self, 'fsr'):
123117
# NB 16S does not require a failed samples report and
@@ -142,7 +136,6 @@ def generate_norm_counts(self):
142136
config['integrate_script_path'],
143137
self.qiita_job_id)
144138

145-
# TODO: Maybe the output from this should be set to a membver too.
146139
job.run(callback=self.status_update_callback)
147140

148141
# audit the results to determine which samples failed to convert
@@ -185,7 +178,6 @@ def integrate_results(self):
185178
"",
186179
config['integrate_cores'])
187180

188-
# TODO: ditto as above
189181
job.run(callback=self.status_update_callback)
190182

191183
# raw_fastq_files_path is used by downstream processes to know
@@ -200,8 +192,6 @@ def integrate_results(self):
200192
# of time. It also relies on metadata stored in the job object.
201193
# Hence, it is performed here.
202194

203-
# TODO: Move any other logs into the right logs directories
204-
205195
# rename the files and move them into project directories.
206196
for root, dirs, files in walk(self.raw_fastq_files_path):
207197
for _file in files:

qp_klp/TODO_CHECKLIST.txt

Lines changed: 0 additions & 10 deletions
This file was deleted.

qp_klp/Workflows.py

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,6 @@ def what_am_i(self):
8181
f"Assay: {self.assay_type}")
8282

8383
def pre_check(self):
84-
# TODO: Note that amplicon/illumina workflows shouldn't call this
85-
# method since demuxing samples is performed downstream, hence there
86-
# isn't a list of real sample-names in the sample-sheet to check.
87-
# This check could be performed using the pre-prep sample data
88-
# however.
89-
9084
# since one of the objectives of SPP is to generate prep-info files
9185
# and automatically load them into Qiita, confirm that all studies
9286
# mentioned in the sample-sheet/pre-prep do not contain sample
@@ -119,10 +113,6 @@ def generate_special_map(self):
119113
Generates a list of tuples to support pipeline processing.
120114
:return: A list of triplets.
121115
"""
122-
# TODO: (see below)
123-
# this function should be able to be tested by passing in simulated =
124-
# results from qclient.
125-
126116
# trimmed files are stored by qiita_id. Find the qiita_id
127117
# associated with each project and ensure a subdirectory exists
128118
# for when it comes time to move the trimmed files.
@@ -144,9 +134,6 @@ def generate_sifs(self):
144134
Generates sample-info files for each project, containing
145135
metadata on BLANKS.
146136
"""
147-
148-
# TODO: This will need to be updated and reviewed to handle recent
149-
# changes. It is currently a placeholder.
150137
from_qiita = {}
151138

152139
for study_id in self.prep_file_paths:
@@ -179,7 +166,6 @@ def generate_sifs(self):
179166
# duplicate sample-names and non-blanks will be handled properly.
180167
self.sifs = self.pipeline.generate_sample_info_files(add_sif_info)
181168

182-
# TODO: Remove returning this value if not tested directly.
183169
return self.sifs
184170

185171
def update_blanks_in_qiita(self):
@@ -188,9 +174,6 @@ def update_blanks_in_qiita(self):
188174
:return:
189175
"""
190176

191-
# TODO: This will need to be updated and reviewed to handle recent
192-
# changes. It is currently a placeholder.
193-
194177
for sif_path in self.sifs:
195178
# get study_id from sif_file_name ...something_14385_blanks.tsv
196179
study_id = sif_path.split('_')[-2]
@@ -353,10 +336,6 @@ def _write_commands_to_output_path(self):
353336
f.write(f'{cmd}\n')
354337

355338
def generate_commands(self):
356-
"""
357-
TODO
358-
:return:
359-
"""
360339
cmds = self._helper_process_operations()
361340

362341
result = self._process_fastp_report_dirs()
@@ -384,10 +363,6 @@ def generate_commands(self):
384363
self._write_commands_to_output_path()
385364

386365
def execute_commands(self):
387-
"""
388-
TODO
389-
:return:
390-
"""
391366
# execute the list of commands in order
392367
for cmd in self.cmds:
393368
p = Popen(cmd,
@@ -717,7 +692,3 @@ def _process_sample_names(self, project_name, qiita_id, samples):
717692
number_in_project = len(set(self.samples_in_qiita[qiita_id]))
718693

719694
return not_in_qiita, examples, number_in_project
720-
721-
def scan_run_directory(self):
722-
# TODO: Impl
723-
pass

qp_klp/tests/test_WorkflowFactory.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ def test_invalid_sample_sheets(self):
100100
def test_metagenomic_workflow_creation(self):
101101
kwargs = {"uif_path": "qp_klp/tests/data/sample-sheets/metagenomic/"
102102
"illumina/good_sheet1.csv",
103-
# TODO: Fix qclient?
104103
"qclient": None,
105104
"lane_number": "1",
106105
"config_fp": "qp_klp/tests/data/configuration.json",
@@ -121,7 +120,6 @@ def test_metagenomic_workflow_creation(self):
121120
def test_metatranscriptomic_workflow_creation(self):
122121
kwargs = {"uif_path": "qp_klp/tests/data/sample-sheets/"
123122
"metatranscriptomic/illumina/good_sheet1.csv",
124-
# TODO: Fix qclient?
125123
"qclient": None,
126124
"lane_number": "1",
127125
"config_fp": "qp_klp/tests/data/configuration.json",
@@ -158,8 +156,6 @@ def test_amplicon_workflow_creation(self):
158156
self.assertEqual(wf.assay_type, ASSAY_NAME_AMPLICON)
159157

160158
def atest_tellseq_workflow_creation(self):
161-
# TODO: Note we will need to modify metapool enough to accept and
162-
# validate these drafts. Fix Qclient
163159
kwargs = {"uif_path": "qp_klp/tests/data/sample-sheets/metagenomic/"
164160
"tellseq/good_sheet_draft1.csv",
165161
"qclient": None,

qp_klp/tests/test_workflows.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -429,21 +429,13 @@ def test_partial_metagenomic_pipeline(self):
429429
self.create_fake_bin('sbatch', "\n".join(cmds))
430430
audit_results = sorted(wf.quality_control())
431431

432-
# TODO: Add assertion tests for NuQCJob
433-
434432
# add tests to test audit results, modify test to introduce some
435433
# 'zero-length' files. add some assertions to show that the post-
436434
# processing step is munging the correct directory structure needed
437435
# for subsequent steps.
438436

439-
# TODO: Test that some files end up in zero-files folder.
440-
441437
# NuQCJob successful.
442438

443-
# TODO: set up fake multiqc bin to. fake results of fastqc and
444-
# multiqc jobs.
445-
# audit_results = sorted(wf.generate_reports())
446-
447439
def test_partial_metatranscriptomic_pipeline(self):
448440
# Tests convert_raw_to_fastq() and quality_control() steps of
449441
# StandardMetatranscriptomicWorkflow(), which in turn exercises
@@ -644,13 +636,8 @@ def test_partial_metatranscriptomic_pipeline(self):
644636
self.create_fake_bin('sbatch', "\n".join(cmds))
645637
audit_results = sorted(wf.quality_control())
646638

647-
# TODO: Add assertion tests for NuQCJob
648-
649639
# NuQCJob successful.
650640

651-
# TODO: Add tests for zero-files
652-
# TODO: Add tests for MultiQC Job.
653-
654641
def test_partial_amplicon_pipeline(self):
655642
# Tests convert_raw_to_fastq() and quality_control() steps of
656643
# StandardAmpliconWorkflow(), which in turn exercises

0 commit comments

Comments
 (0)