/// <summary> /// Author: Garth Nelson /// </summary> protected new void Page_Load(object sender, EventArgs e) { base.Page_Load(sender, e); SNV_ID_Key = Request.QueryString["query_string"]; try { string stringAfterPDot = SNV_ID_Key.Substring(SNV_ID_Key.IndexOf("p.") + 2); string specifiedAAType = new string(stringAfterPDot.TakeWhile(c => char.IsLetter(c)).ToArray()); string specifiedAANumber = new string(stringAfterPDot.Substring(specifiedAAType.Length).TakeWhile(c => char.IsNumber(c)).ToArray()); string specifiedAA = specifiedAAType + "-" + specifiedAANumber; mutations = EF_Data.GetMutationsBySNVIDKey(SNV_ID_Key); proteinMutation = EF_Data.GetMutationBySNVIDKey(SNV_ID_Key); protein = EF_Data.GetProteinByUniprotID(proteinMutation.UniProt_ID); foreach (SNV_Mutation mutation in mutations) { Drug_Information drug = EF_Data.GetDrugByDrugPDBID(mutation.Drug_PDB_ID); drugs.Add(drug); PDB_Interaction interaction = EF_Data.GetPDB_Interaction(mutation.UniProt_ID, mutation.Drug_PDB_ID, specifiedAA); interactions.Add(interaction); } Session["drugs"] = drugs; Session["interactions"] = interactions; Session["mutations"] = mutations; Session["SNV_ID_Key"] = SNV_ID_Key; LoadSNVID(SNV_ID_Key); LoadTargetGeneID(protein, mutations[0]); CreateIDofPDILinkedSNVTable(drugs, interactions, mutations); } catch (Exception) { Page.Master.FindControl("BodyContentPlaceHolder").Visible = false; ExceptionUtilities.DisplayAlert(this, QUERY_PAGE); } }
/// <summary> /// Author: Garth Nelson /// </summary> protected new void Page_Load(object sender, EventArgs e) { base.Page_Load(sender, e); try { string protein_specification = Request.QueryString["query_string"]; string drug_specification = Request.QueryString["drug_specification"]; string SNV_Key = Request.QueryString["snv_id_key"]; Session["SNV_Key"] = SNV_Key; Protein_Information protein = EF_Data.GetProtein(protein_specification); Drug_Information drug = EF_Data.GetDrugUsingDropDownName(drug_specification); PDB_Information PDB = EF_Data.GetPDBInfo(protein, drug); string[] SNV_KEYsplit = SNV_Key.Split('-'); // Retrieve second and third elements string amino_acid_specification = SNV_KEYsplit[1] + "-" + SNV_KEYsplit[2]; PDB_Interaction interaction = EF_Data.GetPDB_Interaction(protein.Uniprot_ID, drug.Drug_PDB_ID, amino_acid_specification); mutation = EF_Data.GetMutationBySNVKey(SNV_Key); Session["mutation"] = mutation; LoadProtein(protein, interaction, mutation); LoadDrug(drug, mutation); LoadPDB_Info(PDB); CreateSNVIdentificationTable(mutation); } catch (Exception) { Page.Master.FindControl("BodyContentPlaceHolder").Visible = false; ExceptionUtilities.DisplayAlert(this, QUERY_PAGE); } }