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

Filter operator fix #22

Merged
merged 2 commits into from
Nov 20, 2024
Merged

Filter operator fix #22

merged 2 commits into from
Nov 20, 2024

Conversation

jmattock5
Copy link

Fix for the filter ratio threshold logic. Documentation stated that samples where less than 10% of reads were kept after filtering were flagged and not assembled. However the code was flagging samples that met this criteria:

(af_total_reads / bf_total_reads) <= params.filter_ratio_threshold

It was discarding samples where the proportion of passed reads was less than 90%. I've changed the filter threshold in the config to 10% to flag only the samples with less than 10% of the reads retained. I've also updated the description in the workflow and the README.

We haven't yet modified the tests affected by this change.

PR checklist

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added a new tool - have you followed the pipeline conventions in the contribution docs
  • Make sure your code lints (nf-core lint).
  • Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
  • Check for unexpected warnings in debug mode (nextflow run . -profile debug,test,docker --outdir <OUTDIR>).
  • README.md is updated (including new tool citations and authors/contributors).

@jmattock5 jmattock5 changed the base branch from main to dev November 20, 2024 15:32
Copy link
Contributor

@Vkale1 Vkale1 left a comment

Choose a reason for hiding this comment

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

This works :) thanks

@mberacochea
Copy link
Member

This is great, thank you for spotting and fixing the issue @jmattock5.

There is one extra file that needs to be modified -> https://github.com/EBI-Metagenomics/miassembler/blob/main/nextflow_schema.json#L165. This schema json file is used by the nf-schema plugin, which is sort of a argparse for nextflow

Copy link
Member

@Ge94 Ge94 left a comment

Choose a reason for hiding this comment

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

Fab! Thank you Jenny :)

Changed ratio threshold default to 0.1 and amended description
Copy link
Member

@mberacochea mberacochea left a comment

Choose a reason for hiding this comment

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

Super, thanks @jmattock5

@jmattock5 jmattock5 merged commit 686fe47 into dev Nov 20, 2024
1 check failed
@jmattock5 jmattock5 deleted the filter_operator branch November 21, 2024 07:27
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.

4 participants