1 Lecture 7 Introduction to Bioinformatics Dr N AYDIN.

Slides:



Advertisements
Similar presentations
DT228/3 Web Development WWW and Client server model.
Advertisements

Languages for Dynamic Web Documents
IIS Technologies.
Copyright 2004 Monash University IMS5401 Web-based Systems Development Topic 2: Elements of the Web (g) Interactivity.
Browsers and Servers CGI Processing Model ( Common Gateway Interface ) © Norman White, 2013.
Server-Side vs. Client-Side Scripting Languages
Web Automation Using Perl to automate web surfing.
B.Sc. Multimedia ComputingMedia Technologies Database Technologies.
Introduction to Web Interface Technology (CSE2030)
Introduction to Web Based Application. Web-based application TCP/IP (HTTP) protocol Using WWW technology & software Distributed environment.
Dynamic Web Pages Bert Wachsmuth. Review  Internet, IP addresses, ports, client-server, http, smtp  HTML, XHTML, XML  Style Sheets, external, internal,
Python and Web Programming
1 CS6320 – Why Servlets? L. Grewe 2 What is a Servlet? Servlets are Java programs that can be run dynamically from a Web Server Servlets are Java programs.
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
2440: 141 Web Site Administration Web Server-Side Programming Professor: Enoch E. Damson.
1 CS428 Web Engineering Lecture 18 Introduction (PHP - I)
Web Programming Language Dr. Ken Cosh Week 1 (Introduction)
8/17/2015CS346 PHP1 Module 1 Introduction to PHP.
Prof. Dr. Nizamettin AYDIN
Form Handling, Validation and Functions. Form Handling Forms are a graphical user interfaces (GUIs) that enables the interaction between users and servers.
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
DAT602 Database Application Development Lecture 15 Java Server Pages Part 1.
Server Side Scripting Norman White. Where do we do processing? Client side – Javascript (embed code in html) – Java applets (send java program to run.
Sys Prog & Scripting - HW Univ1 Systems Programming & Scripting Lecture 15: PHP Introduction.
1 ‘Dynamic’ Web Pages So far, we have developed ‘static’ web-pages, e.g., cv.html, repair.html and order.html. There is often a requirement to produce.
INTRODUCTION TO WEB DATABASE PROGRAMMING
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Introduction to ASP.NET. Prehistory of ASP.NET Original Internet – text based WWW – static graphical content  HTML (client-side) Need for interactive.
1 HTML and CGI Scripting CSC8304 – Computing Environments for Bioinformatics - Lecture 10.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
Dr. Azeddine Chikh IS444: Modern tools for applications development.
Chapter 1: Introduction to Web
Introduction to Internet Programming (Web Based Application)
Chapter 17 - Deploying Java Applications on the Web1 Chapter 17 Deploying Java Applications on the Web.
10 Adding Interactivity to a Web Site Section 10.1 Define scripting Summarize interactivity design guidelines Identify scripting languages Compare common.
CP476 Internet Computing CGI1 CGI is a common way to provide for specific computations on server side, interactions with users, or access to databases.
NASRULLAH KHAN.  Lecturer : Nasrullah   Website :
10/5/2015CS346 PHP1 Module 1 Introduction to PHP.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
Section 17.1 Add an audio file using HTML Create a form using HTML Add text boxes using HTML Add radio buttons and check boxes using HTML Add a pull-down.
HTML. Principle of Programming  Interface with PC 2 English Japanese Chinese Machine Code Compiler / Interpreter C++ Perl Assembler Machine Code.
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
Active Server Pages  In this chapter, you will learn:  How browsers and servers interacted on the Internet when the Internet first became popular 
Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Muhammad Ibn Saud Islamic University College of Computer and Information Sciences Chapter.
1 Basic Perl CGI Programming. 2 Issues How and when your program is invoked. Generating Response –HTTP Headers –HTML (or whatever document type you want)
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
David Lawrence 7/8/091Intro. to PHP -- David Lawrence.
IS-907 Java EE World Wide Web - Overview. World Wide Web - History Tim Berners-Lee, CERN, 1990 Enable researchers to share information: Remote Access.
CITA 310 Section 7 Installing and Testing a Programming Environment (Textbook Chapter 7)
Web Technologies Lecture 8 Server side web. Client Side vs. Server Side Web Client-side code executes on the end-user's computer, usually within a web.
Web Design and Development. World Wide Web  World Wide Web (WWW or W3), collection of globally distributed text and multimedia documents and files 
 2001 Prentice Hall, Inc. All rights reserved. Chapter 7 - Introduction to Common Gateway Interface (CGI) Outline 7.1Introduction 7.2A Simple HTTP Transaction.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
NASRULLAH KHAN.  Lecturer : Nasrullah   Website :
1 PHP Intro PHP Introduction After this lecture, you should be able to: Know the fundamental concepts of Web Scripting Languages in general, PHP in particular.
1 CSC160 Chapter 1: Introduction to JavaScript Chapter 2: Placing JavaScript in an HTML File.
University of Kansas Department of Electrical Engineering and Computer Science Dr. Susan Gauch April 21, 2005 I T T C Introduction to Web Technologies.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
Section 10.1 Define scripting
Chapter 7 - Introduction to Common Gateway Interface (CGI)
Tonga Institute of Higher Education IT 141: Information Systems
WWW and HTTP King Fahd University of Petroleum & Minerals
Using the Internet to publish data and applications
PHP / MySQL Introduction
Tonga Institute of Higher Education IT 141: Information Systems
Tonga Institute of Higher Education IT 141: Information Systems
Web Application Development Using PHP
Presentation transcript:

1 Lecture 7 Introduction to Bioinformatics Dr N AYDIN

2 The Sequence Retrieval System

3 Sequence Retrieval System (SRS) is a web-based database integration system that allows for the querying of data contained in a maltitude of databases, all through a single user interface. This makes the individual databases appear as if they are really one big relational database, organised withdifferent subsections: one called SWISS-PROT, one called EMBL, one called PDB, and so on SRS makes it very easy to query the entire data set, using common search terms that work across all the different databases, regardless of what they are.

4 EBI's SRS Database Selection Page figSRS_OPENING.eps

5 Why Study SRS? SRS is a trademark and the intellectual property of Lion Bioscience

6 EBI's SRS Extended Query Page figSRS_EXTENDED.eps

7 Don't create a new data format unless absolutely necessary. Use an existing format whenever possible

8 EBI's SRS BlastP Service Form figSRS_BLAST.eps

9 Web Technologies Using the Internet to publish data and applications

10 The Web Development Infrastructure The web server- a program that when loaded onto a computer system, provides for the publication of data and applications. Examples (apache, Jigsaw, and Microsft’s IIS) The web client- a program that can request content from a web server and display content within a graphical window, providing a mechanism whereby user can interact with the contents. The common name for the web client is web browser (Mozilla, MS Internet Explorer, KDE Konqueror, Opera and Lynx) Transport protocol- The “language” that the web server and web client use when communicating with eachotherThe transport protocol employed by the WWW is called HyperText Transport Protocol (HTTP) The content- The data and applications published by the web server: HyperText Mark-up Language(HTML).

11 Additional components Client-side programming- a technology used to program the web client, providing a way to enhance the user’s interactive experience. (Java applets, javaScript, macromedia Flash) Server-side programming- a technology used to program the web server, providing a mechanism to extend the services provided by the web server. (Java Servlets, JSP, Python, ASP, PHP, and Perl) Backend database technology- A place to store the data to be published, which is accessed by the server-side programming technology. (MySQL) These additional components turn the standart web development infrostructure into a dynamic and powerful application development environment.

12 Creating Content For The WWW There are a number of techniques employed to create HTML Creating content manually- Any text editor can be used to create HTML (time consuming) Creating content visually- Special purpose editors can create HTML pages visually. (Netscape Composer, MS Frontpage, Macromedia Dreamweaver) (unnecessary tags added, HTML pages are larger) Creating content dynamically- Since HTML is text, it is also possible to creat HTML from a program.(needs a web page creator)

13 Take the time to learn HTML

14 A Simple HTML Page This is as simple a web page as there is. A Simple HTML Page

15 #! /usr/bin/perl -w # produce_simple - produces the "simple.html" web page using # a HERE document. use strict; print <<WEBPAGE; A Simple HTML Page This is as simple a web page as there is. WEBPAGE Producing HTML

16 Another version of HTML generation #! /usr/bin/perl -w # produce_simpleCGI - produces the "simple.html" web page using # Perl's standard CGI module. use strict; use CGI qw( :standard ); print start_html( 'A Simple HTML Page' ), "This is as simple a web page as there is.", end_html; Producing HTML, cont.

17 The CGI module is designed to make the production of HTML as convenient as possible. start_html subroutine produces the tags that appear at the start of the web page. end_html subroutine produces the following HTML, representing tags that conclude a web page:

18 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " transitional.dtd"> A Simple HTML Page This is as simple a web page as there is. Extra staff at the start is optional. Extra tags tell the web browser exactly which version of HTML the web page conforms to. The CGI module includes these tags for web browser to optimise its behaviour to the version of HTML identified. Results from produce_simpleCGI

19 Static creation of WWW content simple.html web page is static If the web page is put on a web server it always appear in exactly the same way every time it is accessed. It is static, and remains unchanged until someone takes the time to change it. It rarely makes sense to create such a web page with a program unless you have a special requirement.

20 Create static web pages either manually or visually

21 The dynamic creation of WWW content When the web page includes content that is not static, it is referred to as dynamic web page. (For example a page including current date and time) It is not possible to creat a web page either manually or visually that includes dynamic content, and this is where server side programming technologies come into their own.

22 #! /usr/bin/perl -wT # whattimeisit - create a dynamic web page that includes the # current date/time. use strict; use CGI qw( :standard ); print start_html( 'What Date and Time Is It?' ), "The current date/time is: ", scalar localtime, end_html; The dynamic creation of WWW content

23 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " transitional.dtd"> What Date and Time Is It? The current date/time is: Mon May 02 23:21: Results from whattimeisit...

24 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " transitional.dtd"> What Date and Time Is It? The current date/time is: Tue May 03 08:04: And some time later...

25 Note that use of the “T” command-line option at the start of the program. This switches on Perl’s taint mode, which enables a set of special security checks on the behaviour of the program. If a server-side program does something that could potentially be exploited and, as a consequence, pose a sequrity treat, Perl refuses to execute the program when taint mode is enabled.

26 Always enable ``taint mode'' for server-side programs

27 $ chkconfig --add httpd $ chkconfig httpd on $ locate httpd.conf Preparing Apache For Perl

28 /etc/httpd/conf/httpd.conf ServerAdmin DocumentRoot "/var/www/html" /var/www/html/index.html ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" Configuring Apache

29 /etc/init.d/httpd start Running Apache

30 Test your web-site on localhost prior to deployment on the Internet

31 $ su $ cp whattimeisit /var/www/cgi-bin $ chmod +x /var/www/cgi-bin/whattimeisit $ Testing the execution of server- side programs

32 The ``Server Error'' web page. figSERVERERROR.eps

33 The ``What Date and Time Is it?'' web page. figSERVERTIME.eps

34 Sending Data To A Web Server Switch on taint mode on the Perl command line Use CGI module, importing (at least) the :standart set of subroutines Ensure the first print statement within the program is “print header”; Envelope any output sent to STDOUT with calls to the start_html and end_html subroutines Create a ststic web page to invoke the server- side program, providing input as necessary

35 #! /usr/bin/perl -wT # The 'match_emblCGI' program - check a sequence against the EMBL # database entry stored in the # embl.data.out data-file on the # web server. use strict; use CGI qw/:standard/; print header; open EMBLENTRY, "embl.data.out" or die "No data-file: have you executed prepare_embl?\n"; my $sequence = ; close EMBLENTRY; Sending Data To A Web Server

36 print start_html( "The results of your search are in!" ); print "Length of sequence is: ", length $sequence, " characters. "; print h3( "Here is the result of your search:" ); my $to_check = param( "shortsequence" ); $to_check = lc $to_check; if ( $sequence =~ /$to_check/ ) { print "Found. The EMBL data extract contains: $to_check."; } else { print "Sorry. No match found for: $to_check."; } print p, hr,p; print "Press Back on your browser to try another search."; print end_html; match_emblCGI, cont.

37 Search the Sequence for a Match Please enter a sequence to match against: A Search HTML Page

38 The ``Search the Sequence for a Match'' web page figMERSEARCH.eps

39 $ su $ cp mersearch.html /var/www/html $ cp match_emblCGI /var/www/cgi-bin $ chmod +x /var/www/cgi-bin/match_embl $ cp embl.data.out /var/www/cgi-bin $ Installing CGIs on a Web Server

40 The ``Results of your search are in!'' web page figMERSEARCHFOUND.eps

41 The ``Sorry! Not Found'' web page figMERSEARCHSORRY.eps

42 print <<MERFORM; Please enter another sequence to match against: MERFORM Using a HERE document

43 Better version: ``Results of your search are in!'' web page figMERSEARCHBETTER.eps

44 Web Databases

45 Searching all the entries in the dnas table figMERSEARCHMULTI.eps

46 The ``results'' of the multiple search on the dnas table

47 $ su $ cp mersearchmulti.html /var/www/html $ cp db_match_emblCGI /var/www/cgi-bin $ chmod +x /var/www/cgi-bin/db_match_emblCGI $ cp /home/barryp/DbUtilsMER.pm /var/www/cgi-bin $ Installing DB Multi-Search

48 Web Automation Using Perl to automate web surfing

49 Why Automate Surfing? Imagine you have 100 sequences to check. If it takes average 1 minutes to enter the sequence into text area, entering 100 sequencesrequires 100 minutes Why not automate it to save time Perl module WWW::Mechanize allows programmer to automate interactions with any web-site

50 Strategy to follow when automating interactions with any web page Load the web page of interest into a graphical browser Wiev the HTML used to display the web page by selecting the Page Source option from browser’s View menu Read the HTML and make a note of nthe names of the interface elements and form buttons that are of interest Write a Perl program that user WWW::Mechanize to interact with the web page (based on automatch, if needed) Use an appropriate regular expression to extract the interesting bits from the results returned from the web server

51 #! /usr/bin/perl -w # The 'automatch' program - check a collection of sequences against # the 'mersearchmulti.html' web page. use strict; use constant URL => " use WWW::Mechanize; my $browser = WWW::Mechanize->new; while ( my $seq = <> ) { chomp( $seq ); print "Now processing: '$seq'.\n"; The automatch program

52 $browser->get( URL ); $browser->form( 1 ); $browser->field( "shortsequence", $seq ); $browser->submit; if ( $browser->success ) { my $content = $browser->content; while ( $content =~ m[ (\w+?) yes ]g ) { print "\tAccession code: $1 matched '$seq'.\n"; } else { print "Something went wrong: HTTP status code: ", $browser->status, "\n"; } The automatch program, cont.

53 $ chmod +x automatch $./automatch sequences.txt Results from automatch Now processing: 'attccgattagggcgta'. Now processing: 'aattc'. Accession code: AF matched 'aattc'. Accession code: J01730 matched 'aattc'. Accession code: M24940 matched 'aattc'. Now processing: 'aatgggc'. Now processing: 'aaattt'. Running the automatch program

54 Accession code: AF matched 'aaattt'. Accession code: J01730 matched 'aaattt'. Accession code: M24940 matched 'aaattt'. Now processing: 'acgatccgcaagtagcaacc'. Accession code: M15049 matched 'acgatccgcaagtagcaacc'. Now processing: 'gggcccaaa'. Now processing: 'atcgatcg'. Now processing: 'tcatgcacctgatgaacgtgcaaaaccacag'. Accession code: AF matched 'tcatgcacctgatgaacgtgcaaaaccacag'.. Now processing: 'ccaaat'. Accession code: AF matched 'ccaaat'. Accession code: J01730 matched 'ccaaat'. Accession code: M24940 matched 'ccaaat'. Results from automatch...

55 Viewing the source of the mersearchmulti.html web page figMERSEARCHSOURCE.eps

56 Automate repetitive WWW interactions whenever possible