Skip to content
Open
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
51 changes: 45 additions & 6 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,23 @@ process {
}
}

withName: '.*FGUMI_SORT' {
ext.prefix = { "${meta.id}.fgumi.unmapped.sorted" }
ext.args = {
[
"--order queryname",
"--compression-level 0",
"--max-memory ${task.memory.toGiga() / task.cpus}G",
"--tmp-dir .",
"--key-types mi"
].join(" ").trim()
}
}

//// FGUMI fastq | SNAP | zipper (step 3a)
withName: RAW_FGUMI_SNAPZIPSORT {
ext.prefix = { "${meta.id}.fgumi" }
ext.args2 = {
ext.args = {
[
"-b-",
"-sm 20",
Expand All @@ -264,35 +277,52 @@ process {
meta.readgroup ? "-R \"@RG\\t" + meta.readgroup.findResults { rg -> rg.value?.trim() ? "${rg.key}:${rg.value}" : null }.join("\\t") + "\"" : "",
].join(" ").trim()
}
ext.args2 = {
[
"--order queryname",
"--compression-level 0",
"--max-memory ${task.memory.toGiga() / task.cpus}G",
"--tmp-dir .",
"--key-types mi"
].join(" ").trim()
}
ext.args4 = {
[
"--order template-coordinate",
"--max-memory ${task.memory.toGiga()}G",
"--max-memory ${task.memory.toGiga() / task.cpus}G",
"--key-types mi",
"--tmp-dir .",
].join(" ").trim()
}
}

//// FGUMI group (step 4)
withName: '.*FGUMI_GROUP' {
ext.prefix = { "${meta.id}.fgumi.group" }
ext.args = { "--edits ${meta.fgumi_group_edits != null ? meta.fgumi_group_edits : 1}" }
ext.args = {
[
"--edits ${meta.fgumi_group_edits != null ? meta.fgumi_group_edits : 1}" ,
"--max-memory ${task.memory.toGiga() / task.cpus}G"
].join(" ").trim()
}
}

//// FGUMI simplex (step 5)
withName: '.*FGUMI_SIMPLEX' {
ext.prefix = { "${meta.id}.fgumi.simplex" }
ext.args = { "--max-memory ${task.memory.toGiga()}G" }
ext.args = { "--max-memory ${task.memory.toGiga() / task.cpus}G" }
}

//// FGUMI filter + coordinate sort/index (step 7)
withName: '.*FGUMI_FILTER' {
ext.prefix = { "${meta.id}.fgumi.filter" }
ext.args = { "--max-memory ${task.memory.toGiga() / task.cpus}G" }
}

//// FGUMI consensus alignment (step 8)
withName: UMI_FGUMI_SNAPZIPSORT {
ext.prefix = { "${meta.id}.fgumi" }
ext.args2 = {
ext.args = {
[
"-b-",
"-sm 20",
Expand All @@ -304,10 +334,19 @@ process {
meta.readgroup ? "-R \"@RG\\t" + meta.readgroup.findResults { rg -> rg.value?.trim() ? "${rg.key}:${rg.value}" : null }.join("\\t") + "\"" : "",
].join(" ").trim()
}
ext.args2 = {
[
"--order queryname",
"--compression-level 0",
"--max-memory ${task.memory.toGiga() / task.cpus}G",
"--tmp-dir .",
"--key-types mi"
].join(" ").trim()
}
ext.args4 = {
[
"--order coordinate",
"--max-memory ${task.memory.toGiga()}G",
"--max-memory ${task.memory.toGiga() / task.cpus}G",
"--write-index",
].join(" ").trim()
}
Expand Down
5 changes: 5 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@
"installed_by": ["modules"],
"patch": "modules/nf-core/fgumi/simplex/fgumi-simplex.diff"
},
"fgumi/sort": {
"branch": "master",
"git_sha": "c3e04783b2ac99ffc011745ec092614a7bef86ca",
"installed_by": ["modules"]
},
"gnu/sort": {
"branch": "master",
"git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120",
Expand Down
18 changes: 11 additions & 7 deletions modules/local/fgumi/snapzipsort/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,20 @@ process FGUMI_SNAPZIPSORT {
[ -z "\$INDEX_FILE" ] && echo "Snap index files not found" 1>&2 && exit 1
INDEX=\$(dirname "\$INDEX_FILE")

fgumi fastq \\
--input ${unmapped_bam} \\
${args} \\
| snap-aligner paired \\
snap-aligner paired \\
\$INDEX \\
-pairedInterleavedFastq - \\
${unmapped_bam} \\
-t ${task.cpus} \\
-o -bam - \\
${args2} \\
| fgumi zipper \\
${args} \\
| fgumi sort \\
--input - \\
--output ${prefix}.intermediate.bam \\
--threads ${task.cpus} \\
${args2}

fgumi zipper \\
--input ${prefix}.intermediate.bam \\
--unmapped ${unmapped_bam} \\
--reference ${fasta} \\
--threads ${task.cpus} \\
Expand Down
7 changes: 7 additions & 0 deletions modules/nf-core/fgumi/sort/environment.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 45 additions & 0 deletions modules/nf-core/fgumi/sort/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

82 changes: 82 additions & 0 deletions modules/nf-core/fgumi/sort/meta.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

89 changes: 89 additions & 0 deletions modules/nf-core/fgumi/sort/tests/main.nf.test

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading