Question: Standalone blast: how to display only results with positive number of hits ?
gravatar for lordbleys
4.0 years ago by
lordbleys0 wrote:

Hi !

Here is my problem: I have a list of sequences (reads in fasta format) from a NGS experiment, and I want to identify some specific sequences in this list and count the number of occurrences they occur. The sequences I am looking for are grouped into a database (another fasta file).


I use a local standalone blast the following way :

makeblastdb -in database.fasta -out database -dbtype nucl

blastn -db database -query ngs_reads.fasta -out results.out


The problem is that the output file displays all the input sequences (several millions in my case), and only a handful of them actually score hits in the database. As a results I have a very impractical file to read until I find the results I am looking for.


I tried using the "-outfmt" option, but to no avail :

-outfmt "7 qacc sacc evalue length nident"


Also, the database is pretty big also, so inverting db/query doesn't really help (already tried).


My question is : is there a way to display only the query sequences for which the number of hits is > or = to 1 in the blastn output ?


Any help would be most welcome ! :)

blast next-gen • 2.1k views
ADD COMMENTlink written 4.0 years ago by lordbleys0
Why did you try outfmt 7 in particular? Have you read the manual/even checked the -help option? There are multiple suitable outfmts for you..
ADD REPLYlink modified 4.0 years ago • written 4.0 years ago by 5heikki8.6k

See this thread for some discussion about this:

ADD REPLYlink written 4.0 years ago by genomax78k

Thanks !

I tried outfmt 7 because of the formatting and the options, I didn't realize the "comment line" was my problem. Indeed very simply with the outfmt 6 it works perfectly.

ADD REPLYlink written 4.0 years ago by lordbleys0

Have you try to specify  a value for evalue parameter?

ADD REPLYlink written 4.0 years ago by iraun3.7k
Please log in to add an answer.


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