This is a test version of Biostars. For the public version, visit https://www.biostars.org.
BLASTP many pairs of peptide sequences

Dear all,

I have many pairs of protein sequences, an example shown below.

MDDDIAALVVDNGSGMCKAG  DDDIAALVDNSGSMCKAG
TTAEREIVRDIKEKLCY  TTAEIVRKEKLCYVA
RMQKEITAPSTMKIKI  KEITALPSTMKIKII
... ...

I need to perform blastp to compare the two sequences in each pair. What's command for that?

To my knowledge, blastn -subject -query can be used for two nucleotide sequence comparison. So how to compare pr sequences?

THANK YOU very much!

blast

1 answer

use bash+named pipes+blastp:

echo -e "MDDDIAALVVDNGSGMCKAG\tDDDIAALVDNSGSMCKAG\nTTAEREIVRDIKEKLCY\tTTAEIVRKEKLCYVA" |\
while read F; do blastp -query <(echo "$F" | cut -f 1 | awk '{printf(">p1\n%s\n",$1);}') -subject <(echo "$F" | cut -f 2 | awk '{printf(">p2\n%s\n",$1);}')  ; done
BLASTP 2.2.28+


Query= p1

Length=20

Subject= p2

Length=18


 Score = 26.9 bits (58),  Expect = 1e-07, Method: Compositional matrix adjust.
 Identities = 15/19 (79%), Positives = 15/19 (79%), Gaps = 1/19 (5%)

Query  2   DDDIAALVVDNGSGMCKAG  20
           DDDIAALV DN   MCKAG
Sbjct  1   DDDIAALV-DNSGSMCKAG  18



Lambda      K        H        a         alpha
   0.317    0.136    0.402    0.792     4.96 

Gapped
Lambda      K        H        a         alpha    sigma
   0.267   0.0410    0.140     1.90     42.6     43.6 

Effective search space used: 360




Matrix: BLOSUM62
Gap Penalties: Existence: 11, Extension: 1
Neighboring words threshold: 11
Window for multiple hits: 40
BLASTP 2.2.28+


Query= p1

Length=17

Subject= p2

Length=15


 Score = 18.9 bits (37),  Expect = 4e-05, Method: Compositional matrix adjust.
 Identities = 10/12 (83%), Positives = 10/12 (83%), Gaps = 2/12 (17%)

Query  6   EIVRDIKEKLCY  17
           EIVR  KEKLCY
Sbjct  4   EIVR--KEKLCY  13



Lambda      K        H        a         alpha
   0.320    0.135    0.376    0.792     4.96 

Gapped
Lambda      K        H        a         alpha    sigma
   0.267   0.0410    0.140     1.90     42.6     43.6 

Effective search space used: 255




Matrix: BLOSUM62
Gap Penalties: Existence: 11, Extension: 1
Neighboring words threshold: 11
Window for multiple hits: 40

thank you Pierre, the shell command is really cool.

Log in to answer this question.