Skip to content
Snippets Groups Projects
Commit 41f64d4b authored by alapendr's avatar alapendr
Browse files

RNAseq.nf : update

parent 6b3a4e61
Branches
Tags
No related merge requests found
......@@ -11,9 +11,22 @@
*/
params.fastq = "$baseDir/data/fastq/*_{1,2}.fastq"
params.fasta = "$baseDir/data/fasta/*.fasta"
params.bed = "$baseDir/data/annot/*.bed"
log.info "fastq files : ${params.fastq}"
log.info "fasta file : ${params.fasta}"
log.info "bed file : ${params.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 }
Channel
.fromFilePairs( params.fastq )
.ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" }
......@@ -75,20 +88,11 @@ UrQt --t 20 --m ${task.cpus} --gz \
*/
/* fasta extraction */
params.fasta = "$baseDir/data/fasta/*.fasta"
params.bed = "$baseDir/data/annot/*.bed"
log.info "fasta file : ${params.fasta}"
log.info "bed file : ${params.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 fasta_from_bed {
tag "${bed.baseName}"
......@@ -118,14 +122,6 @@ bedtools getfasta -name \
*/
/* fasta indexing */
params.fasta = "$baseDir/data/bam/*.fasta"
log.info "fasta files : ${params.fasta}"
Channel
.fromPath( params.fasta )
.ifEmpty { error "Cannot find any fasta files matching: ${params.fasta}" }
.set { fasta_file }
process index_fasta {
tag "$fasta.baseName"
......@@ -149,20 +145,6 @@ kallisto index -k 31 --make-unique -i ${fasta.baseName}.index ${fasta} \
* for paired-end data
*/
params.fastq = "$baseDir/data/fastq/*_{1,2}.fastq"
params.index = "$baseDir/data/index/*.index.*"
log.info "fastq files : ${params.fastq}"
log.info "index files : ${params.index}"
Channel
.fromFilePairs( params.fastq )
.ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" }
.set { fastq_files }
Channel
.fromPath( params.index )
.ifEmpty { error "Cannot find any index files matching: ${params.index}" }
.set { index_files }
process mapping_fastq {
tag "$reads"
......@@ -190,24 +172,6 @@ ${reads[0]} ${reads[1]} &> ${reads[0].baseName}_kallisto_report.txt
* for single-end data
*/
params.fastq = "$baseDir/data/fastq/*.fastq"
params.index = "$baseDir/data/index/*.index*"
params.mean = 200
params.sd = 100
log.info "fastq files : ${params.fastq}"
log.info "index files : ${params.index}"
log.info "mean read size: ${params.mean}"
log.info "sd read size: ${params.sd}"
Channel
.fromPath( params.fastq )
.ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" }
.set { fastq_files }
Channel
.fromPath( params.index )
.ifEmpty { error "Cannot find any index files matching: ${params.index}" }
.set { index_files }
process mapping_fastq {
tag "$reads.baseName"
......@@ -215,8 +179,8 @@ process mapping_fastq {
publishDir "results/mapping/quantification/", mode: 'copy'
input:
file reads from fastq_files
file index from index_files.toList()
file reads from fastq_files_trim
file index from index_files
output:
file "*" into count_files
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment