Punctuated evolution of mitochondrial gene content

Download Report

Transcript Punctuated evolution of mitochondrial gene content

WEB APPLICATION DEVELOPMENT
APPLICATION TO BIO-INFORMATICS-III
Vicky Khanna
200960013
M-Tech Bioinformatics
WHY DO WE NEED WEB APPLICATIONS???
Parsing the NCBI Files
to extract a particular
pattern.
 Removal of HetroAtoms from RCSB files
for Drug Discovery
Analysis.
 Automated Search and
parsing for a particular
gene or gene sequence
from Meta-Databases
like KEGG, NCBIGenbank,BRENDA etc.

WEB TECHNOLOGIES

World Wide Web is based on Client-Server technology

One of the most popular and dominant client server
technologies today
Computer
HTTP
Web Application
HTML Documents
Laptop
Web Server
3
CONSTITUENTS OF WORLD WIDE WEB
Web Browsers
 Web Content
 Web Site
 URL – Uniform Resource Locator
 HTTP – Hyper Text Transfer Protocol
 HTML – Hyper Text Markup Language
 Gateway to Non-Web Resources

4
OVERVIEW
File System
Web Server
HTML Pages
GIF/JPG Images etc
Web Gateway
Database
Non-Web Content
(Dynamic Content)
5
WEB CONTENT - TYPES OF CONTENT

Static Content






Dynamic Content





Content resides in a file
Author determines the content at the time of creation
Each request will return exactly the same data (Content doesn’t change)
Example: HTML files, gif/jpeg files
Disadvantage: Not possible to implement applications
Created on the fly by a web server upon a request to reflect the current info
Content may vary for each request
Example: A typical web application (Banking etc)
Disadvantage: More processing power required on the server
Active Content





Server returns a run-able copy of the program
Browser executes the program locally on the client machine
May need continuous information feed
Examples: Java Applets, Active-X controls for IE
Disadvantage: Possible Security risks
6
WEB TECHNOLOGIES

The Web Application employs various technologies in different layers.

Client Side Scripting

Web browser
HTML, XHTML, CSS
 Scripting Languages


Server Side Scripting
ASP, ASP.NET ( Microsoft Technology)
 Servlet and JSP ( Java Technology)


Web Services

XML, DTD, Schema, XML DOM, SOAP, WSDL
7
COMMON GATEWAY INTERFACE (CGI)
A general framework for creating server side web
applications.
 The first mechanism for creating dynamic web site.
 Instead of returning a static web document, web server
returns results of a program.
 CGI programs can be written in languages like C/C++,
Perl, Java, etc.

8
CGI OVERVIEW
For example
Browser sends the parameter: Genename=chaperone .
 Web server passes the request to a C:\Perl program
 C:\Perl Program returns HTML that says,
TotalGenes=36896 !

Genename=chaperone
Genename=chaperone
C\Perl
Program
Web
Server
Web
Browser
TotalGenes=36896
TotalGenes=36896
9
PERL – CGI PROGRAMMING CONTD
Name.pl
computer2
server
Client sends a HTTP request
encoded with the data to be
passed to the server (shiv,27 etc)
Perl interpreter executes the
corresponding perl script and gives
back the HTML document.
Web server receives the request
and understands that this request
is for a dynamic page and invokes
the perl interpreter by passing the
parameters
10
Web server collects the HTML
document from the perl and sends
It to the browser.
PERL – CGI PROGRAMMING CONTD

HTML form & CGI Script
<html><body>
<form action=“name.pl" method="POST">
Your Name: <input type="text" name="name"><br>
Age
: <input type="text" name="age"><br>
<input type="submit" value="Send">
</form>
</body></html>
use CGI;
print header;
print "<HTML> <BODY>";
print "<H1> Hi ".param('name')."!</H1><BR>";
print "<H2> You are ".param('age')." years old!</H2><BR>";
print "</BODY></HTML>";
11
WORKING OF A CGI APPLICATION
7. Invoke getinfo.exe
under cgi-bin, passes
params thru env
variable/stdin
3. Cannot resolve
locally? Resolve from
other DNS…
2. Translate DNS 4. Returns IP
name to IP address
Address
202.68.33.49
getinfo.exe
1. User Submits form; URL
http://abcbooks.co.in/cgibin/getinfo.exe?title=Web+Servers
12
8. Query DB
for Data
PERL – DBI & DBD

DBD



Database Driver
Have libraries for connecting to various databases
Examples
DBD-Oracle
 DBD-Mysql
 DBD-CSV
 DBD-ODBC


DBI



Database Interface module
DBI modules do not have vendor libraries to access database
It locates the corresponding DBD module for interacting with
database
13
PERL – DBI & DBD
Perl Script
DBI Module
DBD - Oracle
Oracle
DBD - Mysql
Mysql
DBD – CSV
CSV Form
at
14
PERL – DBI & DBD

Connecting to Oracle Database
# !c:\perl\bin\perl.exe
use DBI;
use DBI::Oracle;
# Connecting to database
$DBHandle=DBI->connect(“dbi:Oracle:test:172.17.36.166:3306”
,”vicky”,”password”)or die($DBI::errstr);
# Database Operations
# Disconnecting
$DBHandle->disconnect();

Connecting to Mysql Database
use DBI;
use DBI::mysql(:sql_types);
$DBHandle=DBI->connect(“dbi:mysql:test:172.17.36.166:3306,
”vicky”,”password”)or die(“Error=> DBI::errstr);
15
PERL – DBI & DBD

Executing Insert statements
#!/usr/bin/perl
$Fname=“Vicky"; $Roll=200960013;
use DBI qw(:sql_types);
$DBHandle=DBI->connect("DBI:mysql:test:10.3.4.59:3306","root",”password") or
die($DBI::errstr);
$query="insert into table values(\"".$Fname."\",".$Roll.")";
$queryhandle=$DBHandle->prepare("$query");
$queryhandle->execute();
$DBHandle->disconnect();
16
PERL – DBI & DBD

Executing an Select Query
#!/usr/bin/perl
$Fname=“Vicky"; $Roll=200960013;
#use param(“Fname”) in case of HTML
use DBI qw(:sql_types);
$DBHandle=DBI->connect("DBI:mysql:test:10.3.4.59:3306","root",”password") or
die($DBI::errstr);
$query1="select * from table";
$queryhandle=$DBHandle->prepare("$query1");
$queryhandle->execute();
$queryhandle->bind_columns(\$FName,\$Roll);
while($queryhandle->fetch()) {
print $FName." ".$Roll;
print "\n";
}
$DBHandle->disconnect();
17
THANK YOU….