-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from shervinea/syntax-cleanup
Readability and syntax cleanup
- Loading branch information
Showing
24 changed files
with
1,109 additions
and
1,287 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,19 @@ | ||
# Mac. | ||
**/.DS_Store | ||
|
||
# Notebooks. | ||
**/.ipynb_checkpoints | ||
|
||
# PDB caching. | ||
*.pdb | ||
|
||
# Code execution. | ||
**/__pycache__ | ||
**/.pyc | ||
.idea/** | ||
|
||
# Package. | ||
*.egg-info | ||
|
||
# Virtual environment. | ||
venv/** |
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,19 @@ | ||
'Converts list of PDB enzymes in a text file' | ||
"""Converts list of PDB enzymes in a text file.""" | ||
|
||
# Authors: Afshine Amidi <[email protected]> | ||
# Shervine Amidi <[email protected]> | ||
|
||
# MIT License | ||
|
||
import pandas as pa | ||
import csv | ||
from enzynet.tools import read_dict | ||
import pandas as pd | ||
|
||
|
||
# Read csv files | ||
df = pa.read_csv('../dataset_all.csv', header=None) | ||
def create_download_file() -> None: | ||
"""Creates the RCSB download file containing all relevant PDB IDs.""" | ||
df = pd.read_csv('../dataset_all.csv', header=None) | ||
with open('../download_pdb.txt', 'w') as file: | ||
file.write(", ".join(df[0].tolist())) | ||
|
||
# Only keep PDB IDs | ||
df = df[0]+', ' | ||
df = df.tolist() | ||
|
||
# Save to text file with one PDB ID per line | ||
file = open('../download_pdb.txt','w') | ||
for i in range(len(df)): | ||
file.write(df[i]) | ||
file.close() | ||
if __name__ == "__main__": | ||
create_download_file() |
Oops, something went wrong.