Skip to content

Commit e0d5372

Browse files
author
James Parkhurst
authored
Merge pull request ccpem#52 from alan-turing-institute/pdb_to_cif
changed default filetype to cif
2 parents c31c3c6 + 4ae8413 commit e0d5372

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

profet/alphafold.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def check_structure(self, uniprot_id: str) -> bool:
4444
r = requests.get(url)
4545
return r.status_code != 404
4646

47-
def get_file_url(self, uniprot_id: str, filetype: str = "pdb") -> str:
47+
def get_file_url(self, uniprot_id: str, filetype: str = "cif") -> str:
4848
"""
4949
Get file url relative to an id from the the Alphafold entry page
5050
@@ -77,7 +77,7 @@ def get_file_url(self, uniprot_id: str, filetype: str = "pdb") -> str:
7777
# Return the URL
7878
return url["href"]
7979

80-
def make_url(self, uniprot_id: str, filetype: str = "pdb") -> str:
80+
def make_url(self, uniprot_id: str, filetype: str = "cif") -> str:
8181
"""
8282
Make the URL for the protein
8383
@@ -109,7 +109,7 @@ def make_url(self, uniprot_id: str, filetype: str = "pdb") -> str:
109109
def get_pdb(
110110
self,
111111
uniprot_id: str,
112-
filetype: str = "pdb",
112+
filetype: str = "cif",
113113
) -> tuple:
114114
"""
115115
Returns pdb/cif as strings, saves to file if requested.

profet/cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def __init__(self, directory: str = None):
3535
# The manifest filename
3636
self.manifest = os.path.join(self.directory, "manifest.txt")
3737

38-
def path(self, uniprot_id: str, filetype: str = "pdb") -> str:
38+
def path(self, uniprot_id: str, filetype: str = "cif") -> str:
3939
"""
4040
Get the proposed path
4141

profet/command_line.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def get_parser(parser: ArgumentParser = None) -> ArgumentParser:
3636
"--filetype",
3737
type=str,
3838
dest="filetype",
39-
default="pdb",
39+
default="cif",
4040
choices=["pdb", "cif"],
4141
help="The file type to download",
4242
)

profet/pdb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def make_url(self, uniprot_id: str, filetype: str = "pdb") -> str:
7070
def get_pdb(
7171
self,
7272
uniprot_id: str,
73-
filetype: str = "pdb",
73+
filetype: str = "cif",
7474
) -> tuple:
7575
"""
7676
Returns pdb/cif as strings, saves to file if requested

profet/profet.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def cache(self) -> PDBFileCache:
5454
def file_from_db(
5555
self,
5656
prot_id: str,
57-
filetype: str = "pdb",
57+
filetype: str = "cif",
5858
db: str = "pdb",
5959
) -> tuple:
6060
"""
@@ -76,7 +76,7 @@ def file_from_db(
7676
def get_file(
7777
self,
7878
uniprot_id: str,
79-
filetype: str = "pdb",
79+
filetype: str = "cif",
8080
filesave: bool = False,
8181
db: str = "pdb",
8282
) -> tuple:
@@ -211,7 +211,7 @@ def remove(
211211
"""
212212
# Get the PDB cache
213213
cache = PDBFileCache(directory=self.save_directory)
214-
identifier, _, _ = self.pdb.get_pdb(uniprot_id, filetype="pdb")
214+
identifier, _, _ = self.pdb.get_pdb(uniprot_id, filetype="cif")
215215
if uniprot_id in cache:
216216
filename = cache[uniprot_id]
217217
signal_list = self.Cleaver.signal_residuenumbers_requester(

0 commit comments

Comments
 (0)