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
37 changes: 29 additions & 8 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,40 @@
"https://github.com/nf-core/modules.git": {
"modules": {
"nf-core": {
"blast/blastp": {
"branch": "master",
"git_sha": "6330227ba2a71d39f35b0ef60e381f456489c6ee",
"installed_by": [
"modules"
]
},
"falco": {
"branch": "master",
"git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46",
"installed_by": ["modules"]
"installed_by": [
"modules"
]
},
"fastp": {
"branch": "master",
"git_sha": "d9ec4ef289ad39b8a662a7a12be50409b11df84b",
"installed_by": ["modules"]
"installed_by": [
"modules"
]
},
"fastqc": {
"branch": "master",
"git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46",
"installed_by": ["modules"]
"installed_by": [
"modules"
]
},
"multiqc": {
"branch": "master",
"git_sha": "af27af1be706e6a2bb8fe454175b0cdf77f47b49",
"installed_by": ["modules"]
"installed_by": [
"modules"
]
}
}
},
Expand All @@ -32,20 +47,26 @@
"utils_nextflow_pipeline": {
"branch": "master",
"git_sha": "05954dab2ff481bcb999f24455da29a5828af08d",
"installed_by": ["subworkflows"]
"installed_by": [
"subworkflows"
]
},
"utils_nfcore_pipeline": {
"branch": "master",
"git_sha": "271e7fc14eb1320364416d996fb077421f3faed2",
"installed_by": ["subworkflows"]
"installed_by": [
"subworkflows"
]
},
"utils_nfschema_plugin": {
"branch": "master",
"git_sha": "4b406a74dc0449c0401ed87d5bfff4252fd277fd",
"installed_by": ["subworkflows"]
"installed_by": [
"subworkflows"
]
}
}
}
}
}
}
}
58 changes: 58 additions & 0 deletions subworkflows/local/preprocessing/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
// TODO nf-core: If in doubt look at other nf-core/subworkflows to see how we are doing things! :)
// https://github.com/nf-core/modules/tree/master/subworkflows
// You can also ask for help via your pull request or on the #subworkflows channel on the nf-core Slack workspace:
// https://nf-co.re/join
// TODO nf-core: A subworkflow SHOULD import at least two modules

include { FASTQC } from '../../../modules/nf-core/fastqc/main'
include { FALCO } from '../../../modules/nf-core/falco/main'
include { FASTP } from '../../../modules/nf-core/fastp/main'

workflow PREPROCESSING {

take:
// TODO nf-core: edit input (take) channels
ch_samplesheet // channel: [ val(meta), [ bam ] ]

main:
// TODO nf-core: substitute modules here for the modules of your subworkflow
ch_versions = channel.empty()

//
// MODULE: Run FASTP
//
ch_fastp = ch_samplesheet.map { meta, reads -> tuple(meta, reads, []) }

FASTP (
ch_fastp,
[],
[],
[]
)
ch_versions = ch_versions.mix( FASTP.out.versions )

//
// MODULE: Run FALCO
//
FALCO (
FASTP.out.reads
)
ch_versions = ch_versions.mix( FALCO.out.versions )

//
// MODULE: Run FastQC
//

FASTQC (
ch_samplesheet
)
ch_versions = ch_versions.mix( FASTQC.out.versions )

emit:
// TODO nf-core: edit emitted channels
fastqc = FASTQC.out.zip
versions = ch_versions
//bam = SAMTOOLS_SORT.out.bam // channel: [ val(meta), [ bam ] ]
//bai = SAMTOOLS_INDEX.out.bai // channel: [ val(meta), [ bai ] ]
//csi = SAMTOOLS_INDEX.out.csi // channel: [ val(meta), [ csi ] ]
}
51 changes: 51 additions & 0 deletions subworkflows/local/preprocessing/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json
name: "preprecessing"
## TODO nf-core: Add a description of the subworkflow and list keywords
description: Sort SAM/BAM/CRAM file
keywords:
- sort
- bam
- sam
- cram
## TODO nf-core: Add a list of the modules and/or subworkflows used in the subworkflow
components:
- samtools/sort
- samtools/index
## TODO nf-core: List all of the channels used as input with a description and their structure
input:
- ch_bam:
type: file
description: |
The input channel containing the BAM/CRAM/SAM files
Structure: [ val(meta), path(bam) ]
pattern: "*.{bam/cram/sam}"
## TODO nf-core: List all of the channels used as output with a descriptions and their structure
output:
- bam:
type: file
description: |
Channel containing BAM files
Structure: [ val(meta), path(bam) ]
pattern: "*.bam"
- bai:
type: file
description: |
Channel containing indexed BAM (BAI) files
Structure: [ val(meta), path(bai) ]
pattern: "*.bai"
- csi:
type: file
description: |
Channel containing CSI files
Structure: [ val(meta), path(csi) ]
pattern: "*.csi"
- versions:
type: file
description: |
File containing software versions
Structure: [ path(versions.yml) ]
pattern: "versions.yml"
authors:
- "@FernandoDuarteF"
maintainers:
- "@FernandoDuarteF"
46 changes: 46 additions & 0 deletions subworkflows/local/preprocessing/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// TODO nf-core: Once you have added the required tests, please run the following command to build this file:
// nf-core subworkflows test preprecessing
nextflow_workflow {

name "Test Subworkflow PREPRECESSING"
script "../main.nf"
workflow "PREPRECESSING"

tag "subworkflows"
tag "subworkflows_"
tag "subworkflows/preprecessing"
// TODO nf-core: Add tags for all modules used within this subworkflow. Example:
tag "samtools"
tag "samtools/sort"
tag "samtools/index"


// TODO nf-core: Change the test name preferably indicating the test-data and file-format used
test("sarscov2 - bam - single_end") {

when {
workflow {
"""
// TODO nf-core: define inputs of the workflow here. Example:
input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true),
]
input[1] = [
[ id:'genome' ],
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true),
]
"""
}
}
then {
assert workflow.success
assertAll(
{ assert snapshot(
workflow.out
//TODO nf-core: Add all required assertions to verify the test output.
).match() }
)
}
}
}
15 changes: 8 additions & 7 deletions workflows/fsb.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
IMPORT MODULES / SUBWORKFLOWS / FUNCTIONS
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
include { FASTQC } from '../modules/nf-core/fastqc/main'

include { PREPROCESSING } from '../subworkflows/local/preprocessing'
include { MULTIQC } from '../modules/nf-core/multiqc/main'
include { paramsSummaryMap } from 'plugin/nf-schema'
include { paramsSummaryMultiqc } from '../subworkflows/nf-core/utils_nfcore_pipeline'
Expand All @@ -24,14 +25,14 @@ workflow FSB {

ch_versions = channel.empty()
ch_multiqc_files = channel.empty()
//
// MODULE: Run FastQC
//
FASTQC (

PREPROCESSING (
ch_samplesheet
)
ch_multiqc_files = ch_multiqc_files.mix(FASTQC.out.zip.collect{it[1]})
ch_versions = ch_versions.mix(FASTQC.out.versions.first())
ch_versions = ch_versions.mix( PREPROCESSING.out.versions )

// ch_multiqc_files = ch_multiqc_files.mix(FASTQC.out.zip.collect{it[1]})
// ch_versions = ch_versions.mix(FASTQC.out.versions.first())

//
// Collate and save software versions
Expand Down
Loading