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

correct typos in nf_modules scripts

parent dfc75475
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,7 @@ profiles {
memory = "20GB"
cpus = 32
time = "12h"
queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG5118deb96,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C,SLG6142deb384D"
queue = "CLG6242deb384A,CLG6242deb384C,CLG5218deb192A,CLG5218deb192B,CLG5218deb192C,CLG5218deb192D,SLG6142deb384A,SLG6142deb384B,SLG6142deb384C"
penv = "openmp32"
}
}
......
params.fastq = "$baseDir/data/fastq/*_{1,2}.fastq"
params.index = "$baseDir/data/index/*.index.*"
params.output = "results/"
log.info "fastq files : ${params.fastq}"
log.info "index files : ${params.index}"
......@@ -15,15 +16,15 @@ Channel
process mapping_fastq {
tag "$pair_id"
publishDir "results/mapping/", mode: 'copy'
publishDir "${params.output}", mode: 'copy'
input:
set pair_id, file(reads) from fastq_files
set pair_id, file(fastq_filtred) from fastq_files
file index from index_files.collect()
output:
file "*" into counts_files
set pair_id, "*.bam" into bam_files
set pair_id, "*.{bam, bai}" into bam_files
file "*_report.txt" into mapping_report
script:
......@@ -34,15 +35,24 @@ process mapping_fastq {
}
}
"""
hisat2 -p ${task.cpus} \
-x ${index_id} \
-1 ${reads[0]} \
-2 ${reads[1]} 2> \
${pair_id}_hisat2_report.txt | \
samtools view -Sb - > ${pair_id}.bam
if grep -q "Error" ${pair_id}_hisat2_report.txt; then
hisat2 -x ${index_id} \
-p ${task.cpus} \
-1 ${fastq_filtred[0]} \
-2 ${fastq_filtred[1]} \
--un-conc-gz ${pair_id}_notaligned_R%.fastq.gz \
--rna-strandness 'FR' \
--dta \
--no-softclip\
--trim3 1\
--trim5 1\
2> ${pair_id}_report.txt \
| samtools view -bS -F 4 - \
| samtools sort -@ ${task.cpus} -o ${pair_id}.bam \
&& samtools index ${pair_id}.bam
if grep -q "ERR" ${pair_id}.txt; then
exit 1
fi
"""
}
......@@ -3,7 +3,7 @@ profiles {
docker.temp = "auto"
docker.enabled = true
process {
withName index_fasta {
withName: index_fasta {
container = "lbmc/kallisto:0.44.0"
cpus = 4
}
......
......@@ -9,7 +9,7 @@ Channel
process index_fasta {
tag "$fasta.baseName"
publishDir "results/mapping/index/", mode: 'copy'
publishDir "results/index/", mode: 'copy'
input:
file fasta from fasta_file
......
params.fastq = "$baseDir/data/fastq/*_{1,2}.fastq"
params.index = "$baseDir/data/index/*.index.*"
params.output = "results/mapping/quantification/"
log.info "fastq files : ${params.fastq}"
log.info "index files : ${params.index}"
log.info "output folder : ${params.output}"
Channel
.fromFilePairs( params.fastq )
......@@ -15,7 +17,7 @@ Channel
process mapping_fastq {
tag "$reads"
publishDir "results/mapping/quantification/", mode: 'copy'
publishDir "${params.output}", mode: 'copy'
input:
set pair_id, file(reads) from fastq_files
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment