-
Notifications
You must be signed in to change notification settings - Fork 41
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
New Feature POC: VALIDATE_MODEL #404
New Feature POC: VALIDATE_MODEL #404
Conversation
Warning Newer version of the nf-core template is available. Your pipeline is using an old version of the nf-core template: 3.0.2. For more documentation on how to update your pipeline, please see the nf-core documentation and Synchronisation documentation. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it a lot! Need to check the R code in more detail though.
Update:Now the code was updated to read a simpler yml file contrasts:
- id: "treatment_mCherry_hND6"
comparison: ["treatment", "mCherry", "hND6"]
- id: "treatment_mCherry_hND6_sample_number"
comparison: ["treatment", "mCherry", "hND6"]
blocking_factors: ["sample_number"]
- id: "treatment234"
comparison: ["treatment", "mCherry", "hND6"] |
modules/local/validatemodel/resources/usr/bin/validate_model.R.bkp
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good, have some comments for you that can be addressed or not, minimal things that don't affect functionality
PR checklist
nf-core lint
).nf-test test main.nf.test -profile test,docker
).nextflow run . -profile debug,test,docker --outdir <OUTDIR>
).docs/usage.md
is updated.docs/output.md
is updated.CHANGELOG.md
is updated.README.md
is updated (including new tool citations and authors/contributors).Related to: #371
NEW FEATURE:
VALIDATE_MODEL
GOAL
Create a validation step to cross information between the YML (models and contrast information) and the sample sheet.
Features:
Inputs:
Outputs:
Functionalities:
contrast
field) must be present in the column. If there are more levels in the samplesheet, they are reported with a warning.Perspectives:
Testing
nf-test
was also added for future changes and easy comparison during development.Test
The following example files are part of the nf-test that can be executed as declared below. They were obtained from the pipeline's
test
profile.nf-test test modules/local/validatemodel/tests/main.nf.test --debug --profile docker
Example YML
This fake yml file was generated after the reference
contrast
file. It's (temporary) located within thetests/
folder of the module.Note: Check that I added the "formula" field, compared to @nschcolnicov POC for the YML validation. The script uses it to iterate over, and adds the blocking factors when required. But it can be adjusted if we want to remove it. If we decide to keep the
formula
, it will simplify the comparison field by removing the first part.Example sample sheet
Matching sample sheet can be found in:
Run script
Make the script executable and run it:
validate_model.R \ --yml path/to/yml \ --samplesheet path/to/samplesheet \ --sample_id_col 'sample'