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

src/dual_mapping_paired.nf : add option for better hisat splice junction

parent 74568d96
Branches
No related tags found
No related merge requests found
...@@ -96,7 +96,8 @@ process hisat2 { ...@@ -96,7 +96,8 @@ process hisat2 {
""" """
hisat2 -x ${index_id} -p ${task.cpus} \ 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 \ -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 2> ${file_id}_hisat2_NY5.txt | samtools view -F 4 -F 16 -Sb - > ${file_id}.bam
""" """
} }
...@@ -148,15 +149,24 @@ process merge_bam{ ...@@ -148,15 +149,24 @@ process merge_bam{
input: input:
set file_id, index_id, file(bam_bowtie), file(bam_hisat) from merged_bam 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: output:
file "*merged.{bam,bam.bai}" into final_flow 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}_bowtie_sort.bam ${bam_bowtie} && \
samtools sort -@ ${task.cpus} -o ${file_id}_hisat_sort.bam ${bam_hisat} && \ samtools sort -@ ${task.cpus} -o ${file_id}_hisat_sort.bam ${bam_hisat} && \
samtools merge ${file_id}_merged.bam *sort.bam && \ samtools merge ${file_id}_merged.bam *sort.bam && \
samtools index ${file_id}_merged.bam samtools index ${file_id}_merged.bam
for i in *.txt ; do
echo \$i
cat \$i > \${i::-4}_new.txt
done
""" """
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment