Hi, I am rather new to this, but I looking to learn Biopython.
I am using Anaconda 5.3, Biopython 1.72, Jupyter 5.7.2 on Windows 10.
I am trying the following code:
from Bio.PDB import * from Bio.PDB.PDBParser import PDBParser parser = PDBParser() struc = parser.get_structure('test', '1FAT.pdb')
However, I get a FileNotFoundError:
FileNotFoundError Traceback (most recent call last) <ipython-input-5-bc8e45627a00> in <module>() 4 from Bio.PDB.PDBParser import PDBParser 5 p = PDBParser() ----> 6 struc = p.get_structure('test', '1FAT.pdb') ~\Anaconda3\lib\site-packages\Bio\PDB\PDBParser.py in get_structure(self, id, file) 83 self.structure_builder.init_structure(id) 84 ---> 85 with as_handle(file, mode='rU') as handle: 86 self._parse(handle.readlines()) 87 ~\Anaconda3\lib\contextlib.py in __enter__(self) 110 del self.args, self.kwds, self.func 111 try: --> 112 return next(self.gen) 113 except StopIteration: 114 raise RuntimeError("generator didn't yield") from None ~\Anaconda3\lib\site-packages\Bio\File.py in as_handle(handleish, mode, **kwargs) 99 yield fp 100 else: --> 101 with open(handleish, mode, **kwargs) as fp: 102 yield fp 103 else: FileNotFoundError: [Errno 2] No such file or directory: '1FAT.pdb'
It can be that I am very tired at the moment, but I can't get it to work. I thought Bio.PDB was automatically set up to get files from the PDB database. I have tried to retrive the file from PDB first, and putting in the whole filepath, but I keep on getting the same error. I tried to understand what the error message tells me, but I must confess I don't completely understand it, more than it can't find the file. I will be very grateful for any help.