fastq-dump (or any command line tool) not found
1
0
Entering edit mode
2.6 years ago
Jeffrey ▴ 20

Please help. I am trying to get started in bioinformatics and having trouble getting an environment set up. I am using Ubuntu. I installed anaconda and created a new environment. I added sra toolkit to the environment. I opened a jupyter notebook in that environment and tried to use sra-toolkit commands such as fastq-dump, but I get "command not found". What do I have to do to make packages I installed to my environment visible in jupyter notebook?

sra-toolkit fastq-dump anaconda • 1.8k views
ADD COMMENT
0
Entering edit mode

Why do you have to use it on Jupyter-notebook? You can use sratoolkit from terminal.

I imagine you need the command to download fastq files starting from a file.sra, and you what to use the downloaded file on Jupyter notebook.

You simply have to follow the following command on terminal:

cd $path_to_the_folder_where_you_whant_your_downloads_to_be_set

conda activate $conda_environment_with_sratoolkit_installed

fastq-dump --split-files file.sra

conda activate $conda_environment_with_jupyter_installed

jupyter notebook

Once on your notebook you can upload the fastq like this

file= glob.glob("*.fastq")

ADD REPLY
0
Entering edit mode

First, thank you for the response. Well, I'd like to use jupyter notebook as I learn bioinformatics so that I have a record of everything I've done. It was my understanding that I could run command line tools from within a jupyter notebook. I thought that I could click the "white triangle in a green circle" next to my environment in anaconda navigator and start a jupyter notebook in that environment. Maybe my problem is that I'm not really in that environment and that is why the commands are not found?

Here is exactly what I am trying to do. I am trying to learn chip-seq data analysis by following the steps in the book, "Practical Guide to Chip-seq Analysis". On page 15 it tells me to enter this command: fastq-dump --origfmt --outdir data --gzip -A SRR250083

So, using anaconda navigator, I created an environment and installed SRA toolkit. I thought I would then be able to launch jupyter notebook in that environment and run the command like this:

!fastq-dump --origfmt --outdir data --gzip -A SRR250O83

It tells me fastq-dump not found. If I enter !fastq-dump -h it tells me fastq-dump not found. I guess the particular command isn't important. The problem is that it can't find the sra-toolkit tools I installed in my environment, and I don't know why.

ADD REPLY
2
Entering edit mode
2.6 years ago
Jeffrey ▴ 20

I think I found a solution. Even though I chose to launch jupyter notebook from the environment where I installed the sra toolkit, it seems that anaconda navigator launched jupyter notebook in my base environment which didn't have sra toolkit installed. So, what I had to do was activate the correct conda environment from within the jupyter notebook. Then, the tools I installed were found.

ADD COMMENT

Login before adding your answer.

Traffic: 2046 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6