Skip to content

Commit

Permalink
Merge branch 'release-24q4' into dmc-24q4
Browse files Browse the repository at this point in the history
  • Loading branch information
snwessel committed Dec 19, 2024
2 parents aecae73 + cf1a718 commit f041abb
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 13 deletions.
2 changes: 1 addition & 1 deletion breadbox/breadbox/celery_task/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def format_task_status(task):
"id": task.id,
"state": task.state,
"message": message,
"percentComplete": percent_complete,
"percentComplete": int(percent_complete) if percent_complete else None,
"nextPollDelay": 1000, # units are miliseconds, this says once per second
"result": result,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from googleapiclient.discovery import build

from gumbo_rest_client import Client
from taigapy import default_tc as taiga_client_v2
from taigapy import create_taiga_client_v3
from utils import (
gumbo_df_preprocessing,
get_model_ids,
Expand Down Expand Up @@ -133,8 +133,9 @@ def main():
model_ids = get_model_ids(quarterly_release_dataset_id)

# Get Previous Model IDs to whitelist them
taiga_client_v3 = create_taiga_client_v3()
previous_release_model_ids = set(
taiga_client_v2.get(previous_model_dataset_id)["ModelID"]
taiga_client_v3.get(previous_model_dataset_id)["ModelID"]
)
model_ids.update(previous_release_model_ids)

Expand Down Expand Up @@ -229,7 +230,7 @@ def main():
)

if args.upload:
new_version = taiga_client_v2.update_dataset(
new_version = taiga_client_v3.update_dataset(
quarterly_release_dataset_id,
changes_description="Uploaded model and model condition file generated by get_release_model_and_model_condition.py using the data dictionary",
upload_files=[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,17 @@ def get_model_ids(quarterly_release_dataset_id: str) -> set():
taiga_ids_to_check.items(), desc="Processing Taiga IDs", unit="id"
):
print("taiga_id", taiga_id)
df = taiga_client_v3.get(taiga_id)
if re.match("ACH-[0-9]*", str(df.index[0])):
model_ids.update(set(df.index))
elif re.match("ACH-[0-9]*", str(df.columns[0])):
model_ids.update(set(df.columns))
if "public" in taiga_id and "PRISMOncologyReferenceAUCMatrix" in taiga_id:
continue
else:
assert column in df.columns, f"Missing {column} in {df.columns}"
model_ids.update(set(df[column]))
df = taiga_client_v3.get(taiga_id)
if re.match("ACH-[0-9]*", str(df.index[0])):
model_ids.update(set(df.index))
elif re.match("ACH-[0-9]*", str(df.columns[0])):
model_ids.update(set(df.columns))
else:
assert column in df.columns, f"Missing {column} in {df.columns}"
model_ids.update(set(df[column]))

return model_ids

Expand Down
7 changes: 5 additions & 2 deletions portal-backend/depmap/cell_line/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,12 @@ def get_pref_dep_data_for_data_type(data_type: str, model_id: str) -> dict:

@blueprint.route("/compound_sensitivity/<model_id>")
def get_compound_sensitivity_data(model_id: str) -> dict:
dataset_name = DependencyDataset.get_dataset_by_data_type_priority(
dataset = DependencyDataset.get_dataset_by_data_type_priority(
DependencyDataset.DataTypeEnum.drug_screen
).name.name
)
if dataset is None:
abort(404)
dataset_name = dataset.name.name
labels_by_index = get_compound_labels_by_index(dataset_name)

return get_rows_with_lowest_z_score(dataset_name, model_id, labels_by_index)
Expand Down

0 comments on commit f041abb

Please sign in to comment.