Question: What blastp command will give output having outfmt6 with header?
0
gravatar for talk4torypam
10 weeks ago by
talk4torypam0 wrote:

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 • 198 views
ADD COMMENTlink written 10 weeks ago by talk4torypam0
2

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 REPLYlink modified 10 weeks ago • written 10 weeks ago by Bastien Hervé3.7k

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 REPLYlink written 10 weeks ago by talk4torypam0

Which command line did you use ?

ADD REPLYlink written 10 weeks ago by Bastien Hervé3.7k

i used the second one

sed -i '1s/^/qseqid\tsseqid\tpident\tlength\tmismatch\tgapopen\tqstart\tqend\tsstart\tsend\tevalue\tbitscore\n/' blast_file
ADD REPLYlink modified 10 weeks ago by Bastien Hervé3.7k • written 10 weeks ago by talk4torypam0

Is this working better ?

sed -i '1s|^|qseqid\tsseqid\tpident\tlength\tmismatch\tgapopen\tqstart\tqend\tsstart\tsend\tevalue\tbitscore\n|' blast_file
ADD REPLYlink modified 10 weeks ago • written 10 weeks ago by Bastien Hervé3.7k

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 REPLYlink modified 10 weeks ago • written 10 weeks ago by talk4torypam0

Are you on macOS or unix ?

ADD REPLYlink modified 10 weeks ago • written 10 weeks ago by Bastien Hervé3.7k

i use ubuntu linux

ADD REPLYlink written 10 weeks ago by talk4torypam0

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 REPLYlink modified 10 weeks ago • written 10 weeks ago by Bastien Hervé3.7k

it worked. thank you so very much

ADD REPLYlink written 10 weeks ago by talk4torypam0

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 REPLYlink written 10 weeks ago by lieven.sterck4.2k
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: 905 users visited in the last hour