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

fixes after rc testing #24

Merged
merged 2 commits into from
Dec 20, 2023
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: 4 additions & 2 deletions qp_woltka/tests/test_woltka.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,11 +577,13 @@ def test_calculate_cell_counts(self):
'SKB8.640193': {
'run_prefix': 'S22205_S104', 'syndna_pool_number': 1,
'raw_reads_r1r2': 10000, 'mass_syndna_input_ng': 120,
'minipico_dna_concentration_ng_ul': 10, 'vol_elute_ul': 5},
'extracted_gdna_concentration_ng_ul': 10,
'vol_extracted_elution_ul': 5},
'SKD8.640184': {
'run_prefix': 'S22282_S102', 'syndna_pool_number': 1,
'raw_reads_r1r2': 10002, 'mass_syndna_input_ng': 120,
'minipico_dna_concentration_ng_ul': 11, 'vol_elute_ul': 6}}
'extracted_gdna_concentration_ng_ul': 11,
'vol_extracted_elution_ul': 6}}
data = {'prep_info': dumps(prep_info_dict),
'study': 1,
'data_type': 'Metagenomic'}
Expand Down
2 changes: 1 addition & 1 deletion qp_woltka/woltka.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ def woltka_syndna(qclient, job_id, parameters, out_dir):
prep = pd.read_csv(
f'{out_dir}/prep_info.tsv', index_col=None, sep='\t')
output = fit_linear_regression_models_for_qiita(
prep, load_table(fp_biom), parameters['min_sample_counts'])
prep, load_table(fp_biom), int(parameters['min_sample_counts']))
# saving results to disk
lin_regress_results_fp = f'{out_dir}/lin_regress_by_sample_id.yaml'
fit_syndna_models_log_fp = f'{out_dir}/fit_syndna_models_log.txt'
Expand Down
22 changes: 14 additions & 8 deletions scripts/start_woltka
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,20 @@ def execute(url, job_id, out_dir):

qclient.update_job_step(
job_id, "Step 1 of 4: Collecting info and generating submission")

# these were defined in qp_woltka/__init.py__ while defining the
# available commands for this plugin
valid_commands = [
'Woltka v0.1.4', 'SynDNA Woltka', 'Calculate Cell Counts']

# this if/elif is the current solution for
# https://github.com/qiita-spots/qiita/issues/3340
if command not in valid_commands:
raise ValueError(f'Not a valid command: "{command}"')
elif command == 'Calculate Cell Counts':
plugin(url, job_id, out_dir)
exit(0)

artifact_id = parameters['input']
del parameters['input']
files, prep = qclient.artifact_and_preparation_files(artifact_id)
Expand All @@ -47,14 +61,6 @@ def execute(url, job_id, out_dir):
else:
directory = directory.pop()

# these were defined in qp_woltka/__init.py__ while defining the
# available commands for this plugin
valid_commands = [
'Woltka v0.1.4', 'SynDNA Woltka', 'Calculate Cell Counts']

if command not in valid_commands:
raise ValueError(f'Not a valid command: "{command}"')

if command == 'Woltka v0.1.4':
main_fp, merge_fp = woltka_to_array(
files, out_dir, parameters['Database'], prep, url, job_id)
Expand Down
Loading