SchwartzLabURI / SISRS

This project identifies phylogenetically informative sites from next-generation whole-genome sequencing of multiple species. It is able to identify homologous sites without the need to do de novo assembly, annotation, and alignment.
https://schwartzlaburi.github.io/SISRS/
GNU General Public License v2.0
7 stars 7 forks source link

finding adapters when bbmap installed w conda #4

Closed rachelss closed 5 years ago

rachelss commented 5 years ago

The autofind of adapters.fa is incorrect when bbmap is installed with conda due to symlinks. Adapters.fa is in /usr/bin/anaconda3/opt/bbmap-38.51-0/resources/adapters.fa

when anaconda is installed to /usr/bin/anaconda3

sisrs is looking for /usr/bin/anaconda3/bin/resources/adapters.fa as /usr/bin/anaconda3/bin is where bbduk.sh is found although it's also in /usr/bin/anaconda3/opt/bbmap-38.51-0/

DevinJMcc commented 5 years ago

Hi Rachel,

The autofind function that can be found in sisrs_02_read_trimmer.py is based off of your path variable that is located in your .bash_profile. When installing SISRS notice the dependency list and that BBMap Suite (37.40) is included in that. Prior to running SISRS add BBMap to your path.

First this is what your initial.bash_profile might look like:

$ cat /.bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin        

Now to add that path scroll down past the "PATH=" variable:

$vim .bash_profile

PATH=$PATH:$HOME/bin 

# Added new line here
export PATH="/usr/bin/anaconda3/opt/bbmap-38.51-0/:$PATH"

Once you do this your problem should be resolved.

rachelss commented 5 years ago

I added /usr/bin/anaconda3/opt/bbmap-38.51-0/ to PATH for all users on the server

Error:

java -Djava.library.path=/usr/bin/anaconda3/opt/bbmap-38.51-0/jni/ -ea -Xmx335m -Xms335m -cp /usr/bin/anaconda3/opt/bbmap-38.51-0/current/ jgi.BBDuk maxns=0 ref=usr/bin/anaconda3/opt/bbmap-38.51-0/resources/adapters.fa qtrim=w trimq=15 minlength=35 maq=25 in=sisrs_test/Reads/RawReads/AotNan/AotNan_SE.fastq.gz out=sisrs_test/Reads/TrimReads/AotNan/AotNan_SE_Trim.fastq.gz k=23 mink=11 hdist=1 hdist2=0 ktrim=r ow=t &> sisrs_test/Reads/RawReads/trimOutput/out_AotNan_SE_Trim Traceback (most recent call last): File "/usr/bin/SISRS/scripts/sisrs.py", line 116, in sisrs2(rtn[2],rtn[3],rtn[0]) File "/usr/bin/SISRS/scripts/sisrs.py", line 49, in sisrs2 trim(out[5],out[1],bbduk_adapter,out[2]) File "/usr/bin/SISRS/scripts/sisrs_02_read_trimmer.py", line 175, in trim check_call(se_trim_command) File "/usr/bin/anaconda3/lib/python3.7/subprocess.py", line 347, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['bbduk.sh', 'maxns=0', 'ref=usr/bin/anaconda3/opt/bbmap-38.51-0/resources/adapters.fa', 'qtrim=w', 'trimq=15', 'minlength=35', 'maq=25', 'in=sisrs_test/Reads/RawReads/AotNan/AotNan_SE.fastq.gz', 'out=sisrs_test/Reads/TrimReads/AotNan/AotNan_SE_Trim.fastq.gz', 'k=23', 'mink=11', 'hdist=1', 'hdist2=0', 'ktrim=r', 'ow=t', '&>', 'sisrs_test/Reads/RawReads/trimOutput/out_AotNan_SE_Trim']' returned non-zero exit status 1.