view release on metacpan or search on metacpan
Genetics/API/DB/Insert.pm view on Meta::CPAN
} elsif ( $svFormat eq "Date") {
$sth->execute($id, $svCategory, $svFormat, $sv->field("isXLinked"), $sv->field("description"), undef, undef, $sv->field("lowerBound"), $sv->field("upperBound")) ;
} else {
$sth->execute($id, $svCategory, $svFormat, $sv->field("isXLinked"), $sv->field("description"), undef, undef, undef, undef) ;
}
$sth->finish() ;
# Code data
if ( $svFormat eq "Code" ) {
$sth = $dbh->prepare( "insert into CodeDerivation
(codeDerivationID, studyVariableID, code,
description, formula)
values (?, ?, ?, ?, ?)" ) ;
if ($svCategory eq "StaticLiabilityClass") {
$sth1 = $dbh->prepare( "insert into StaticLCPenetrance
(cdID, pen11, pen12, pen22, malePen1, malePen2)
values (?, ?, ?, ?, ?, ?)" ) ;
}
$codesListPtr = $sv->field("Codes") ;
foreach $codePtr (@$codesListPtr) {
$sth->execute(undef, $id, $$codePtr{code}, $$codePtr{description}, undef) ;
$cdID = $sth->{'mysql_insertid'} ;
Genetics/API/DB/Insert.pm view on Meta::CPAN
$sth = $dbh->prepare( "insert into AffectionStatusDefinition
(asDefID, studyVariableID, name, diseaseAlleleFreq,
pen11, pen12, pen22, malePen1, malePen2)
values (?, ?, ?, ?, ?, ?, ?, ?, ?)" ) ;
$sth->execute(undef, $id, $$asdPtr{name}, $$asdPtr{diseaseAlleleFreq}, $$asdPtr{pen11}, $$asdPtr{pen12}, $$asdPtr{pen22}, $$asdPtr{malePen1}, $$asdPtr{malePen2}) ;
$asdID = $sth->{'mysql_insertid'} ;
$sth->finish() ;
# AffectionStatusElement fields
if ( defined($aseListPtr = $$asdPtr{AffStatElements}) ) {
$sth = $dbh->prepare( "insert into AffectionStatusElement
(asElementID, asDefID, code, type, formula)
values (?, ?, ?, ?, ?)" ) ;
foreach $asePtr (@$aseListPtr) {
$sth->execute(undef, $asdID, $$asePtr{code}, $$asePtr{type}, $$asePtr{formula}) ;
}
$sth->finish() ;
}
# LiabilityClass data
# NB: these are dynamic LCs; if the SV is of category StaticLiabilityClass,
# the penetrance values are handled with the Codes and are stored in the
# StaticLCPenetrance table
if ( defined($lcDefPtr = $sv->field("LCDef")) ) {
$sth = $dbh->prepare( "insert into LiabilityClassDefinition
(lcDefID, studyVariableID, name)
values (?, ?, ?)" ) ;
$sth->execute(undef, $id, $$lcDefPtr{name}) ;
$lcdID = $sth->{'mysql_insertid'} ;
$sth->finish() ;
# LiabilityClass fields
$lcListPtr = $$lcDefPtr{LiabilityClasses} ;
$sth = $dbh->prepare( "insert into LiabilityClass
(lcID, lcDefID, code, description, pen11, pen12,
pen22, malePen1, malePen2, formula)
values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" ) ;
foreach $lcPtr (@$lcListPtr) {
$sth->execute(undef, $lcdID, $$lcPtr{code}, $$lcPtr{description}, $$lcPtr{pen11}, $$lcPtr{pen12}, $$lcPtr{pen22}, $$lcPtr{malePen1}, $$lcPtr{malePen2}, $$lcPtr{formula}) ;
}
$sth->finish() ;
}
}
$DEBUG and carp " ->[insertStudyVariable] End." ;
return($id) ;
}
Genetics/API/DB/Read.pm view on Meta::CPAN
$param{isXLinked} = $$arrRef[2] ;
defined $$arrRef[3] and $param{description} = $$arrRef[3] ;
defined $$arrRef[4] and $param{lowerBound} = $$arrRef[4] ;
defined $$arrRef[5] and $param{upperBound} = $$arrRef[5] ;
defined $$arrRef[6] and $param{lowerBound} = $$arrRef[6] ;
defined $$arrRef[7] and $param{upperBound} = $$arrRef[7] ;
$sth->finish() ;
# CodeDerivation data
if ($format eq "Code") {
if ($category eq "StaticLiabilityClass") {
$sth = $dbh->prepare("select codeDerivationID, code, description, formula
from CodeDerivation
where studyVariableID = $id") ;
$sth->execute() ;
$sth1 = $dbh->prepare("select pen11, pen12, pen22, malePen1, malePen2
from StaticLCPenetrance
where cdID = ?") ;
while ($arrRef = $sth->fetchrow_arrayref()) {
%init = () ;
$sth1->execute($$arrRef[0]) ;
($p11, $p12, $p22, $mp1, $mp2) = $sth1->fetchrow_array() ;
$init{code} = $$arrRef[1] ;
$init{pen11} = $p11 ;
$init{pen12} = $p12 ;
$init{pen22} = $p22 ;
defined $mp1 and $init{malePen1} = $mp1 ;
defined $mp2 and $init{malePen2} = $mp2 ;
defined $$arrRef[2] and $init{description} = $$arrRef[2] ;
defined $$arrRef[3] and $init{formula} = $$arrRef[3] ;
push(@codesList, { %init }) ;
}
} else {
$sth = $dbh->prepare("select code, description, formula
from CodeDerivation
where studyVariableID = $id") ;
$sth->execute() ;
while ($arrRef = $sth->fetchrow_arrayref()) {
%init = () ;
$init{code} = $$arrRef[0] ;
defined $$arrRef[1] and $init{description} = $$arrRef[1] ;
defined $$arrRef[2] and $init{formula} = $$arrRef[2] ;
push(@codesList, { %init }) ;
}
}
}
defined $codesList[0] and $param{Codes} = \@codesList ;
if ($category =~ /AffectionStatus$/) {
# AffectionStatus data
$sth = $dbh->prepare("select name, diseaseAlleleFreq, pen11, pen12,
pen22, malePen1, malePen2, asDefID
Genetics/API/DB/Read.pm view on Meta::CPAN
if ( defined ($arrRef = $sth->fetchrow_arrayref()) ) {
%init = () ;
$init{name} = $$arrRef[0] ;
$init{diseaseAlleleFreq} = $$arrRef[1] ;
$init{pen11} = $$arrRef[2] ;
$init{pen12} = $$arrRef[3] ;
$init{pen22} = $$arrRef[4] ;
defined $$arrRef[5] and $init{malePen1} = $$arrRef[5] ;
defined $$arrRef[6] and $init{malePen2} = $$arrRef[6] ;
# Elements
$sth1 = $dbh->prepare("select code, type, formula
from AffectionStatusElement
where asDefID = $$arrRef[7]") ;
$sth1->execute() ;
while ($arrRef1 = $sth1->fetchrow_arrayref()) {
push(@aseList, {code => $$arrRef1[0],
type => $$arrRef1[1],
formula => $$arrRef1[2]}) ;
}
if (defined($aseList[0])) {
$init{AffStatElements} = \@aseList ;
}
$param{AffStatDef} = { %init } ;
# LiabilityClass data
# This is for dynamic LCs
$sth = $dbh->prepare("select name, lcDefID
from LiabilityClassDefinition
where studyVariableID = $id") ;
$sth->execute() ;
if ( defined($arrRef = $sth->fetchrow_arrayref()) ) {
%init = () ;
$init{name} = $$arrRef[0] ;
# Classes
$sth1 = $dbh->prepare("select code, description, pen11, pen12, pen22,
malePen1, malePen2, formula
from LiabilityClass
where lcDefID = $$arrRef[1]") ;
$sth1->execute() ;
while ($arrRef1 = $sth1->fetchrow_arrayref()) {
%init1 = () ;
$init1{code} = $$arrRef1[0] ;
defined $$arrRef1[1] and $init1{description} = $$arrRef1[1] ;
$init1{pen11} = $$arrRef1[2] ;
$init1{pen12} = $$arrRef1[3] ;
$init1{pen22} = $$arrRef1[4] ;
defined $$arrRef1[5] and $init1{malePen1} = $$arrRef1[5] ;
defined $$arrRef1[6] and $init1{malePen2} = $$arrRef1[6] ;
$init1{formula} = $$arrRef1[7] ;
push(@lcList, { %init1 }) ;
}
$init{LiabilityClasses} = \@lcList ;
$param{LCDef} = { %init } ;
}
}
}
$sv = new Genetics::StudyVariable(%param) ;
Genetics/API/DB/Read.pm view on Meta::CPAN
$param{dateCreated} = $$arrRef[2] ;
$param{dateModified} = $$arrRef[3] ;
$param{comment} = $$arrRef[4] ;
$category = $param{category} = $$arrRef[5] ;
$format = $param{format} = $$arrRef[6] ;
$param{isXLinked} = $$arrRef[7] ;
defined $$arrRef[8] and $param{description} = $$arrRef[8] ;
# CodeDerivation data
if ($format eq "Code") {
if ($category eq "StaticLiabilityClass") {
$sth = $dbh->prepare("select codeDerivationID, code, description, formula
from CodeDerivation
where studyVariableID = $id") ;
$sth->execute() ;
$sth1 = $dbh->prepare("select pen11, pen12, pen22, malePen1, malePen2
from StaticLCPenetrance
where cdID = ?") ;
while ($arrRef = $sth->fetchrow_arrayref()) {
%init = () ;
$sth1->execute($$arrRef[0]) ;
($p11, $p12, $p22, $mp1, $mp2) = $sth1->fetchrow_array() ;
$init{code} = $$arrRef[1] ;
$init{pen11} = $p11 ;
$init{pen12} = $p12 ;
$init{pen22} = $p22 ;
defined $mp1 and $init{malePen1} = $mp1 ;
defined $mp2 and $init{malePen2} = $mp2 ;
defined $$arrRef[2] and $init{description} = $$arrRef[2] ;
defined $$arrRef[3] and $init{formula} = $$arrRef[3] ;
push(@codesList, { %init }) ;
}
} else {
$sth = $dbh->prepare("select code, description, formula
from CodeDerivation
where studyVariableID = $id") ;
$sth->execute() ;
while ($arrRef = $sth->fetchrow_arrayref()) {
%init = () ;
$init{code} = $$arrRef[0] ;
defined $$arrRef[1] and $init{description} = $$arrRef[1] ;
defined $$arrRef[2] and $init{formula} = $$arrRef[2] ;
push(@codesList, { %init }) ;
}
}
}
defined $codesList[0] and $param{Codes} = \@codesList ;
if ($category =~ /AffectionStatus$/) {
# AffectionStatus data
$sth = $dbh->prepare("select name, diseaseAlleleFreq, pen11, pen12,
pen22, malePen1, malePen2, asDefID
Genetics/API/DB/Read.pm view on Meta::CPAN
if ( defined ($arrRef = $sth->fetchrow_arrayref()) ) {
%init = () ;
$init{name} = $$arrRef[0] ;
$init{diseaseAlleleFreq} = $$arrRef[1] ;
$init{pen11} = $$arrRef[2] ;
$init{pen12} = $$arrRef[3] ;
$init{pen22} = $$arrRef[4] ;
defined $$arrRef[5] and $init{malePen1} = $$arrRef[5] ;
defined $$arrRef[6] and $init{malePen2} = $$arrRef[6] ;
# Elements
$sth1 = $dbh->prepare("select code, type, formula
from AffectionStatusElement
where asDefID = $$arrRef[7]") ;
$sth1->execute() ;
while ($arrRef1 = $sth1->fetchrow_arrayref()) {
push(@aseList, {code => $$arrRef1[0],
type => $$arrRef1[1],
formula => $$arrRef1[2]}) ;
}
$init{AffStatElements} = \@aseList ;
$param{AffStatDef} = { %init } ;
}
}
$sv = new Genetics::StudyVariable(%param) ;
$DEBUG and carp " ->[getMiniStudyVariable] $sv" ;
Genetics/API/DB/Update.pm view on Meta::CPAN
where studyVariableID = $id" ) ;
$sth->execute() ;
while ($arrRef = $sth->fetchrow_arrayref()) {
$dbh->do( "delete from StaticLCPenetrance
where cdID = $$arrRef[0]" ) ;
}
$dbh->do( "delete from CodeDerivation
where studyVariableID = $id" ) ;
$sth = $dbh->prepare( "insert into CodeDerivation
(codeDerivationID, studyVariableID, code, description, formula)
values (?, ?, ?, ?, ?)" ) ;
if ($category eq "StaticLiabilityClass") {
$sth1 = $dbh->prepare( "insert into StaticLCPenetrance
(cdID, pen11, pen12, pen22, malePen1, malePen2)
values (?, ?, ?, ?, ?, ?)" ) ;
}
foreach $codePtr (@$codesListPtr) {
$sth->execute(undef, $id, $$codePtr{code}, $$codePtr{description}, undef) ;
$cdID = $sth->{'mysql_insertid'} ;
if ($category eq "StaticLiabilityClass") {
Genetics/API/DB/Update.pm view on Meta::CPAN
values (?, ?, ?, ?, ?, ?, ?, ?, ?)" ) ;
$sth->execute(undef, $id, $$asdPtr{name}, $$asdPtr{diseaseAlleleFreq}, $$asdPtr{pen11}, $$asdPtr{pen12}, $$asdPtr{pen22}, $$asdPtr{malePen1}, $$asdPtr{malePen2}) ;
$asdID = $sth->{'mysql_insertid'} ;
$sth->finish() ;
if ( defined($aseListPtr = $$asdPtr{AffStatElements}) ) {
if (defined $oldAsdID) {
$dbh->do( "delete from AffectionStatusElement
where asDefID = $oldAsdID" ) ;
}
$sth = $dbh->prepare( "insert into AffectionStatusElement
(asElementID, asDefID, code, type, formula)
values (?, ?, ?, ?, ?)" ) ;
foreach $asePtr (@$aseListPtr) {
$sth->execute(undef, $asdID, $$asePtr{code}, $$asePtr{type}, $$asePtr{formula}) ;
}
$sth->finish() ;
}
}
if ( defined($lcDefPtr = $sv->field("LCDef")) ) {
( $oldLcdID ) = $dbh->selectrow_array( "select lcDefID from LiabilityClassDefinition
where studyVariableID = $id" ) ;
$dbh->do( "delete from LiabilityClassDefinition
where studyVariableID = $id" ) ;
$sth = $dbh->prepare( "insert into LiabilityClassDefinition
(lcDefID, studyVariableID, name)
values (?, ?, ?)" ) ;
$sth->execute(undef, $id, $$lcDefPtr{name}) ;
$lcdID = $sth->{'mysql_insertid'} ;
$sth->finish() ;
if ( defined($lcListPtr = $$lcDefPtr{LiabilityClasses}) ) {
$dbh->do( "delete from LiabilityClass
where lcDefID = $oldLcdID" ) ;
$sth = $dbh->prepare( "insert into LiabilityClass
(lcID, lcDefID, code, description, pen11,
pen12, pen22, malePen1, malePen2, formula)
values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" ) ;
foreach $lcPtr (@$lcListPtr) {
$sth->execute(undef, $lcdID, $$lcPtr{code}, $$lcPtr{description}, $$lcPtr{pen11}, $$lcPtr{pen12}, $$lcPtr{pen22}, $$lcPtr{malePen1}, $$lcPtr{malePen2}, $$lcPtr{formula}) ;
}
$sth->finish() ;
}
}
}
$DEBUG and carp " ->[updateStudyVariable] End." ;
return(1) ;
}
Genetics/StudyVariable.pm view on Meta::CPAN
{code => 2,
description => "EA Affected"},
],
AffStatDef => {name => 'EA',
diseaseAlleleFreq => 0.001,
pen11 => 0.0,
pen12 => 0.0,
pen22 => 1.0,
AffStatElements => [ {code => 0,
type => "Unknown",
formula => "'EA Aff Stat' = 0"},
{code => 1,
type => "Unaffected",
formula => "'EA Aff Stat' = 1"},
{code => 2,
type => "Affected",
formula => "'EA Aff Stat' = 2"},
],
},
LCDef => {name => 'EA Default LC',
LiabilityClasses => [ {code => 0,
description => "Unknown Age",
pen11 => 0.0,
pen12 => 0.0,
pen22 => 1.0,
formula => "'Age' = ''"},
{code => 1,
description => "Age less than 40",
pen11 => 0.0,
pen12 => 0.2,
pen22 => 1.0,
formula => "'Age' < 40"},
{code => 2,
description => "Age less than 50",
pen11 => 0.0,
pen12 => 0.3,
pen22 => 1.0,
formula => "'Age' < 50"},
{code => 3,
description => "Age grater than or equal to 60",
pen11 => 0.0,
pen12 => 0.4,
pen22 => 1.0,
formula => "'Age' >= 60"},
],
},
) ;
See the GenPerl Tutorial for more information.
=head1 DESCRIPTION
StudyVariable objects represent definitions of physical traits, affection
status loci, environmental exposure, or drug treatments.
doc/Read.html view on Meta::CPAN
$param{dateCreated} = $$arrRef[2] ;
$param{dateModified} = $$arrRef[3] ;
$param{comment} = $$arrRef[4] ;
$category = $param{category} = $$arrRef[5] ;
$format = $param{format} = $$arrRef[6] ;
$param{isXLinked} = $$arrRef[7] ;
defined $$arrRef[8] and $param{description} = $$arrRef[8] ;
# CodeDerivation data
if ($format eq "Code") {
if ($category eq "StaticLiabilityClass") {
$sth = $dbh->prepare("select codeDerivationID, code, description, formula
from CodeDerivation
where studyVariableID = $id") ;
$sth->execute() ;
$sth1 = $dbh->prepare("select pen11, pen12, pen22, malePen1, malePen2
from StaticLCPenetrance
where cdID = ?") ;
while ($arrRef = $sth->fetchrow_arrayref()) {
%init = () ;
$sth1->execute($$arrRef[0]) ;
($p11, $p12, $p22, $mp1, $mp2) = $sth1->fetchrow_array() ;
$init{code} = $$arrRef[1] ;
$init{pen11} = $p11 ;
$init{pen12} = $p12 ;
$init{pen22} = $p22 ;
defined $mp1 and $init{malePen1} = $mp1 ;
defined $mp2 and $init{malePen2} = $mp2 ;
defined $$arrRef[2] and $init{description} = $$arrRef[2] ;
defined $$arrRef[3] and $init{formula} = $$arrRef[3] ;
push(@codesList, { %init }) ;
}
} else {
$sth = $dbh->prepare("select code, description, formula
from CodeDerivation
where studyVariableID = $id") ;
$sth->execute() ;
while ($arrRef = $sth->fetchrow_arrayref()) {
%init = () ;
$init{code} = $$arrRef[0] ;
defined $$arrRef[1] and $init{description} = $$arrRef[1] ;
defined $$arrRef[2] and $init{formula} = $$arrRef[2] ;
push(@codesList, { %init }) ;
}
}
}
defined $codesList[0] and $param{Codes} = \@codesList ;
</PRE>
<PRE>
if ($category =~ /AffectionStatus$/) {
# AffectionStatus data
doc/Read.html view on Meta::CPAN
if ( defined ($arrRef = $sth->fetchrow_arrayref()) ) {
%init = () ;
$init{name} = $$arrRef[0] ;
$init{diseaseAlleleFreq} = $$arrRef[1] ;
$init{pen11} = $$arrRef[2] ;
$init{pen12} = $$arrRef[3] ;
$init{pen22} = $$arrRef[4] ;
defined $$arrRef[5] and $init{malePen1} = $$arrRef[5] ;
defined $$arrRef[6] and $init{malePen2} = $$arrRef[6] ;
# Elements
$sth1 = $dbh->prepare("select code, type, formula
from AffectionStatusElement
where asDefID = $$arrRef[7]") ;
$sth1->execute() ;
while ($arrRef1 = $sth1->fetchrow_arrayref()) {
push(@aseList, {code => $$arrRef1[0],
type => $$arrRef1[1],
formula => $$arrRef1[2]}) ;
}
$init{AffStatElements} = \@aseList ;
$param{AffStatDef} = { %init } ;
}
}</PRE>
<PRE>
$sv = new Genetics::StudyVariable(%param) ;
</PRE>
<PRE>
doc/StudyVariable.html view on Meta::CPAN
{code => 2,
description => "EA Affected"},
],
AffStatDef => {name => 'EA',
diseaseAlleleFreq => 0.001,
pen11 => 0.0,
pen12 => 0.0,
pen22 => 1.0,
AffStatElements => [ {code => 0,
type => "Unknown",
formula => "'EA Aff Stat' = 0"},
{code => 1,
type => "Unaffected",
formula => "'EA Aff Stat' = 1"},
{code => 2,
type => "Affected",
formula => "'EA Aff Stat' = 2"},
],
},
LCDef => {name => 'EA Default LC',
LiabilityClasses => [ {code => 0,
description => "Unknown Age",
pen11 => 0.0,
pen12 => 0.0,
pen22 => 1.0,
formula => "'Age' = ''"},
{code => 1,
description => "Age less than 40",
pen11 => 0.0,
pen12 => 0.2,
pen22 => 1.0,
formula => "'Age' < 40"},
{code => 2,
description => "Age less than 50",
pen11 => 0.0,
pen12 => 0.3,
pen22 => 1.0,
formula => "'Age' < 50"},
{code => 3,
description => "Age grater than or equal to 60",
pen11 => 0.0,
pen12 => 0.4,
pen22 => 1.0,
formula => "'Age' >= 60"},
],
},
) ;
</PRE>
<PRE>
See the GenPerl Tutorial for more information.</PRE>
<P>
<HR>
<H1><A NAME="description">DESCRIPTION</A></H1>
doc/createGenPerlSchema.sql view on Meta::CPAN
dateUpperBound DATE NULL,
PRIMARY KEY( studyVariableID )
);
CREATE TABLE CodeDerivation
(
codeDerivationID MEDIUMINT UNSIGNED AUTO_INCREMENT NOT NULL,
studyVariableID BIGINT UNSIGNED NOT NULL,
code TINYINT(2) NOT NULL,
description VARCHAR(255) NULL,
formula TEXT NULL,
PRIMARY KEY( codeDerivationID ),
INDEX( studyVariableID )
);
CREATE TABLE AffectionStatusDefinition
(
asDefID MEDIUMINT UNSIGNED AUTO_INCREMENT NOT NULL,
studyVariableID BIGINT UNSIGNED NOT NULL,
name VARCHAR(120) NOT NULL,
diseaseAlleleFreq DECIMAL(7,6) NOT NULL,
doc/createGenPerlSchema.sql view on Meta::CPAN
PRIMARY KEY( asDefID ),
INDEX( studyVariableID )
);
CREATE TABLE AffectionStatusElement
(
asElementID MEDIUMINT UNSIGNED AUTO_INCREMENT NOT NULL,
asDefID MEDIUMINT UNSIGNED NOT NULL,
code TINYINT(1) NOT NULL,
type ENUM("Unknown", "Unaffected", "Affected") NOT NULL,
formula TEXT NULL,
PRIMARY KEY( asElementID ),
INDEX( asDefID )
);
CREATE TABLE StaticLCPenetrance
(
cdID MEDIUMINT UNSIGNED NOT NULL,
pen11 DECIMAL(7,6) NOT NULL,
pen12 DECIMAL(7,6) NOT NULL,
pen22 DECIMAL(7,6) NOT NULL,
doc/createGenPerlSchema.sql view on Meta::CPAN
(
lcID MEDIUMINT UNSIGNED AUTO_INCREMENT NOT NULL,
lcDefID MEDIUMINT UNSIGNED NOT NULL,
code TINYINT(2) NOT NULL,
description VARCHAR(255) NULL,
pen11 DECIMAL(7,6) NOT NULL,
pen12 DECIMAL(7,6) NOT NULL,
pen22 DECIMAL(7,6) NOT NULL,
malePen1 DECIMAL(7,6) NULL,
malePen2 DECIMAL(7,6) NULL,
formula TEXT NULL,
PRIMARY KEY( lcID ),
INDEX( lcDefID )
);
CREATE TABLE Phenotype
(
ptID BIGINT UNSIGNED NOT NULL,
subjectID BIGINT UNSIGNED NOT NULL,
svID BIGINT UNSIGNED NOT NULL,
numberValue DECIMAL(12,5) NULL,
doc/gptutorial.html view on Meta::CPAN
<td width="14%"> <font face="Courier New, Courier, mono" color="maroon" > upperBound </font></td>
<td width="45%"> Float (12,5) OR String ("YYYY-MM-DD") </td>
<td width="40%"> Only appropriate for StudyVariables with a format of Number or Date. </td>
</tr>
<tr bgcolor="#d9d5d5">
<td width="14%"> <font face="Courier New, Courier, mono" color="maroon" > Codes </font></td>
<td width="45%"> Array pointer to a list of hash pointers. The referenced hashes should have the following key/value structure: <br>
<font face="Courier New, Courier, mono" color="#000080" > code </font> => Integer (<= 99) <br>
<font face="Courier New, Courier, mono" color="maroon" > description </font> => String (<= 255 characters) <br>
<font face="Courier New, Courier, mono" color="maroon" > formula </font> => String (<= 65535 characters) </td>
<td width="40%"> Only appropriate for StudyVariables with a format of Code or DerivedCode. A formula is required for each Code definition if the format is DerivedCode</td>
</tr>
<tr bgcolor="#d9d5d5">
<td width="14%"> <font face="Courier New, Courier, mono" color="maroon" > AffStatDef </font></td>
<td width="45%"> Hash pointer. The referenced hash should have the following key/value structure: <br>
<font face="Courier New, Courier, mono" color="#000080" > name </font> => String (<= 120 characters) <br>
<font face="Courier New, Courier, mono" color="#000080" > diseaseAlleleFreq </font> => Float (7,6) <br>
<font face="Courier New, Courier, mono" color="#000080" > pen11 </font> => Float (7,6) <br>
<font face="Courier New, Courier, mono" color="#000080" > pen12 </font> => Float (7,6) <br>
<font face="Courier New, Courier, mono" color="#000080" > pen22 </font> => Float (7,6) <br>
doc/gptutorial.html view on Meta::CPAN
{code => 2,
description => "EA Affected"},
],
AffStatDef => {name => 'EA',
diseaseAlleleFreq => 0.001,
pen11 => 0.0,
pen12 => 0.0,
pen22 => 1.0,
AffStatElements => [ {code => 0,
type => "Unknown",
formula => "'EA Aff Stat' = 0"},
{code => 1,
type => "Unaffected",
formula => "'EA Aff Stat' = 1"},
{code => 2,
type => "Affected",
formula => "'EA Aff Stat' = 2"},
],
},
LCDef => {name => 'EA Default LC',
LiabilityClasses => [ {code => 0,
description => "Unknown Age",
pen11 => 0.0,
pen12 => 0.0,
pen22 => 1.0,
formula => "'Age' = ''"},
{code => 1,
description => "Age less than 40",
pen11 => 0.0,
pen12 => 0.2,
pen22 => 1.0,
formula => "'Age' < 40"},
{code => 2,
description => "Age less than 50",
pen11 => 0.0,
pen12 => 0.3,
pen22 => 1.0,
formula => "'Age' < 50"},
{code => 3,
description => "Age grater than or equal to 60",
pen11 => 0.0,
pen12 => 0.4,
pen22 => 1.0,
formula => "'Age' >= 60"},
],
},
) ;
</pre>
<HR>
<H2><a name="subject"></a>Genetics::Object::Subject</H2>
<table border="0" width="99%" cellspacing="1" cellpadding="2">