예제 #1
0
 public Abstract(Sequence seq)
 {
     InitializeComponent();
     CenterToScreen();
     SetStyle(ControlStyles.ResizeRedraw, true);
     name = seq.getAccession();
     id = seq.getAbstractID();
 }
예제 #2
0
 private void prv_rna_Click(object sender, EventArgs e)
 {
     if (prevSEQ.getAccession() == "Default") return;
     graphstart = 1;
     Sequence tmpSEQ = curSEQ;
     curSEQ = prevSEQ;
     prevSEQ = tmpSEQ;
     SetTitles();
 }
예제 #3
0
        private void Get_Page(string id)
        {
            // get page from ID
            string datapage = EutilsURLBuilder.getFile("nucleotide", id, "gb", "xml");
            Console.WriteLine(datapage);
            WebRequest request = WebRequest.Create(datapage);
            WebResponse response;
            try
            {
                response = request.GetResponse();
            }
            catch
            {
                Console.WriteLine("There was an error accessing the web utilities.");
                return;
            }
            Stream dataStream = response.GetResponseStream();
            StreamReader reader = new StreamReader(dataStream);
            string responseFromServer = reader.ReadToEnd();
            Console.WriteLine(responseFromServer);
            reader.Close();
            response.Close();

            // get name & location & put in vector

            prevSEQ = curSEQ;
            curSEQ = new Sequence(new XmlTextReader(new StringReader(responseFromServer)));

            listitems.Clear();
            foreach (Sequence.feature feat in curSEQ.featurelist)
            {
                listitems.Add(feat.name);
            }
            featureListBox.DataSource = listitems;

            SetTitles();
            graphstart = 1;
            viewer.On();
            isSeqView = true;

            Refresh();
        }