biopython

"Desired structure doesn't exist" for PDB retrieve_pdb_file method

"Desired structure doesn't exist" for PDB retrieve_pdb_file method Question: Trying to download some protein data from PDB using Biopython’s Bio.PDB.PDBList Here is a min. reproducible example: from Bio.PDB import PDBList pdbl=PDBList() pdbl.retrieve_pdb_file(‘1GAV’, file_format="pdb") This returns: Downloading PDB structure ‘1GAV’… Desired structure doesn’t exists Desired behavior is download of the PDB file to the working directory. …

Total answers: 2

How to save each ligand from a PDB file separately with Bio.PDB?

How to save each ligand from a PDB file separately with Bio.PDB? Question: I have a list of PDB files. I want to extract the ligands of all the files (so, heteroatoms) and save each one separately into PDB files, by using the Bio.PDB module from BioPython. I tried some solutions, like this one: Remove …

Total answers: 1

Applying language filter to Entrez.esearch and Entrez.efetch

Applying language filter to Entrez.esearch and Entrez.efetch Question: I’m querying PubMed for some results using Biopython. This is a portion of the code: def search(query): Entrez.email = ‘[email protected]’ handle = Entrez.esearch(db = ‘pubmed’, sort = ‘relevance’, retmax = ‘30000’, retmode = ‘xml’, term = query) results = Entrez.read(handle) return results I want to the results …

Total answers: 2

How to handle IncompleteRead: in biopython

How to handle IncompleteRead: in biopython Question: I am trying to fetch fasta sequences for accession numbers from NCBI using Biopython. Usually the sequences were successfully downloaded. But once in a while I get the below error: http.client.IncompleteRead: IncompleteRead(61808640 bytes read) I have searched the answers How to handle IncompleteRead: in python I have tried …

Total answers: 2

How to call module written with argparse in iPython notebook

How to call module written with argparse in iPython notebook Question: I am trying to pass BioPython sequences to Ilya Stepanov’s implementation of Ukkonen’s suffix tree algorithm in iPython’s notebook environment. I am stumbling on the argparse component. I have never had to deal directly with argparse before. How can I use this without rewriting …

Total answers: 11

Reverse complement of DNA strand using Python

Reverse complement of DNA strand using Python Question: I have a DNA sequence and would like to get reverse complement of it using Python. It is in one of the columns of a CSV file and I’d like to write the reverse complement to another column in the same file. The tricky part is, there …

Total answers: 10