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

decontamination workflow #72

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
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
5 changes: 1 addition & 4 deletions assets/samplesheet.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
species,refseq,fasta,gff
Vespula_vulgaris,GCF_905475345.1,,
Vespa_velutina,GCF_912470025.1,,
Apis_mellifera,GCF_003254395.2,,
Osmia_bicornis,GCF_907164935.1,,
Saccharomyces_cerevisiae,,/workspace/FCS_combo_test.fa,/workspace/GCF_000146045.2_R64_genomic.gff.gz
41 changes: 41 additions & 0 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,47 @@ process {
ext.args = "--minimum 5 --maximum 12"
}

withName: 'FCS_FCSADAPTOR' {
publishDir = [
path: { "${params.outdir}/decontamination/adaptor" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: 'FCS_CLEANADAPTOR' {
publishDir = [
path: { "${params.outdir}/decontamination/adaptor" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: 'FCS_FCSGX' {
publishDir = [
path: { "${params.outdir}/decontamination//NCBI" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: 'FCS_CLEANGENOME' {
publishDir = [
path: { "${params.outdir}/decontamination/NCBI" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: 'TIARA_TIARA' {
publishDir = [
path: { "${params.outdir}/decontamination/tiara" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}


withName: 'MULTIQC' {
ext.args = { params.multiqc_title ? "--title \"$params.multiqc_title\"" : '' }
publishDir = [
Expand Down
257 changes: 118 additions & 139 deletions modules.json
Original file line number Diff line number Diff line change
@@ -1,142 +1,121 @@
{
"name": "ecoflow/genomeqc",
"homePage": "https://github.com/ecoflow/genomeqc",
"repos": {
"https://github.com/nf-core/modules.git": {
"modules": {
"nf-core": {
"agat/spstatistics": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": [
"modules"
]
},
"busco/busco": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": [
"modules"
]
},
"fastqc": {
"branch": "master",
"git_sha": "285a50500f9e02578d90b3ce6382ea3c30216acd",
"installed_by": [
"modules"
]
},
"gffread": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": [
"modules"
]
},
"multiqc": {
"branch": "master",
"git_sha": "b7ebe95761cd389603f9cc0e0dc384c0f663815a",
"installed_by": [
"modules"
]
},
"ncbigenomedownload": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": [
"modules"
]
},
"orthofinder": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": [
"modules"
]
},
"pigz/uncompress": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": [
"modules"
]
},
"quast": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": [
"modules"
]
},
"seqkit/seq": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": [
"fasta_explore_search_plot_tidk"
]
},
"seqkit/sort": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": [
"fasta_explore_search_plot_tidk"
]
},
"tidk/explore": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": [
"fasta_explore_search_plot_tidk"
]
},
"tidk/plot": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": [
"fasta_explore_search_plot_tidk"
]
},
"tidk/search": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": [
"fasta_explore_search_plot_tidk"
]
}
}
},
"subworkflows": {
"nf-core": {
"fasta_explore_search_plot_tidk": {
"branch": "master",
"git_sha": "ab80a04707104a4baf39341581dfbced5da05479",
"installed_by": [
"subworkflows"
]
},
"utils_nextflow_pipeline": {
"branch": "master",
"git_sha": "5caf7640a9ef1d18d765d55339be751bb0969dfa",
"installed_by": [
"subworkflows"
]
},
"utils_nfcore_pipeline": {
"branch": "master",
"git_sha": "92de218a329bfc9a9033116eb5f65fd270e72ba3",
"installed_by": [
"subworkflows"
]
},
"utils_nfvalidation_plugin": {
"branch": "master",
"git_sha": "5caf7640a9ef1d18d765d55339be751bb0969dfa",
"installed_by": [
"subworkflows"
]
}
}
}
"name": "ecoflow/genomeqc",
"homePage": "https://github.com/ecoflow/genomeqc",
"repos": {
"https://github.com/nf-core/modules.git": {
"modules": {
"nf-core": {
"agat/spstatistics": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": ["modules"]
},
"busco/busco": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": ["modules"]
},
"fastqc": {
"branch": "master",
"git_sha": "285a50500f9e02578d90b3ce6382ea3c30216acd",
"installed_by": ["modules"]
},
"fcs/fcsadaptor": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": ["modules"]
},
"fcs/fcsgx": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": ["modules"]
},
"gffread": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": ["modules"]
},
"multiqc": {
"branch": "master",
"git_sha": "b7ebe95761cd389603f9cc0e0dc384c0f663815a",
"installed_by": ["modules"]
},
"ncbigenomedownload": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": ["modules"]
},
"orthofinder": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": ["modules"]
},
"pigz/uncompress": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": ["modules"]
},
"quast": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": ["modules"]
},
"seqkit/seq": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": ["fasta_explore_search_plot_tidk"]
},
"seqkit/sort": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": ["fasta_explore_search_plot_tidk"]
},
"tiara/tiara": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": ["modules"]
},
"tidk/explore": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": ["fasta_explore_search_plot_tidk"]
},
"tidk/plot": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": ["fasta_explore_search_plot_tidk"]
},
"tidk/search": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": ["fasta_explore_search_plot_tidk"]
}
}
},
"subworkflows": {
"nf-core": {
"fasta_explore_search_plot_tidk": {
"branch": "master",
"git_sha": "ab80a04707104a4baf39341581dfbced5da05479",
"installed_by": ["subworkflows"]
},
"utils_nextflow_pipeline": {
"branch": "master",
"git_sha": "5caf7640a9ef1d18d765d55339be751bb0969dfa",
"installed_by": ["subworkflows"]
},
"utils_nfcore_pipeline": {
"branch": "master",
"git_sha": "92de218a329bfc9a9033116eb5f65fd270e72ba3",
"installed_by": ["subworkflows"]
},
"utils_nfvalidation_plugin": {
"branch": "master",
"git_sha": "5caf7640a9ef1d18d765d55339be751bb0969dfa",
"installed_by": ["subworkflows"]
}
}
}
}
}
}
}
51 changes: 51 additions & 0 deletions modules/local/fcs/cleanadaptor/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
process FCS_CLEANADAPTOR {
tag "$meta.id"
label 'process_low'

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/ncbi-fcs-gx:0.5.4--h4ac6f70_1':
'biocontainers/ncbi-fcs-gx:0.5.4--h4ac6f70_1' }"

input:
tuple val(meta), path(assembly), path(adaptor_report)

output:
tuple val(meta), path("${meta.id}.adapt-cleaned.fasta") , emit: cleaned
path("${meta.id}.adaptor-contam.fasta") , emit: contam

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def FCSGX_VERSION = '0.5.4'

"""
python3 --version
#sed -i '1i ##[["FCS genome report",2,' "$adaptor_report"
gx clean-genome \\
--input ${assembly} \\
--action-report "${adaptor_report}" \\
--output "${meta.id}.adapt-cleaned.fasta" \\
--contam-fasta-out "${prefix}.adaptor-contam.fasta"

cat <<-END_VERSIONS > versions.yml
"${task.process}":
FCS-GX: $FCSGX_VERSION
END_VERSIONS
"""

stub:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def FCSGX_VERSION = '0.5.4'

"""
touch ${meta.id}.adapt-cleaned.fasta"
touch "${prefix}.adaptor-contam.fasta"

cat <<-END_VERSIONS > versions.yml
"${task.process}":
FCS-GX: $FCSGX_VERSION
END_VERSIONS
"""
}
3 changes: 3 additions & 0 deletions modules/local/fcs/cleangenome/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
channels:
- conda-forge
- bioconda
Loading