I have a program called "bowtie2" and I changed the default path in the 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 I call it from R, this is still an old version from another way:
> bowtie2="bowtie2"
> system2(bowtie2,"--version",stdout=TRUE)[1]
[1] "/usr/bin/bowtie2-align version 2.1.0"
My question is how to change the default path for a program in R (so the version is "/opt/NGS/bowtie2-2.2.8/bowtie2-align-s version 2.2.8 is more likely" / usr / bin / bowtie2- align version 2.1.0 ")
source
share