Skip to content

Commit

Permalink
Speed up using pigz!
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Peltzer authored and Alexander Peltzer committed Nov 19, 2018
1 parent 8720bef commit 38c333e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ dependencies:
- bioconda::pmdtools=0.60
- conda-forge::r-rmarkdown=1.10
- conda-forge::libiconv=1.15
- conda-forge::pigz=2.3.4
- bioconda::sequencetools=1.2.2
- bioconda::preseq=2.0.3
- bioconda::fastp=0.19.4
Expand Down
2 changes: 1 addition & 1 deletion main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ process samtools_filter {
prefix="$bam" - ~/(\.bam)?/
rm_type = "${params.bam_unmapped_keep_type}" == 'bam' ? 'bam' : 'fastq.gz'
rm_unmapped = "${params.bam_discard_unmapped}" ? "rm *.unmapped.${rm_type}" : ''
fq_convert = "${params.bam_unmapped_to_fastq}" ? "samtools fastq -tn ${prefix}.unmapped.bam | gzip > ${prefix}.unmapped.fq.gz" : ''
fq_convert = "${params.bam_unmapped_to_fastq}" ? "samtools fastq -tn ${prefix}.unmapped.bam | pigz -p ${task.cpus} > ${prefix}.unmapped.fq.gz" : ''


if("${params.bam_separate_unmapped}"){
Expand Down

2 comments on commit 38c333e

@jfy133
Copy link
Member

@jfy133 jfy133 commented on 38c333e Nov 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 I wonder if you could also give the ability to accept gzipped reference fastas too?

@apeltzer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open a ticket for that one - yes, shouldn't be very difficult at all. Need to unzip these first, but could dump them then in a channel to multiple downstream processes quite easily... if this is a use case, why not?

Please sign in to comment.