Skip to content

Commit

Permalink
Merge pull request #24 from antgonza/fix-after-rc-testing
Browse files Browse the repository at this point in the history
fixes after rc testing
  • Loading branch information
charles-cowart authored Dec 20, 2023
2 parents 71fe32d + 01f1d02 commit bd235f5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
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

0 comments on commit bd235f5

Please sign in to comment.