This is a test version of Biostars. For the public version, visit https://www.biostars.org.
What blastp command will give output having outfmt6 with header?

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

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

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

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

i used the second one

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

Is this working better ?

sed -i '1s|^|qseqid\tsseqid\tpident\tlength\tmismatch\tgapopen\tqstart\tqend\tsstart\tsend\tevalue\tbitscore\n|' blast_file

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

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

0 answers

No answers yet.

Log in to answer this question.