Genetics

 view release on metacpan or  search on metacpan

Genetics/API/DB/Update.pm  view on Meta::CPAN

142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
  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

189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
  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

316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
  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

384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
=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

601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
=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

829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
=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

936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
=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

1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
=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

1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
=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

1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
=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

1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
=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

1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
=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

1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
=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

1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
=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

214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
<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-&gt;{dbh} ;
</P>
<PRE>
 
  $DEBUG and carp &quot; -&gt;[updatePhenotype] $pt&quot; ;</PRE>
<PRE>
  $id = $pt-&gt;field(&quot;id&quot;) ;
  ( $actualType ) = $dbh-&gt;selectrow_array(&quot;select objType from Object



( run in 0.408 second using v1.01-cache-2.11-cpan-26ccb49234f )