Skip to content

Commit

Permalink
Fix bug in salmon/index module when generating decoys (#3043)
Browse files Browse the repository at this point in the history
* Fix bug in salmon/index module when generating decoys

* Fix spacing
  • Loading branch information
drpatelh committed Mar 16, 2023
1 parent 0263ccf commit cfef219
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions modules/nf-core/salmon/index/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ process SALMON_INDEX {
path transcript_fasta

output:
path "salmon" , emit: index
path "versions.yml" , emit: versions
path "salmon" , emit: index
path "versions.yml", emit: versions

when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
def get_decoy_ids = "grep '^>' $genome_fasta | cut -d ' ' -f 1 > decoys.txt"
def get_decoy_ids = "grep '^>' $genome_fasta | cut -d ' ' -f 1 | cut -d \$'\\t' -f 1 > decoys.txt"
def gentrome = "gentrome.fa"
if (genome_fasta.endsWith('.gz')) {
get_decoy_ids = "grep '^>' <(gunzip -c $genome_fasta) | cut -d ' ' -f 1 > decoys.txt"
get_decoy_ids = "grep '^>' <(gunzip -c $genome_fasta) | cut -d ' ' -f 1 | cut -d \$'\\t' -f 1 > decoys.txt"
gentrome = "gentrome.fa.gz"
}
"""
Expand All @@ -38,6 +38,7 @@ process SALMON_INDEX {
-d decoys.txt \\
$args \\
-i salmon
cat <<-END_VERSIONS > versions.yml
"${task.process}":
salmon: \$(echo \$(salmon --version) | sed -e "s/salmon //g")
Expand Down

0 comments on commit cfef219

Please sign in to comment.