示例#1
0
        /// <summary>
        /// Author: Ryan Liang
        /// </summary>
        public static Protein_Information GetProtein(string query)
        {
            Protein_Information protein = null;

            using (DrugProNETEntities context = new DrugProNETEntities())
            {
                DbSet <Protein_Information> dbSet = context.Protein_Information;

                foreach (Protein_Information p in dbSet)
                {
                    if (IsQueryInValues(query,
                                        p.Protein_Short_Name,
                                        p.Protein_Full_Name,
                                        p.NCBI_Gene_ID,
                                        p.PDB_Protein_Name,
                                        p.Protein_Alias,
                                        p.Uniprot_ID,
                                        p.NCBI_RefSeq_NP_ID,
                                        p.NCBI_Gene_Name,
                                        p.PhosphoNET_Name))
                    {
                        protein = p;
                    }
                }
            }

            return(protein);
        }
示例#2
0
        /// <summary>
        /// Author: Andy Tang
        /// </summary>
        public static PDB_Information GetPDBInfo(Protein_Information protein, Drug_Information drug)
        {
            PDB_Information PDBInfo = null;

            if (protein == null || drug == null)
            {
                return(PDBInfo);
            }

            string uniprot_ID  = protein.Uniprot_ID;
            string drug_PDB_ID = drug.Drug_PDB_ID;

            using (DrugProNETEntities context = new DrugProNETEntities())
            {
                DbSet <PDB_Information> dbSet = context.PDB_Information;
                foreach (PDB_Information pdb in dbSet)
                {
                    if (string.Equals(pdb.Uniprot_ID, uniprot_ID, StringComparison.OrdinalIgnoreCase) &&
                        string.Equals(pdb.Drug_PDB_ID, drug_PDB_ID, StringComparison.OrdinalIgnoreCase))
                    {
                        PDBInfo = pdb;
                    }
                }
            }

            return(PDBInfo);
        }
示例#3
0
        /// <summary>
        /// Author: Andy Tang
        /// </summary>
        protected void Search_Textbox_Changed(object sender, EventArgs e)
        {
            search_drop_down.Items.Clear();
            search_drop_down.Items.Add(DROP_DOWN_PROMPT_MESSAGE);

            List <Protein_Information> proteinList = new List <Protein_Information>();

            const int minPrefixLength = 3;

            if (search_textBox.Text.Length < minPrefixLength)
            {
                return;
            }
            Drug_Information drug = EF_Data.GetDrugsQuery(search_textBox.Text).FirstOrDefault();

            if (drug != null)
            {
                List <PDB_Information> pdbInfoList = EF_Data.GetPDBInfoUsingDrug(drug.Drug_PDB_ID);

                foreach (PDB_Information pdb in pdbInfoList)
                {
                    Protein_Information protein = EF_Data.GetProteinByUniprotID(pdb.UniProt_ID);

                    if (protein != null)
                    {
                        proteinList.Add(protein);
                    }
                }
            }

            if (proteinList.Count > 0)
            {
                List <string> valuesList = new List <string>();

                foreach (Protein_Information protein in proteinList)
                {
                    valuesList.Add(protein.UniProt_ID);
                    valuesList.Add(protein.Protein_Short_Name);
                    valuesList.Add(protein.Protein_Full_Name);
                    valuesList.Add(protein.Protein_Alias);
                    valuesList.Add(protein.NCBI_RefSeq_NP_ID);
                    valuesList.Add(protein.PhosphoNET_Name);
                    valuesList.Add(protein.PDB_Protein_Name);
                }

                valuesList = DataUtilities.FilterDropdownList(valuesList);

                foreach (string value in valuesList)
                {
                    search_drop_down.Items.Add(new ListItem(value, value, true));
                }
            }
            else
            {
                search_drop_down.Items.Clear();
                search_drop_down.Items.Add(DROP_DOWN_NO_MATCHES_MESSAGE);
            }
        }
示例#4
0
        /// <summary>
        /// Author: Andy Tang
        /// </summary>
        protected void Search_Textbox_Changed(object sender, EventArgs e)
        {
            search_drop_down.Items.Clear();
            search_drop_down.Items.Add(DROP_DOWN_PROMPT_MESSAGE);

            List <Drug_Information> drugList = new List <Drug_Information>();

            const int minPrefixLength = 3;

            if (search_textBox.Text.Length < minPrefixLength)
            {
                return;
            }

            Protein_Information protein = EF_Data.GetProteinsInfoQuery(search_textBox.Text).FirstOrDefault();

            if (protein != null)
            {
                List <PDB_Information> pdbInfoList = EF_Data.GetPDBInfoUsingProtein(protein.UniProt_ID);

                foreach (PDB_Information pdb in pdbInfoList)
                {
                    Drug_Information drug = EF_Data.GetDrugByDrugPDBID(pdb.Drug_PDB_ID);
                    if (drug != null)
                    {
                        drugList.Add(drug);
                    }
                }
            }

            if (drugList.Count > 0)
            {
                List <string> valuesList = new List <string>();

                foreach (Drug_Information drug in drugList)
                {
                    valuesList.Add(drug.Other_Drug_Name_Alias);
                    valuesList.Add(drug.Drug_Common_Name);
                    valuesList.Add(drug.Drug_Chemical_Name);
                    valuesList.Add(drug.Compound_CAS_ID);
                    valuesList.Add(drug.PubChem_CID);
                    valuesList.Add(drug.ChEMBL_ID);
                }

                valuesList = DataUtilities.FilterDropdownList(valuesList);

                foreach (string value in valuesList)
                {
                    search_drop_down.Items.Add(new ListItem(value, value, true));
                }
            }
            else
            {
                search_drop_down.Items.Clear();
                search_drop_down.Items.Add(DROP_DOWN_NO_MATCHES_MESSAGE);
            }
        }
示例#5
0
        /// <summary>
        /// Author: Ryan Liang
        /// </summary>
        private void LoadTargetGeneID(Protein_Information protein, SNV_Mutation mutation)
        {
            ProcessRow(gene_name_row, gene_name, mutation.NCBI_Gene_Name);
            ProcessRow(uniprot_id_row, uniprot_id, protein.UniProt_ID);
            ProcessRow(ncbi_refseq_id_row, ncbi_refseq_id, protein.NCBI_RefSeq_NP_ID);
            ProcessRow(chromosome_location_row, chromosome_location, protein.Human_Chromosome_Location);

            gene_and_protein_info_url.Text        = "Link to further gene and protein information";
            gene_and_protein_info_url.NavigateUrl = "ProteinInfoResult.aspx?query_string=" + protein.UniProt_ID;
            gene_and_protein_info_url.Target      = "_blank";
        }
示例#6
0
        /// <summary>
        /// Author: Ryan Liang
        /// </summary>
        public static Protein_Information GetProteinByUniprotID(string uniprotID)
        {
            Protein_Information protein = null;

            using (DrugProNETEntities context = new DrugProNETEntities())
            {
                protein = context.Protein_Information.Where(p => p.Uniprot_ID.ToLower().Contains(uniprotID.ToLower())).FirstOrDefault();
            }

            return(protein);
        }
示例#7
0
        protected void Search_Textbox_Changed(object sender, EventArgs e)
        {
            drug_specification_drop_down.Items.Clear();
            drug_specification_drop_down.Items.Add(DROP_DOWN_PROMPT_MESSAGE);

            amino_acid_specification_drop_down.Items.Clear();
            amino_acid_specification_drop_down.Items.Add(DROP_DOWN_PROMPT_MESSAGE);

            const int minPrefixLength = 3;

            if (search_textBox.Text.Length < minPrefixLength)
            {
                return;
            }

            Protein_Information protein = EF_Data.GetProteinsInfoQuery(search_textBox.Text).FirstOrDefault();

            if (protein != null)
            {
                List <PDB_Information>  pdbList  = EF_Data.GetPDBInfoUsingProtein(protein.UniProt_ID);
                List <Drug_Information> drugList = new List <Drug_Information>();

                foreach (PDB_Information pdb in pdbList)
                {
                    Drug_Information drug = EF_Data.GetDrugByDrugPDBID(pdb.Drug_PDB_ID);
                    if (drug != null)
                    {
                        drugList.Add(drug);
                    }
                }

                if (drugList.Count > 0)
                {
                    List <string> dropdownValues = new List <string>();
                    foreach (Drug_Information drug in drugList)
                    {
                        dropdownValues.Add(drug.Drug_Name_for_Pull_Down_Menu);
                    }

                    dropdownValues = DataUtilities.FilterDropdownList(dropdownValues);

                    foreach (string dropdownValue in dropdownValues)
                    {
                        drug_specification_drop_down.Items.Add(dropdownValue);
                    }
                }
                else
                {
                    drug_specification_drop_down.Items.Clear();
                    drug_specification_drop_down.Items.Add(DROP_DOWN_NO_MATCHES_MESSAGE);
                }
            }
        }
        /// <summary>
        /// Author: Ryan Liang
        /// </summary>
        private void LoadData(Protein_Information protein)
        {
            ProcessRow(protein_short_name_row, protein_short_name, protein.Protein_Short_Name);
            ProcessRow(protein_full_name_row, protein_full_name, protein.Protein_Full_Name);
            ProcessRow(gene_name_row, gene_name, protein.NCBI_Gene_Name);
            ProcessRow(alias_row, alias, protein.Protein_Alias);
            ProcessRow(protein_type_row, protein_type, protein.Protein_Type_Specific);
            ProcessRow(kinase_group_row, kinase_group, protein.Kinase_Group);
            ProcessRow(kinase_family_row, kinase_family, protein.Kinase_Family);
            ProcessRow(kinase_subfamily_row, kinase_subfamily, protein.Kinase_Subfamily);

            ProcessRow(null, cell_component1, protein.GOCellComponent1, protein.GOCellComponent1URL);
            ProcessRow(null, cell_component2, protein.GOCellComponent2, protein.GOCellComponent2URL);
            ProcessRow(null, cell_component3, protein.GOCellComponent3, protein.GOCellComponent3URL);
            ProcessControl(cell_component_row, protein.GOCellComponent1, protein.GOCellComponent2, protein.GOCellComponent3);

            ProcessRow(null, mo1, protein.GOMolFunction1, protein.GOCellComponent1URL);
            ProcessRow(null, mo2, protein.GOMolFunction2, protein.GOCellComponent2URL);
            ProcessRow(null, mo3, protein.GOMolFunction3, protein.GOCellComponent3URL);
            ProcessControl(molecular_function_row, protein.GOMolFunction1, protein.GOMolFunction2, protein.GOMolFunction3);

            ProcessRow(null, bo1, protein.GOBioProcess1, protein.GOBioProcess1URL);
            ProcessRow(null, bo2, protein.GOBioProcess2, protein.GOBioProcess2URL);
            ProcessRow(null, bo3, protein.GOBioProcess3, protein.GOBioProcess3URL);
            ProcessControl(biological_process_row, protein.GOBioProcess1, protein.GOBioProcess2, protein.GOBioProcess3);

            ProcessControls(group_gene_ontology_terms, cell_component_row, molecular_function_row, biological_process_row);

            ProcessRow(mass_da_row, mass_da, protein.Protein_Mass);
            ProcessRow(number_aa_row, number_aa, protein.Protein_AA_Number);

            ProcessRow(null, uniprot_id, protein.UniProt_ID, protein.UniProt_Entry_URL);
            ProcessRow(null, uniprot_entry, protein.Entry_ID, protein.UniProt_Entry_URL);
            ProcessControl(uniprot_row, protein.UniProt_ID, protein.Entry_ID);

            ProcessRow(ncbi_refseq_id_row, ncbi_refseq_id, protein.NCBI_RefSeq_NP_ID, protein.NCBI_RefSeq_NP_ID_URL);
            ProcessRow(int_protein_id_row, int_protein_id, protein.International_Prot_ID);
            ProcessRow(phosphonet_id_row, phosphonet_id, protein.PhosphoNET_Name, protein.PhosphoNET_URL);
            ProcessRow(phosphositeplus_row, phosphositeplus, protein.PhosphoSite_Plus_Entry, protein.PhosphoSite_Plus_Entry_URL);
            ProcessRow(kinasenet_id_row, kinasenet_id, protein.UniProt_ID, protein.KinaseNET_URL);
            kinasenet_id_row.Visible = !string.IsNullOrEmpty(protein.KinaseNET_URL?.Trim());

            ProcessRow(onconet_id_row, onconet_id, protein.UniProt_ID, protein.OncoNET_URL);
            onconet_id_row.Visible = !string.IsNullOrEmpty(protein.OncoNET_URL?.Trim());
            ProcessRow(chromosome_no_row, chromosome_no, protein.Human_Chromosome_Number);
            ProcessRow(chromosome_location_row, chromosome_location, protein.Human_Chromosome_Location);
            ProcessRow(gene_location_row, gene_location, protein.Human_Gene_Location);
            ProcessRow(ncbi_nucleotide_id_row, ncbi_nucleotide_id, protein.NCBI_Nucleotide_ID, protein.NCBI_Nucleotide_ID_URL);
            ProcessRow(ncbi_gene_id_row, ncbi_gene_id, protein.NCBI_Gene_ID, protein.NCBI_Gene_URL);
        }
示例#9
0
 /// <summary>
 /// Author: Ryan Liang
 /// </summary>
 public void LoadProtein(Protein_Information protein, PDB_Interaction interaction, SNV_Mutation mutation)
 {
     ProcessRow(gene_name_row, gene_name, mutation.NCBI_Gene_Name);
     ProcessRow(uniprot_id_row, uniprot_id, mutation.UniProt_ID, protein.UniProt_Entry_URL);
     ProcessRow(refseq_id_row, refseq_id, protein.NCBI_RefSeq_NP_ID, protein.NCBI_RefSeq_NP_ID_URL);
     ProcessRow(nucleotide_id_row, nucleotide_id, protein.NCBI_Nucleotide_ID, protein.NCBI_Nucleotide_ID_URL);
     ProcessRow(gene_id_row, gene_id, protein.NCBI_Gene_ID, protein.NCBI_Gene_URL);
     ProcessRow(chromosome_location_row, chromosome_location, protein.Human_Chromosome_Location);
     ProcessRow(gene_location_row, gene_location, protein.Human_Gene_Location);
     ProcessRow(aa_residue_no_row, aa_residue_no, interaction.Uniprot_Residue_Number);
     ProcessRow(atomic_interactions_row, atomic_interactions, interaction.Number_of_Atomic_Interactions);
     ProcessRow(aa_residue_type_row, aa_residue_type, interaction.AA_Residue_Type);
     ProcessRow(avg_atom_distance_row, avg_atom_distance, interaction.Average_Distance_Between_Atoms);
     ProcessRow(interaction_distance_ratio_row, interaction_distance_ratio, interaction.Interaction_Distance_Ratio);
 }
示例#10
0
        /// <summary>
        /// Author: Ryan Liang
        /// </summary>
        public void LoadProtein(Protein_Information protein)
        {
            ProcessRow(protein_name_row, protein_name, protein.Protein_Short_Name);
            ProcessRow(protein_full_name_row, protein_full_name, protein.Protein_Full_Name);
            ProcessRow(p_alias_row, p_alias, protein.Protein_Alias);
            ProcessRow(uniprot_ID_row, uniprot_ID, protein.UniProt_ID);
            ProcessRow(NCBI_ID_row, NCBI_ID, protein.NCBI_RefSeq_NP_ID);
            ProcessRow(protein_type_row, protein_type, protein.Protein_Type_Specific);
            ProcessRow(kinase_group_row, kinase_group, protein.Kinase_Group);
            ProcessRow(kinase_family_row, kinase_family, protein.Kinase_Family);
            ProcessRow(number_aa_row, number_aa, protein.Protein_AA_Number);
            ProcessRow(protein_mass_da_row, protein_mass_da, protein.Protein_Mass);

            ProcessRow(protein_information_result_url_row, protein_information_result_url, "Link to further protein information", "ProteinInfoResult.aspx?query_string=" + protein.UniProt_ID);
        }
        /// <summary>
        /// Author: Andy Tang
        /// </summary>
        protected new void Page_Load(object sender, EventArgs e)
        {
            base.Page_Load(sender, e);

            string query = Request.QueryString["query_string"];

            Protein_Information protein = EF_Data.GetProteinsInfoQuery(query).FirstOrDefault();

            if (protein != null)
            {
                LoadData(protein);
            }
            else
            {
                Page.Master.FindControl("BodyContentPlaceHolder").Visible = false;
                ExceptionUtilities.DisplayAlert(this, QUERY_PAGE);
            }
        }
示例#12
0
        protected void LoadAminoAcidDropDown(object sender, EventArgs e)
        {
            amino_acid_specification_drop_down.Items.Clear();
            amino_acid_specification_drop_down.Items.Add(DROP_DOWN_PROMPT_MESSAGE);

            try
            {
                if (drug_specification_drop_down.SelectedItem.Value != DROP_DOWN_PROMPT_MESSAGE)
                {
                    Protein_Information protein = EF_Data.GetProtein(search_textBox.Text);
                    Drug_Information    drug    = EF_Data.GetDrugUsingDropDownName(drug_specification_drop_down.SelectedItem.Value);
                    PDB_Information     PDB     = EF_Data.GetPDBInfo(protein, drug);

                    List <SNV_Mutation> mutations = EF_Data.GetMutations(protein.UniProt_ID, drug.Drug_PDB_ID, PDB.PDB_File_ID);

                    if (mutations.Count > 0)
                    {
                        List <string> dropdownValues = new List <string>();

                        foreach (SNV_Mutation mutation in mutations)
                        {
                            dropdownValues.Add(mutation.SNV_Key);
                        }

                        dropdownValues = DataUtilities.FilterDropdownList(dropdownValues);

                        foreach (string dropdownValue in dropdownValues)
                        {
                            amino_acid_specification_drop_down.Items.Add(dropdownValue);
                        }
                    }
                    else
                    {
                        amino_acid_specification_drop_down.Items.Clear();
                        amino_acid_specification_drop_down.Items.Add(DROP_DOWN_NO_MATCHES_MESSAGE);
                    }
                }
            }
            catch (Exception)
            {
                amino_acid_specification_drop_down.Items.Clear();
                amino_acid_specification_drop_down.Items.Add(DROP_DOWN_PROMPT_MESSAGE);
            }
        }
示例#13
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);
            }
        }
示例#14
0
        /// <summary>
        /// Author: Andy Tang
        /// </summary>
        public static PDB_Information GetPDBInfo(Protein_Information protein, Drug_Information drug)
        {
            PDB_Information PDBInfo = null;

            if (protein == null || drug == null)
            {
                return(PDBInfo);
            }

            using (DrugProNETEntities context = new DrugProNETEntities())
            {
                PDBInfo = context.PDB_Information.Where(pdb =>
                                                        pdb.UniProt_ID.Equals(protein.UniProt_ID, StringComparison.OrdinalIgnoreCase) &&
                                                        pdb.Drug_PDB_ID.Equals(drug.Drug_PDB_ID, StringComparison.OrdinalIgnoreCase)
                                                        ).FirstOrDefault();
            }

            return(PDBInfo);
        }
示例#15
0
        /// <summary>
        /// Author: Ryan Liang
        /// </summary>
        public static Protein_Information GetProtein(string query)
        {
            Protein_Information protein = null;

            using (DrugProNETEntities context = new DrugProNETEntities())
            {
                protein = context.Protein_Information.Where(p =>
                                                            p.Protein_Short_Name.ToLower().Contains(query.ToLower()) ||
                                                            p.Protein_Full_Name.ToLower().Contains(query.ToLower()) ||
                                                            p.NCBI_Gene_ID.ToLower().Contains(query.ToLower()) ||
                                                            p.PDB_Protein_Name.ToLower().Contains(query.ToLower()) ||
                                                            p.Protein_Alias.ToLower().Contains(query.ToLower()) ||
                                                            p.UniProt_ID.ToLower().Contains(query.ToLower()) ||
                                                            p.NCBI_RefSeq_NP_ID.ToLower().Contains(query.ToLower()) ||
                                                            p.NCBI_Gene_Name.ToLower().Contains(query.ToLower()) ||
                                                            p.PhosphoNET_Name.ToLower().Contains(query.ToLower())
                                                            ).FirstOrDefault();
            }

            return(protein);
        }
示例#16
0
        /// <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);
            }
        }
示例#17
0
        /// <summary>
        /// Author: Andy Tang, Ryan Liang
        /// </summary>
        protected new void Page_Load(object sender, EventArgs e)
        {
            base.Page_Load(sender, e);

            if (!IsPostBack)
            {
                string fromPage     = null;
                string query_string = null;

                try
                {
                    query_string = Request.QueryString["query_string"];

                    drug_specification    = Request.QueryString["drug_specification"];
                    protein_specification = Request.QueryString["protein_specification"];

                    if (!string.IsNullOrEmpty(drug_specification))
                    {
                        protein_specification = query_string;
                        fromPage = "protein";
                    }
                    else if (!string.IsNullOrEmpty(protein_specification))
                    {
                        drug_specification = query_string;
                        fromPage           = "drug";
                    }

                    drug    = EF_Data.GetDrugsQuery(drug_specification).FirstOrDefault();
                    protein = EF_Data.GetProteinsInfoQuery(protein_specification).FirstOrDefault();
                    PDB     = EF_Data.GetPDBInfo(protein, drug);
                    Session["PDB_File_ID"] = PDB.PDB_File_ID;

                    interaction_distance    = double.Parse(Request.QueryString["interaction_distance"]);
                    protein_chain           = bool.Parse(Request.QueryString["protein_chain"]);
                    protein_atoms           = bool.Parse(Request.QueryString["protein_atoms"]);
                    protein_residues        = bool.Parse(Request.QueryString["protein_residues"]);
                    protein_residue_numbers = bool.Parse(Request.QueryString["protein_residue_numbers"]);
                    drug_atoms = bool.Parse(Request.QueryString["drug_atoms"]);

                    Session["interaction_distance"] = interaction_distance;
                }
                catch (Exception)
                {
                    throw;
                }

                if (drug == null || protein == null || PDB == null)
                {
                    Page.Master.FindControl("BodyContentPlaceHolder").Visible = false;

                    if (fromPage != null)
                    {
                        ExceptionUtilities.DisplayAlert(this, fromPage.Equals("drug") ? DRUG_QUERY_PAGE : PROTEIN_QUERY_PAGE);
                    }
                    else
                    {
                        ExceptionUtilities.DisplayAlert(this, DEFAULT_REDIRECT_PAGE);
                    }
                }
                else
                {
                    Session["interaction_distance"]    = interaction_distance;
                    Session["protein_chain"]           = protein_chain;
                    Session["protein_atoms"]           = protein_atoms;
                    Session["protein_residues"]        = protein_residues;
                    Session["protein_residue_numbers"] = protein_residue_numbers;
                    Session["drug_atoms"] = drug_atoms;

                    LoadProtein(protein);
                    LoadDrug(drug, PDB);
                    LoadPDB_Info(PDB);

                    GetDrugAtomNumberingImage(drug);

                    CreateInteractionList(PDB, interaction_distance, protein_chain, protein_atoms, protein_residues, protein_residue_numbers, drug_atoms);

                    CreateInteractionSummary();

                    ScriptManager.RegisterStartupScript(Page, GetType(), "D_3DViewer", "javascript:loadDrugLigand('" + drug.Drug_PDB_ID + "');", true);
                    ScriptManager.RegisterStartupScript(Page, GetType(), "PDB_3DViewer", "javascript:loadStage('" + drug.PDB_File_ID + "', '" + drug.Drug_PDB_ID + "');", true);
                }
            }
        }