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

Add missing module versions #245

Merged
merged 3 commits into from
Mar 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

- [#221](https://github.com/nf-core/airrflow/pull/221) Fixed bug arising when not providing `--index_file FALSE` for some input options not requiring index files.
- [#239](https://github.com/nf-core/airrflow/pull/239) Implemented workaround for Slurm Sbatch file too large. We plan to revert when possible[#242](https://github.com/nf-core/airrflow/issues/242)
- [#245](https://github.com/nf-core/airrflow/pull/245) Add missing module versions

### `Dependencies`

Expand Down
9 changes: 8 additions & 1 deletion modules/local/reveal/add_meta_to_tab.nf
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,17 @@ process ADD_META_TO_TAB {
output:
tuple val(meta), path("*meta-pass.tsv"), emit: tab // sequence tsv in AIRR format
path("*_command_log.txt"), emit: logs //process logs
path "versions.yml", emit: versions

script:
"""
# TODO: remove not relevant fields
reveal_add_metadata.R --repertoire "${tab}" --metadata "${validated_input}" --input_id "${meta.id}" --outname "${meta.id}" > "${meta.id}_add-meta_command_log.txt"

cat <<-END_VERSIONS > versions.yml
"${task.process}":
dplyr: \$(Rscript -e "library(dplyr); cat(paste(packageVersion('dplyr'), collapse='.'))")
optparse: \$(Rscript -e "library(optparse); cat(paste(packageVersion('optparse'), collapse='.'))")
R: \$(echo \$(R --version 2>&1) | awk -F' ' '{print \$3}')
END_VERSIONS
"""
}
9 changes: 9 additions & 0 deletions modules/local/reveal/filter_junction_mod3.nf
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,18 @@ process FILTER_JUNCTION_MOD3 {
output:
tuple val(meta), path("*junction-pass.tsv"), emit: tab // sequence tsv in AIRR format
path("*_command_log.txt"), emit: logs //process logs
path "versions.yml", emit: versions

script:
"""
reveal_mod_3_junction.R --repertoire $tab --outname ${meta.id} > "${meta.id}_jmod3_command_log.txt"

cat <<-END_VERSIONS > versions.yml
"${task.process}":
alakazam: \$(Rscript -e "library(alakazam); cat(paste(packageVersion('alakazam'), collapse='.'))")
optparse: \$(Rscript -e "library(optparse); cat(paste(packageVersion('optparse'), collapse='.'))")
airr: \$(Rscript -e "library(airr); cat(paste(packageVersion('airr'), collapse='.'))")
R: \$(echo \$(R --version 2>&1) | awk -F' ' '{print \$3}')
END_VERSIONS
"""
}
13 changes: 12 additions & 1 deletion modules/local/reveal/filter_quality.nf
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,21 @@ process FILTER_QUALITY {
output:
tuple val(meta), path("*quality-pass.tsv"), emit: tab // sequence tsv in AIRR format
path("*_command_log.txt"), emit: logs //process logs
path "versions.yml", emit: versions

script:
// TODO: add to enchantr
"""
reveal_filter_quality.R --repertoire $tab --outname ${meta.id} > "${meta.id}_fq_command_log.txt"

cat <<-END_VERSIONS > versions.yml
"${task.process}":
alakazam: \$(Rscript -e "library(alakazam); cat(paste(packageVersion('alakazam'), collapse='.'))")
optparse: \$(Rscript -e "library(optparse); cat(paste(packageVersion('optparse'), collapse='.'))")
stringi: \$(Rscript -e "library(stringi); cat(paste(packageVersion('stringi'), collapse='.'))")
dplyr: \$(Rscript -e "library(dplyr); cat(paste(packageVersion('dplyr'), collapse='.'))")
airr: \$(Rscript -e "library(airr); cat(paste(packageVersion('airr'), collapse='.'))")
DT: \$(Rscript -e "library(DT); cat(paste(packageVersion('DT'), collapse='.'))")
R: \$(echo \$(R --version 2>&1) | awk -F' ' '{print \$3}')
END_VERSIONS
"""
}
5 changes: 0 additions & 5 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,6 @@ params {
igphyml="/usr/local/bin/igphyml"
skip_lineage = false


// old bcellmagic options ----------------------
// Clustering parameters
// threshold_method = 'density'

// -----------------------
// reporting options
// -----------------------
Expand Down
1 change: 0 additions & 1 deletion subworkflows/local/assembled_input_check.nf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ workflow ASSEMBLED_INPUT_CHECK {
miairr
collapseby
cloneby
//reassign

main:
// TODO: validate input should check that sample_ids are unique
Expand Down
7 changes: 4 additions & 3 deletions subworkflows/local/vdj_annotation.nf
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ workflow VDJ_ANNOTATION {
// - locus should match v_call chain
// - seq alignment min length informative positions 200
// - max 10% N nucleotides
// TODO: emit versions
FILTER_QUALITY(
ch_assigned_tab
)
ch_logs = ch_logs.mix(FILTER_QUALITY.out.logs)
ch_versions = ch_versions.mix(FILTER_QUALITY.out.versions.ifEmpty(null))

if (params.productive_only) {
CHANGEO_PARSEDB_SPLIT (
Expand All @@ -112,12 +112,13 @@ workflow VDJ_ANNOTATION {
ch_versions = ch_versions.mix(CHANGEO_PARSEDB_SPLIT.out.versions.ifEmpty(null))

// Apply filter: junction length multiple of 3
// TODO: Add to enchantr and emit versions?
FILTER_JUNCTION_MOD3(
CHANGEO_PARSEDB_SPLIT.out.tab
)
ch_logs = ch_logs.mix(FILTER_JUNCTION_MOD3.out.logs)
ch_versions = ch_versions.mix(FILTER_JUNCTION_MOD3.out.versions.ifEmpty(null))
ch_repertoire = FILTER_JUNCTION_MOD3.out.tab.ifEmpty(null)

} else {
ch_repertoire = FILTER_QUALITY.out.tab.ifEmpty(null)
}
Expand All @@ -126,8 +127,8 @@ workflow VDJ_ANNOTATION {
ch_repertoire,
ch_validated_samplesheet
)
//TODO: emit versions
ch_logs = ch_logs.mix(ADD_META_TO_TAB.out.logs)
ch_versions = ch_versions.mix(ADD_META_TO_TAB.out.versions.ifEmpty(null))


emit:
Expand Down
2 changes: 0 additions & 2 deletions workflows/airrflow.nf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ def summary_params = NfcoreSchema.paramsSummaryMap(workflow, params)
// Validate input parameters
WorkflowAirrflow.initialise(params, log)

// TODO nf-core: Add all file path parameters for the pipeline to the list below
// Check input path parameters to see if they exist
def checkPathParamList = [ params.input, params.multiqc_config ]
for (param in checkPathParamList) { if (param) { file(param, checkIfExists: true) } }
Expand Down Expand Up @@ -45,7 +44,6 @@ ch_report_logo_img = Channel.fromPath(params.report_logo_img, checkIfExists: tru

include { CHANGEO_CONVERTDB_FASTA as CHANGEO_CONVERTDB_FASTA_FROM_AIRR } from '../modules/local/changeo/changeo_convertdb_fasta'


//
// SUBWORKFLOW: Consisting of a mix of local and nf-core/modules
//
Expand Down