BioSQL lookup function does not work in biopython example
0
0
Entering edit mode
3.3 years ago
biofysikos • 0

I am trying the examples described here https://biopython.org/wiki/BioSQL

First I create the database orchids and then I try to use lookup using the code provided

from BioSQL import BioSeqDatabase

server = BioSeqDatabase.open_database(
driver="mysql.connector",
user="root",
passwd="your-password",
host="localhost",
db="bioseqdb",
)
db = server["orchids"]
for identifier in ["6273291", "6273290", "6273289"]:
    seq_record = db.lookup(gi=identifier)
    printseq_record.id, seq_record.description[:50] + "...")
    print("Sequence length %i," % len(seq_record.seq))

But it seems that the gi's are the id's such as 'AF191665', 'AF191664' and 'AF191663'. Is this the only way to lookup BioSQL entries?

biosql • 733 views
ADD COMMENT

Login before adding your answer.

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