Skip to content
Snippets Groups Projects
Commit 82e6907d authored by xgrand's avatar xgrand
Browse files

Add deseq2-wrapper

parent 9fc49679
Branches
No related tags found
No related merge requests found
FROM rocker/r-base:4.2.3
LABEL MAINTAINER "Xavier Grand <xavier.grand@ens-lyon.fr>"
RUN apt update && apt-get install -y apt-transport-https
RUN apt install -y pandoc libfontconfig1-dev libcurl4-openssl-dev \
libssl-dev libssh2-1-dev libxml2-dev zlib1g-dev \
libharfbuzz-dev libfribidi-dev libfreetype6-dev \
libpng-dev libtiff5-dev libjpeg-dev && \
R -e "install.packages(c('devtools', 'testthat', 'roxygen2', 'BiocManager', 'plotly'))" && \
R -e "BiocManager::install('DESeq2')"
COPY *.R .
RUN Rscript install_deseq2-wrapper.R
CMD [ "bash" ]
\ No newline at end of file
# deseq2-wrapper.R
#!/bin/Rscript
library(DESeqwrapper)
cli_run_deseq2()
#!/bin/sh
# docker pull xgrand/deseq2-wrapper:1.0.0
docker build src/.docker_modules/deseq2-wrapper/1.0.0 -t 'xgrand/deseq2-wrapper:1.0.0'
docker push xgrand/deseq2-wrapper:1.0.0
# docker buildx build --platform linux/amd64,linux/arm64 -t "xgrand/deseq2-wrapper:1.0.0" --push src/.docker_modules/deseq2-wrapper/1.0.0
\ No newline at end of file
#!/usr/bin/env Rscript
install.packages("devtools")
library(devtools)
install_gitlab("LBMC/regards/deseq2-wrapper", host = "https://gitbio.ens-lyon.fr", quiet = FALSE)
...@@ -31,6 +31,7 @@ def helpMessage() { ...@@ -31,6 +31,7 @@ def helpMessage() {
Input: Input:
--fastq [path] Path to fastq folder. --fastq [path] Path to fastq folder.
--bam [path] Path to the bam folder (indexed and sorted). --bam [path] Path to the bam folder (indexed and sorted).
--design [path] Path to the design file.
References: Can be downloaded with download_references.sh (not implemented in pipeline). References: Can be downloaded with download_references.sh (not implemented in pipeline).
--genome [path] Path to genome reference fasta file. --genome [path] Path to genome reference fasta file.
...@@ -83,6 +84,8 @@ params.star_mapping2fusion_out = "06_mapping2fusion" ...@@ -83,6 +84,8 @@ params.star_mapping2fusion_out = "06_mapping2fusion"
params.filter_bam_quality_out = "07_Filtered_bam" params.filter_bam_quality_out = "07_Filtered_bam"
params.arriba_out = "10_Arriba_results" params.arriba_out = "10_Arriba_results"
params.draw_fusions_out = "11_drawn_fusions" params.draw_fusions_out = "11_drawn_fusions"
params.concat_fusion_out = "12_concat_fusions"
params.fusion_out = "13_DFG"
/* /*
**************************************************************** ****************************************************************
...@@ -122,6 +125,10 @@ Channel ...@@ -122,6 +125,10 @@ Channel
.fromPath( params.gtf ) .fromPath( params.gtf )
.set { gtf_file } .set { gtf_file }
Channel
.fromPath( params.design )
.set { design }
if(params.bam) { if(params.bam) {
Channel Channel
.fromPath( bam_list ) .fromPath( bam_list )
...@@ -162,6 +169,8 @@ include { index_bam } from './nf_modules/samtools/main.nf' ...@@ -162,6 +169,8 @@ include { index_bam } from './nf_modules/samtools/main.nf'
include { htseq_count } from './nf_modules/htseq/main.nf' addParams(htseq_out: '09_htseq_count', htseq_param: "${params.htseq_param}" ) include { htseq_count } from './nf_modules/htseq/main.nf' addParams(htseq_out: '09_htseq_count', htseq_param: "${params.htseq_param}" )
include { arriba } from "./nf_modules/arriba/main.nf" include { arriba } from "./nf_modules/arriba/main.nf"
include { draw_fusions } from "./nf_modules/arriba/main.nf" include { draw_fusions } from "./nf_modules/arriba/main.nf"
include { concat_fusion } from "./nf_modules/concatenate/main.nf"
include { parsefusion } from "./nf_modules/fusion_parser/main.nf"
/* /*
**************************************************************** ****************************************************************
...@@ -232,4 +241,6 @@ workflow { ...@@ -232,4 +241,6 @@ workflow {
**************************************************************** ****************************************************************
*/ */
concat_fusion(arriba.out.fusions, arriba.out.discarded)
parsefusion(concat_fusion.out.concatenated_fusions)
} }
\ No newline at end of file
version = "3.15.4"
container_url = "xgrand/alpine:${version}"
params.fastq_out = ""
process concatenate {
tag "fastq_folder"
label "big_mem_mono_cpus"
if (params.fastq_out != "") {
publishDir "results/${params.fastq_out}", mode: 'copy'
}
input:
path fastq
output:
path "merged.fastq.gz", emit: merged_fastq
script:
"""
zcat ${fastq}/*.fastq.gz > merged.fastq
gzip --quiet merged.fastq
"""
}
params.concat_fusion_out = ""
process concat_fusion {
tag "concat_fusion"
label "big_mem_mono_cpus"
if (params.fastq_out != "") {
publishDir "results/${concat_fusion_out}", mode: 'copy'
}
input:
path fusions
path discarded_fusions
output:
path "*_fusions.tsv", emit: concatenated_fusions
script:
"""
cat ${fusions} > res_fusions.tsv
tail +2 ${discarded_fusions} >> res_fusions.tsv
"""
}
\ No newline at end of file
version = "1.0" version = "1.0"
container_url = "xgrand/fusion_parser:${version}" container_url = "xgrand/fusion_parser:${version}"
params.fusion_out = ""
process parsefusion{ process parsefusion{
container = "${container_url}" container = "${container_url}"
label "big_mem_multi_cpus" label "big_mem_multi_cpus"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment