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

Report warning message when analyzing data with two replicates #7289

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Xinlei-Gao
Copy link

The update version deals with two cases:

  1. If there are two conditions with two replicates, skip running anota2seq and report warning message in the log file.

  2. If there are more than two conditions with two replicates, perform analysis with the parameter onlyGroup = TRUE, and report warning message in the log file.

PR checklist

Closes #XXX

  • 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 module conventions in the contribution docs
  • If necessary, include test data in your PR.
  • Remove all TODO statements.
  • Emit the versions.yml file.
  • Follow the naming conventions.
  • Follow the parameters requirements.
  • Follow the input/output options guidelines.
  • Add a resource label
  • Use BioConda and BioContainers if possible to fulfil software requirements.
  • Ensure that the test works with either Docker / Singularity. Conda CI tests can be quite flaky:
    • For modules:
      • nf-core modules test <MODULE> --profile docker
      • nf-core modules test <MODULE> --profile singularity
      • nf-core modules test <MODULE> --profile conda
    • For subworkflows:
      • nf-core subworkflows test <SUBWORKFLOW> --profile docker
      • nf-core subworkflows test <SUBWORKFLOW> --profile singularity
      • nf-core subworkflows test <SUBWORKFLOW> --profile conda

…sis on datasets with only two replicates.

The update version deals with two cases:
1. If there are two conditions with two replicates, skip running anota2seq and report warning message in the log file.

2. If there are more than two conditions with two replicates, perform analysis with the parameter onlyGroup = TRUE, and report warning message in the log file.
@lpantano
Copy link
Contributor

Hi @Xinlei-Gao, did you get to run nf-core modules test <MODULE> --profile docker successfully locally? I think you need to update your snapshots and that is done by running twice the modules test (I believe).

@Xinlei-Gao
Copy link
Author

Xinlei-Gao commented Jan 10, 2025 via email

@Xinlei-Gao
Copy link
Author

Xinlei-Gao commented Jan 10, 2025 via email

@SPPearce
Copy link
Contributor

I'm confused by this module, what exactly is it doing?

@Xinlei-Gao
Copy link
Author

Xinlei-Gao commented Jan 13, 2025 via email

Copy link
Contributor

@SPPearce SPPearce left a comment

Choose a reason for hiding this comment

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

Ok, I think I understand what the module is doing now (not the PR, the module itself), I was confused by the fact that a samplesheet was being passed.

@@ -33,5 +33,7 @@ process ANOTA2SEQ_ANOTA2SEQRUN {
task.ext.when == null || task.ext.when

script:
template 'anota2seqrun.r'
"""
Rscript ${projectDir}/modules/nf-core/anota2seq/anota2seqrun/templates/anota2seqrun.r --output_prefix ${task.ext.prefix ?: meta.id} --sample_treatment_col ${sample_treatment_col} --reference_level ${reference} --target_level ${target} --sample_file ${samplesheet} --count_file ${counts}
Copy link
Contributor

Choose a reason for hiding this comment

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

You can't do this, it won't work on cloud providers. Why are you trying to move away from the use of the template?

@Xinlei-Gao
Copy link
Author

Xinlei-Gao commented Jan 13, 2025 via email

@SPPearce
Copy link
Contributor

I tried keeping using template after modifying the R code anota2seqrun.r, but it failed when I ran the nf-core Ribo-seq pipeline (which called this module), due to some error that it can not correctly pass the parameter like $task.ext.***. So that I replaced the template command with directly calling Rscript and passing the parameters in the command line. The template R script itself would read an input samplesheet. The samplesheet file is provided in a nf-core test dataset. I don't know this can affect cloud platforms. If so what might be any suggestions? Thanks! Xinlei

Guidelines are here: https://nf-co.re/docs/guidelines/components/modules#script-inclusion
I think we should be able to fix the template issue, we should be able to use task.ext.args with the template.

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.

3 participants