Question: Parsing Blast output on linux/unix
5
gravatar for chagross
11 months ago by
chagross40
chagross40 wrote:

Hello All,

I recently ran the following command on linux:

*blastall -p blastn -d new_NotPatoDB.fa -i smallQuery.fasta  -o textout.xml -m 7*

The results I received are in XML format , I'm trying to extract the sequences with minimum hits. I tried using the following script: ncbiblastparser.pl by running the following command: perl ncbiblastparser.pl output.xml 5 parseout.txt but I get the following error:

*Can't locate Bio/SearchIO.pm in @INC (you may need to install the Bio::SearchIO module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at ncbiblastparser.pl line 6.
BEGIN failed--compilation aborted at ncbiblastparser.pl line 6.*

I have downloaded the Bio/SearchIO.pm package a few times.

can anyone identify the problem? or have any other ideas or ways parse the results.

linux output blast parse python • 572 views
ADD COMMENTlink modified 11 months ago by shira.zaltsman10 • written 11 months ago by chagross40
1

If you don't have to stick to XML, you should try tabular output (outfmt 6).

Then you can start learning how to parse it from ncbi webinar.
Basic UNIX command lines will work far better on tabular output compared to XML.

ADD REPLYlink modified 11 months ago • written 11 months ago by erwan.scaon680
1
sudo perl -MCPAN -e shell
install Bio::SearchIO

Or if you want to parse xml in Bash, check this insightful post

But really the best option is to use -outfmt 6 (tabular output) and use sort, awk, etc.

ADD REPLYlink modified 11 months ago • written 11 months ago by 5heikki8.4k

Did you try install bioperl to your system?? Bio::SearchIO is module of Bioperl.

ADD REPLYlink modified 11 months ago • written 11 months ago by Paul1.3k

is this a homework question?

ADD REPLYlink written 11 months ago by YaGalbi1.4k

NO this is for a research project.

ADD REPLYlink written 11 months ago by chagross40

I used these instructions to download bioperl - https://bioperl.org/INSTALL.html when I run the dpkg command I don't see bioperl listed could it be the installation was not successful?

ADD REPLYlink written 11 months ago by chagross40

I don't see a dpkg command. What is the OS you're working on? Can you give us the output of uname -a?

ADD REPLYlink written 11 months ago by RamRS21k

Linux Bioinformatics 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 21:23:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

ADD REPLYlink written 11 months ago by chagross40

I'm having the same problem :(

ADD REPLYlink modified 11 months ago • written 11 months ago by shira.zaltsman10

There was a probable answer in Stackoverflow.com

https://stackoverflow.com/questions/33086310/perl-compilation-error-cant-locate-local-lib-pm

ADD REPLYlink modified 11 months ago • written 11 months ago by natasha.sernova3.4k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 923 users visited in the last hour