.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Bio::Chado::Schema 3pm" .TH Bio::Chado::Schema 3pm "2020-12-04" "perl v5.32.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Bio::Chado::Schema \- A standard DBIx::Class layer for the Chado database schema. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Bio::Chado::Schema; \& \& my $chado = Bio::Chado::Schema\->connect( $dsn, $user, $password ); \& \& print "number of rows in feature table: ", \& $chado\->resultset(\*(AqSequence::Feature\*(Aq)\->count, \& "\en"; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This is a standard object-relational mapping layer for use with the \&\s-1GMOD\s0 Chado database schema. This layer is implemented with DBIx::Class, generated with the help of the very fine DBIx::Class::Schema::Loader module. .PP Chado is an open-source modular database schema for biological data. It is divided into several notional \*(L"modules\*(R", which are reflected in the namespace organization of this package. Note that modules in the Chado context refers to sets of tables, they are not modules in the Perl sense. .SH "GETTING STARTED" .IX Header "GETTING STARTED" To learn how to use this DBIx::Class \s-1ORM\s0 layer, a good starting point is the DBIx::Class::Manual. .SH "CHADO MODULES COVERED BY THIS PACKAGE" .IX Header "CHADO MODULES COVERED BY THIS PACKAGE" Bio::Chado::Schema::CellLine .PP Bio::Chado::Schema::Companalysis .PP Bio::Chado::Schema::Composite .PP Bio::Chado::Schema::Contact .PP Bio::Chado::Schema::Cv .PP Bio::Chado::Schema::Expression .PP Bio::Chado::Schema::General .PP Bio::Chado::Schema::Genetic .PP Bio::Chado::Schema::Library .PP Bio::Chado::Schema::Mage .PP Bio::Chado::Schema::Map .PP Bio::Chado::Schema::NaturalDiversity .PP Bio::Chado::Schema::Organism .PP Bio::Chado::Schema::Phenotype .PP Bio::Chado::Schema::Phylogeny .PP Bio::Chado::Schema::Project .PP Bio::Chado::Schema::Pub .PP Bio::Chado::Schema::Sequence .PP Bio::Chado::Schema::Stock .SH "CHADO VERSIONS" .IX Header "CHADO VERSIONS" Basically, \s-1BCS\s0 has always followed the \s-1SVN HEAD\s0 of Chado, since it's on a much faster release cycle than Chado itself. .PP Most users will not experience incompatibilities using the most recent versions of Bio::Chado::Schema with older Chado installations. However, if you encounter problems using Bio::Chado::Schema with an older Chado schema, you may want to try downgrading to an earlier version of Bio::Chado::Schema. The following rough equivalencies hold between \s-1BCS\s0 and Chado versions: .PP .Vb 4 \& Chado 1.2 \-\- BCS 0.09000 \& Chado 1.11 \-\- BCS 0.05801 \& Chado 1.1 \-\- BCS 0.05801 \& older \-\- BCS 0.03100 .Ve .SH "SCHEMA OBJECT METHODS" .IX Header "SCHEMA OBJECT METHODS" .ie n .SS "get_cvterm( ""$cv_name:$cvterm_name"" ) \s-1OR\s0 get_cvterm( $cv_name, $cvterm_name )" .el .SS "get_cvterm( ``$cv_name:$cvterm_name'' ) \s-1OR\s0 get_cvterm( \f(CW$cv_name\fP, \f(CW$cvterm_name\fP )" .IX Subsection "get_cvterm( $cv_name:$cvterm_name ) OR get_cvterm( $cv_name, $cvterm_name )" Convenience method to for finding single cvterms based on the text name of the \s-1CV\s0 and the term. The cvterm objects found with this method are cached in the schema object itself. Thus, you only use this function in the (relatively common) scenario in which you just need convenient access to a handful of different cvterms. .SS "get_cvterm_or_die" .IX Subsection "get_cvterm_or_die" Same as get_cvterm above, but dies with a \*(L"not found\*(R" message if the cvterm is not found. This is convenient when you don't want to be bothered with checking the return value of \f(CW\*(C`get_cvterm\*(C'\fR, which for me is most of the time. .SH "CLASS METHODS" .IX Header "CLASS METHODS" .ie n .SS "plugin_add_relationship( 'ChadoModule::SourceName', 'reltype', @args )" .el .SS "plugin_add_relationship( 'ChadoModule::SourceName', 'reltype', \f(CW@args\fP )" .IX Subsection "plugin_add_relationship( 'ChadoModule::SourceName', 'reltype', @args )" Sometimes application-specific plugins need to add relationships to the core \s-1BCS\s0 classes. It can't just be done normally from inside the classes of the plugins, you need to use this method. .PP Example: Bio::Chado::Schema::Result::MyApp::SpecialThing belongs_to the core \s-1BCS\s0 Organism::Organism, and you would like to be able to call \&\f(CW\*(C`$organism\->myapp_specialthings\*(C'\fR on organisms to get their associated SpecialThings. .PP .Vb 1 \& package Bio::Chado::Schema::MyApp::Result::SpecialThing; \& \& # ( do table and column definitions and so forth here ) \& \& Bio::Chado::Schema\->plugin_add_relationship( \& \*(AqOrganism::Organism\*(Aq, \*(Aqhas_many\*(Aq, ( \& "myapp_specialthings", \& "Bio::Chado::Schema::MyApp::Result::Foo", \& { "foreign.organism_id" => "self.organism_id" }, \& { cascade_copy => 0, cascade_delete => 0 }, \& ); \& ); .Ve .SH "AUTHOR" .IX Header "AUTHOR" Robert Buels, .SH "CONTRIBUTORS" .IX Header "CONTRIBUTORS" Naama Menda, .PP Aureliano Bombarely, .PP Jonathan \*(L"Duke\*(R" Leto,