How to set or change the default software path in R -
i have program called "bowtie2" , changed default path in terminal:
$export path=/opt/ngs/bowtie2-2.2.8:/usr/local/sbin:/usr/local/bin:/usr/sbin $bowtie2 --version /opt/ngs/bowtie2-2.2.8/bowtie2-align-s version 2.2.8 but when call r it's still old version other path:
> bowtie2="bowtie2" > system2(bowtie2,"--version",stdout=true)[1] [1] "/usr/bin/bowtie2-align version 2.1.0" my question how change default path program in r (so version "/opt/ngs/bowtie2-2.2.8/bowtie2-align-s version 2.2.8" rather "/usr/bin/bowtie2-align version 2.1.0")
you need add export path=/opt/ngs/bowtie2-2.2.8:/usr/local/sbin:/usr/local/bin:/usr/sbin end of .bashrc(linux) or .bash_profile(mac) file in home folder.
vi ~/.bash_profile and add export command @ end of file, otherwise work current shell session. when use system command in r, launches new shell session, export command won't apply to.
Comments
Post a Comment