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

Move out integration processes #597

Merged
merged 10 commits into from
Dec 4, 2023
52 changes: 0 additions & 52 deletions integrate.nf
Copy link
Member

Choose a reason for hiding this comment

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

Do you want to rename this while you are at it, since it isn't integration at all now?

Original file line number Diff line number Diff line change
Expand Up @@ -54,57 +54,6 @@ process merge_sce {

}

// integrate with fastMNN
process integrate_fastmnn {
container params.SCPCATOOLS_CONTAINER
label 'mem_16'
label 'cpus_4'
input:
tuple val(integration_group), path(merged_sce_file)
output:
tuple val(integration_group), path(integrated_sce_file)
script:
integrated_sce_file = "${integration_group}.rds"
"""
integrate_sce.R \
--input_sce_file "${merged_sce_file}" \
--output_sce_file "${integrated_sce_file}" \
--method "fastMNN" \
--seed ${params.seed} \
--threads ${task.cpus}
"""
stub:
integrated_sce_file = "${integration_group}.rds"
"""
touch ${integrated_sce_file}
"""
}

// integrate with fastMNN
process integrate_harmony {
container params.SCPCATOOLS_CONTAINER
publishDir "${params.results_dir}/integration/${integration_group}"
label 'mem_16'
input:
tuple val(integration_group), path(merged_sce_file)
output:
tuple val(integration_group), path(integrated_sce_file)
script:
integrated_sce_file = "${integration_group}.rds"
"""
integrate_sce.R \
--input_sce_file "${merged_sce_file}" \
--output_sce_file "${integrated_sce_file}" \
--method "harmony" \
--seed ${params.seed}
"""
stub:
integrated_sce_file = "${integration_group}.rds"
"""
touch ${integrated_sce_file}
"""
}

// create integrated report and single object
process integration_report {
container params.SCPCATOOLS_CONTAINER
Expand Down Expand Up @@ -180,4 +129,3 @@ workflow {
// generate integration report
integration_report(integrate_harmony.out, file(integration_template))
Copy link
Member

Choose a reason for hiding this comment

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

Probably want to rename this report, and we need to get rid of the integration process calls above here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe just comment this out for now, since we also don't have the rmd yet?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I'm fine with just commenting out most of this. I just don't like the idea of merging in changes that by their nature break the workflow.

Copy link
Member Author

Choose a reason for hiding this comment

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

and we need to get rid of the integration process calls above here?

Ah, I totally missed this 🙃. I blame my long 🦃 break. These lines are gone now!

}

52 changes: 52 additions & 0 deletions modules/integrate-sces.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// These processes are not currently used by any workflow.

// Process to integrate SCEs with fastMNN
process integrate_fastmnn {
container params.SCPCATOOLS_CONTAINER
label 'mem_16'
label 'cpus_4'
input:
tuple val(integration_group), path(merged_sce_file)
output:
tuple val(integration_group), path(integrated_sce_file)
script:
integrated_sce_file = "${integration_group}.rds"
"""
integrate_sce.R \
--input_sce_file "${merged_sce_file}" \
--output_sce_file "${integrated_sce_file}" \
--method "fastMNN" \
--seed ${params.seed} \
--threads ${task.cpus}
"""
stub:
integrated_sce_file = "${integration_group}.rds"
"""
touch ${integrated_sce_file}
"""
}

// Process to integrate SCEs with Harmony
process integrate_harmony {
container params.SCPCATOOLS_CONTAINER
publishDir "${params.results_dir}/integration/${integration_group}"
label 'mem_16'
input:
tuple val(integration_group), path(merged_sce_file)
output:
tuple val(integration_group), path(integrated_sce_file)
script:
integrated_sce_file = "${integration_group}.rds"
"""
integrate_sce.R \
--input_sce_file "${merged_sce_file}" \
--output_sce_file "${integrated_sce_file}" \
--method "harmony" \
--seed ${params.seed}
"""
stub:
integrated_sce_file = "${integration_group}.rds"
"""
touch ${integrated_sce_file}
"""
}