Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wrong description in README.md and a bug in the RMSD calc script. #14

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# AF-Cluster

Code and data corresponding to Wayment-Steele*, Ojoawo*, ... Ovchinnikov, Colwell, Kern (2023) "Predicting multiple conformations via sequence clustering with AlphaFold2" *Nature*. [link](https://www.nature.com/articles/s41586-023-06832-9)
Code and data corresponding to Wayment-Steele*, Ojoawo*, ... Ovchinnikov, Colwell, Kern (2023) "Predicting multiple conformations via sequence clustering with AlphaFold2" *Nature*. [link](https://www.nature.com/articles/s41586-023-06832-9)

[original bioRxiv](https://www.biorxiv.org/content/10.1101/2022.10.17.512570v1)

Expand Down Expand Up @@ -50,7 +50,7 @@ To also perform PCA and/or tSNE embedding at the same time and save it in `EX_cl

`python scripts/ClusterMSA.py -i <my_alignment.a3m> -o <outdir> --run_PCA`

or
or

`python scripts/ClusterMSA.py -i <my_alignment.a3m> -o <outdir> --run_tSNE`

Expand Down Expand Up @@ -92,7 +92,7 @@ See https://github.com/jproney/AF2Rank for more information on compiling an Alph

### To calculate RMSD to provided reference structure(s):

`python scripts/CalculateModelFeatures.py path/to/pdbs/* -o <my_output_file>.json.zip --ref_struct REF_PDB_1.pdb REF_PDB_2.pdb`
`python scripts/CalculateModelFeatures.py path/to/pdbs/* -o <my_output_file>.json --ref_struct REF_PDB.pdb`

### To reproduce figures in preprint:

Expand Down
7 changes: 3 additions & 4 deletions scripts/CalculateModelFeatures.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def calc_rmsd(decoy, ref_obj, debug=False):
string='name CA and ('+ ' or '.join("resid %d" % x for x in ref_atoms)+')'

if debug:

print(ref_seq)
print(decoy_seq)
if len(decoy.top.select(string)) != len(ref_obj.top.select(string)):
Expand Down Expand Up @@ -83,12 +83,12 @@ def calc_dssp(decoy):

if args.ref_struct is not None:
pdb_name = os.path.basename(args.ref_struct).replace('.pdb','')
ref_obj = md.load_pdb(args.ref_struct)
df['rmsd_ref'] = df.parallel_apply(lambda row: calc_rmsd(row['pdb'], ref_obj), axis=1)

ref_obj = md.load_pdb(args.ref_struct)
ref_dssp = calc_dssp(ref_obj)
df['dist_dssp'] = df.parallel_apply(lambda row: levenshtein(row['dssp_string'], ref_dssp), axis=1)

df.head()

if args.plot_results and args.ref_struct is not None:
Expand All @@ -115,4 +115,3 @@ def calc_dssp(decoy):

df.to_json(args.o)
print('Wrote to', args.o)