pm21-dragon/exercises/source/exercise-11/3__bioinformatics_with_HTTP.ipynb
2025-01-17 08:33:38 +01:00

62 KiB

None <html> <head> </head>
In [1]:
# Import biopython
import Bio

import requests
In [2]:
# You must run this cell, but you can ignore its contents.

import hashlib

def ads_hash(ty):
    """Return a unique string for input"""
    ty_str = str(ty).encode()
    m = hashlib.sha256()
    m.update(ty_str)
    return m.hexdigest()[:10]

Bioinformatics with HTTP

Not only can we use the Star Wars API with HTTP, we can also access the NCBI's databases over HTTP. Here is more information from the NCBI. Note that in this exercise, we will be doing low volume queries without using a specialized software library. Some libraries and other software is available to automatically do this for here. For example, below we use the NCBIWWW module from biopython. Here we do it "the hard way" at a low level.

If you start using the NCBI web resources extensively, please read the NCBI's documentation about providing them with an email address to contact you.

In [3]:
def get_protein_fasta(accession):
    url = "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=protein&id=%s&rettype=fasta&retmode=text"%(accession,)
    return requests.get(url).text
In [4]:
da1 = get_protein_fasta('NP_524481.2')
da1
Out[4]:
'>NP_524481.2 nicotinic acetylcholine receptor alpha1, isoform A [Drosophila melanogaster]\nMGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVNLKNQI\nMTTNVWVEQEWNDYKLKWNPDDYGGVDTLHVPSEHIWLPDIVLYNNADGNYEVTIMTKAILHHTGKVVWK\nPPAIYKSFCEIDVEYFPFDEQTCFMKFGSWTYDGYMVDLRHLKQTADSDNIEVGIDLQDYYISVEWDIMR\nVPAVRNEKFYSCCEEPYLDIVFNLTLRRKTLFYTVNLIIPCVGISFLSVLVFYLPSDSGEKISLCISILL\nSLTVFFLLLAEIIPPTSLTVPLLGKYLLFTMMLVTLSVVVTIAVLNVNFRSPVTHRMAPWVQRLFIQILP\nKLLCIERPKKEEPEEDQPPEVLTDVYHLPPDVDKFVNYDSKRFSGDYGIPALPASHRFDLAAAGGISAHC\nFAEPPLPSSLPLPGADDDLFSPSGLNGDISPGCCPAAAAAAAADLSPTFEKPYAREMEKTIEGSRFIAQH\nVKNKDKFESVEEDWKYVAMVLDRMFLWIFAIACVVGTALIILQAPSLYDQSQPIDILYSKIAKKKFELLK\nMGSENTL\n\n'

Great, so we can get FASTA files directly from the NBCI using the accession.

Q1 Get the FASTA for accession NP_733001.1. Put the result in the variable da2, which should be a string.

In [5]:
# Write your answer here
da2 = get_protein_fasta('NP_733001.1')
In [6]:
# This checks that the above worked
assert ads_hash(da2)=='16538bd802'

Using the biopython library for bioinformatics, including NCBI queries

In [7]:
import Bio
from Bio.Blast import NCBIWWW
from Bio.Blast import NCBIXML
from Bio import SeqIO
from io import StringIO
import os

We can work with FASTA sequences using the biopython library. It expects multiple sequences in a given FASTA file, so we loop over them:

Each record here is an instance of the Seq class.

Let's copy the sequence to a raw python string called da2_seq:

In [8]:
da2_seq = None
for record in SeqIO.parse(StringIO(da2), "fasta"):
    print(record)
    assert(da2_seq is None)
    da2_seq = str(record.seq)
ID: NP_733001.1
Name: NP_733001.1
Description: NP_733001.1 nicotinic acetylcholine receptor alpha2, isoform B [Drosophila melanogaster]
Number of features: 0
Seq('MAPGCCTTRPRPIALLAHIWRHCKPLCLLLVLLLLCETVQANPDAKRLYDDLLS...KKN')
In [9]:
da2_seq
Out[9]:
'MAPGCCTTRPRPIALLAHIWRHCKPLCLLLVLLLLCETVQANPDAKRLYDDLLSNYNRLIRPVSNNTDTVLVKLGLRLSQLIDLNLKDQILTTNVWLEHEWQDHKFKWDPSEYGGVTELYVPSEHIWLPDIVLYNNADGEYVVTTMTKAILHYTGKVVWTPPAIFKSSCEIDVRYFPFDQQTCFMKFGSWTYDGDQIDLKHISQKNDKDNKVEIGIDLREYYPSVEWDILGVPAERHEKYYPCCAEPYPDIFFNITLRRKTLFYTVNLIIPCVGISYLSVLVFYLPADSGEKIALCISILLSQTMFFLLISEIIPSTSLALPLLGKYLLFTMLLVGLSVVITIIILNIHYRKPSTHKMRPWIRSFFIKRLPKLLLMRVPKDLLRDLAANKINYGLKFSKTKFGQALMDEMQMNSGGSSPDSLRRMQGRVGAGGCNGMHVTTATNRFSGLVGALGGGLSTLSGYNGLPSVLSGLDDSLSDVAARKKYPFELEKAIHNVMFIQHHMQRQDEFNAEDQDWGFVAMVMDRLFLWLFMIASLVGTFVILGEAPSLYDDTKAIDVQLSDVAKQIYNLTEKKN'

In addition to "raw" HTTP requests using the requests library, biopython also is able to call the NCBI for you. It is using HTTP to perform the call, but this is hidden from you. Below, we do a BLAST search based on the sequence we just downloaded.

We can limit our search to just a few organisms using the NCBI taxon ID. The easiest way to find these it to start typing in the BLAST web search entry page and copy the taxon ID from there.

Here are a few taxon IDs for some insects and then some code to limit our NCBI query just to these taxa.

In [10]:
# Bombus terrestris 30195
# Apis mellifera 7460
# Locusta migratoria 7004
# Drosophila melanogaster 7227
# Tribolium castaneum 7070
taxids = (30195, 7460, 7004, 7227, 7070)
taxid_query = ' OR '.join(['txid%d[ORGN]'%taxid for taxid in taxids])
taxid_query
Out[10]:
'txid30195[ORGN] OR txid7460[ORGN] OR txid7004[ORGN] OR txid7227[ORGN] OR txid7070[ORGN]'

Now with our query limited to these specific groups, we are going to run a BLAST search. As with the web browser interface, this can take some time, so the code below is written to only run the web search when the output file is not present. Therefore, once you run the web search the first time, it will not run again unless you delete the file.

Futhermore, as mentioned in the bio python tutorial, we need to be careful with our result handle when we get it because it can be read only once. So, here we the results of our search to a local file. Later, we can read this as often as we want.

This may take some time as we are running a full BLAST search on the NCBI servers.

In [11]:
fname = "da2_blast.xml"
if not os.path.exists(fname):
    result_handle = NCBIWWW.qblast("blastp", "nr", da2_seq, entrez_query=taxid_query)
    with open(fname, "w") as out_handle:
        out_handle.write(result_handle.read())
else:
    print("not overwriting file %s"%fname)
not overwriting file da2_blast.xml
In [12]:
blast_record = NCBIXML.read(open(fname))
for alignment in blast_record.alignments:
    print(alignment)
ref|NP_524482.1| nicotinic acetylcholine receptor alpha2, isoform A [Drosophila melanogaster] >ref|NP_733001.1| nicotinic acetylcholine receptor alpha2, isoform B [Drosophila melanogaster] >ref|XP_002032516.1| acetylcholine receptor subunit alpha-like 2 [Drosophila sechellia] >ref|XP_002104730.1| acetylcholine receptor subunit alpha-like 2 [Drosophila simulans] >ref|XP_033165329.1| acetylcholine receptor subunit alpha-like 2 [Drosophila mauritiana] >sp|P17644.1| RecName: Full=Acetylcholine receptor subunit alpha-like 2; AltName: Full=Nicotinic acetylcholine receptor alpha 2; Flags: Precursor [Drosophila melanogaster] >gb|ACL85307.1| nAcRalpha-96Ab-PA, partial [synthetic construct] >gb|AAF56302.2| nicotinic acetylcholine receptor alpha2, isoform A [Drosophila melanogaster] >gb|AAF56303.1| nicotinic acetylcholine receptor alpha2, isoform B [Drosophila melanogaster] >gb|AAL13675.1| GH22843p [Drosophila melanogaster] >gb|ACL90211.1| nAcRalpha-96Ab-PA [synthetic construct]
           Length = 576

ref|NP_001011625.1| nicotinic acetylcholine receptor alpha2 subunit precursor [Apis mellifera] >ref|XP_006561565.1| nicotinic acetylcholine receptor alpha2 subunit isoform X1 [Apis mellifera] >ref|XP_026298380.1| nicotinic acetylcholine receptor alpha2 subunit isoform X1 [Apis mellifera] >gb|KAG6801311.1| nicotinic acetylcholine receptor alpha2 subunit precursor [Apis mellifera caucasica] >gb|KAG9431277.1| nicotinic acetylcholine receptor alpha2 subunit precursor [Apis mellifera carnica] >gb|AAS48080.1| neuronal nicotinic acetylcholine receptor Apisa2 subunit [Apis mellifera] >gb|AJE70260.1| nicotinic acetylcholine receptor alpha2 subunit [Apis mellifera]
           Length = 541

ref|XP_003397559.1| acetylcholine receptor subunit alpha-L1 isoform X2 [Bombus terrestris]
           Length = 541

ref|NP_001103423.1| nicotinic acetylcholine receptor alpha 2 subunit precursor [Tribolium castaneum] >gb|ABS86903.1| nicotinic acetylcholine receptor subunit alpha2 [Tribolium castaneum] >gb|EFA10793.1| nicotinic acetylcholine receptor subunit alpha2 [Tribolium castaneum]
           Length = 541

ref|XP_012166790.1| acetylcholine receptor subunit alpha-L1 isoform X1 [Bombus terrestris]
           Length = 544

gb|ACM09847.1| nicotinic acetylcholine receptor subunit a2 [Tribolium castaneum] >gb|ACM09848.1| nicotinic acetylcholine receptor subunit a2 [Tribolium castaneum] >gb|ACM09849.1| nicotinic acetylcholine receptor subunit a2 [Tribolium castaneum]
           Length = 540

gb|ACM09846.1| nicotinic acetylcholine receptor subunit a2 [Tribolium castaneum]
           Length = 540

gb|ACL00341.1| nicotinic acetylcholine receptor a2 subunit [Tribolium castaneum]
           Length = 540

ref|XP_008198426.1| PREDICTED: nicotinic acetylcholine receptor alpha 2 subunit isoform X1 [Tribolium castaneum]
           Length = 558

gb|AHJ11209.1| nicotinic acetylcholine receptor alpha2 [Locusta migratoria]
           Length = 551

ref|XP_015838943.1| PREDICTED: nicotinic acetylcholine receptor alpha 2 subunit isoform X2 [Tribolium castaneum]
           Length = 461

ref|NP_001262917.1| nicotinic acetylcholine receptor alpha1, isoform C [Drosophila melanogaster] >ref|NP_524481.2| nicotinic acetylcholine receptor alpha1, isoform A [Drosophila melanogaster] >ref|XP_016952288.1| acetylcholine receptor subunit alpha-like 1 [Drosophila biarmipes] >sp|P09478.2| RecName: Full=Acetylcholine receptor subunit alpha-like 1; AltName: Full=Nicotinic acetylcholine receptor alpha 1; Flags: Precursor [Drosophila melanogaster] >gb|AAF56301.2| nicotinic acetylcholine receptor alpha1, isoform A [Drosophila melanogaster] >gb|AGB96297.1| nicotinic acetylcholine receptor alpha1, isoform C [Drosophila melanogaster]
           Length = 567

ref|NP_001262916.1| nicotinic acetylcholine receptor alpha1, isoform B [Drosophila melanogaster] >gb|AGB96296.1| nicotinic acetylcholine receptor alpha1, isoform B [Drosophila melanogaster]
           Length = 597

ref|NP_001103245.1| nicotinic acetylcholine receptor alpha1 subunit precursor [Tribolium castaneum] >gb|ABS86902.1| nicotinic acetylcholine receptor subunit alpha1 [Tribolium castaneum] >gb|EEZ99265.1| nicotinic acetylcholine receptor subunit alpha1 [Tribolium castaneum]
           Length = 545

emb|CAA30172.1| mature acetylcholine receptor alpha-like subunit [Drosophila melanogaster]
           Length = 567

gb|AHJ11220.1| nicotinic acetylcholine receptor alpha8 variant C [Locusta migratoria]
           Length = 574

gb|AHJ11221.1| nicotinic acetylcholine receptor alpha8 variant D [Locusta migratoria]
           Length = 580

gb|AHJ11218.1| nicotinic acetylcholine receptor alpha8 variant A [Locusta migratoria]
           Length = 540

gb|AHJ11219.1| nicotinic acetylcholine receptor alpha8 variant B [Locusta migratoria]
           Length = 546

emb|CAA04053.1| nicotinic acetylcholine receptor, alpha2 subunit, partial [Locusta migratoria]
           Length = 515

ref|NP_001091690.1| nicotinic acetylcholine receptor alpha1 subunit [Apis mellifera] >gb|AAY87890.1| nicotinic acetylcholine receptor alpha1 subunit [Apis mellifera] >gb|AJE70259.1| nicotinic acetylcholine receptor alpha1 subunit [Apis mellifera]
           Length = 601

ref|XP_026298411.1| nicotinic acetylcholine receptor alpha1 subunit isoform X1 [Apis mellifera] >gb|KAG6801309.1| nicotinic acetylcholine receptor alpha1 subunit isoform X1 [Apis mellifera caucasica] >gb|KAG9431275.1| nicotinic acetylcholine receptor alpha1 subunit isoform X1 [Apis mellifera carnica]
           Length = 627

ref|XP_003397561.2| acetylcholine receptor subunit alpha-like 1 [Bombus terrestris]
           Length = 615

ref|XP_012163744.1| acetylcholine receptor subunit beta-like 2 isoform X1 [Bombus terrestris] >ref|XP_050590207.1| acetylcholine receptor subunit beta-like 2 isoform X1 [Bombus affinis]
           Length = 535

ref|NP_001011575.1| nicotinic acetylcholine receptor alpha8 subunit [Apis mellifera] >gb|AAM51823.1| neuronal nicotinic acetylcholine receptor alpha-3 [Apis mellifera] >gb|AJE70266.1| nicotinic acetylcholine receptor alpha8 subunit [Apis mellifera]
           Length = 537

ref|XP_012163745.1| acetylcholine receptor subunit beta-like 2 isoform X2 [Bombus terrestris] >ref|XP_050590208.1| acetylcholine receptor subunit beta-like 2 isoform X2 [Bombus affinis]
           Length = 531

gb|KAG6799677.1| nicotinic acetylcholine receptor alpha8 subunit [Apis mellifera caucasica] >gb|KAG9434134.1| nicotinic acetylcholine receptor alpha8 subunit [Apis mellifera carnica]
           Length = 534

ref|NP_001107770.1| nicotinic acetylcholine receptor alpha 3 subunit precursor [Tribolium castaneum] >ref|XP_008200302.1| PREDICTED: nicotinic acetylcholine receptor alpha 3 subunit isoform X1 [Tribolium castaneum] >gb|ABS86904.1| nicotinic acetylcholine receptor subunit alpha3 [Tribolium castaneum] >gb|ABV72695.1| nicotinic acetylcholine receptor alpha 3 subunit [Tribolium castaneum] >gb|ACM09844.1| nicotinic acetylcholine receptor subunit a3 [Tribolium castaneum] >gb|EEZ97689.1| nicotinic acetylcholine receptor subunit alpha3 [Tribolium castaneum]
           Length = 551

ref|XP_026296304.1| nicotinic acetylcholine receptor alpha8 subunit isoform X1 [Apis mellifera]
           Length = 533

ref|NP_001103419.1| nicotinic acetylcholine receptor alpha 8 subunit isoform 2 precursor [Tribolium castaneum] >gb|ABS86912.1| nicotinic acetylcholine receptor subunit alpha8 [Tribolium castaneum]
           Length = 508

gb|ACP31314.1| nicotinic acetylcholine receptor a11 subunit [Tribolium castaneum]
           Length = 510

ref|NP_001107771.1| nicotinic acetylcholine receptor alpha 11 subunit precursor [Tribolium castaneum] >gb|ABS86915.1| nicotinic acetylcholine receptor subunit alpha11 [Tribolium castaneum]
           Length = 510

ref|NP_001155998.1| nicotinic acetylcholine receptor alpha 8 subunit isoform 1 precursor [Tribolium castaneum] >gb|ACP31302.1| nicotinic acetylcholine receptor a8 subunit splice variant [Tribolium castaneum] >gb|ACP31304.1| nicotinic acetylcholine receptor a8 subunit [Tribolium castaneum] >gb|ACP31305.1| nicotinic acetylcholine receptor a8 subunit [Tribolium castaneum] >gb|ACP31306.1| nicotinic acetylcholine receptor a8 subunit [Tribolium castaneum]
           Length = 515

ref|XP_016767553.1| nicotinic acetylcholine receptor alpha3 subunit isoform X2 [Apis mellifera]
           Length = 553

gb|KYB29425.1| nicotinic acetylcholine receptor subunit alpha11 [Tribolium castaneum]
           Length = 498

gb|EEZ99341.2| nicotinic acetylcholine receptor subunit alpha8 [Tribolium castaneum]
           Length = 499

gb|KYB29426.1| nicotinic acetylcholine receptor subunit alpha11 [Tribolium castaneum]
           Length = 491

ref|XP_003399573.1| acetylcholine receptor subunit alpha-like isoform X2 [Bombus terrestris]
           Length = 554

ref|NP_001073029.1| nicotinic acetylcholine receptor alpha3 subunit precursor [Apis mellifera] >ref|XP_016767550.1| nicotinic acetylcholine receptor alpha3 subunit isoform X1 [Apis mellifera] >ref|XP_016767551.1| nicotinic acetylcholine receptor alpha3 subunit isoform X1 [Apis mellifera] >ref|XP_016767552.1| nicotinic acetylcholine receptor alpha3 subunit isoform X1 [Apis mellifera] >gb|KAG6799381.1| nicotinic acetylcholine receptor alpha3 subunit precursor [Apis mellifera caucasica] >gb|KAG9433524.1| nicotinic acetylcholine receptor alpha3 subunit precursor [Apis mellifera carnica] >gb|AAY87891.1| nicotinic acetylcholine receptor alpha3 subunit [Apis mellifera]
           Length = 566

gb|ACP31303.1| nicotinic acetylcholine receptor a8 subunit [Tribolium castaneum]
           Length = 515

gb|AJE70261.1| nicotinic acetylcholine receptor alpha3 subunit [Apis mellifera]
           Length = 567

emb|CAA04054.1| nicotinic acetylcholine receptor, alpha3 subunit, partial [Locusta migratoria]
           Length = 540

ref|XP_012170034.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus terrestris] >ref|XP_012170035.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus terrestris] >ref|XP_012170036.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus terrestris] >ref|XP_048267067.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus terrestris]
           Length = 567

ref|NP_524483.1| nicotinic acetylcholine receptor beta2, isoform A [Drosophila melanogaster] >ref|XP_002032518.2| acetylcholine receptor subunit beta-like 2 [Drosophila sechellia] >ref|XP_002104732.1| acetylcholine receptor subunit beta-like 2 [Drosophila simulans] >ref|XP_033161984.1| acetylcholine receptor subunit beta-like 2 [Drosophila mauritiana] >sp|P25162.3| RecName: Full=Acetylcholine receptor subunit beta-like 2; AltName: Full=Nicotinic acetylcholine receptor beta 2; Flags: Precursor [Drosophila melanogaster] >gb|AAF56304.1| nicotinic acetylcholine receptor beta2, isoform A [Drosophila melanogaster] >gb|EDX14235.1| GD18288 [Drosophila simulans] >gb|KMZ05571.1| uncharacterized protein Dsimw501_GD18288 [Drosophila simulans]
           Length = 519

ref|XP_033202999.1| acetylcholine receptor subunit alpha-like isoform X3 [Bombus vancouverensis nearcticus] >ref|XP_033365856.1| acetylcholine receptor subunit alpha-like isoform X3 [Bombus vosnesenskii] >ref|XP_043592353.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus pyrosoma] >ref|XP_043592354.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus pyrosoma] >ref|XP_043592355.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus pyrosoma] >ref|XP_043592356.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus pyrosoma] >ref|XP_048265520.1| acetylcholine receptor subunit alpha-like isoform X3 [Bombus terrestris] >ref|XP_050476339.1| acetylcholine receptor subunit alpha-like isoform X3 [Bombus huntii] >ref|XP_050600937.1| acetylcholine receptor subunit alpha-like isoform X3 [Bombus affinis] >ref|XP_060819514.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus pascuorum] >ref|XP_060819517.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus pascuorum] >ref|XP_060819518.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus pascuorum]
           Length = 572

ref|XP_033365857.1| acetylcholine receptor subunit alpha-like isoform X4 [Bombus vosnesenskii] >ref|XP_048265521.1| acetylcholine receptor subunit alpha-like isoform X4 [Bombus terrestris] >ref|XP_050476340.1| acetylcholine receptor subunit alpha-like isoform X4 [Bombus huntii] >ref|XP_050600938.1| acetylcholine receptor subunit alpha-like isoform X4 [Bombus affinis] >ref|XP_060819515.1| acetylcholine receptor subunit alpha-like isoform X2 [Bombus pascuorum]
           Length = 572

ref|XP_033202993.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus vancouverensis nearcticus] >ref|XP_033202997.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus vancouverensis nearcticus] >ref|XP_033202998.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus vancouverensis nearcticus] >ref|XP_033365852.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus vosnesenskii] >ref|XP_033365853.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus vosnesenskii] >ref|XP_033365854.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus vosnesenskii] >ref|XP_048265515.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus terrestris] >ref|XP_048265517.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus terrestris] >ref|XP_048265519.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus terrestris] >ref|XP_050476333.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus huntii] >ref|XP_050476335.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus huntii] >ref|XP_050476336.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus huntii] >ref|XP_050476337.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus huntii] >ref|XP_050476338.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus huntii] >ref|XP_050600932.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus affinis] >ref|XP_050600935.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus affinis] >ref|XP_050600936.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus affinis]
           Length = 583

ref|XP_033365855.1| acetylcholine receptor subunit alpha-like isoform X2 [Bombus vosnesenskii] >ref|XP_048265516.1| acetylcholine receptor subunit alpha-like isoform X2 [Bombus terrestris] >ref|XP_050476334.1| acetylcholine receptor subunit alpha-like isoform X2 [Bombus huntii] >ref|XP_050600934.1| acetylcholine receptor subunit alpha-like isoform X2 [Bombus affinis]
           Length = 583

emb|CAA39211.1| second beta subunit of nicotinic acetylcholine receptor, partial [Drosophila melanogaster] >prf||1701297A nicotinic acetylcholine receptor beta [Drosophila melanogaster]
           Length = 500

ref|NP_001091691.1| nicotinic acetylcholine receptor alpha4 subunit precursor [Apis mellifera] >ref|XP_006562617.1| nicotinic acetylcholine receptor alpha4 subunit isoform X1 [Apis mellifera] >ref|XP_006562618.1| nicotinic acetylcholine receptor alpha4 subunit isoform X1 [Apis mellifera] >ref|XP_016768429.1| nicotinic acetylcholine receptor alpha4 subunit isoform X1 [Apis mellifera] >ref|XP_016768430.1| nicotinic acetylcholine receptor alpha4 subunit isoform X1 [Apis mellifera] >gb|AAY87892.1| nicotinic acetylcholine receptor alpha4 subunit [Apis mellifera]
           Length = 569

Let's do another blast search for the first protein we had. Again, this can take a long period of time to run on the NCBI servers.

In [13]:
da1_seq = None
for record in SeqIO.parse(StringIO(da1), "fasta"):
    da1_seq = str(record.seq)

fname = "da1_blast.xml"
if not os.path.exists(fname):
    result_handle = NCBIWWW.qblast("blastp", "nr", da1_seq, entrez_query=taxid_query)
    with open(fname, "w") as out_handle:
        out_handle.write(result_handle.read())
else:
    print("not overwriting file %s"%fname)
not overwriting file da1_blast.xml

In the results, each alignment returns a sequence of HSPS ("High Scoring Pairs").

https://www.ncbi.nlm.nih.gov/books/NBK62051/

In [14]:
blast_record = NCBIXML.read(open(fname))
for alignment in blast_record.alignments:
    print(alignment)
    print("%d HSPs"%len(alignment.hsps))
    for hsps in alignment.hsps:
        print(hsps)
    print()
ref|NP_001262917.1| nicotinic acetylcholine receptor alpha1, isoform C [Drosophila melanogaster] >ref|NP_524481.2| nicotinic acetylcholine receptor alpha1, isoform A [Drosophila melanogaster] >ref|XP_016952288.1| acetylcholine receptor subunit alpha-like 1 [Drosophila biarmipes] >sp|P09478.2| RecName: Full=Acetylcholine receptor subunit alpha-like 1; AltName: Full=Nicotinic acetylcholine receptor alpha 1; Flags: Precursor [Drosophila melanogaster] >gb|AAF56301.2| nicotinic acetylcholine receptor alpha1, isoform A [Drosophila melanogaster] >gb|AGB96297.1| nicotinic acetylcholine receptor alpha1, isoform C [Drosophila melanogaster]
           Length = 567

1 HSPs
Score 3024 (1169 bits), expectation 0.0e+00, alignment length 567
Query:       1 MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGN...NTL 567
               MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGN...NTL
Sbjct:       1 MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGN...NTL 567

ref|NP_001262916.1| nicotinic acetylcholine receptor alpha1, isoform B [Drosophila melanogaster] >gb|AGB96296.1| nicotinic acetylcholine receptor alpha1, isoform B [Drosophila melanogaster]
           Length = 597

1 HSPs
Score 3020 (1167 bits), expectation 0.0e+00, alignment length 567
Query:       1 MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGN...NTL 567
               MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGN...NTL
Sbjct:       1 MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGN...NTL 567

emb|CAA30172.1| mature acetylcholine receptor alpha-like subunit [Drosophila melanogaster]
           Length = 567

1 HSPs
Score 3014 (1165 bits), expectation 0.0e+00, alignment length 567
Query:       1 MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGN...NTL 567
               MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGN...NTL
Sbjct:       1 MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGN...NTL 567

ref|NP_001103245.1| nicotinic acetylcholine receptor alpha1 subunit precursor [Tribolium castaneum] >gb|ABS86902.1| nicotinic acetylcholine receptor subunit alpha1 [Tribolium castaneum] >gb|EEZ99265.1| nicotinic acetylcholine receptor subunit alpha1 [Tribolium castaneum]
           Length = 545

1 HSPs
Score 2131 (825 bits), expectation 0.0e+00, alignment length 546
Query:      21 ANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVN...GSE 564
                N DAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGL+LSQLIDVN...  E
Sbjct:      20 GNQDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLKLSQLIDVN...VPE 543

gb|AHJ11207.1| nicotinic acetylcholine receptor alpha1 variant A [Locusta migratoria]
           Length = 570

1 HSPs
Score 2127 (823 bits), expectation 0.0e+00, alignment length 585
Query:       1 MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGN...GSE 564
               MGSVL A V  A+   +G  ANP+AKRLYDDLLSNYNRLIRPVGN...G E
Sbjct:       1 MGSVLLALVLAAMG-GSGTQANPEAKRLYDDLLSNYNRLIRPVGN...GPE 568

ref|XP_003397561.2| acetylcholine receptor subunit alpha-like 1 [Bombus terrestris]
           Length = 615

1 HSPs
Score 2122 (822 bits), expectation 0.0e+00, alignment length 609
Query:       1 MGSVLFAAVFIALHFAT--GGLANPDAKRLYDDLLSNYNRLIRPV...GSE 564
               +G +L  A  I+   A   G  ANP+AKRLYDDLLSNYNRLIRPV...G E
Sbjct:      21 LGGLLAMATAISCLVAPFPGASANPEAKRLYDDLLSNYNRLIRPV...GPE 613

ref|NP_001091690.1| nicotinic acetylcholine receptor alpha1 subunit [Apis mellifera] >gb|AAY87890.1| nicotinic acetylcholine receptor alpha1 subunit [Apis mellifera] >gb|AJE70259.1| nicotinic acetylcholine receptor alpha1 subunit [Apis mellifera]
           Length = 601

1 HSPs
Score 2109 (816 bits), expectation 0.0e+00, alignment length 602
Query:      18 GGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLI...GSE 564
               G  AN +AKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLI...G E
Sbjct:      14 GASANSEAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLI...GPE 599

ref|XP_026298411.1| nicotinic acetylcholine receptor alpha1 subunit isoform X1 [Apis mellifera] >gb|KAG6801309.1| nicotinic acetylcholine receptor alpha1 subunit isoform X1 [Apis mellifera caucasica] >gb|KAG9431275.1| nicotinic acetylcholine receptor alpha1 subunit isoform X1 [Apis mellifera carnica]
           Length = 627

1 HSPs
Score 2108 (816 bits), expectation 0.0e+00, alignment length 621
Query:       1 MGSVLFAAVFIALHFAT--GGLANPDAKRLYDDLLSNYNRLIRPV...GSE 564
               +G +L  A  I+   A   G  AN +AKRLYDDLLSNYNRLIRPV...G E
Sbjct:      21 LGGLLAMATAISCLVAPFPGASANSEAKRLYDDLLSNYNRLIRPV...GPE 625

emb|CAA04054.1| nicotinic acetylcholine receptor, alpha3 subunit, partial [Locusta migratoria]
           Length = 540

1 HSPs
Score 2019 (782 bits), expectation 0.0e+00, alignment length 555
Query:      33 LSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVNLKNQIMTTNVWV...GSE 564
               LSNYNRLIRPVGNNSDRLT KMGLRLSQLIDVNLKNQIMTTNVWV...G E
Sbjct:       1 LSNYNRLIRPVGNNSDRLTSKMGLRLSQLIDVNLKNQIMTTNVWV...GPE 538

gb|AHJ11208.1| nicotinic acetylcholine receptor alpha1 variant B [Locusta migratoria]
           Length = 555

1 HSPs
Score 2017 (781 bits), expectation 0.0e+00, alignment length 586
Query:       1 MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGN...SEN 565
               MGSVL A V  A+   +G  ANP+AKRLYDDLLSNYNRLIRPVGN... E 
Sbjct:       1 MGSVLLALVLAAMG-GSGTQANPEAKRLYDDLLSNYNRLIRPVGN...PEE 554

gb|AHJ11220.1| nicotinic acetylcholine receptor alpha8 variant C [Locusta migratoria]
           Length = 574

1 HSPs
Score 1706 (661 bits), expectation 0.0e+00, alignment length 556
Query:      15 FATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLS...AKK 554
                 T   ANPDAKRLYDDLLSNYNRLIRPV NNS+ LTV +GL+LS...+ +
Sbjct:      19 LGTAFEANPDAKRLYDDLLSNYNRLIRPVTNNSETLTVHLGLKLS...SLR 557

gb|AHJ11221.1| nicotinic acetylcholine receptor alpha8 variant D [Locusta migratoria]
           Length = 580

1 HSPs
Score 1705 (661 bits), expectation 0.0e+00, alignment length 547
Query:      15 FATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLS...AKK 554
                 T   ANPDAKRLYDDLLSNYNRLIRPV NNS+ LTV +GL+LS...+ +
Sbjct:      19 LGTAFEANPDAKRLYDDLLSNYNRLIRPVTNNSETLTVHLGLKLS...SLR 563

gb|AHJ11219.1| nicotinic acetylcholine receptor alpha8 variant B [Locusta migratoria]
           Length = 546

1 HSPs
Score 1666 (646 bits), expectation 0.0e+00, alignment length 540
Query:      15 FATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLS...AKK 554
                 T   ANPDAKRLYDDLLSNYNRLIRPV NNS+ LTV +GL+LS...+ +
Sbjct:      19 LGTAFEANPDAKRLYDDLLSNYNRLIRPVTNNSETLTVHLGLKLS...SLR 529

gb|AHJ11218.1| nicotinic acetylcholine receptor alpha8 variant A [Locusta migratoria]
           Length = 540

1 HSPs
Score 1665 (645 bits), expectation 0.0e+00, alignment length 540
Query:      15 FATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLS...AKK 554
                 T   ANPDAKRLYDDLLSNYNRLIRPV NNS+ LTV +GL+LS...+ +
Sbjct:      19 LGTAFEANPDAKRLYDDLLSNYNRLIRPVTNNSETLTVHLGLKLS...SLR 523

emb|CAA04053.1| nicotinic acetylcholine receptor, alpha2 subunit, partial [Locusta migratoria]
           Length = 515

1 HSPs
Score 1658 (643 bits), expectation 0.0e+00, alignment length 533
Query:      22 NPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVNL...AKK 554
               NPDAKRLYDDLLSNYNRLIRPV NNS+ LTV +GL+LSQLI+VNL...+ +
Sbjct:       1 NPDAKRLYDDLLSNYNRLIRPVTNNSETLTVHLGLKLSQLIEVNL...SLR 498

ref|XP_012170034.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus terrestris] >ref|XP_012170035.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus terrestris] >ref|XP_012170036.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus terrestris] >ref|XP_048267067.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus terrestris]
           Length = 567

1 HSPs
Score 1624 (630 bits), expectation 0.0e+00, alignment length 577
Query:       1 MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGN...KIA 552
               M   L   ++I L   +G   NPDAKRLYDDLLSNYN+L+RPV N...+IA
Sbjct:       1 MMKSLVGIMWIVLVLISGCSGNPDAKRLYDDLLSNYNKLVRPVVN...EIA 555

ref|XP_003399573.1| acetylcholine receptor subunit alpha-like isoform X2 [Bombus terrestris]
           Length = 554

1 HSPs
Score 1620 (628 bits), expectation 0.0e+00, alignment length 569
Query:       1 MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGN...KIA 552
               M   L   ++I L   +G   NPDAKRLYDDLLSNYN+L+RPV N...+IA
Sbjct:       1 MMKSLVGIMWIVLVLISGCSGNPDAKRLYDDLLSNYNKLVRPVVN...EIA 542

gb|AJE70261.1| nicotinic acetylcholine receptor alpha3 subunit [Apis mellifera]
           Length = 567

1 HSPs
Score 1616 (627 bits), expectation 0.0e+00, alignment length 577
Query:       1 MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGN...KIA 552
               M   L   ++I L   +G   NPDAKRLYDDLLSNYN+L+RPV N...+IA
Sbjct:       1 MMKSLVGIMWIVLVLISGCSGNPDAKRLYDDLLSNYNKLVRPVVN...EIA 555

ref|NP_001073029.1| nicotinic acetylcholine receptor alpha3 subunit precursor [Apis mellifera] >ref|XP_016767550.1| nicotinic acetylcholine receptor alpha3 subunit isoform X1 [Apis mellifera] >ref|XP_016767551.1| nicotinic acetylcholine receptor alpha3 subunit isoform X1 [Apis mellifera] >ref|XP_016767552.1| nicotinic acetylcholine receptor alpha3 subunit isoform X1 [Apis mellifera] >gb|KAG6799381.1| nicotinic acetylcholine receptor alpha3 subunit precursor [Apis mellifera caucasica] >gb|KAG9433524.1| nicotinic acetylcholine receptor alpha3 subunit precursor [Apis mellifera carnica] >gb|AAY87891.1| nicotinic acetylcholine receptor alpha3 subunit [Apis mellifera]
           Length = 566

1 HSPs
Score 1613 (625 bits), expectation 0.0e+00, alignment length 575
Query:       1 MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGN...KIA 552
               M   L   ++I L   +G   NPDAKRLYDDLLSNYN+L+RPV N...+IA
Sbjct:       1 MMKSLVGIMWIVLVLISGCSGNPDAKRLYDDLLSNYNKLVRPVVN...EIA 554

ref|NP_001107770.1| nicotinic acetylcholine receptor alpha 3 subunit precursor [Tribolium castaneum] >ref|XP_008200302.1| PREDICTED: nicotinic acetylcholine receptor alpha 3 subunit isoform X1 [Tribolium castaneum] >gb|ABS86904.1| nicotinic acetylcholine receptor subunit alpha3 [Tribolium castaneum] >gb|ABV72695.1| nicotinic acetylcholine receptor alpha 3 subunit [Tribolium castaneum] >gb|ACM09844.1| nicotinic acetylcholine receptor subunit a3 [Tribolium castaneum] >gb|EEZ97689.1| nicotinic acetylcholine receptor subunit alpha3 [Tribolium castaneum]
           Length = 551

1 HSPs
Score 1612 (625 bits), expectation 0.0e+00, alignment length 555
Query:       5 LFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDR...KIA 552
               L   ++I L   +G   NPDAKRLYDDLLSNYN+L+RPV N SD ...+IA
Sbjct:       4 LVGIMWIVLVLISGCSGNPDAKRLYDDLLSNYNKLVRPVVNVSDA...EIA 539

gb|KAG6799677.1| nicotinic acetylcholine receptor alpha8 subunit [Apis mellifera caucasica] >gb|KAG9434134.1| nicotinic acetylcholine receptor alpha8 subunit [Apis mellifera carnica]
           Length = 534

1 HSPs
Score 1610 (624 bits), expectation 0.0e+00, alignment length 562
Query:       1 MGSVLFAAVFIALH--FATGGL----ANPDAKRLYDDLLSNYNRL...KKF 556
               M  +    +F  LH  ++  GL    ANPD KRLYDDLLSNYNRL...+ +
Sbjct:       1 MQILTLGVLFNTLHIIYSVAGLKIFEANPDTKRLYDDLLSNYNRL...RNY 523

ref|XP_016767553.1| nicotinic acetylcholine receptor alpha3 subunit isoform X2 [Apis mellifera]
           Length = 553

1 HSPs
Score 1610 (624 bits), expectation 0.0e+00, alignment length 567
Query:       1 MGSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGN...KIA 552
               M   L   ++I L   +G   NPDAKRLYDDLLSNYN+L+RPV N...+IA
Sbjct:       1 MMKSLVGIMWIVLVLISGCSGNPDAKRLYDDLLSNYNKLVRPVVN...EIA 541

ref|NP_001011575.1| nicotinic acetylcholine receptor alpha8 subunit [Apis mellifera] >gb|AAM51823.1| neuronal nicotinic acetylcholine receptor alpha-3 [Apis mellifera] >gb|AJE70266.1| nicotinic acetylcholine receptor alpha8 subunit [Apis mellifera]
           Length = 537

1 HSPs
Score 1608 (624 bits), expectation 0.0e+00, alignment length 562
Query:       1 MGSVLFAAVFIALH--FATGGL----ANPDAKRLYDDLLSNYNRL...KKF 556
               M  +    +F  LH  ++  GL    ANPD KRLYDDLLSNYNRL...+ +
Sbjct:       4 MQILTLGVLFNTLHIIYSVAGLKIFEANPDTKRLYDDLLSNYNRL...RNY 526

ref|XP_012163744.1| acetylcholine receptor subunit beta-like 2 isoform X1 [Bombus terrestris] >ref|XP_050590207.1| acetylcholine receptor subunit beta-like 2 isoform X1 [Bombus affinis]
           Length = 535

1 HSPs
Score 1607 (623 bits), expectation 0.0e+00, alignment length 562
Query:       1 MGSVLFAAVFIALHFATGGL------ANPDAKRLYDDLLSNYNRL...KKF 556
               M  + F+ +F  LH   G +      ANPD KRLYDDLLSNYNRL...+ +
Sbjct:       1 MRILTFSILFNVLHIIFGAIGLKIYEANPDTKRLYDDLLSNYNRL...RNY 523

ref|XP_026296304.1| nicotinic acetylcholine receptor alpha8 subunit isoform X1 [Apis mellifera]
           Length = 533

1 HSPs
Score 1602 (621 bits), expectation 0.0e+00, alignment length 562
Query:       1 MGSVLFAAVFIALH--FATGGL----ANPDAKRLYDDLLSNYNRL...KKF 556
               M  +    +F  LH  ++  GL    ANPD KRLYDDLLSNYNRL...+ +
Sbjct:       4 MQILTLGVLFNTLHIIYSVAGLKIFEANPDTKRLYDDLLSNYNRL...RNY 522

ref|XP_033202999.1| acetylcholine receptor subunit alpha-like isoform X3 [Bombus vancouverensis nearcticus] >ref|XP_033365856.1| acetylcholine receptor subunit alpha-like isoform X3 [Bombus vosnesenskii] >ref|XP_043592353.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus pyrosoma] >ref|XP_043592354.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus pyrosoma] >ref|XP_043592355.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus pyrosoma] >ref|XP_043592356.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus pyrosoma] >ref|XP_048265520.1| acetylcholine receptor subunit alpha-like isoform X3 [Bombus terrestris] >ref|XP_050476339.1| acetylcholine receptor subunit alpha-like isoform X3 [Bombus huntii] >ref|XP_050600937.1| acetylcholine receptor subunit alpha-like isoform X3 [Bombus affinis] >ref|XP_060819514.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus pascuorum] >ref|XP_060819517.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus pascuorum] >ref|XP_060819518.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus pascuorum]
           Length = 572

1 HSPs
Score 1598 (620 bits), expectation 0.0e+00, alignment length 556
Query:      11 IALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMG...KIA 552
               + +H A  G  NPDAKRLYDDLLSNYN+L+RPV N SD L V + ...+ A
Sbjct:      18 LVVHGAVAG--NPDAKRLYDDLLSNYNKLVRPVVNTSDVLRVCIK...EFA 562

ref|NP_001103419.1| nicotinic acetylcholine receptor alpha 8 subunit isoform 2 precursor [Tribolium castaneum] >gb|ABS86912.1| nicotinic acetylcholine receptor subunit alpha8 [Tribolium castaneum]
           Length = 508

1 HSPs
Score 1597 (619 bits), expectation 0.0e+00, alignment length 529
Query:      19 GLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLID...PID 545
                +ANPDAKRLYDDLLSNYNRLIRPV N++  LTV +GL++SQLI+...P+D
Sbjct:      20 NIANPDAKRLYDDLLSNYNRLIRPVENHTQTLTVWLGLKISQLIE...PVD 502

ref|XP_012163745.1| acetylcholine receptor subunit beta-like 2 isoform X2 [Bombus terrestris] >ref|XP_050590208.1| acetylcholine receptor subunit beta-like 2 isoform X2 [Bombus affinis]
           Length = 531

1 HSPs
Score 1597 (619 bits), expectation 0.0e+00, alignment length 562
Query:       1 MGSVLFAAVFIALHFATGGL------ANPDAKRLYDDLLSNYNRL...KKF 556
               M  + F+ +F  LH   G +      ANPD KRLYDDLLSNYNRL...+ +
Sbjct:       1 MRILTFSILFNVLHIIFGAIGLKIYEANPDTKRLYDDLLSNYNRL...RNY 519

gb|KYB29426.1| nicotinic acetylcholine receptor subunit alpha11 [Tribolium castaneum]
           Length = 491

1 HSPs
Score 1595 (619 bits), expectation 0.0e+00, alignment length 529
Query:      19 GLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLID...PID 545
                +ANPDAKRLYDDLLSNYNRLIRPV N++  LTV +GL++SQLI+...P+D
Sbjct:       3 NIANPDAKRLYDDLLSNYNRLIRPVENHTQTLTVWLGLKISQLIE...PVD 485

ref|NP_001155998.1| nicotinic acetylcholine receptor alpha 8 subunit isoform 1 precursor [Tribolium castaneum] >gb|ACP31302.1| nicotinic acetylcholine receptor a8 subunit splice variant [Tribolium castaneum] >gb|ACP31304.1| nicotinic acetylcholine receptor a8 subunit [Tribolium castaneum] >gb|ACP31305.1| nicotinic acetylcholine receptor a8 subunit [Tribolium castaneum] >gb|ACP31306.1| nicotinic acetylcholine receptor a8 subunit [Tribolium castaneum]
           Length = 515

1 HSPs
Score 1594 (618 bits), expectation 0.0e+00, alignment length 527
Query:      21 ANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVN...PID 545
               ANPDAKRLYDDLLSNYNRLIRPV N++  LTV +GL++SQLI++N...P+D
Sbjct:      29 ANPDAKRLYDDLLSNYNRLIRPVENHTQTLTVWLGLKISQLIEMN...PVD 509

gb|KYB29425.1| nicotinic acetylcholine receptor subunit alpha11 [Tribolium castaneum]
           Length = 498

1 HSPs
Score 1592 (617 bits), expectation 0.0e+00, alignment length 527
Query:      21 ANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVN...PID 545
               ANPDAKRLYDDLLSNYNRLIRPV N++  LTV +GL++SQLI++N...P+D
Sbjct:      12 ANPDAKRLYDDLLSNYNRLIRPVENHTQTLTVWLGLKISQLIEMN...PVD 492

ref|NP_524482.1| nicotinic acetylcholine receptor alpha2, isoform A [Drosophila melanogaster] >ref|NP_733001.1| nicotinic acetylcholine receptor alpha2, isoform B [Drosophila melanogaster] >ref|XP_002032516.1| acetylcholine receptor subunit alpha-like 2 [Drosophila sechellia] >ref|XP_002104730.1| acetylcholine receptor subunit alpha-like 2 [Drosophila simulans] >ref|XP_033165329.1| acetylcholine receptor subunit alpha-like 2 [Drosophila mauritiana] >sp|P17644.1| RecName: Full=Acetylcholine receptor subunit alpha-like 2; AltName: Full=Nicotinic acetylcholine receptor alpha 2; Flags: Precursor [Drosophila melanogaster] >gb|ACL85307.1| nAcRalpha-96Ab-PA, partial [synthetic construct] >gb|AAF56302.2| nicotinic acetylcholine receptor alpha2, isoform A [Drosophila melanogaster] >gb|AAF56303.1| nicotinic acetylcholine receptor alpha2, isoform B [Drosophila melanogaster] >gb|AAL13675.1| GH22843p [Drosophila melanogaster] >gb|ACL90211.1| nAcRalpha-96Ab-PA [synthetic construct]
           Length = 576

1 HSPs
Score 1591 (617 bits), expectation 0.0e+00, alignment length 547
Query:      21 ANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVN...FEL 558
               ANPDAKRLYDDLLSNYNRLIRPV NN+D + VK+GLRLSQLID+N...+ L
Sbjct:      41 ANPDAKRLYDDLLSNYNRLIRPVSNNTDTVLVKLGLRLSQLIDLN...YNL 571

ref|XP_033202993.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus vancouverensis nearcticus] >ref|XP_033202997.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus vancouverensis nearcticus] >ref|XP_033202998.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus vancouverensis nearcticus] >ref|XP_033365852.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus vosnesenskii] >ref|XP_033365853.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus vosnesenskii] >ref|XP_033365854.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus vosnesenskii] >ref|XP_048265515.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus terrestris] >ref|XP_048265517.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus terrestris] >ref|XP_048265519.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus terrestris] >ref|XP_050476333.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus huntii] >ref|XP_050476335.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus huntii] >ref|XP_050476336.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus huntii] >ref|XP_050476337.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus huntii] >ref|XP_050476338.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus huntii] >ref|XP_050600932.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus affinis] >ref|XP_050600935.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus affinis] >ref|XP_050600936.1| acetylcholine receptor subunit alpha-like isoform X1 [Bombus affinis]
           Length = 583

1 HSPs
Score 1588 (616 bits), expectation 0.0e+00, alignment length 567
Query:      11 IALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMG...KIA 552
               + +H A  G  NPDAKRLYDDLLSNYN+L+RPV N SD L V + ...+ A
Sbjct:      18 LVVHGAVAG--NPDAKRLYDDLLSNYNKLVRPVVNTSDVLRVCIK...EFA 573

gb|KYB29325.1| nicotinic acetylcholine receptor subunit alpha4 [Tribolium castaneum]
           Length = 598

1 HSPs
Score 1586 (615 bits), expectation 0.0e+00, alignment length 559
Query:      11 IALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMG...KFE 557
               + +H A  G  NPDAKRLYDDLLSNYN+L+RPV N SD L V + ...KFE
Sbjct:      59 LVVHGAVAG--NPDAKRLYDDLLSNYNKLVRPVVNTSDVLRVCIK...KFE 584

ref|NP_001091691.1| nicotinic acetylcholine receptor alpha4 subunit precursor [Apis mellifera] >ref|XP_006562617.1| nicotinic acetylcholine receptor alpha4 subunit isoform X1 [Apis mellifera] >ref|XP_006562618.1| nicotinic acetylcholine receptor alpha4 subunit isoform X1 [Apis mellifera] >ref|XP_016768429.1| nicotinic acetylcholine receptor alpha4 subunit isoform X1 [Apis mellifera] >ref|XP_016768430.1| nicotinic acetylcholine receptor alpha4 subunit isoform X1 [Apis mellifera] >gb|AAY87892.1| nicotinic acetylcholine receptor alpha4 subunit [Apis mellifera]
           Length = 569

1 HSPs
Score 1586 (615 bits), expectation 0.0e+00, alignment length 550
Query:      11 IALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMG...PID 545
               + +H A  G  NPDAKRLYDDLLSNYN+L+RPV N SD L V + ...PID
Sbjct:      17 LVVHGAVAG--NPDAKRLYDDLLSNYNKLVRPVVNTSDVLRVCIK...PID 552

ref|NP_001103246.1| nicotinic acetylcholine receptor alpha4 subunit isoform 1 precursor [Tribolium castaneum] >ref|XP_044259329.1| acetylcholine receptor subunit alpha-like isoform X3 [Tribolium madens] >gb|ABS86905.1| nicotinic acetylcholine receptor subunit alpha4 variant [Tribolium castaneum] >gb|ACM09852.1| nicotinic acetylcholine receptor subunit a4 [Tribolium castaneum]
           Length = 556

1 HSPs
Score 1586 (615 bits), expectation 0.0e+00, alignment length 559
Query:      11 IALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMG...KFE 557
               + +H A  G  NPDAKRLYDDLLSNYN+L+RPV N SD L V + ...KFE
Sbjct:      17 LVVHGAVAG--NPDAKRLYDDLLSNYNKLVRPVVNTSDVLRVCIK...KFE 542

ref|XP_008201498.1| PREDICTED: nicotinic acetylcholine receptor alpha4 subunit isoform X1 [Tribolium castaneum] >ref|XP_044259327.1| acetylcholine receptor subunit alpha-like isoform X1 [Tribolium madens]
           Length = 560

1 HSPs
Score 1584 (614 bits), expectation 0.0e+00, alignment length 563
Query:      11 IALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMG...KFE 557
               + +H A  G  NPDAKRLYDDLLSNYN+L+RPV N SD L V + ...KFE
Sbjct:      17 LVVHGAVAG--NPDAKRLYDDLLSNYNKLVRPVVNTSDVLRVCIK...KFE 546

ref|XP_033365857.1| acetylcholine receptor subunit alpha-like isoform X4 [Bombus vosnesenskii] >ref|XP_048265521.1| acetylcholine receptor subunit alpha-like isoform X4 [Bombus terrestris] >ref|XP_050476340.1| acetylcholine receptor subunit alpha-like isoform X4 [Bombus huntii] >ref|XP_050600938.1| acetylcholine receptor subunit alpha-like isoform X4 [Bombus affinis] >ref|XP_060819515.1| acetylcholine receptor subunit alpha-like isoform X2 [Bombus pascuorum]
           Length = 572

1 HSPs
Score 1579 (612 bits), expectation 0.0e+00, alignment length 556
Query:      11 IALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMG...KIA 552
               + +H A  G  NPDAKRLYDDLLSNYN+L+RPV N SD L V + ...+ A
Sbjct:      18 LVVHGAVAG--NPDAKRLYDDLLSNYNKLVRPVVNTSDVLRVCIK...EFA 562

gb|ACP31303.1| nicotinic acetylcholine receptor a8 subunit [Tribolium castaneum]
           Length = 515

1 HSPs
Score 1579 (612 bits), expectation 0.0e+00, alignment length 527
Query:      21 ANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVN...PID 545
               ANPDAKRLYDDLLSNYNRLIRPV N++  LTV +GL++SQLI++N...P+D
Sbjct:      29 ANPDAKRLYDDLLSNYNRLIRPVENHTQTLTVWLGLKISQLIEMN...PVD 509

ref|XP_003397559.1| acetylcholine receptor subunit alpha-L1 isoform X2 [Bombus terrestris]
           Length = 541

1 HSPs
Score 1576 (611 bits), expectation 0.0e+00, alignment length 556
Query:      21 ANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVN...KKF 556
               +NPDAKRLYDDLLSNYNRLIRPV NN+D + VK+GLRLSQLID+N...++F
Sbjct:      17 SNPDAKRLYDDLLSNYNRLIRPVSNNNDTVVVKLGLRLSQLIDLN...QQF 530

gb|AHJ11209.1| nicotinic acetylcholine receptor alpha2 [Locusta migratoria]
           Length = 551

1 HSPs
Score 1575 (611 bits), expectation 0.0e+00, alignment length 541
Query:      22 NPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVNL...KKF 556
               NPDAKRLYDDLLSNYNRLIRPV NN+D + VK+GLRLSQLID+NL...++F
Sbjct:      25 NPDAKRLYDDLLSNYNRLIRPVSNNTDTVLVKLGLRLSQLIDLNL...QQF 545

ref|NP_001011625.1| nicotinic acetylcholine receptor alpha2 subunit precursor [Apis mellifera] >ref|XP_006561565.1| nicotinic acetylcholine receptor alpha2 subunit isoform X1 [Apis mellifera] >ref|XP_026298380.1| nicotinic acetylcholine receptor alpha2 subunit isoform X1 [Apis mellifera] >gb|KAG6801311.1| nicotinic acetylcholine receptor alpha2 subunit precursor [Apis mellifera caucasica] >gb|KAG9431277.1| nicotinic acetylcholine receptor alpha2 subunit precursor [Apis mellifera carnica] >gb|AAS48080.1| neuronal nicotinic acetylcholine receptor Apisa2 subunit [Apis mellifera] >gb|AJE70260.1| nicotinic acetylcholine receptor alpha2 subunit [Apis mellifera]
           Length = 541

1 HSPs
Score 1575 (611 bits), expectation 0.0e+00, alignment length 550
Query:      21 ANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVN...KKF 556
                NPDAKRLYDDLLSNYNRLIRPV NN+D + VK+GLRLSQLID+N...++F
Sbjct:      17 GNPDAKRLYDDLLSNYNRLIRPVSNNNDTVVVKLGLRLSQLIDLN...QQF 530

ref|XP_012166790.1| acetylcholine receptor subunit alpha-L1 isoform X1 [Bombus terrestris]
           Length = 544

1 HSPs
Score 1572 (610 bits), expectation 0.0e+00, alignment length 559
Query:      21 ANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVN...KKF 556
               +NPDAKRLYDDLLSNYNRLIRPV NN+D + VK+GLRLSQLID+N...++F
Sbjct:      17 SNPDAKRLYDDLLSNYNRLIRPVSNNNDTVVVKLGLRLSQLIDLN...QQF 533

ref|XP_033365855.1| acetylcholine receptor subunit alpha-like isoform X2 [Bombus vosnesenskii] >ref|XP_048265516.1| acetylcholine receptor subunit alpha-like isoform X2 [Bombus terrestris] >ref|XP_050476334.1| acetylcholine receptor subunit alpha-like isoform X2 [Bombus huntii] >ref|XP_050600934.1| acetylcholine receptor subunit alpha-like isoform X2 [Bombus affinis]
           Length = 583

1 HSPs
Score 1569 (608 bits), expectation 0.0e+00, alignment length 567
Query:      11 IALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMG...KIA 552
               + +H A  G  NPDAKRLYDDLLSNYN+L+RPV N SD L V + ...+ A
Sbjct:      18 LVVHGAVAG--NPDAKRLYDDLLSNYNKLVRPVVNTSDVLRVCIK...EFA 573

ref|XP_006562616.1| nicotinic acetylcholine receptor alpha4 subunit isoform X2 [Apis mellifera] >gb|AAY87893.1| nicotinic acetylcholine receptor alpha4 subunit [Apis mellifera] >gb|AJE70262.1| nicotinic acetylcholine receptor alpha4 subunit [Apis mellifera]
           Length = 569

1 HSPs
Score 1568 (608 bits), expectation 0.0e+00, alignment length 550
Query:      11 IALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMG...PID 545
               + +H A  G  NPDAKRLYDDLLSNYN+L+RPV N SD L V + ...PID
Sbjct:      17 LVVHGAVAG--NPDAKRLYDDLLSNYNKLVRPVVNTSDVLRVCIK...PID 552

ref|NP_001155997.1| nicotinic acetylcholine receptor alpha4 subunit isoform 2 precursor [Tribolium castaneum] >ref|XP_044259330.1| acetylcholine receptor subunit alpha-like isoform X4 [Tribolium madens] >gb|ABS86906.1| nicotinic acetylcholine receptor subunit alpha4 variant [Tribolium castaneum]
           Length = 556

1 HSPs
Score 1567 (608 bits), expectation 0.0e+00, alignment length 559
Query:      11 IALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMG...KFE 557
               + +H A  G  NPDAKRLYDDLLSNYN+L+RPV N SD L V + ...KFE
Sbjct:      17 LVVHGAVAG--NPDAKRLYDDLLSNYNKLVRPVVNTSDVLRVCIK...KFE 542

emb|CAB77445.1| nicotinic acetylcholine receptor Dalpha 4 subunit [Drosophila melanogaster]
           Length = 568

1 HSPs
Score 1567 (608 bits), expectation 0.0e+00, alignment length 551
Query:       2 GSVLFAAVFIALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNN...QPI 544
               G  L A +  AL        NPDAKRLYDDLLSNYN+L+RPV N ... PI
Sbjct:      18 GGTLRAWILSALMVHGAVAGNPDAKRLYDDLLSNYNKLVRPVVNT...IPI 548

ref|NP_001103423.1| nicotinic acetylcholine receptor alpha 2 subunit precursor [Tribolium castaneum] >gb|ABS86903.1| nicotinic acetylcholine receptor subunit alpha2 [Tribolium castaneum] >gb|EFA10793.1| nicotinic acetylcholine receptor subunit alpha2 [Tribolium castaneum]
           Length = 541

1 HSPs
Score 1566 (607 bits), expectation 0.0e+00, alignment length 536
Query:      21 ANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVN...KKF 556
                NPDAKRLYDDLLSNYNRLIRPV NN+D + VK+GLRLSQLI++N...++F
Sbjct:      21 TNPDAKRLYDDLLSNYNRLIRPVSNNTDTVLVKLGLRLSQLIELN...QQF 535

gb|ACM09847.1| nicotinic acetylcholine receptor subunit a2 [Tribolium castaneum] >gb|ACM09848.1| nicotinic acetylcholine receptor subunit a2 [Tribolium castaneum] >gb|ACM09849.1| nicotinic acetylcholine receptor subunit a2 [Tribolium castaneum]
           Length = 540

1 HSPs
Score 1566 (607 bits), expectation 0.0e+00, alignment length 536
Query:      21 ANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMGLRLSQLIDVN...KKF 556
                NPDAKRLYDDLLSNYNRLIRPV NN+D + VK+GLRLSQLI++N...++F
Sbjct:      20 TNPDAKRLYDDLLSNYNRLIRPVSNNTDTVLVKLGLRLSQLIELN...QQF 534

gb|EEZ99194.2| nicotinic acetylcholine receptor subunit alpha4 [Tribolium castaneum]
           Length = 598

1 HSPs
Score 1565 (607 bits), expectation 0.0e+00, alignment length 559
Query:      11 IALHFATGGLANPDAKRLYDDLLSNYNRLIRPVGNNSDRLTVKMG...KFE 557
               + +H A  G  NPDAKRLYDDLLSNYN+L+RPV N SD L V + ...KFE
Sbjct:      59 LVVHGAVAG--NPDAKRLYDDLLSNYNKLVRPVVNTSDVLRVCIK...KFE 584

</html>