Skip to content

Commit

Permalink
trust4 nf-core module
Browse files Browse the repository at this point in the history
  • Loading branch information
mapo9 committed Jun 5, 2024
1 parent 46a5fa2 commit ba3eea1
Show file tree
Hide file tree
Showing 7 changed files with 126 additions and 30 deletions.
5 changes: 5 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
"branch": "master",
"git_sha": "b7ebe95761cd389603f9cc0e0dc384c0f663815a",
"installed_by": ["modules"]
},
"trust4": {
"branch": "master",
"git_sha": "bbb9636dbe460f45fe786d0866f8fd7337e4fc7a",
"installed_by": ["modules"]
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion modules/local/prepare_trust4_reference.nf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ process PREPARE_TRUST4_REFERENCE {
path(reference_igblast)

output:
path("trust4_reference.fa") , emit: trust4_reference
tuple val(meta), path("trust4_reference.fa") , emit: trust4_reference

script:
"""
Expand Down
9 changes: 9 additions & 0 deletions modules/nf-core/trust4/environment.yml

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

47 changes: 25 additions & 22 deletions modules/local/trust4.nf → modules/nf-core/trust4/main.nf

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

75 changes: 75 additions & 0 deletions modules/nf-core/trust4/meta.yml

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

6 changes: 1 addition & 5 deletions subworkflows/local/fastq_input_check.nf
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,7 @@ def create_fastq_channels(LinkedHashMap col) {
}
if (params.library_generation_method == "trust4") {
meta.barcode_read = params.barcode_read
if (params.umi_read == "") {
meta.umi_read = null
} else {
meta.umi_read = params.umi_read
}
meta.umi_read = params.umi_read
array = [ meta, [ file(col.filename_R1), file(col.filename_R2) ] ]
} else {
array = [ meta, [ file(col.filename_R1), file(col.filename_R2) ] ]
Expand Down
12 changes: 10 additions & 2 deletions subworkflows/local/rnaseq_input.nf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include { PREPARE_TRUST4_REFERENCE } from '../../modules/local/prepare_trust4_reference'
include { TRUST4 } from '../../modules/local/trust4'
include { TRUST4 } from '../../modules/nf-core/trust4/main'
include { FASTQ_INPUT_CHECK } from '../../subworkflows/local/fastq_input_check'
include { CHANGEO_CONVERTDB_FASTA as CHANGEO_CONVERTDB_FASTA_FROM_AIRR } from '../../modules/local/changeo/changeo_convertdb_fasta'
include { FASTP } from '../../modules/nf-core/fastp/main'
Expand Down Expand Up @@ -75,10 +75,18 @@ workflow RNASEQ_INPUT {

PREPARE_TRUST4_REFERENCE.out.trust4_reference.dump(tag: "trust4_reference")

ch_reads_trust4.dump(tag: "trust4_input")

// create barcode and umi channels for nf-core trust4 module
barcode_channel = ch_reads_fastp_filtered.map { meta, read_1, read_2 -> [meta, meta.barcode_read] }
umi_channel = ch_reads_fastp_filtered.map { meta, read_1, read_2 -> [meta, meta.umi_read] }

TRUST4(
ch_reads_trust4,
PREPARE_TRUST4_REFERENCE.out.trust4_reference,
Channel.of([[], []]).collect()
Channel.of([[], []]).collect(),
barcode_channel,
umi_channel
)

ch_trust4_out = TRUST4.out.outs
Expand Down

0 comments on commit ba3eea1

Please sign in to comment.