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

src/RibosomeProfiling.nf : trim 1 base at 5' and 3' end by hisat

parent fbed90fc
Branches
No related tags found
No related merge requests found
...@@ -276,6 +276,9 @@ hisat2 -x ${index_id} \ ...@@ -276,6 +276,9 @@ hisat2 -x ${index_id} \
--un-gz ${file_id}_notaligned.fastq.gz \ --un-gz ${file_id}_notaligned.fastq.gz \
--rna-strandness ${params.strand} \ --rna-strandness ${params.strand} \
--dta \ --dta \
--no-softclip \
--trim5 1\
--trim3 1\
2> ${file_id}_genome.txt \ 2> ${file_id}_genome.txt \
| samtools view -bS -F 4 - \ | samtools view -bS -F 4 - \
| samtools sort -@ ${task.cpus} -o ${file_id}.bam \ | samtools sort -@ ${task.cpus} -o ${file_id}.bam \
...@@ -316,6 +319,7 @@ process fastqc_genome { ...@@ -316,6 +319,7 @@ process fastqc_genome {
/* Deduplication of reads */ /* Deduplication of reads */
//////////////////////////// ////////////////////////////
if (params.do_dedup) {
process dedup_genome { process dedup_genome {
tag "$file_id" tag "$file_id"
publishDir "${params.output}/03_hisat2/dedup/", mode: 'copy' publishDir "${params.output}/03_hisat2/dedup/", mode: 'copy'
...@@ -336,9 +340,8 @@ process dedup_genome { ...@@ -336,9 +340,8 @@ process dedup_genome {
> ${file_id}_dedup.log > ${file_id}_dedup.log
""" """
} }
} else {
if (! params.do_dedup) { HISAT_ALIGNED_DEDUP.set{DEDUP_GENOME}
HISAT_ALIGNED_DEDUP.into{DEDUP_GENOME}
} }
DEDUP_GENOME.into{DEDUP_GENOME_HTSEQ; DEDUP_GENOME.into{DEDUP_GENOME_HTSEQ;
...@@ -456,7 +459,7 @@ hisat2 -x ${index2_id} \ ...@@ -456,7 +459,7 @@ hisat2 -x ${index2_id} \
--rna-strandness ${params.strand} \ --rna-strandness ${params.strand} \
--dta\ --dta\
2> ${file_id}_postgenome.txt \ 2> ${file_id}_postgenome.txt \
| samtools view -bS -F 4 - \ | samtools view -bS -F 4 -F 256 - \
| samtools sort -@ ${task.cpus} -o ${file_id}.bam \ | samtools sort -@ ${task.cpus} -o ${file_id}.bam \
&& samtools index ${file_id}.bam && samtools index ${file_id}.bam
...@@ -473,6 +476,7 @@ POSTGENOME_ALIGNED.into{POSTGENOME_ALIGNED_FASTQC; ...@@ -473,6 +476,7 @@ POSTGENOME_ALIGNED.into{POSTGENOME_ALIGNED_FASTQC;
/* Deduplication of reads */ /* Deduplication of reads */
//////////////////////////// ////////////////////////////
if (params.do_dedup){
process dedup_postgenome { process dedup_postgenome {
tag "$file_id" tag "$file_id"
publishDir "${params.output}/05_post_genome_hisat2/dedup/", mode: 'copy' publishDir "${params.output}/05_post_genome_hisat2/dedup/", mode: 'copy'
...@@ -493,6 +497,9 @@ process dedup_postgenome { ...@@ -493,6 +497,9 @@ process dedup_postgenome {
> ${file_id}_dedup.log > ${file_id}_dedup.log
""" """
} }
} else {
}
process fastqc_postgenome { process fastqc_postgenome {
tag "$file_id" tag "$file_id"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment