Skip to content

Commit

Permalink
Added Fixing Faulty SWISS-ID
Browse files Browse the repository at this point in the history
  • Loading branch information
mitch-parker committed Dec 23, 2022
1 parent fd6bbcf commit b83531a
Show file tree
Hide file tree
Showing 13 changed files with 3,419 additions and 3,396 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "rascore"
version = "1.0.4"
version = "1.0.5"
description = "A tool for analyzing RAS protein structures"
authors = ["mitch-parker <[email protected]>"]
license = "Apache License 2.0"
Expand Down
Binary file modified src/rascore/util/constants/__pycache__/gene.cpython-38.pyc
Binary file not shown.
7 changes: 3 additions & 4 deletions src/rascore/util/constants/gene.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
uniprot_acc_lst = ["P01116", "P01116-2", "P01112", "P01111"]

gene_class_dict = {
"GTPase HRas": hras_name,
"GTPase KRas": kras_name,
"Isoform 2B of GTPase KRas": kras_name,
"GTPase NRas": nras_name,
"RASK_HUMAN":kras_name,
"RASN_HUMAN":nras_name,
"RASH_HUMAN":hras_name,
}
2 changes: 1 addition & 1 deletion src/rascore/util/data/dihedral.json

Large diffs are not rendered by default.

1,516 changes: 760 additions & 756 deletions src/rascore/util/data/entry.tsv

Large diffs are not rendered by default.

5,264 changes: 2,633 additions & 2,631 deletions src/rascore/util/data/pocket.tsv

Large diffs are not rendered by default.

Binary file modified src/rascore/util/pages/__pycache__/inhibitor_page.cpython-38.pyc
Binary file not shown.
Binary file modified src/rascore/util/pages/__pycache__/query_page.cpython-38.pyc
Binary file not shown.
7 changes: 6 additions & 1 deletion src/rascore/util/pages/query_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,14 @@ def query_page():

mask_dict[col] = st.sidebar.multiselect(
rename_col_dict[col],
lst_col(mask_df, col, unique=True),
[x.upper() for x in lst_col(mask_df, col, unique=True)],
)

if col == pdb_id_col:
mask_dict[col] = [f"{x[:4].lower()}{x[4:5]}" for x in mask_dict[col]]
elif col == pdb_code_col:
mask_dict[col] = [x.lower() for x in mask_dict[col]]

mask_df = mask_st_table(mask_df, mask_dict)

if len(mask_df) == 0:
Expand Down
Binary file not shown.
5 changes: 3 additions & 2 deletions src/rascore/util/pipelines/build_rascore.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
match_class_col,
gene_class_col,
prot_class_col,
prot_col,
swiss_id_col,
bio_lig_col,
nuc_class_col,
rcsb_path_col,
Expand Down Expand Up @@ -297,7 +297,7 @@ def update_annot(pdbaa_fasta_path, out_path=None, past_df=None, num_cpu=1):
match_class = pharm_match
df.at[index, match_class_col] = match_class

df[gene_class_col] = df[prot_col].map(gene_class_dict)
df[gene_class_col] = df[swiss_id_col].map(gene_class_dict)
df[nuc_class_col] = df[bio_lig_col].map(nuc_class_dict).fillna(gtp_name)

df = annot_prot(
Expand Down Expand Up @@ -684,6 +684,7 @@ def build_rascore(out_path=None, pdbaa_fasta_path=None, num_cpu=1):
search_pdbaa(
pdbaa_fasta_path=pdbaa_fasta_path,
search_lst=swiss_id_lst,
fix_dict={"7u8hA":"RASK_HUMAN","7u8hB":"RASK_HUMAN","7u8hC":"RASK_HUMAN","7u8hD":"RASK_HUMAN"},
entry_table_path=entry_table_path,
min_length=25,
)
Expand Down
Binary file modified src/rascore/util/scripts/__pycache__/search_pdbaa.cpython-38.pyc
Binary file not shown.
12 changes: 12 additions & 0 deletions src/rascore/util/scripts/search_pdbaa.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
def search_pdbaa(
pdbaa_fasta_path,
search_lst,
fix_dict=None,
entry_table_path=None,
min_length=None,
min_resolution=None,
Expand Down Expand Up @@ -83,6 +84,10 @@ def search_pdbaa(
for col in col_lst:
record_dict[col] = list()

fix_lst = list()
if fix_dict is not None:
fix_lst = list(fix_dict.keys())

for record in tqdm(
list(pdbaa_dict.keys()), desc="Searching pdbaa", position=0, leave=True
):
Expand All @@ -107,6 +112,13 @@ def search_pdbaa(
if pdb_id in search_lst:
get_seq = True

if len(fix_lst) > 0:
if not get_seq:
if pdb_id in fix_lst:
fix_lst.remove(pdb_id)
swiss_id = fix_dict[pdb_id]
get_seq = True

if get_seq:

seq = get_record_seq(record)
Expand Down

0 comments on commit b83531a

Please sign in to comment.