NCBI-Hackathons / ViruSpy

A pipeline for viral identification from metagenomic samples
MIT License
27 stars 4 forks source link

Not using full paths within scripts #7

Closed jkwaldman closed 7 years ago

jkwaldman commented 7 years ago

Script paths need straightening out - while trying to run viruspy.sh and magicblast_w_opts.sh I got repeated "file not found" errors.

./viruspy.sh -s SRR5675673 -o /zfs1/ncbi-workshop/virus-discovery/JW/Pipeline_Rerun/

srr: SRR5675673 outdir: /zfs1/ncbi-workshop/virus-discovery/JW/Pipeline_Rerun/ blastDB: paired: ./viruspy.sh: line 73: magicblast_w_opts.sh: command not found

This error is because of line 73 in the script:

$magic_blast -s $srr -o $srr.fastq

without ./$magic_blast or bash $magic_blast, my shell won't be able to interpret the command.

Once that's fixed, I get:

bash: magicblast_w_opts.sh: No such file or directory

That's because of line 67:

cd $magic_dir

Which takes us out of the current directory into out_dir/data_magicblast, and the full path for magicblast_w_opts is not given, so it can't find the file. Since this is a larger issue (most of our paths in scripts are not full paths) I'm putting it up as an issue rather than just fixing it in the script.

pcantalupo commented 7 years ago

I don't think full paths should be in our scripts. Code users need to put the scripts directory in their $PATH variable. Maybe this needs added to the README. Does this solve your issue?

pcantalupo commented 7 years ago

@jkwaldman is it ok to close this?

jkwaldman commented 7 years ago

@pcantalupo Let me check and get back to you tomorrow - today's a little hectic to test things out.

jkwaldman commented 7 years ago

@pcantalupo Adding /scripts/ directory to $PATH solved my issues - added it to the readme.