Genetics

 view release on metacpan or  search on metacpan

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


  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

  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

  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


=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


=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


=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

=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

=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


=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


=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


=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


=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


=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


=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

<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.637 second using v1.01-cache-2.11-cpan-4d4bc49f3ae )