GATB / DiscoSnp

DiscoSnp is designed for discovering all kinds of SNPs (not only isolated ones), as well as insertions and deletions, from raw set(s) of reads.
https://gatb.inria.fr/software/discosnp/
GNU Affero General Public License v3.0
38 stars 20 forks source link

Call to python 2 in run_discoSNP++.sh #30

Closed AxVE closed 2 years ago

AxVE commented 2 years ago

Could it be possible to replace python by python3 at line 69 of run_discoSNP++.sh so all the project depends on python3. The change doesn't to have an impact.

https://github.com/GATB/DiscoSnp/blob/master/run_discoSnp%2B%2B.sh#L69

-EDIR=$( python -c "import os.path; print(os.path.dirname(os.path.realpath(\"${BASH_SOURCE[0]}\")))" ) # as suggested by Philippe Bordron 
+ EDIR=$( python3 -c "import os.path; print(os.path.dirname(os.path.realpath(\"${BASH_SOURCE[0]}\")))" ) # as suggested by Philippe Bordron 

Another solution would be to not use python3 here:

-EDIR=$( python -c "import os.path; print(os.path.dirname(os.path.realpath(\"${BASH_SOURCE[0]}\")))" ) # as suggested by Philippe Bordron 
+EDIR=$( dirname $( realpath ${BASH_SOURCE[0]} ) )

I find this better as it re-becomes a bash-only script (except the project calls ofc).

For information: we're running on minimal environments and always omit the python2 which is deprecated.

pierrepeterlongo commented 2 years ago

Hi AxVE

Thanks for your comment. I committed the changes. I chose the first option (force python3). Indeed, dirname has not the same behavior with mac or linux.

Best, Pierre

AxVE commented 2 years ago

Thanks,

Ah yes, I didn't think about mac :)