view release on metacpan or search on metacpan
Genetics/API/DB/Update.pm view on Meta::CPAN
142143144145146147148149150151152153154155156157158159160161162
Function : Update a Genetics::Object::Cluster object in the database.
Argument : The Genetics::Object::Cluster object to be updated.
Returns : 1 on success,
undef
otherwise.
Scope : Public
Comments : Cluster.clusterType cannot be modified, so this method does
not touch the Cluster table.
=cut
sub updateCluster {
my($self, $cluster) = @_ ;
my($id, $actualType, $sth, $listPtr, $objRef) ;
my $dbh = $self->{dbh} ;
$DEBUG and carp " ->[updateCluster] $cluster." ;
$id = $cluster->field("id") ;
( $actualType ) = $dbh->selectrow_array("select objType from Object
where id = $id") ;
if ( $actualType ne "Cluster") {
Genetics/API/DB/Update.pm view on Meta::CPAN
189190191192193194195196197198199200201202203204205206207208209
Argument : The Genetics::Object::Subject object to be updated.
Returns : 1 on success,
undef
otherwise.
Scope : Public
Comments : If Subject.kindredID is modified, the approprate updates are also
made to KindredSubject. In other words, the reciprocal
relationships Kindred->Subjects and Subject->Kindred are kept in
synch.
=cut
sub updateSubject {
my($self, $subject) = @_ ;
my($id, $actualType, $sth, $sth1, $orgPtr, $orgID, $kindredRef,
$momRef, $dadRef, $sex, $date, $isProband) ;
my $dbh = $self->{dbh} ;
$DEBUG and carp " ->[updateSubject] $subject." ;
$id = $subject->field("id") ;
( $actualType ) = $dbh->selectrow_array("select objType from Object
where id = $id") ;
Genetics/API/DB/Update.pm view on Meta::CPAN
316317318319320321322323324325326327328329330331332333334335336
Returns : 1 on success,
undef
otherwise.
Scope : Public
Comments : If the set of Subjects contained in a Kindred is modified,
the approprate updates are also made to the Subject.kindredID
field of
each
of the Subjects. In other words, the reciprocal
relationships Kindred->Subjects and Subject->Kindred are kept
in synch. This only applies to primary Kindreds, of course.
=cut
sub updateKindred {
my($self, $kindred) = @_ ;
my($id, $actualType, $sth, $kindredRef, $subjRef, $subjListPtr, @subjIDs) ;
my $dbh = $self->{dbh} ;
$DEBUG and carp " ->[updateKindred] $kindred." ;
$id = $kindred->field("id") ;
( $actualType ) = $dbh->selectrow_array("select objType from Object
where id = $id") ;
if ( $actualType ne "Kindred") {
Genetics/API/DB/Update.pm view on Meta::CPAN
384385386387388389390391392393394395396397398399400401402403404=head2 updateMarker
Function : Update a Genetics::Object::Marker object in the database.
Argument : The Genetics::Object::Marker object to be updated.
Returns : 1 on success, undef otherwise.
Scope : Public
=cut
sub
updateMarker {
my
(
$self
,
$marker
) =
@_
;
my
(
$id
,
$actualType
,
$sth
,
$sth1
,
$chr
,
$orgPtr
,
$orgID
,
$seqPtr
,
$oldSeqID
,
$newSeqID
,
$ploidy
,
$polyType
,
$idx
,
$seq
,
$alleleListPtr
,
$allelePtr
,
$iscnListPtr
,
$iscnMapLocID
,
$iscnPtr
,
$iscnID
) ;
my
$dbh
=
$self
->{dbh} ;
$DEBUG
and carp
" ->[updateMarker] $marker"
;
$id
=
$marker
->field(
"id"
) ;
(
$actualType
) =
$dbh
->selectrow_array("
select
objType from Object
Genetics/API/DB/Update.pm view on Meta::CPAN
601602603604605606607608609610611612613614615616617618619620621=head2 updateSNP
Function : Update a Genetics::Object::SNP object in the database.
Argument : The Genetics::Object::SNP object to be updated.
Returns : 1 on success, undef otherwise.
Scope : Public
=cut
sub
updateSNP {
my
(
$self
,
$snp
) =
@_
;
my
(
$id
,
$actualType
,
$sth
,
$sth1
,
$chr
,
$orgPtr
,
$orgID
,
$seqPtr
,
$oldSeqID
,
$newSeqID
,
$ploidy
,
$type
,
$class
,
$idx
,
$conf
,
$method
,
$alleleListPtr
,
$allelePtr
,
$iscnListPtr
,
$iscnMapLocID
,
$iscnPtr
,
$iscnID
) ;
my
$dbh
=
$self
->{dbh} ;
$DEBUG
and carp
" ->[updateSNP] $snp"
;
$id
=
$snp
->field(
"id"
) ;
(
$actualType
) =
$dbh
->selectrow_array("
select
objType from Object
Genetics/API/DB/Update.pm view on Meta::CPAN
829830831832833834835836837838839840841842843844845846847848849=head2 updateGenotype
Function : Update a Genetics::Object::Genotype object in the database.
Argument : The Genetics::Object::Genotype object to be updated.
Returns : 1 on success, undef otherwise.
Scope : Public
=cut
sub
updateGenotype {
my
(
$self
,
$gt
) =
@_
;
my
(
$id
,
$actualType
,
$sth
,
$active
,
$icResult
,
$date
,
$acListPtr
,
$poID
,
$sthAC
,
$sthA
,
$sortOrder
,
$acPtr
,
$alleleID
,
$aaListPtr
,
$alleleCallID
) ;
my
$dbh
=
$self
->{dbh} ;
$DEBUG
and carp
" ->[updateGenotype] $gt"
;
$id
=
$gt
->field(
"id"
) ;
(
$actualType
) =
$dbh
->selectrow_array("
select
objType from Object
Genetics/API/DB/Update.pm view on Meta::CPAN
936937938939940941942943944945946947948949950951952953954955956=head2 updateStudyVariable
Function : Update a Genetics::Object::StudyVariable object in the database.
Argument : The Genetics::Object::StudyVariable object to be updated.
Returns : 1 on success, undef otherwise.
Scope : Public
Comments : StudyVariable.format cannot be modified.
=cut
sub
updateStudyVariable {
my
(
$self
,
$sv
) =
@_
;
my
(
$id
,
$format
,
$category
,
$actualType
,
$sth
,
$isX
,
$desc
,
$bound
,
$codesListPtr
,
$codePtr
,
$arrRef
,
$sth1
,
$cdID
,
$oldAsdID
,
$asdPtr
,
$asdID
,
$aseListPtr
,
$asePtr
,
$oldLcdID
,
$lcDefPtr
,
$lcdID
,
$lcListPtr
,
$lcPtr
) ;
my
$dbh
=
$self
->{dbh} ;
$DEBUG
and carp
" ->[updateStudyVariable] $sv"
;
$id
=
$sv
->field(
"id"
) ;
$format
=
$sv
->field(
"format"
) ;
Genetics/API/DB/Update.pm view on Meta::CPAN
112611271128112911301131113211331134113511361137113811391140114111421143114411451146=head2 updatePhenotype
Function : Update a Genetics::Object::Phenotype object in the database.
Argument : The Genetics::Object::Phenotype object to be updated.
Returns : 1 on success, undef otherwise.
Scope : Public
Comments :
=cut
sub
updatePhenotype {
my
(
$self
,
$pt
) =
@_
;
my
(
$id
,
$actualType
,
$sth
,
$active
,
$date
,
$svFormat
,
$valueFieldName
,
$aaListPtr
) ;
my
$dbh
=
$self
->{dbh} ;
$DEBUG
and carp
" ->[updatePhenotype] $pt"
;
$id
=
$pt
->field(
"id"
) ;
(
$actualType
) =
$dbh
->selectrow_array("
select
objType from Object
where id =
$id
") ;
if
(
$actualType
ne
"Phenotype"
) {
Genetics/API/DB/Update.pm view on Meta::CPAN
118911901191119211931194119511961197119811991200120112021203120412051206120712081209=head2 updateFrequencySource
Function : Update a Genetics::Object::FrequencySource object in the database.
Argument : The Genetics::Object::FrequencySource object to be updated.
Returns : 1 on success, undef otherwise.
Scope : Public
=cut
sub
updateFrequencySource {
my
(
$self
,
$fs
) =
@_
;
my
(
$id
,
$actualType
,
$sth
,
$sthA
,
$sthOF
,
$sthFSOF
,
$listPtr
,
$arrRef
,
$oafPtr
,
$allelePtr
,
$poID
,
$alleleID
,
$obsFreqID
,
$ohfPtr
,
$htID
) ;
my
$dbh
=
$self
->{dbh} ;
$DEBUG
and carp
" ->[updateFrequencySource] $fs"
;
$id
=
$fs
->field(
"id"
) ;
(
$actualType
) =
$dbh
->selectrow_array("
select
objType from Object
where id =
$id
") ;
Genetics/API/DB/Update.pm view on Meta::CPAN
133213331334133513361337133813391340134113421343134413451346134713481349135013511352=head2 updateHtMarkerCollection
Function : Update a Genetics::Object::HtMarkerCollection object in the database.
Argument : The Genetics::Object::HtMarkerCollection object to be updated.
Returns : 1 on success, undef otherwise.
Scope : Public
=cut
sub
updateHtMarkerCollection {
my
(
$self
,
$hmc
) =
@_
;
my
(
$id
,
$actualType
,
$sth
,
$units
,
$poListPtr
,
$sortOrder
,
$poPtr
) ;
my
$dbh
=
$self
->{dbh} ;
$DEBUG
and carp
" ->[updateHtMarkerCollection] $hmc"
;
$id
=
$hmc
->field(
"id"
) ;
(
$actualType
) =
$dbh
->selectrow_array("
select
objType from Object
where id =
$id
") ;
if
(
$actualType
ne
"HtMarkerCollection"
) {
Genetics/API/DB/Update.pm view on Meta::CPAN
138513861387138813891390139113921393139413951396139713981399140014011402140314041405=head2 updateHaplotype
Function : Update a Genetics::Object::Haplotype object in the database.
Argument : The Genetics::Object::Haplotype object to be updated.
Returns : 1 on success, undef otherwise.
Scope : Public
=cut
sub
updateHaplotype {
my
(
$self
,
$ht
) =
@_
;
my
(
$id
,
$actualType
,
$sth
,
$sthA
,
$hmcPtr
,
$hmcID
,
$alleleListPtr
,
$sortOrder
,
$allelePtr
,
$poID
,
$alleleID
) ;
my
$dbh
=
$self
->{dbh} ;
$DEBUG
and carp
" ->[updateHaplotype] $ht"
;
$id
=
$ht
->field(
"id"
) ;
(
$actualType
) =
$dbh
->selectrow_array("
select
objType from Object
where id =
$id
") ;
Genetics/API/DB/Update.pm view on Meta::CPAN
145714581459146014611462146314641465146614671468146914701471147214731474147514761477=head2 updateDNASample
Function : Update a Genetics::Object::DNASample object in the database.
Argument : The Genetics::Object::DNASample object to be updated.
Returns : 1 on success, undef otherwise.
Scope : Public
=cut
sub
updateDNASample {
my
(
$self
,
$sample
) =
@_
;
my
(
$id
,
$actualType
,
$sth
,
$date
,
$amt
,
$units
,
$conc
,
$subjPtr
,
$gtListPtr
,
$gtPtr
) ;
my
$dbh
=
$self
->{dbh} ;
$DEBUG
and carp
" ->[updateDNASample] $sample"
;
$id
=
$sample
->field(
"id"
) ;
(
$actualType
) =
$dbh
->selectrow_array("
select
objType from Object
where id =
$id
") ;
Genetics/API/DB/Update.pm view on Meta::CPAN
158515861587158815891590159115921593159415951596159715981599160016011602160316041605=head2 updateTissueSample
Function : Update a Genetics::Object::TissueSample object in the database.
Argument : The Genetics::Object::TissueSample object to be updated.
Returns : 1 on success, undef otherwise.
Scope : Public
=cut
sub
updateTissueSample {
my
(
$self
,
$sample
) =
@_
;
my
(
$id
,
$actualType
,
$sth
,
$date
,
$tissue
,
$amt
,
$units
,
$subjPtr
,
$dsListPtr
,
$dsPtr
) ;
my
$dbh
=
$self
->{dbh} ;
$DEBUG
and carp
" ->[updateTissueSample] $sample"
;
$id
=
$sample
->field(
"id"
) ;
(
$actualType
) =
$dbh
->selectrow_array("
select
objType from Object
where id =
$id
") ;
Genetics/API/DB/Update.pm view on Meta::CPAN
169516961697169816991700170117021703170417051706170717081709171017111712171317141715=head2 updateMap
Function : Update a Genetics::Object::Map object in the database.
Argument : The Genetics::Object::Map object to be updated.
Returns : 1 on success, undef otherwise.
Scope : Public
=cut
sub
updateMap {
my
(
$self
,
$map
) =
@_
;
my
(
$id
,
$actualType
,
$sth
,
$method
,
$units
,
$chr
,
$orgPtr
,
$orgID
,
$sortOrder
,
$omeListPtr
,
$omePtr
,
$soPtr
,
$soID
,
$omeName
) ;
my
$dbh
=
$self
->{dbh} ;
$DEBUG
and carp
" ->[updateMap] $map"
;
$id
=
$map
->field(
"id"
) ;
(
$actualType
) =
$dbh
->selectrow_array("
select
objType from Object
where id =
$id
") ;
doc/Update.html view on Meta::CPAN
214215216217218219220221222223224225226227228229230231232233234<PRE>
Function : Update a Genetics::Object::Phenotype object in the database.
Argument : The Genetics::Object::Phenotype object to be updated.
Returns : 1 on success,
undef
otherwise.
Scope : Public
Comments :
</PRE>
<PRE>
=cut</PRE>
<P>sub updatePhenotype {
my($self, $pt) = @_ ;
my($id, $actualType, $sth, $active, $date, $svFormat, $valueFieldName, $aaListPtr) ;
my $dbh = $self->{dbh} ;
</P>
<PRE>
$DEBUG and carp " ->[updatePhenotype] $pt" ;</PRE>
<PRE>
$id = $pt->field("id") ;
( $actualType ) = $dbh->selectrow_array("select objType from Object