Beispiel #1
0
        /// <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);
            }
        }