Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
genotoul-bioinfo
metagWGS
Commits
5702351d
Commit
5702351d
authored
Oct 21, 2021
by
MARTIN Pierre
Browse files
merge
parents
d1b70ff9
9413b928
Changes
5
Hide whitespace changes
Inline
Side-by-side
modules/cd_hit.nf
View file @
5702351d
process
INDIVIDUAL_CD_HIT
{
tag
"${
replicat
eId}"
tag
"${
sampl
eId}"
publishDir
"${params.outdir}/06_func_annot/06_1_clustering"
,
mode:
'copy'
label
'CD_HIT'
input:
tuple
val
(
replicat
eId
),
file
(
assembly_ffn_file
)
tuple
val
(
sampl
eId
),
file
(
assembly_ffn_file
)
val
percentage_identity_cdhit
output:
path
(
"${
replicat
eId}.cd-hit-est.${percentage_identity_cdhit}.fasta"
),
emit:
clstr_fasta
path
(
"${
replicat
eId}.cd-hit-est.${percentage_identity_cdhit}.table_cluster_contigs.txt"
),
emit:
individual_clstr_table
path
(
"${
replicat
eId}.cd-hit-est.${percentage_identity_cdhit}.fasta.clstr"
)
path
(
"${
sampl
eId}.cd-hit-est.${percentage_identity_cdhit}.fasta"
),
emit:
clstr_fasta
path
(
"${
sampl
eId}.cd-hit-est.${percentage_identity_cdhit}.table_cluster_contigs.txt"
),
emit:
individual_clstr_table
path
(
"${
sampl
eId}.cd-hit-est.${percentage_identity_cdhit}.fasta.clstr"
)
// when: ('06_func_annot' in step)
script:
"""
cd-hit-est -c ${percentage_identity_cdhit} -i ${assembly_ffn_file} -o ${
replicat
eId}.cd-hit-est.${percentage_identity_cdhit}.fasta -T ${task.cpus} -M ${task.mem} -d 150
cat ${
replicat
eId}.cd-hit-est.${percentage_identity_cdhit}.fasta.clstr | cd_hit_produce_table_clstr.py > ${
replicat
eId}.cd-hit-est.${percentage_identity_cdhit}.table_cluster_contigs.txt
cd-hit-est -c ${percentage_identity_cdhit} -i ${assembly_ffn_file} -o ${
sampl
eId}.cd-hit-est.${percentage_identity_cdhit}.fasta -T ${task.cpus} -M ${task.mem} -d 150
cat ${
sampl
eId}.cd-hit-est.${percentage_identity_cdhit}.fasta.clstr | cd_hit_produce_table_clstr.py > ${
sampl
eId}.cd-hit-est.${percentage_identity_cdhit}.table_cluster_contigs.txt
"""
}
...
...
modules/feature_counts.nf
View file @
5702351d
// Quantification of reads on each gene in each sample.
process
quantification
{
tag
"${
replicat
eId}"
process
QUANTIFICATION
{
tag
"${
sampl
eId}"
publishDir
"${params.outdir}/06_func_annot/06_2_quantification"
,
mode:
'copy'
input:
tuple
val
(
replicat
eId
),
file
(
gff_prokka
),
file
(
bam
),
file
(
bam_index
)
tuple
val
(
sampl
eId
),
file
(
gff_prokka
),
file
(
bam
),
file
(
bam_index
)
output:
path
"${replicateId}.featureCounts.tsv"
,
emit:
count_table
path
"${replicateId}.featureCounts.tsv.summary"
,
emit:
summary
path
"${replicateId}.featureCounts.stdout"
// when: ('06_func_annot' in step)
path
"${sampleId}.featureCounts.tsv"
,
emit:
count_table
path
"${sampleId}.featureCounts.tsv.summary"
,
emit:
summary
path
"${sampleId}.featureCounts.stdout"
script:
"""
featureCounts -T ${task.cpus} -p -O -t gene -g ID -a ${gff_prokka} -o ${
replicat
eId}.featureCounts.tsv ${bam} &> ${
replicat
eId}.featureCounts.stdout
featureCounts -T ${task.cpus} -p -O -t gene -g ID -a ${gff_prokka} -o ${
sampl
eId}.featureCounts.tsv ${bam} &> ${
sampl
eId}.featureCounts.stdout
"""
}
...
...
@@ -43,8 +41,6 @@ process quantification {
"""
}
workflow
FEATURE_COUNTS
{
take:
...
...
nextflow.config
View file @
5702351d
...
...
@@ -18,7 +18,8 @@ params {
metaspades_mem
=
440
min_contigs_cpm
=
1000
diamond_bank
=
""
percentage_identity
=
0
.
95
//
Skip
step
or
sub
-
step
.
skip_clean
=
false
skip_sickle
=
false
...
...
subworkflows/06_functionnal_annot.nf
0 → 100644
View file @
5702351d
include
{
CD_HIT
}
from
'../modules/cd_hit'
//include {FEATURE_COUNTS} from './modules/feature_counts'
// cd_hit + quantification + quantification_table + eggnog_mapper_db + eggnog_mapper
// + best_hit_diamond + mergeçquandtif and functionnal annot + make_functionnal_annotation_tables
workflow
STEP_06_FUNC_ANNOT
{
take:
assembly_ch
// channel: [ val(sampleid), path(assemblyfasta) ]
main:
CD_HIT
(
assembly_ch
,
params
.
percentage_identity
)
}
subworkflows/shared.nf
View file @
5702351d
...
...
@@ -2,7 +2,7 @@
include
{
FILTERED_QUAST
}
from
'../modules/metaquast'
include
{
STEP_04_STRUCTURAL_ANNOT
}
from
'./04_structural_annot'
include
{
STEP_05_ALIGNMENT
}
from
'./05_alignment'
include
{
STEP_06_FUNC_ANNOT
}
from
'./06_functionnal_annot'
workflow
SHARED
{
take:
...
...
@@ -10,25 +10,24 @@ workflow SHARED {
ch_assembly
main:
FILTERED_QUAST
(
ch_assembly
)
ch_prokka_and_reads
=
Channel
.
empty
()
ch_faa
=
Channel
.
empty
()
if
(
!
params
.
skip_structural_annot
)
{
STEP_04_STRUCTURAL_ANNOT
(
ch_assembly
)
ch_gff
=
STEP_04_STRUCTURAL_ANNOT
.
out
.
gff
ch_fna
=
STEP_04_STRUCTURAL_ANNOT
.
out
.
fna
ch_faa
=
STEP_04_STRUCTURAL_ANNOT
.
out
.
faa
ch_prokka_and_reads
=
ch_gff
.
join
(
ch_fna
,
remainder:
true
).
join
(
ch_reads
,
remainder:
true
)
}
if
(
!
params
.
skip_alignment
)
{
STEP_05_ALIGNMENT
(
ch_prokka_and_reads
,
ch_faa
)
}
FILTERED_QUAST
(
ch_assembly
)
ch_prokka_reads
=
Channel
.
empty
()
ch_prokka_faa
=
Channel
.
empty
()
if
(
!
params
.
skip_structural_annot
)
{
PROKKA_AND_RENAME
(
ch_assembly
)
ch_prokka_reads
=
PROKKA_AND_RENAME
.
out
.
gff
.
join
(
PROKKA_AND_RENAME
.
out
.
fna
,
remainder:
true
).
join
(
ch_reads
,
remainder:
true
)
ch_prokka_faa
=
PROKKA_AND_RENAME
.
out
.
faa
}
if
(
!
params
.
skip_alignment
)
{
STEP_05_ALIGNMENT
(
ch_prokka_reads
,
ch_prokka_faa
)
}
if
(
!
params
.
skip_func_annot
)
{
STEP_06_FUNC_ANNOT
(
PROKKA_AND_RENAME
.
out
.
fna
)
}
emit:
report_prokka
=
STEP_04_STRUCTURAL_ANNOT
.
out
.
report
report_quast
=
FILTERED_QUAST
.
out
.
report
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment