What blastp command will give output having outfmt6 with header?
0
0
Entering edit mode
5.9 years ago

Hi all, i am trying to run fusedTriplets.py . i have run the following commands in order to get my input

makeblastdb -in all.fas -dbtype prot -title all -out allseqs -parse_seqids

and for the input file I used

blastp -query all.fas -db allseqs -out all-vs-all_dbsize_defult.tsv -outfmt 6

and

blastp -query all.fas -db allseqs -out all-vs-all_dbsize_defult.tsv -outfmt “6 qseqid sseqid evalue pident bitscore qstart qend qlen sstart send slen”

and I get the error Assertion error: network header should start with 'qseqid sseqid' I have tried using blast outfmt 7 (edited it too) and 10. but still get the same error massage can anyone help with the appropriate thing to do to overcome this thank you

software error • 2.3k views
ADD COMMENT
2
Entering edit mode

Along to lieven.sterck 's comment

This should work

sed -i '1s/^/qseqid\tsseqid\tevalue\tpident\tbitscore\tqstart\tqend\tqlen\tsstart\tsend\tslen\n/' blast_file

For the command line

blastp -query all.fas -db allseqs -out all-vs-all_dbsize_defult.tsv -outfmt “6 qseqid sseqid evalue pident bitscore qstart qend qlen sstart send slen”

For this command line :

blastp -query all.fas -db allseqs -out all-vs-all_dbsize_defult.tsv -outfmt 6

According to the documentation, you will prefer

sed -i '1s/^/qseqid\tsseqid\tpident\tlength\tmismatch\tgapopen\tqstart\tqend\tsstart\tsend\tevalue\tbitscore\n/' blast_file
ADD REPLY
0
Entering edit mode

thank you this is really helpful, however i am getting this error

sed: -e expression #1, char 1: unknown command:

i am not familiar with sed. what can i do to overcome this. Thank you

ADD REPLY
0
Entering edit mode

Which command line did you use ?

ADD REPLY
0
Entering edit mode

i used the second one

sed -i '1s/^/qseqid\tsseqid\tpident\tlength\tmismatch\tgapopen\tqstart\tqend\tsstart\tsend\tevalue\tbitscore\n/' blast_file
ADD REPLY
0
Entering edit mode

Is this working better ?

sed -i '1s|^|qseqid\tsseqid\tpident\tlength\tmismatch\tgapopen\tqstart\tqend\tsstart\tsend\tevalue\tbitscore\n|' blast_file
ADD REPLY
0
Entering edit mode

i am afraid that did not work either it gave me the same error report as above and

sed: -e expression #1, char 1: unknown command:
^: command not found
': command not found
qseqidtsseqidtpidenttlengthtmismatchtgapopentqstarttqendtsstarttsendtevaluetbitscore
coren: command not found
ADD REPLY
0
Entering edit mode

Are you on macOS or unix ?

ADD REPLY
0
Entering edit mode

i use ubuntu linux

ADD REPLY
0
Entering edit mode

I'm not really sure of myself so make a copy of your file. Seems like you have non-GNU sed

Copy these lines one by one and press enter at the end of each line

sed -i '1i\
qseqid\tsseqid\tpident\tlength\tmismatch\tgapopen\tqstart\tqend\tsstart\tsend\tevalue\tbitscore
' blast_file
ADD REPLY
0
Entering edit mode

it worked. thank you so very much

ADD REPLY
0
Entering edit mode

Not 100% sure, but I think you can (should?) manually add the header you want on top of the tabular output from outfmt 6. None of the "default" blast outformats will add named column headers in the output file

ADD REPLY

Login before adding your answer.

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