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

Added CLI command for generating a QC report for CDM #4

Merged

Conversation

mhkc
Copy link
Collaborator

@mhkc mhkc commented Dec 8, 2023

Added a CLI command for generating the a QC report for CDM in JSON format. The PR includes a unit tests for the command.

Run

Run with prp create-cdm-input -q quast.tsv -p bwa.qc -c chewbbaca.out sample_name

Test

pytest tests

@mhkc mhkc linked an issue Dec 8, 2023 that may be closed by this pull request
@ryanjameskennedy
Copy link
Collaborator

I was thinking that we could run prp just once like so:

prp create-output \\
      --sample-id ${sampleName} \\
      ${amrfinderArgs} \\
      ${brackenArgs} \\
      ${cgmlstArgs} \\
      ${mlstArgs} \\
      ${mykrobeArgs} \\
      ${postalignqcArgs} \\
      ${quastArgs} \\
      ${resfinderArgs} \\
      ${runInfoArgs} \\
      ${tbprofilerArgs} \\
      ${virulenceArgs} \\
      --qc-results ${qcOutput} \\
      --analysis-results ${output}

This way we don't need to parse the outputs twice?

@mhkc
Copy link
Collaborator Author

mhkc commented Dec 11, 2023

I think its cleaner to keep them as separate commands as it makes it clearer what type of input is used to generate which output. CDM is also a proprietary software that other sites are not going to use. Its cleaner to not generate CDM input data by default, especially since we already have a export_to_cdm submodule.

@ryanjameskennedy
Copy link
Collaborator

Yeah but the export_to_cdm is just for creating the arguments file for the upload:

echo ${sequencingRun} \\
         -sample-id ${sampleName} \\
         -assay ${species} \\
         -qc ${qc} \\
         ${limsID}

Anyways I will create another process in the prp module if you think this is better.

@ryanjameskennedy
Copy link
Collaborator

Perhaps we could add an --output arg?

@@ -86,7 +86,7 @@ def cli():
@click.option("-t", "--tbprofiler", type=click.File(), help="tbprofiler results")
@click.option("--correct_alleles", is_flag=True, help="Correct alleles")
@click.argument("output", type=click.File("w"))
def create_output(
def create_bonsai_input(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean the subarg changes from create-output to create-bonsai-input? I.e. prp create-bonsai-input $args?

Copy link
Collaborator

@ryanjameskennedy ryanjameskennedy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@mhkc mhkc merged commit 1de5ffb into master Dec 12, 2023
7 checks passed
@mhkc mhkc deleted the 3-args-for-cdm-qc-output-json-filepath-and-analysis-results branch December 12, 2023 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Args for cdm qc output json filepath and analysis results
2 participants