rrwick / Trycycler

A tool for generating consensus long-read assemblies for bacterial genomes
GNU General Public License v3.0
306 stars 28 forks source link

Rscript path should not be hardcoded #19

Closed EricDeveaud closed 3 years ago

EricDeveaud commented 3 years ago

Hello

trycycler/cluster.py have Rscript hardcoded on line 273 see

rpm_maker:Trycycler/Trycycler-0.5.0 > grep -Rn Rscript
trycycler/cluster.py:264:        subprocess.check_output(['Rscript', tree_script])
trycycler/cluster.py:273:        f.write('#!/usr/bin/Rscript\n') 

should be mmore flexible.

in our case, R is provided via module environnement

I suggest to use #/usr/bin/env Rscript instead

regards

rrwick commented 3 years ago

Good catch! I don't think it should cause a problem, as the script is run like this:

Rscript /path/to/tree.R

and not like this:

/path/to/tree.R

So I wouldn't expect the path in the shebang to matter. But in the interest of best practices, I've changed it as you suggested: ae58eed. Thanks!