Skip to content
Snippets Groups Projects
Commit 2fa2ee10 authored by fmortreu's avatar fmortreu
Browse files

"RNAseq_trimming"

parent 8f51fbe1
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,11 @@ profiles {
cpus = 4
container = "lbmc/urqt:d62c1f8"
}
withName: fasta_from_bed {
container = "lbmc/bedtools:2.25.0"
cpus = 1
}
}
}
singularity {
......
log.info "fastq files : ${params.fastq}"
log.info "fasta file : ${params.fasta}"
log.info "bed file : ${params.bed}"
Channel
.fromFilePairs( params.fastq )
.ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" }
.set { fastq_files }
params.fasta = "$baseDir/data/fasta/*.fasta"
params.bed = "$baseDir/data/annot/*.bed"
Channel
.fromPath( params.fasta )
.ifEmpty { error "Cannot find any fasta files matching: ${params.fasta}" }
.set { fasta_files }
Channel
.fromPath( params.bed )
.ifEmpty { error "Cannot find any bed files matching: ${params.bed}" }
.set { bed_files }
process adaptor_removal {
tag "$pair_id"
publishDir "results/fastq/adaptor_removal/", mode: 'copy'
......@@ -28,7 +42,7 @@ process trimming {
publishDir "results/fastq/trimming/", mode: 'copy'
input:
set pair_id, file(reads) from fastq_files
set pair_id, file(reads) from fastq_files_cut
output:
set pair_id, "*_trim_R{1,2}.fastq.gz" into fastq_files_trim
......@@ -41,3 +55,21 @@ UrQt --t 20 --m ${task.cpus} --gz \
> ${pair_id}_trimming_report.txt
"""
}
process fasta_from_bed {
tag "${bed.baseName}"
publishDir "results/fasta/", mode: 'copy'
input:
file fasta from fasta_files
file bed from bed_files
output:
file "*_extracted.fasta" into fasta_files_extracted
script:
"""
bedtools getfasta -name \
-fi ${fasta} -bed ${bed} -fo ${bed.baseName}_extracted.fasta
"""
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment