Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated get_project_info() #147

Merged
merged 1 commit into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion sequence_processing_pipeline/Pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -723,10 +723,14 @@ def get_project_info(self, short_names=False):
for res in bioinformatics.to_dict('records'):
p_name, q_id = self._parse_project_name(res['Sample_Project'],
short_names)

# parsed SampleSheet() objects should now contain only
# boolean values in contains_replicates column.

contains_replicates = False

if 'contains_replicates' in res:
if res['contains_replicates'] == 'True':
if res['contains_replicates'] is True:
contains_replicates = True

results.append({'project_name': p_name,
Expand Down
11 changes: 11 additions & 0 deletions sequence_processing_pipeline/tests/test_Pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -1558,6 +1558,17 @@ def test_get_project_info(self):

self.assertEqual(sorted(obs_project_names), sorted(exp_project_names))

pipeline = Pipeline(self.good_config_file, self.good_run_id,
self.good_sheet_w_replicates, None,
self.output_file_path, self.qiita_id,
Pipeline.METAGENOMIC_PTYPE)

obs_proj_info = pipeline.get_project_info()

# assert value is boolean type True, even though the method no longer
# silently converts string values to bool.
self.assertTrue(obs_proj_info[0]['contains_replicates'])

def test_configuration_profiles(self):
pipeline = Pipeline(self.good_config_file, self.good_run_id,
self.good_sample_sheet_path, None,
Expand Down
Loading