Skip to content
Snippets Groups Projects
Commit c8a6b0ca authored by elabaron's avatar elabaron
Browse files

Merge branch 'master' of gitbio.ens-lyon.fr:LBMC/RMI2/rmi2_pipelines

parents ce8a3fb2 23a2efa9
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,11 @@ profiles {
}
withName: plastid_psite {
container = "quay.io/biocontainers/plastid:0.5.1--py38h390ddb8_3"
cpus = 4
cpus = 1
}
withName: plastid_metagene {
container = "quay.io/biocontainers/plastid:0.5.1--py38h390ddb8_3"
cpus = 1
}
}
}
......@@ -36,6 +40,15 @@ profiles {
time = "24h"
queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG5118deb96,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C,SLG6142deb384D"
}
withName: plastid_metagene {
container = "quay.io/biocontainers/plastid:0.5.1--py38h390ddb8_3"
executor = "sge"
clusterOptions = "-cwd -V"
cpus = 1
memory = "30GB"
time = "24h"
queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG5118deb96,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C,SLG6142deb384D"
}
}
}
}
......@@ -7,12 +7,12 @@ params.outputdir = "results/plastid/generate"
log.info "gff files : ${params.annotation_files}"
Channel
.fromFilePairs( params.annotation_files )
.fromPath( params.annotation_files )
.ifEmpty { error "Cannot find any gff files matching: ${params.annotation_files}" }
.set { ANNOT_FILES }
process plastid_generate {
tag "$file_id"
tag "plastid_generate"
publishDir "${params.outputdir}", mode: 'copy'
input:
......@@ -25,7 +25,7 @@ process plastid_generate {
"""
metagene generate ${params.outputBaseName} \
--landmark ${params.landmark} \
--annotation_files ${annot} \
--annotation_files ./${annot} \
--downstream ${params.downstream}
"""
......
params.outputdir = "results/plastid/metagene"
params.roi = "data/*roi.txt"
params.bam = "data/*.bam"
params.offset = 12
params.min_count = 50
params.landmark = "cds_start"
log.info "output dir : ${params.outputdir}"
log.info "bam files : ${params.bam}"
log.info "ROI files : ${params.roi}"
log.info "offset : ${params.offset}"
log.info "min count : ${params.min_count}"
Channel
.fromFilePairs( params.bam )
.ifEmpty { error "Cannot find any files matching: ${params.bam}" }
.set { BAM_FILES }
Channel
.fromPath( params.roi )
.ifEmpty { error "Cannot find any files matching: ${params.roi}" }
.set { ROI_FILES }
process plastid_metagene {
tag "${file_id}"
publishDir "${params.outputdir}", mode: 'copy'
input:
set file_id, file(bam) from BAM_FILES
file roi from ROI_FILES.collect()
output:
file "*metagene_profile.txt" into METAGENE_FILES
script:
"""
metagene count ${roi} ${file_id} \
--count_files ${bam[0]}\
--fiveprime \
--offset ${params.offset} \
--normalize_over 30 200 \
--min_counts ${params.min_count} \
--cmap Blues \
--title "${file_id}"
"""
}
process plastid_chart {
tag "${file_id}"
publishDir "${params.outputdir}", mode: 'copy'
input:
file metagene_profile from METAGENE_FILES.collect()
output:
file "*" into CHART_files
script:
"""
metagene chart --landmark "${params.landmark}" \
--title "metagene plot"\
Metachart\
*metagene_profile.txt
"""
}
......@@ -8,17 +8,16 @@ log.info "output dir : ${params.outputdir}"
log.info "bam files : ${params.bam}"
log.info "ROI files : ${params.roi}"
log.info "min length : ${params.min_length}"
lof.info "max length : ${params.max_length}"
log.info "max length : ${params.max_length}"
Channel
.fromFilePairs( params.roi )
.ifEmpty { error "Cannot find any files matching: ${params.roi}" }
.set { ROI_FILES }
.fromPath( params.roi )
.ifEmpty { error "Cannot find any files matching: ${params.roi}" }
.set { ROI_FILES }
Channel
.fromPath( params.bam )
.fromFilePairs( params.bam )
.ifEmpty { error "Cannot find any files matching: ${params.bam}" }
.map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]}
.set { BAM_FILES }
process plastid_psite {
......@@ -26,7 +25,7 @@ process plastid_psite {
publishDir "${params.outputdir}", mode: 'copy'
input:
set file_id, file(bam), from BAM_FILES
set file_id, file(bam) from BAM_FILES
file roi from ROI_FILES.collect()
output:
......@@ -39,6 +38,6 @@ psite ${roi} \
--min_length ${params.min_length}\
--max_length ${params.max_length}\
--require_upstream \
--count_files ${bam}
--count_files ${bam[0]}
"""
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment