ISUgenomics / SequelTools

new repo
GNU General Public License v3.0
26 stars 6 forks source link

command not found #4

Closed dcopetti closed 4 years ago

dcopetti commented 4 years ago

Hello,

I am trying to run the tool on three SMRT cells with the scraps files /home/copettid/bin/SequelTools/Scripts/SequelTools.sh -t Q -c scraps_SGP5p.txt -u subreads_SGP5p.txt -n 10 -o SGP5p_3_SequelTools_QC but I get this error:

/home/copettid/bin/SequelTools/Scripts/SequelTools.sh: line 681: generateReadLenStats_wScraps.py: command not found
ERROR: Calculation of read length statistics failed!

However, the python script is there and runs - though it asks for an argument that I did not see in the .sh file

(base) bash-4.2$ ls -lrth /home/copettid/bin/SequelTools/Scripts/
total 124K
-rwxr-xr-x. 1 copettid mpb  41K Mar 27 08:46 SequelTools.sh
-rwxr-xr-x. 1 copettid mpb 9.3K Mar 27 08:46 generateReadLenStats_wScraps.py
-rwxr-xr-x. 1 copettid mpb 4.2K Mar 27 08:46 generateReadLenStats_noScraps.py
-rwxr-xr-x. 1 copettid mpb 6.6K Mar 27 08:46 filterReads.py
-rwxr-xr-x. 1 copettid mpb 5.4K Mar 27 08:46 subsampleReads_wScraps.py
-rwxr-xr-x. 1 copettid mpb 4.4K Mar 27 08:46 subsampleReads_noScraps.py
-rwxr-xr-x. 1 copettid mpb  23K Mar 27 08:46 plotForSequelQC_wScraps.R
-rwxr-xr-x. 1 copettid mpb  11K Mar 27 08:46 plotForSequelQC_noScraps.R
(base) bash-4.2$ python /home/copettid/bin/SequelTools/Scripts/generateReadLenStats_wScraps.py
Traceback (most recent call last):
  File "/home/copettid/bin/SequelTools/Scripts/generateReadLenStats_wScraps.py", line 22, in <module>
    groupsDesired = sys.argv[9]                  #a or b (stands for 'all' or 'basic')
IndexError: list index out of range

Can you help me figure it out? Thanks, Dario

PS: I am now running it in NO_SCRAPS mode to see if it still gives the same error.

dcopetti commented 4 years ago

update: I get the same error also without using the information in the scraps file:

$ /home/copettid/bin/SequelTools/Scripts/SequelTools.sh -t Q -u subreads_SGP5p.txt -n 10 -o SGP5p_3_SequelTools_QCsubreads
Beginning quality control function

Running in NO_SCRAPS mode
/home/copettid/bin/SequelTools/Scripts/SequelTools.sh: line 675: generateReadLenStats_noScraps.py: command not found
ERROR: Calculation of read length statistics failed!
DavidEHufnagel commented 4 years ago

Hello Dario,

Thank you for trying our tool and for reaching out! Have the scripts that came with SequelTools been put in your $PATH? If not that would cause this issue. There are some instructions for how to do this on the GitHub page. If you need any further assistance I'd be happy to help!

Best, Dr. David E. Hufnagel

On Fri, Mar 27, 2020 at 10:50 AM Dario Copetti notifications@github.com wrote:

update: I get the same error also without using the information in the scraps file:

$ /home/copettid/bin/SequelTools/Scripts/SequelTools.sh -t Q -u subreads_SGP5p.txt -n 10 -o SGP5p_3_SequelTools_QCsubreads Beginning quality control function

Running in NO_SCRAPS mode /home/copettid/bin/SequelTools/Scripts/SequelTools.sh: line 675: generateReadLenStats_noScraps.py: command not found ERROR: Calculation of read length statistics failed!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ISUgenomics/SequelTools/issues/4#issuecomment-605073764, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQPE3ITHXRT2MBCDGLXSDTRJTDLRANCNFSM4LVBIU3A .

dcopetti commented 4 years ago

Hello David,

Thank you for your feedback. Yes, the issue went away by adding the folder in the path with export = PATH. When it failed, I had added the path to the .bashrc file, sourced it, but evidently that was not enough. All good

Dairo

DavidEHufnagel commented 4 years ago

Happy to help! Best of luck in all your endeavors!

--David

On Sat, Mar 28, 2020 at 4:08 AM Dario Copetti notifications@github.com wrote:

Closed #4 https://github.com/ISUgenomics/SequelTools/issues/4.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ISUgenomics/SequelTools/issues/4#event-3174774258, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQPE3PJT67D5KTL4NM5HD3RJW475ANCNFSM4LVBIU3A .

nick-youngblut commented 3 years ago

I ran into this same issue. Usually, if a parent script calls another script in the software distribution, the parent looks for the child in the same directory or >=1 developer-defined directories. Why not have SequelTools.sh try calling generateReadLenStats_wScraps.py with the assumption that it is in the same directory, after calling assuming that generateReadLenStats_wScraps.py is in the PATH? This would help for all users that don't want to modify their PATH just to use SequelTools (generally not needed for modern software installs).