{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "da78b443-8f9a-426d-8ac1-2320dc10f1d6", "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import numpy as np\n", "import os\n", "# os.environ['CUDA_VISIBLE_DEVICES'] = '2'\n" ] }, { "cell_type": "code", "execution_count": 2, "id": "6ed86222-b6a4-4f3c-8dd6-ae6ac2fd7545", "metadata": {}, "outputs": [], "source": [ "trial_spaces = pd.read_csv('ctgov_all_trials_trial_space_lineitems_10-31-24.csv')" ] }, { "cell_type": "code", "execution_count": 3, "id": "df199321-94ac-4998-a3ad-bb90705485f9", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "RangeIndex: 38140 entries, 0 to 38139\n", "Data columns (total 10 columns):\n", " # Column Non-Null Count Dtype \n", "--- ------ -------------- ----- \n", " 0 Unnamed: 0.1 38140 non-null int64 \n", " 1 Unnamed: 0 38140 non-null int64 \n", " 2 nct_id 38140 non-null object\n", " 3 title 38140 non-null object\n", " 4 brief_summary 38140 non-null object\n", " 5 eligibility_criteria 38140 non-null object\n", " 6 trial_text 38140 non-null object\n", " 7 spaces 38140 non-null object\n", " 8 this_space 38140 non-null object\n", " 9 space_number 38140 non-null int64 \n", "dtypes: int64(3), object(7)\n", "memory usage: 2.9+ MB\n" ] } ], "source": [ "trial_spaces.info()" ] }, { "cell_type": "code", "execution_count": 4, "id": "47b983df-d6f7-41d8-8c98-354f395c098e", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/homes10/klkehl/miniconda3/envs/vllm2/lib/python3.12/site-packages/sentence_transformers/cross_encoder/CrossEncoder.py:13: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n", " from tqdm.autonotebook import tqdm, trange\n", "Loading checkpoint shards: 100%|██████████████████████████████████████████████████████████| 2/2 [00:03<00:00, 1.86s/it]\n" ] } ], "source": [ "from sentence_transformers import SentenceTransformer\n", "import torch\n", "\n", "embedding_model = SentenceTransformer('reranker_round2.model', trust_remote_code=True, device='cuda')" ] }, { "cell_type": "code", "execution_count": 5, "id": "9ae0aa51-92f4-4e44-9a95-bf76196b1b7b", "metadata": {}, "outputs": [], "source": [ "# only needs to be run once to generate and save trial embeddings\n", "\n", "# with torch.no_grad():\n", "# trial_space_embeddings = embedding_model.encode(trial_spaces.this_space.tolist(), convert_to_tensor=True)\n", "\n", "# from safetensors.torch import save_file\n", "# output_trial_file = {\"space_embeddings\": trial_space_embeddings}\n", "# save_file(output_trial_file, \"trial_space_embeddings.safetensors\")\n", "\n", "# trial_space_embeddings.shape" ] }, { "cell_type": "code", "execution_count": null, "id": "a6abc0de-b919-41df-88be-b838e0998f51", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": 6, "id": "e6a25767-1939-48dd-a509-0bb2e3598f06", "metadata": {}, "outputs": [], "source": [ "from safetensors import safe_open\n", "with safe_open(\"trial_space_embeddings.safetensors\", framework=\"pt\", device=0) as f:\n", " trial_space_embeddings = f.get_tensor(\"space_embeddings\")" ] }, { "cell_type": "code", "execution_count": 7, "id": "f83d55e8-4876-4048-8aa9-8aaf766b6722", "metadata": {}, "outputs": [], "source": [ "from transformers import pipeline, AutoTokenizer\n", "tokenizer = AutoTokenizer.from_pretrained(\"roberta-large\")\n", "\n", "pipe = pipeline('text-classification', './roberta-checker', tokenizer=tokenizer, truncation=True, padding='max_length', max_length=512, device='cuda') \n" ] }, { "cell_type": "code", "execution_count": 8, "id": "0318b38e-8ee8-493c-a3fa-391142ce9696", "metadata": {}, "outputs": [], "source": [ "patient_summary = \"metastatic lung adenocarcinoma, PD-L1 75%, KRAS G12C mutant, prior pembrolizumab, prior carboplatin/pemetrexed\"" ] }, { "cell_type": "code", "execution_count": 9, "id": "6d84d3a6-d965-49f2-ad6c-c8f9571da616", "metadata": {}, "outputs": [], "source": [ "patient_embedding = embedding_model.encode([patient_summary], convert_to_tensor=True)" ] }, { "cell_type": "code", "execution_count": null, "id": "08c76a33-fdd0-4b1c-8a93-3a9e1f8b9bd6", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "d8bf2e6f-fc8a-4f1a-9c68-f0e5fb939f5a", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": 10, "id": "0b36fc28-28f1-4cba-b4fc-679d457e8da4", "metadata": {}, "outputs": [], "source": [ "import torch.nn.functional as F\n", "similarities = F.cosine_similarity(patient_embedding, trial_space_embeddings)" ] }, { "cell_type": "code", "execution_count": 11, "id": "774db345-8fd4-4a5d-b76e-2aa44123b4f7", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "torch.Size([38140])" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "similarities.shape" ] }, { "cell_type": "code", "execution_count": 12, "id": "b77b3b0b-a474-4a19-a4b8-2cc0990a3a45", "metadata": {}, "outputs": [], "source": [ "# pull top ten spaces for the patient\n", "sorted_similarities, sorted_indices = torch.sort(similarities, descending=True)\n", "relevant_spaces = trial_spaces.iloc[sorted_indices[0:10].cpu().numpy()].this_space\n", "relevant_nctid = trial_spaces.iloc[sorted_indices[0:10].cpu().numpy()].nct_id\n", "relevant_title = trial_spaces.iloc[sorted_indices[0:10].cpu().numpy()].title\n", "relevant_brief_summary = trial_spaces.iloc[sorted_indices[0:10].cpu().numpy()].brief_summary\n", "relevant_eligibility_criteria = trial_spaces.iloc[sorted_indices[0:10].cpu().numpy()].eligibility_criteria\n", "relevant_space_embeddings = trial_space_embeddings[sorted_indices[0:10], :]" ] }, { "cell_type": "code", "execution_count": 13, "id": "653c772f-6031-4c35-9978-5f23eb9f9301", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
patient_summarythis_spacenct_idtrial_titletrial_brief_summarytrial_eligibility_criteriapt_trial_pair
0metastatic lung adenocarcinoma, PD-L1 75%, KRA...5. Cancer type allowed: non-small cell lung ca...NCT06253520A Phase Ib Clinical Trial to Evaluate the Admi...Background:\\n\\nMany cancer cells produce subst...* INCLUSION CRITERIA:\\n* Participants with an ...5. Cancer type allowed: non-small cell lung ca...
1metastatic lung adenocarcinoma, PD-L1 75%, KRA...1. Cancer type allowed: non-small cell lung ca...NCT05853575A Randomized Study of Two Dosing Regimens of A...This study will evaluate the efficacy of two d...Key Inclusion Criteria:\\n\\n* Are at least 18 y...1. Cancer type allowed: non-small cell lung ca...
2metastatic lung adenocarcinoma, PD-L1 75%, KRA...3. Cancer type allowed: non-small cell lung ca...NCT06128551Phase 1b, Multicenter, Open-Label, Dose Escala...This study is to evaluate the safety, tolerabi...Inclusion Criteria:\\n\\n* 18 years of age\\n* Hi...3. Cancer type allowed: non-small cell lung ca...
3metastatic lung adenocarcinoma, PD-L1 75%, KRA...1. Cancer type allowed: Non-small cell lung ca...NCT05788926A Phase I Dose-escalation Trial of TG6050 Admi...This is a phase I, open-label, dose-escalation...Inclusion Criteria:\\n\\n1. Signed written infor...1. Cancer type allowed: Non-small cell lung ca...
4metastatic lung adenocarcinoma, PD-L1 75%, KRA...1. Cancer type allowed: non-small cell lung ca...NCT05375084A Phase 1 Study of the SHP2 Inhibitor BBP-398 ...This is a Phase 1 study of BBP-398, a SHP2 inh...Key Inclusion Criteria:\\n\\n* Patients must hav...1. Cancer type allowed: non-small cell lung ca...
\n", "
" ], "text/plain": [ " patient_summary \\\n", "0 metastatic lung adenocarcinoma, PD-L1 75%, KRA... \n", "1 metastatic lung adenocarcinoma, PD-L1 75%, KRA... \n", "2 metastatic lung adenocarcinoma, PD-L1 75%, KRA... \n", "3 metastatic lung adenocarcinoma, PD-L1 75%, KRA... \n", "4 metastatic lung adenocarcinoma, PD-L1 75%, KRA... \n", "\n", " this_space nct_id \\\n", "0 5. Cancer type allowed: non-small cell lung ca... NCT06253520 \n", "1 1. Cancer type allowed: non-small cell lung ca... NCT05853575 \n", "2 3. Cancer type allowed: non-small cell lung ca... NCT06128551 \n", "3 1. Cancer type allowed: Non-small cell lung ca... NCT05788926 \n", "4 1. Cancer type allowed: non-small cell lung ca... NCT05375084 \n", "\n", " trial_title \\\n", "0 A Phase Ib Clinical Trial to Evaluate the Admi... \n", "1 A Randomized Study of Two Dosing Regimens of A... \n", "2 Phase 1b, Multicenter, Open-Label, Dose Escala... \n", "3 A Phase I Dose-escalation Trial of TG6050 Admi... \n", "4 A Phase 1 Study of the SHP2 Inhibitor BBP-398 ... \n", "\n", " trial_brief_summary \\\n", "0 Background:\\n\\nMany cancer cells produce subst... \n", "1 This study will evaluate the efficacy of two d... \n", "2 This study is to evaluate the safety, tolerabi... \n", "3 This is a phase I, open-label, dose-escalation... \n", "4 This is a Phase 1 study of BBP-398, a SHP2 inh... \n", "\n", " trial_eligibility_criteria \\\n", "0 * INCLUSION CRITERIA:\\n* Participants with an ... \n", "1 Key Inclusion Criteria:\\n\\n* Are at least 18 y... \n", "2 Inclusion Criteria:\\n\\n* 18 years of age\\n* Hi... \n", "3 Inclusion Criteria:\\n\\n1. Signed written infor... \n", "4 Key Inclusion Criteria:\\n\\n* Patients must hav... \n", "\n", " pt_trial_pair \n", "0 5. Cancer type allowed: non-small cell lung ca... \n", "1 1. Cancer type allowed: non-small cell lung ca... \n", "2 3. Cancer type allowed: non-small cell lung ca... \n", "3 1. Cancer type allowed: Non-small cell lung ca... \n", "4 1. Cancer type allowed: non-small cell lung ca... " ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "analysis = pd.DataFrame({'patient_summary':patient_summary, 'this_space':relevant_spaces,\n", " 'nct_id':relevant_nctid, 'trial_title':relevant_title,\n", " 'trial_brief_summary':relevant_brief_summary, 'trial_eligibility_criteria':relevant_eligibility_criteria}).reset_index(drop=True)\n", "analysis['pt_trial_pair'] = analysis['this_space'] + \"\\nNow here is the patient summary:\" + analysis['patient_summary']\n", "analysis.head()" ] }, { "cell_type": "code", "execution_count": 14, "id": "38439e90-59bc-4d8a-bef7-8731966ff015", "metadata": {}, "outputs": [], "source": [ "pipe = pipeline('text-classification', model='./roberta-checker', device='cuda')" ] }, { "cell_type": "code", "execution_count": 15, "id": "4d6c761a-1d9f-4890-beb8-c20ba5523f87", "metadata": {}, "outputs": [], "source": [ "classifier_results = pipe(analysis.pt_trial_pair.tolist())\n", "analysis['roberta_check_result'] = [x['label'] for x in classifier_results]\n", "analysis['roberta_check_score'] = [x['score'] for x in classifier_results]\n" ] }, { "cell_type": "code", "execution_count": null, "id": "d9b9cb51-a054-4950-bef7-220c4378757d", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": 16, "id": "86d23c7b-d10a-4efb-bec5-ab95ef6dfb0d", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
patient_summarythis_spacenct_idtrial_titletrial_brief_summarytrial_eligibility_criteriapt_trial_pairroberta_check_resultroberta_check_score
0metastatic lung adenocarcinoma, PD-L1 75%, KRA...5. Cancer type allowed: non-small cell lung ca...NCT06253520A Phase Ib Clinical Trial to Evaluate the Admi...Background:\\n\\nMany cancer cells produce subst...* INCLUSION CRITERIA:\\n* Participants with an ...5. Cancer type allowed: non-small cell lung ca...NEGATIVE0.834101
1metastatic lung adenocarcinoma, PD-L1 75%, KRA...1. Cancer type allowed: non-small cell lung ca...NCT05853575A Randomized Study of Two Dosing Regimens of A...This study will evaluate the efficacy of two d...Key Inclusion Criteria:\\n\\n* Are at least 18 y...1. Cancer type allowed: non-small cell lung ca...POSITIVE0.910206
2metastatic lung adenocarcinoma, PD-L1 75%, KRA...3. Cancer type allowed: non-small cell lung ca...NCT06128551Phase 1b, Multicenter, Open-Label, Dose Escala...This study is to evaluate the safety, tolerabi...Inclusion Criteria:\\n\\n* 18 years of age\\n* Hi...3. Cancer type allowed: non-small cell lung ca...POSITIVE0.915395
3metastatic lung adenocarcinoma, PD-L1 75%, KRA...1. Cancer type allowed: Non-small cell lung ca...NCT05788926A Phase I Dose-escalation Trial of TG6050 Admi...This is a phase I, open-label, dose-escalation...Inclusion Criteria:\\n\\n1. Signed written infor...1. Cancer type allowed: Non-small cell lung ca...POSITIVE0.914168
4metastatic lung adenocarcinoma, PD-L1 75%, KRA...1. Cancer type allowed: non-small cell lung ca...NCT05375084A Phase 1 Study of the SHP2 Inhibitor BBP-398 ...This is a Phase 1 study of BBP-398, a SHP2 inh...Key Inclusion Criteria:\\n\\n* Patients must hav...1. Cancer type allowed: non-small cell lung ca...POSITIVE0.877930
5metastatic lung adenocarcinoma, PD-L1 75%, KRA...2. Cancer type allowed: non-small cell lung ca...NCT06128551Phase 1b, Multicenter, Open-Label, Dose Escala...This study is to evaluate the safety, tolerabi...Inclusion Criteria:\\n\\n* 18 years of age\\n* Hi...2. Cancer type allowed: non-small cell lung ca...POSITIVE0.926033
6metastatic lung adenocarcinoma, PD-L1 75%, KRA...2. Cancer type allowed: Non-Small Cell Lung Ca...NCT06447662A Phase 1 Open-Label Study of PF-07934040 as a...The purpose of this study is to learn about th...Inclusion Criteria:\\n\\n* Histological or cytol...2. Cancer type allowed: Non-Small Cell Lung Ca...POSITIVE0.506948
7metastatic lung adenocarcinoma, PD-L1 75%, KRA...1. Cancer type allowed: non-small cell lung ca...NCT06127940K-SAB Trial - Sotorasib Followed by SBRT to 1-...The goal of this interventional study is to le...Main inclusion criteria:\\n\\n1. Histological or...1. Cancer type allowed: non-small cell lung ca...POSITIVE0.952771
8metastatic lung adenocarcinoma, PD-L1 75%, KRA...1. Cancer type allowed: non-small cell lung ca...NCT06343402A Phase 1a/1b Open-Label Study of BBO-8520 As ...A first in human study to evaluate the safety,...Inclusion Criteria:\\n\\n* Histologically docume...1. Cancer type allowed: non-small cell lung ca...POSITIVE0.949954
9metastatic lung adenocarcinoma, PD-L1 75%, KRA...1. Cancer type allowed: non-small cell lung ca...NCT05815173Phase I/II Study of Ladarixin and Sotorasib in...This is a phase I/II, open-label, study of twi...Inclusion Criteria:\\n\\n* Written informed cons...1. Cancer type allowed: non-small cell lung ca...POSITIVE0.937962
\n", "
" ], "text/plain": [ " patient_summary \\\n", "0 metastatic lung adenocarcinoma, PD-L1 75%, KRA... \n", "1 metastatic lung adenocarcinoma, PD-L1 75%, KRA... \n", "2 metastatic lung adenocarcinoma, PD-L1 75%, KRA... \n", "3 metastatic lung adenocarcinoma, PD-L1 75%, KRA... \n", "4 metastatic lung adenocarcinoma, PD-L1 75%, KRA... \n", "5 metastatic lung adenocarcinoma, PD-L1 75%, KRA... \n", "6 metastatic lung adenocarcinoma, PD-L1 75%, KRA... \n", "7 metastatic lung adenocarcinoma, PD-L1 75%, KRA... \n", "8 metastatic lung adenocarcinoma, PD-L1 75%, KRA... \n", "9 metastatic lung adenocarcinoma, PD-L1 75%, KRA... \n", "\n", " this_space nct_id \\\n", "0 5. Cancer type allowed: non-small cell lung ca... NCT06253520 \n", "1 1. Cancer type allowed: non-small cell lung ca... NCT05853575 \n", "2 3. Cancer type allowed: non-small cell lung ca... NCT06128551 \n", "3 1. Cancer type allowed: Non-small cell lung ca... NCT05788926 \n", "4 1. Cancer type allowed: non-small cell lung ca... NCT05375084 \n", "5 2. Cancer type allowed: non-small cell lung ca... NCT06128551 \n", "6 2. Cancer type allowed: Non-Small Cell Lung Ca... NCT06447662 \n", "7 1. Cancer type allowed: non-small cell lung ca... NCT06127940 \n", "8 1. Cancer type allowed: non-small cell lung ca... NCT06343402 \n", "9 1. Cancer type allowed: non-small cell lung ca... NCT05815173 \n", "\n", " trial_title \\\n", "0 A Phase Ib Clinical Trial to Evaluate the Admi... \n", "1 A Randomized Study of Two Dosing Regimens of A... \n", "2 Phase 1b, Multicenter, Open-Label, Dose Escala... \n", "3 A Phase I Dose-escalation Trial of TG6050 Admi... \n", "4 A Phase 1 Study of the SHP2 Inhibitor BBP-398 ... \n", "5 Phase 1b, Multicenter, Open-Label, Dose Escala... \n", "6 A Phase 1 Open-Label Study of PF-07934040 as a... \n", "7 K-SAB Trial - Sotorasib Followed by SBRT to 1-... \n", "8 A Phase 1a/1b Open-Label Study of BBO-8520 As ... \n", "9 Phase I/II Study of Ladarixin and Sotorasib in... \n", "\n", " trial_brief_summary \\\n", "0 Background:\\n\\nMany cancer cells produce subst... \n", "1 This study will evaluate the efficacy of two d... \n", "2 This study is to evaluate the safety, tolerabi... \n", "3 This is a phase I, open-label, dose-escalation... \n", "4 This is a Phase 1 study of BBP-398, a SHP2 inh... \n", "5 This study is to evaluate the safety, tolerabi... \n", "6 The purpose of this study is to learn about th... \n", "7 The goal of this interventional study is to le... \n", "8 A first in human study to evaluate the safety,... \n", "9 This is a phase I/II, open-label, study of twi... \n", "\n", " trial_eligibility_criteria \\\n", "0 * INCLUSION CRITERIA:\\n* Participants with an ... \n", "1 Key Inclusion Criteria:\\n\\n* Are at least 18 y... \n", "2 Inclusion Criteria:\\n\\n* 18 years of age\\n* Hi... \n", "3 Inclusion Criteria:\\n\\n1. Signed written infor... \n", "4 Key Inclusion Criteria:\\n\\n* Patients must hav... \n", "5 Inclusion Criteria:\\n\\n* 18 years of age\\n* Hi... \n", "6 Inclusion Criteria:\\n\\n* Histological or cytol... \n", "7 Main inclusion criteria:\\n\\n1. Histological or... \n", "8 Inclusion Criteria:\\n\\n* Histologically docume... \n", "9 Inclusion Criteria:\\n\\n* Written informed cons... \n", "\n", " pt_trial_pair roberta_check_result \\\n", "0 5. Cancer type allowed: non-small cell lung ca... NEGATIVE \n", "1 1. Cancer type allowed: non-small cell lung ca... POSITIVE \n", "2 3. Cancer type allowed: non-small cell lung ca... POSITIVE \n", "3 1. Cancer type allowed: Non-small cell lung ca... POSITIVE \n", "4 1. Cancer type allowed: non-small cell lung ca... POSITIVE \n", "5 2. Cancer type allowed: non-small cell lung ca... POSITIVE \n", "6 2. Cancer type allowed: Non-Small Cell Lung Ca... POSITIVE \n", "7 1. Cancer type allowed: non-small cell lung ca... POSITIVE \n", "8 1. Cancer type allowed: non-small cell lung ca... POSITIVE \n", "9 1. Cancer type allowed: non-small cell lung ca... POSITIVE \n", "\n", " roberta_check_score \n", "0 0.834101 \n", "1 0.910206 \n", "2 0.915395 \n", "3 0.914168 \n", "4 0.877930 \n", "5 0.926033 \n", "6 0.506948 \n", "7 0.952771 \n", "8 0.949954 \n", "9 0.937962 " ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "analysis" ] }, { "cell_type": "code", "execution_count": 17, "id": "94ccb775-e2da-47cf-a64d-6e017a5bb11f", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'5. Cancer type allowed: non-small cell lung cancer. Histology allowed: solid cancer. Cancer burden allowed: metastatic disease. Prior treatment required: at least one platinum-based chemotherapy regimen and at least one FDA-approved targeted treatment. Biomarkers required: KRAS G12V or G12D mutation. Biomarkers to be assessed during screening: HLA match.'" ] }, "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "analysis.this_space.iloc[0]" ] }, { "cell_type": "code", "execution_count": 18, "id": "27f3bdda-a893-4439-bb20-d864c0476b23", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'1. Cancer type allowed: non-small cell lung cancer. Histology allowed: adenocarcinoma, squamous cell carcinoma, large cell carcinoma, and other subtypes of non-small cell lung cancer. Cancer burden allowed: advanced, metastatic. Prior treatment required: chemotherapy that included cisplatin or carboplatin, immune checkpoint inhibitor. Prior treatment excluded: KRAS G12C targeted therapy. Biomarkers required: KRAS G12C mutation.'" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "analysis.this_space.iloc[1]" ] }, { "cell_type": "code", "execution_count": 19, "id": "824794ca-1934-47dd-8844-74cf0ea2db75", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'3. Cancer type allowed: non-small cell lung cancer. Histology allowed: pathologically documented, KRAS G12C-mutated. Cancer burden allowed: advanced or metastatic. Prior treatment required: immunotherapy, chemotherapy. Biomarkers required: KRAS G12C mutation.'" ] }, "execution_count": 19, "metadata": {}, "output_type": "execute_result" } ], "source": [ "analysis.this_space.iloc[2]" ] }, { "cell_type": "code", "execution_count": null, "id": "24a06913-e32e-4f14-ba0a-c9cd6ae6c4fd", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.18" } }, "nbformat": 4, "nbformat_minor": 5 }