diff --git a/src/dual_mapping_paired.nf b/src/dual_mapping_paired.nf index 00821087e35472c8dc4ea45aa47f012ae29958e2..f5a5fe5fc5b08e2078f6164559a15a4d95739608 100644 --- a/src/dual_mapping_paired.nf +++ b/src/dual_mapping_paired.nf @@ -96,7 +96,8 @@ process hisat2 { """ hisat2 -x ${index_id} -p ${task.cpus} \ -1 ${fastq_filtred[0]} -2 ${fastq_filtred[1]} --un-conc-gz ${file_id}_notaligned_hisat_R%.fastq.gz \ ---rna-strandness 'F' --dta \ +--rna-strandness 'F' --dta --no-temp-splicesite \ +--novel-splicesite-outfile ${file_id}splicesite.txt 2> ${file_id}_hisat2_NY5.txt | samtools view -F 4 -F 16 -Sb - > ${file_id}.bam """ } @@ -148,15 +149,24 @@ process merge_bam{ input: set file_id, index_id, file(bam_bowtie), file(bam_hisat) from merged_bam + file(hisat_txt) from hisat_report + file(bowtie_txt) from mapping_report output: file "*merged.{bam,bam.bai}" into final_flow + file "*.txt" into final_report """ samtools sort -@ ${task.cpus} -o ${file_id}_bowtie_sort.bam ${bam_bowtie} && \ samtools sort -@ ${task.cpus} -o ${file_id}_hisat_sort.bam ${bam_hisat} && \ samtools merge ${file_id}_merged.bam *sort.bam && \ samtools index ${file_id}_merged.bam + + for i in *.txt ; do + echo \$i + cat \$i > \${i::-4}_new.txt + done + """ }