Parsing Blast output on linux/unix
0
5
Entering edit mode
6.5 years ago
chagross ▴ 40

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.

blast parse output python linux • 3.3k views
ADD COMMENT
1
Entering edit mode

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 REPLY
1
Entering edit mode
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 REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

is this a homework question?

ADD REPLY
0
Entering edit mode

NO this is for a research project.

ADD REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

I'm having the same problem :(

ADD REPLY
0
Entering edit mode
ADD REPLY

Login before adding your answer.

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