Sample Scripts for Generating PaGE-OM XML

This page is offering some sample scripts to you effective for the data processing of Illumina 1M-Duo. It is useful to make huge data of genotype and/or phenotype with PAGE-OM standard format.

dbSNP is operating on MS SQLServer. Moreover, only the script for SQLServer is being offered. Then, This page offers the script that can be used on MySQL.

Outline chart of procedure




6. Creating RDB tables for Generating PaGE-OM XML

These scripts help you to create phenotype tables.

Example of script: create table tbl_page_phenotype.sql

create table tbl_page_phenotype (	
height	varchar(20),
weight	varchar(20),
BMI	varchar(20),
systolic_blood_pressure	varchar(20),
diastolic_blood_pressure	varchar(20),
ECG	varchar(20),
HR	varchar(20),
protein	varchar(20),
albumin	varchar(20),
bilirubin	varchar(20),
AST_GOT	varchar(20),
ALT_GPT	varchar(20),
LDH_JSCC	varchar(20),
G-GTP_JSCC	varchar(20),
ALP_JSCC	varchar(20),
CRP	varchar(20),
total_cholesterol	varchar(20),
TG	varchar(20),
phospholoid	varchar(20),
urinary_nitrogen	varchar(20),
creatinine	varchar(20),
UA_uric_aid	varchar(20),
HbA1c	varchar(20),
Na	varchar(20),
Cl	varchar(20),
Ka	varchar(20),
Ca	varchar(20),
HBS_antigen	varchar(20),
HCV_antibody_RIA	varchar(20),
HCV_antibody_RIA_decision	varchar(20),
HCV_antibody_RIA_index	varchar(20),
WBC_count	varchar(20),
RBC_count	varchar(20)
)	
;	
Download: create_tables_sql2.zip


7. Generating PaGE-OM XML from phenotype data

This sample Perl script helps you to extract data from MySQL by an example. The user table is necessary to execute it appropriately.

Example of script: makexml_gv_full.pl

#!usr/bin/perl

#########################
# xmlmake_gv_full.pl
#

use DBI;

$ds = 'DBI:mysql:pageomdb;host=localhost;port=3306';
$user = 'pageom';
$pass = 'pageompassxxxx';

$string = 'rs112078';

$db = DBI->connect($ds, $user, $pass) || die "Got error $DBI::errstr when connecting to $ds\n";

# for test
$sth = $db->prepare("select * from tbl_array WHERE rsname like \'$string\%\' and subsnp_id is not null");

# real thing
#$sth = $db->prepare("select * from tbl_array WHERE subsnp_id is not null");

$sth->execute;

#print "Content-type: text/html;\n\n";
while(@row = $sth->fetchrow_array) {

# for debug

#	print "@row\n";

#	print $row[0] . "\n";
#	print $row[1] . "\n";
#	print $row[2] . "\n";

	print "\t\n";
	print "\t\t$row[0]\n";
	print "\t\tSNP\n";
...
...
Download: makexml_gv_full.pl