Skip to content
Snippets Groups Projects
Verified Commit f27bf148 authored by Laurent Modolo's avatar Laurent Modolo
Browse files

Merge crey02/nextflow-add_htseq to close #29

parent da99648b
No related branches found
No related tags found
No related merge requests found
FROM ubuntu:20.04
LABEL maintainer= Laurent Modolo
RUN apt-get update \
&& apt-get install -y \
procps \
build-essential \
python3 \
python3-pip
RUN pip install HTSeq==1.99.2
\ No newline at end of file
#!/bin/sh
docker pull lbmc/htseq:1.99.2
docker build src/.docker_modules/htseq/1.99.2 -t 'lbmc/htseq:1.99.2'
docker push lbmc/htseq:1.99.2
version = "1.99.2"
container_url = "lbmc/htseq:${version}"
params.htseq_out = ""
process gff3_2_gtf {
container = "dceoy/cufflinks"
label "small_mem_mono_cpus"
input:
tuple val(genome_id), path(gff3_file)
output:
path "${genome_id}.gtf", emit: gtf
script:
"""
gffread ${gff3_file} -T -o ${genome_id}.gtf
"""
}
process htseq_count {
container = "${container_url}"
label "big_mem_multi_cpus"
tag "file_id: $file_id"
if (params.htseq_out != "") {
publishDir "results/${params.htseq_out}", mode: 'copy'
}
input:
tuple val(file_id), path(bam), path(bai)
path (gtf)
output:
path "${file_id}.tsv", emit: counts
script:
"""
htseq-count -n ${task.cpus} -r pos -a 10 -s yes -t exon -i gene_id $bam $gtf > ${file_id}.tsv
"""
}
workflow htseq_count_with_gff {
take:
bam_tuple
gff_file
main:
gff3_2_gtf(gff_file)
htseq_count(bam_tuple,gff3_2_gtf.out.gtf)
emit:
counts = htseq_count.out.counts
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment