Fastqc works in terminal fastqc not found during jupyter call
0
0
Entering edit mode
4.8 years ago
bz3 • 0

I am using Ubuntu 18.04 LTS and fastQC v0.11.8. Using the terminal fastqc is easly called, producing report, graphs and all needed files. In jupyter notebook I tried calling in 2 different ways with two outcomes:

!/usr/local/bin/fastqc /home/bz/Desktop/1coding/pipeline/frag_2.fastq /home/bz/Desktop/1coding/pipeline/frag_1.fastq --extract

i get error

/bin/sh: 1: /usr/local/bin/fastqc: not found

However link to the file is present at this location.

When I give direct path to the file.

!/home/bz/FastQC/fastqc /home/bz/Desktop/1coding/pipeline/frag_2.fastq /home/bz/Desktop/1coding/pipeline/frag_1.fastq --extract

The error:

Can't locate FindBin.pm in @INC (you may need to install the FindBin module)
 (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1
 /usr/local/share/perl/5.26.1 
/usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 
/usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /home/bz/FastQC/fastqc line 4.
BEGIN failed--compilation aborted at /home/bz/FastQC/fastqc line 4.

I checked if the package is installed and it is:perl -e FindBin.pm doesn't throw any errors

Any tips what might be wrong and how can i make fastqc run as a part of python script, many thanks.

FastQC Assembly software error quality reads • 2.4k views
ADD COMMENT
0
Entering edit mode

It is not clear to me how exactly you are executing these commands. Are you using subprocess from Python? In your terminal you should check where FastQC is installed, using a command like which fastqc, then check to make sure that this location is in the PATH when Python/Jupyter/etc are trying to run the command. Or just give the full path to the FastQC binary in your command. The Perl module issues also sound like a PATH problem.

ADD REPLY
0
Entering edit mode

I tried using both subprocess.call() and ! sign,part of jupyter notebook magic to run shell command, with the same error. Fastqc is actually added to the PATH as well as Perl.

which perl 
/usr/bin/perl
which fastqc
/usr/local/bin/fastqc
echo $PATH
/home/bz/anaconda3/bin:/home/bz/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/bin/fastqc
ADD REPLY

Login before adding your answer.

Traffic: 1883 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