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 GMM-Demux #5892

Merged
merged 33 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
585cc96
meta
mari-ga Jun 27, 2024
cbd4cc9
deleted white space
mari-ga Jun 27, 2024
f22b5e6
updates for comments
mari-ga Jul 26, 2024
1c4f130
Merge branch 'nf-core:master' into gmm-demux
mari-ga Jul 26, 2024
58c4afa
Merge remote-tracking branch 'refs/remotes/origin/gmm-demux' into gmm…
mari-ga Jul 26, 2024
76c3ee9
Merge branch 'nf-core:master' into gmm-demux
mari-ga Jul 29, 2024
96e73ae
added fixes to gmmdemux
mari-ga Jul 29, 2024
bae8d35
new structure including all outputs in a single folder
mari-ga Jul 30, 2024
8e557e3
white trailing space deleted
mari-ga Jul 30, 2024
b9a2a92
Merge branch 'master' into gmm-demux
mari-ga Jul 30, 2024
415544b
lint solved
mari-ga Jul 30, 2024
275fc71
Merge remote-tracking branch 'refs/remotes/origin/gmm-demux' into gmm…
mari-ga Jul 30, 2024
08cfac4
Fixed stub and changed default num of cells
mari-ga Jul 30, 2024
05ddd5a
added -o param to script
mari-ga Jul 30, 2024
34c9d10
Merge branch 'master' into gmm-demux
mari-ga Aug 1, 2024
d97b8dc
Edit spacing
SPPearce Aug 1, 2024
48f3e18
Add empty line
SPPearce Aug 1, 2024
c0c5978
added simple test, fix for argument
mari-ga Aug 1, 2024
ecbcd25
Merge remote-tracking branch 'refs/remotes/origin/gmm-demux' into gmm…
mari-ga Aug 1, 2024
09af95f
Merge branch 'master' into gmm-demux
mari-ga Aug 1, 2024
61b86fd
white space lint
mari-ga Aug 1, 2024
c8c0e14
Merge remote-tracking branch 'refs/remotes/origin/gmm-demux' into gmm…
mari-ga Aug 1, 2024
b6b2fc7
new snapshots
mari-ga Aug 5, 2024
7f89fee
Merge branch 'master' into gmm-demux
mari-ga Aug 5, 2024
3383e58
lint whitespace
mari-ga Aug 5, 2024
7aad7f5
Merge remote-tracking branch 'refs/remotes/origin/gmm-demux' into gmm…
mari-ga Aug 5, 2024
bbb528c
lint whitespace
mari-ga Aug 5, 2024
e12c48f
Merge branch 'master' into gmm-demux
mari-ga Aug 5, 2024
1fc2250
new snaps
mari-ga Aug 7, 2024
4243a2c
fix snap
mari-ga Aug 7, 2024
ab84680
Merge remote-tracking branch 'refs/remotes/origin/gmm-demux' into gmm…
mari-ga Aug 7, 2024
7cd4624
Merge branch 'master' into gmm-demux
mari-ga Aug 7, 2024
9ba5d7d
Merge branch 'master' into gmm-demux
mari-ga Aug 8, 2024
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
Prev Previous commit
Next Next commit
new structure including all outputs in a single folder
  • Loading branch information
mari-ga committed Jul 30, 2024
commit bae8d35687433e4e23a253fcaae332422aed6062
31 changes: 16 additions & 15 deletions modules/nf-core/gmmdemux/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,28 @@ process GMMDEMUX {
path examine

output:
tuple val(meta), path("${meta.id}/barcodes.tsv.gz" ), emit: barcodes
tuple val(meta), path("${meta.id}/*.mtx.gz" ), emit: matrix
tuple val(meta), path("${meta.id}/features.tsv.gz" ), emit: features
tuple val(meta), path("${meta.id}/classification_report_${meta.id}" ), emit: classification_report
tuple val(meta), path("summary_report_${meta.id}.txt" ), emit: summary_report, optional: true
path "versions.yml" , emit: versions
tuple val(meta), path("barcodes.tsv.gz" ), emit: barcodes
tuple val(meta), path("matrix.mtx.gz" ), emit: matrix
tuple val(meta), path("features.tsv.gz" ), emit: features
tuple val(meta), path("GMM_*.csv" ), emit: classification_report
tuple val(meta), path("GMM_*.config" ), emit: config_report
tuple val(meta), path("summary_report_*.txt" ), emit: summary_report, optional: true
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def type_report = type_report ? "-f ${prefix}/classification_report_${prefix}" : "-s ${prefix}/classification_report_${prefix}"
def skip = skip ? "--skip $skip" : ""
def examine_cells = examine ? "--extract $examine" : ""
mari-ga marked this conversation as resolved.
Show resolved Hide resolved
def summary_rep = summary_report ? "-r summary_report_${prefix}" : ""
def VERSION = '0.2.2.3' // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions.
def type_report = type_report ? "-f ." : "-s ."
def summary_rep = summary_report ? "-r summary_report_${prefix}" : ""
"""
if [[ ${summary_report} == true ]]; then
cat /dev/null > summary_report_${prefix}.txt
echo "summary report file created"
fi

GMM-demux $args \\
mari-ga marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -54,14 +54,15 @@ process GMMDEMUX {
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
def VERSION = '0.2.2.3'
def prefix = task.ext.prefix ?: "${meta.id}"
"""
mkdir ${prefix}
touch ${prefix}/barcodes.tsv.gz
touch ${prefix}/features.tsv.gz
touch ${prefix}/matrix.mtx.gz
touch ${prefix}/classification_report_${prefix}

echo "" | gzip > barcodes.tsv.gz
echo "" | gzip > features.tsv.gz
echo "" | gzip > matrix.mtx.gz
touch GMM_full.config
touch GMM_full.csv

cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
13 changes: 9 additions & 4 deletions modules/nf-core/gmmdemux/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,22 +59,27 @@ output:
type: file
description: |
barcodes tsv file with removed cell-hashing-identifiable multiplets
pattern: "test/*.tsv.gz"
pattern: "barcodes.tsv.gz"
- matrix:
type: file
description: |
matrix mtx.tsv file with removed cell-hashing-identifiable multiplets
pattern: "test/*.tsv.gz"
pattern: "matrix.mtx.gz"
- features:
type: file
description: |
features tsv file with removed cell-hashing-identifiable multiplets
pattern: "test/*.tsv.gz"
pattern: "features.tsv.gz"
- classification_report:
type: file
description: |
full or simplified classification report
pattern: "test/*_report_*.txt"
pattern: "GMM_*.csv"
- config_report:
type: file
description: |
Configuration report mapping the results obtained by the tool to the respective names of the HTOs in the classification report.
pattern: "GMM_*.csv"
- summary_report:
type: file
description: |
Expand Down
5 changes: 2 additions & 3 deletions modules/nf-core/gmmdemux/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,8 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert path(process.out.matrix.get(0).get(1)).exists() },
{ assert path(process.out.barcodes.get(0).get(1)).exists() },
{ assert path(process.out.features.get(0).get(1)).exists() },
{ assert process.success },
{ assert snapshot( process.out ).match() }
)
}

Expand Down
141 changes: 22 additions & 119 deletions modules/nf-core/gmmdemux/tests/main.nf.test.snap
mari-ga marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,188 +1,91 @@
{
"Standard_Multiome - 10x mtx": {
"Standard_Multiome - 10x mtx - Stub": {
Copy link
Contributor

Choose a reason for hiding this comment

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

This still has -Stub, and not the actual test output.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I ran nf-core modules test gmmdemux --update but didin't create a new snapshot, then deleted the file main.nf.test.snap , but it didn't produce a new file, so I fixed the name from Stub to stub, is that right? I read that it was possible on Slack

"content": [
{
"0": [
[
{
"id": "test",
"single_end": true
"id": "test"
},
"barcodes.tsv.gz:md5,8ce05fd0599d95476158177deaa48543"
"barcodes.tsv.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
]
],
"1": [
[
{
"id": "test",
"single_end": true
"id": "test"
},
"matrix.mtx.gz:md5,a203d4315dfae4ff939fe60dec9b9846"
"matrix.mtx.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
]
],
"2": [
[
{
"id": "test",
"single_end": true
"id": "test"
},
"features.tsv.gz:md5,d7abe6b89142a9cf23d75a434d13a789"
"features.tsv.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
]
],
"3": [
[
{
"id": "test",
"single_end": true
"id": "test"
},
[
"GMM_full.config:md5,5d74af7b15c1cd4abaa4696be78631b2",
"GMM_full.csv:md5,5b10400b4962e55c5daa4ea22394ff41"
]
"GMM_full.csv:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"4": [
[
{
"id": "test",
"single_end": true
"id": "test"
},
"summary_report_test.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
"GMM_full.config:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"5": [
"versions.yml:md5,da37b016c394b4e8cc16afb83e6f4941"
],
"barcodes": [
[
{
"id": "test",
"single_end": true
},
"barcodes.tsv.gz:md5,8ce05fd0599d95476158177deaa48543"
]
],
"classification_report": [
[
{
"id": "test",
"single_end": true
},
[
"GMM_full.config:md5,5d74af7b15c1cd4abaa4696be78631b2",
"GMM_full.csv:md5,5b10400b4962e55c5daa4ea22394ff41"
]
]
],
"features": [
[
{
"id": "test",
"single_end": true
},
"features.tsv.gz:md5,d7abe6b89142a9cf23d75a434d13a789"
]
],
"matrix": [
[
{
"id": "test",
"single_end": true
},
"matrix.mtx.gz:md5,a203d4315dfae4ff939fe60dec9b9846"
]
],
"summary_report": [
[
{
"id": "test",
"single_end": true
},
"summary_report_test.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
]

],
"versions": [
"6": [
"versions.yml:md5,da37b016c394b4e8cc16afb83e6f4941"
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.2"
},
"timestamp": "2024-07-26T13:49:27.371578"
},
"Standard_Multiome - 10x mtx - Stub": {
"content": [
{
"0": [
[
{
"id": "test"
},
"/Users/mylenemarianagonzalesandre/Development/HiWi/nf-core/gmm-demux/modules/.nf-test/tests/7eb233d1843e36f276a6f58572e05321/work/43/54cffeebab21850b5b74ec9d5aab4b/test/barcodes.tsv.gz"
]
],
"1": [
[
{
"id": "test"
},
"/Users/mylenemarianagonzalesandre/Development/HiWi/nf-core/gmm-demux/modules/.nf-test/tests/7eb233d1843e36f276a6f58572e05321/work/43/54cffeebab21850b5b74ec9d5aab4b/test/matrix.mtx.gz"
]
],
"2": [
[
{
"id": "test"
},
"/Users/mylenemarianagonzalesandre/Development/HiWi/nf-core/gmm-demux/modules/.nf-test/tests/7eb233d1843e36f276a6f58572e05321/work/43/54cffeebab21850b5b74ec9d5aab4b/test/features.tsv.gz"
]
],
"3": [
"barcodes": [
[
{
"id": "test"
},
"classification_report_test:md5,d41d8cd98f00b204e9800998ecf8427e"
"barcodes.tsv.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
]
],
"4": [

],
"5": [
"versions.yml:md5,da37b016c394b4e8cc16afb83e6f4941"
],
"barcodes": [
"classification_report": [
[
{
"id": "test"
},
"/Users/mylenemarianagonzalesandre/Development/HiWi/nf-core/gmm-demux/modules/.nf-test/tests/7eb233d1843e36f276a6f58572e05321/work/43/54cffeebab21850b5b74ec9d5aab4b/test/barcodes.tsv.gz"
"GMM_full.csv:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"classification_report": [
"config_report": [
[
{
"id": "test"
},
"classification_report_test:md5,d41d8cd98f00b204e9800998ecf8427e"
"GMM_full.config:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"features": [
[
{
"id": "test"
},
"/Users/mylenemarianagonzalesandre/Development/HiWi/nf-core/gmm-demux/modules/.nf-test/tests/7eb233d1843e36f276a6f58572e05321/work/43/54cffeebab21850b5b74ec9d5aab4b/test/features.tsv.gz"
"features.tsv.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
]
],
"matrix": [
[
{
"id": "test"
},
"/Users/mylenemarianagonzalesandre/Development/HiWi/nf-core/gmm-demux/modules/.nf-test/tests/7eb233d1843e36f276a6f58572e05321/work/43/54cffeebab21850b5b74ec9d5aab4b/test/matrix.mtx.gz"
"matrix.mtx.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
]
],
"summary_report": [
Expand All @@ -197,6 +100,6 @@
"nf-test": "0.8.4",
"nextflow": "24.04.3"
},
"timestamp": "2024-07-29T14:41:14.557411"
"timestamp": "2024-07-30T15:00:17.240999"
}
}
6 changes: 4 additions & 2 deletions modules/nf-core/gmmdemux/tests/nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ params{
num_cells = 35685
examine = "example_cell_types.txt"
ambiguous = 0.05
output_path = 'test'


}

process {
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }

withName: GMMDEMUX {
ext.args = "-t ${params.threshold} --summary ${params.num_cells} -o ${params.output_path} -a ${params.ambiguous} "
ext.args = "-t ${params.threshold} -o . --summary ${params.num_cells} -a ${params.ambiguous} "
}
}
Loading