6 votes
Accepted

Can I traverse/enumerate PDB one at a time using a Python script without downloading all of them to my local disk?

The page https://www.wwpdb.org/ftp/pdb-ftp-sites gives the addresses of interest. PDB has an FTP site downloadable via rsync and the latter has a dry run mode. ...
Matteo Ferla's user avatar
  • 4,114
5 votes
Accepted

Read PDB file, extract dihedral angles, modify dihedral angles, reconstruct Cartesian coordinates, and write PDB file

ok, here my input pdb, example_short.pdb : ...
pippo1980's user avatar
  • 783
4 votes

Read PDB file, extract dihedral angles, modify dihedral angles, reconstruct Cartesian coordinates, and write PDB file

I answered about doing it with PyRosetta as I assumed that as BioPython PDB module is basic and the fact it was being asked made me think it was not possible. Turns out I was wrong. So I am making a ...
Matteo Ferla's user avatar
  • 4,114
4 votes

Read PDB file, extract dihedral angles, modify dihedral angles, reconstruct Cartesian coordinates, and write PDB file

I do not know if there is a function in Biopython.PDB for dihedral space transformations, but due to the lack of answers I would say no. Biopython.PDB is nice and clean, but I would use something with ...
Matteo Ferla's user avatar
  • 4,114
4 votes

open and read Fasta file (raw data)

It sounds like all you really want is to print every 2nd line of a text file. If so, you don't need Python, let alone BioPython, you can do it with basic *nix tools: ...
terdon's user avatar
  • 9,352
4 votes

File I/O error using nglview.show_biopython(structure)

I also figured out another way to fix this problem. After going back to the tutorial I was talking about I saw that it was made back in 2021. After seeing this I wonder if we were using the same ...
Jeremiah Wade's user avatar
3 votes

File I/O error using nglview.show_biopython(structure)

This is an issue with Biopython 1.80, in particular introduced by a commit that automatically closes IO objects sent to PDBIO.save. I made a PR to change the ...
jgreener's user avatar
  • 931
3 votes

File I/O error using nglview.show_biopython(structure)

I had a similar problem with: ...
pippo1980's user avatar
  • 783
3 votes

How to write FASTA records using "Bio.SeqIO.write()"

I figured it out: ...
Supertech's user avatar
  • 534
3 votes
Accepted

How to extract the protein sequences of a genbank file using R or biopython

ok tried a little bit, not sure is the most elegant/fastest way of doing it starting from file from : https://www.ncbi.nlm.nih.gov/nuccore/NC_004460.2?report=gbwithparts&log$=seqview {...
pippo1980's user avatar
  • 783
2 votes
Accepted

Help using BioPython's IC_Chain functionality for getting protein 3D coordinates from torsion angles

It turns out that in order to generate the internal coordinates for a protein structure, one shouldn't manually create an IC_Chain object, but rather just use the <...
CubeHead's user avatar
  • 405
2 votes

Help using BioPython's IC_Chain functionality for getting protein 3D coordinates from torsion angles

not able to grasp the question, tried to figure out a way to show the internal_coordinates: ...
pippo1980's user avatar
  • 783
2 votes
Accepted

How can I get a list of neighboring Hydrogen atoms of an alpha-carbon?

You posted similar question here: https://stackoverflow.com/questions/69676943/how-can-i-get-a-list-of-neighboring-hydrogen-atoms-of-an-alpha-carbon/69815509#69815509 ok got some code : ...
pippo1980's user avatar
  • 783
2 votes

Remove Redundant Sequences from FASTA file with Biopython reducing memory footprint

I wrote the answer here and while I'm not clear on all aspects of this question, I can offer two suggestions to reduce the memory footprint considerably while maintaining high speed. First, rather ...
Chris_Rands's user avatar
  • 3,858
2 votes

How to write FASTA records using "Bio.SeqIO.write()"

my attempt at changing the way Biopython formats fasta file sequence width, read into code to figure out standard behaviour: ...
pippo1980's user avatar
  • 783
2 votes

How to write FASTA records using "Bio.SeqIO.write()"

You could instead pass in a generator that yields SeqRecords. This avoids storing the entire list of sequences in memory and is usually the way to go assuming that you need to handle large files ...
Steve's user avatar
  • 2,706
2 votes

How can I make this Biopython program (to correct erroneous barcodes) run faster, and is there any alternative method?

Try profiling (benchmarking) your code to work out where it is slow. My other suggestions are: replace your simple Pure Python hamming_distance function with something optimised like RapidFuzz - see ...
Peter Cock's user avatar
1 vote
Accepted

Download all pubmed central article ids that have a keyword appearing in their titles/abstracts and also falling between two dates

There seems to be a problem with using the [Title/Abstract] field. What you have looks correct and should produce the expected result, since it should capture ...
Steve's user avatar
  • 2,706
1 vote

File I/O error using nglview.show_biopython(structure)

tried to understand git, I ended up with this, seems more coherent with the previous habits in the biopython project, but cant push it. Anyone could pass it along ? [of course needs to be checked out,...
pippo1980's user avatar
  • 783

Only top scored, non community-wiki answers of a minimum length are eligible