Skip to content

Commit

Permalink
Get the assembler variable parsed out by snakemake directly
Browse files Browse the repository at this point in the history
Note the missing single quotes around the variable wrapped by square
brackets {config[foo]} .

Thanks to @tomas-pluskal for the link to
https://stackoverflow.com/questions/49140578/how-can-one-access-snakemake-config-variables-inside-shell-section
  • Loading branch information
mmokrejs committed Sep 24, 2021
1 parent a1480fb commit 74fce8d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Snakefile
Expand Up @@ -474,8 +474,7 @@ Runs Trinity script to get statistics about the assembled transcriptome
1
shell:
"""
assembler=$( grep '^assembler: ' config.yaml | sed -e 's/^assembler: "\(.*\)"/\1/' )
if [ "$assembler" -eq 'trinity' ]; then
if [ {config[assembler]} -eq 'trinity' ]; then
{TRINITY_HOME}/util/TrinityStats.pl {input.transcriptome} > {output.stats} 2> {log}
else
{TRINITY_HOME}/util/TrinityStats.pl {input.transcriptome} | sed -e 's/trinity/rnaspades/g' > {output.stats} 2> {log}
Expand Down

0 comments on commit 74fce8d

Please sign in to comment.