Commit fdbd34a3 authored by Olivier Sallou's avatar Olivier Sallou

Imported Upstream version 0.20000

parent 8140c020
0.20000 2012-07-06 15:04:34 America/New_York
* added Bio::Chado::NaturalDiversity::Reports, which has some canned
reporting functions for working with natural diversity data (nmenda)
* added greate_genotypeprops to Genetic::Genotype (nmenda)
* added stock_phenotypes_rs, recursive_phenotypes_rs,
stock_genotypes_rs, and stock_project_phenotypes to Stock::Stock
(nmenda)
0.10010 2011-11-08 16:39:15 America/New_York
* fix (in cleanup) errors related to schema object DESTROY function
......
......@@ -65,6 +65,7 @@ doc/slides/intro/template/tt2/slide.css
doc/slides/intro/template/tt2/slide.html
doc/slides/intro/template/tt2/start.html
doc/slides/intro/template/tt2/top.html
lib/Bio/Chado/NaturalDiversity/Reports.pm
lib/Bio/Chado/Schema.pm
lib/Bio/Chado/Schema/Result/CellLine.pod
lib/Bio/Chado/Schema/Result/CellLine/CellLine.pm
......
......@@ -4,7 +4,7 @@
"Robert Buels <rbuels@cpan.org>"
],
"dynamic_config" : 0,
"generated_by" : "Dist::Zilla version 4.200003, CPAN::Meta::Converter version 2.112150",
"generated_by" : "Dist::Zilla version 4.300014, CPAN::Meta::Converter version 2.120921",
"license" : [
"perl_5"
],
......@@ -16,31 +16,34 @@
"prereqs" : {
"configure" : {
"requires" : {
"ExtUtils::MakeMaker" : "6.31"
"ExtUtils::MakeMaker" : "6.30"
}
},
"runtime" : {
"requires" : {
"Bio::PrimarySeq" : 0,
"Bio::Range" : 0,
"Bio::PrimarySeq" : "0",
"Bio::Range" : "0",
"Bio::Root::Version" : "1.005002",
"Carp" : 0,
"Carp::Clan" : 0,
"DBIx::Class" : 0,
"DBIx::Class::Core" : 0,
"DBIx::Class::ResultSet" : 0,
"DBIx::Class::Schema" : 0,
"DBIx::Class::Tree::NestedSet" : "0.07"
"Carp" : "0",
"Carp::Clan" : "0",
"DBIx::Class" : "0",
"DBIx::Class::Core" : "0",
"DBIx::Class::ResultSet" : "0",
"DBIx::Class::Schema" : "0",
"DBIx::Class::Tree::NestedSet" : "0.07",
"base" : "0",
"strict" : "0",
"warnings" : "0"
}
},
"test" : {
"requires" : {
"DBD::SQLite" : "1.14",
"FindBin" : 0,
"FindBin" : "0",
"SQL::Translator" : "0.11005",
"Test::Exception" : "0.27",
"Test::More" : "0.87",
"Test::Warn" : 0
"Test::Warn" : "0"
}
}
},
......@@ -57,93 +60,93 @@
"web" : "http://github.com/rbuels/bio-chado-schema"
}
},
"version" : "0.10010",
"version" : "0.20000",
"x_Dist_Zilla" : {
"plugins" : [
{
"class" : "Dist::Zilla::Plugin::GatherDir",
"name" : "@Filter/@Basic/GatherDir",
"version" : "4.200003"
"version" : "4.300014"
},
{
"class" : "Dist::Zilla::Plugin::PruneCruft",
"name" : "@Filter/@Basic/PruneCruft",
"version" : "4.200003"
"version" : "4.300014"
},
{
"class" : "Dist::Zilla::Plugin::ManifestSkip",
"name" : "@Filter/@Basic/ManifestSkip",
"version" : "4.200003"
"version" : "4.300014"
},
{
"class" : "Dist::Zilla::Plugin::MetaYAML",
"name" : "@Filter/@Basic/MetaYAML",
"version" : "4.200003"
"version" : "4.300014"
},
{
"class" : "Dist::Zilla::Plugin::License",
"name" : "@Filter/@Basic/License",
"version" : "4.200003"
"version" : "4.300014"
},
{
"class" : "Dist::Zilla::Plugin::ExtraTests",
"name" : "@Filter/@Basic/ExtraTests",
"version" : "4.200003"
"version" : "4.300014"
},
{
"class" : "Dist::Zilla::Plugin::ExecDir",
"name" : "@Filter/@Basic/ExecDir",
"version" : "4.200003"
"version" : "4.300014"
},
{
"class" : "Dist::Zilla::Plugin::ShareDir",
"name" : "@Filter/@Basic/ShareDir",
"version" : "4.200003"
"version" : "4.300014"
},
{
"class" : "Dist::Zilla::Plugin::MakeMaker",
"name" : "@Filter/@Basic/MakeMaker",
"version" : "4.200003"
"version" : "4.300014"
},
{
"class" : "Dist::Zilla::Plugin::Manifest",
"name" : "@Filter/@Basic/Manifest",
"version" : "4.200003"
"version" : "4.300014"
},
{
"class" : "Dist::Zilla::Plugin::TestRelease",
"name" : "@Filter/@Basic/TestRelease",
"version" : "4.200003"
"version" : "4.300014"
},
{
"class" : "Dist::Zilla::Plugin::ConfirmRelease",
"name" : "@Filter/@Basic/ConfirmRelease",
"version" : "4.200003"
"version" : "4.300014"
},
{
"class" : "Dist::Zilla::Plugin::UploadToCPAN",
"name" : "@Filter/@Basic/UploadToCPAN",
"version" : "4.200003"
"version" : "4.300014"
},
{
"class" : "Dist::Zilla::Plugin::MetaConfig",
"name" : "@Filter/MetaConfig",
"version" : "4.200003"
"version" : "4.300014"
},
{
"class" : "Dist::Zilla::Plugin::MetaJSON",
"name" : "@Filter/MetaJSON",
"version" : "4.200003"
"version" : "4.300014"
},
{
"class" : "Dist::Zilla::Plugin::PkgVersion",
"name" : "@Filter/PkgVersion",
"version" : "4.200003"
"version" : "4.300014"
},
{
"class" : "Dist::Zilla::Plugin::PodSyntaxTests",
"name" : "@Filter/PodSyntaxTests",
"version" : "4.200003"
"version" : "4.300014"
},
{
"class" : "Dist::Zilla::Plugin::NoTabsTests",
......@@ -153,12 +156,12 @@
{
"class" : "Dist::Zilla::Plugin::PodCoverageTests",
"name" : "@Filter/PodCoverageTests",
"version" : "4.200003"
"version" : "4.300014"
},
{
"class" : "Dist::Zilla::Plugin::MetaResources",
"name" : "@Filter/MetaResources",
"version" : "4.200003"
"version" : "4.300014"
},
{
"class" : "Dist::Zilla::Plugin::Authority",
......@@ -173,12 +176,12 @@
{
"class" : "Dist::Zilla::Plugin::AutoPrereqs",
"name" : "@Filter/AutoPrereqs",
"version" : "4.200003"
"version" : "4.300014"
},
{
"class" : "Dist::Zilla::Plugin::NextRelease",
"name" : "@Filter/NextRelease",
"version" : "4.200003"
"version" : "4.300014"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
......@@ -189,7 +192,7 @@
}
},
"name" : "Prereqs",
"version" : "4.200003"
"version" : "4.300014"
},
{
"class" : "Dist::Zilla::Plugin::Prereqs",
......@@ -200,27 +203,37 @@
}
},
"name" : "TestRequires",
"version" : "4.200003"
"version" : "4.300014"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":InstallModules",
"version" : "4.200003"
"version" : "4.300014"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":IncModules",
"version" : "4.300014"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":TestFiles",
"version" : "4.200003"
"version" : "4.300014"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ExecFiles",
"version" : "4.200003"
"version" : "4.300014"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":ShareFiles",
"version" : "4.200003"
"version" : "4.300014"
},
{
"class" : "Dist::Zilla::Plugin::FinderCode",
"name" : ":MainModule",
"version" : "4.300014"
}
],
"zilla" : {
......@@ -228,7 +241,7 @@
"config" : {
"is_trial" : "0"
},
"version" : "4.200003"
"version" : "4.300014"
}
},
"x_authority" : "cpan:RBUELS"
......
......@@ -10,9 +10,9 @@ build_requires:
Test::More: 0.87
Test::Warn: 0
configure_requires:
ExtUtils::MakeMaker: 6.31
ExtUtils::MakeMaker: 6.30
dynamic_config: 0
generated_by: 'Dist::Zilla version 4.200003, CPAN::Meta::Converter version 2.112150'
generated_by: 'Dist::Zilla version 4.300014, CPAN::Meta::Converter version 2.120921'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
......@@ -29,81 +29,84 @@ requires:
DBIx::Class::ResultSet: 0
DBIx::Class::Schema: 0
DBIx::Class::Tree::NestedSet: 0.07
base: 0
strict: 0
warnings: 0
resources:
bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=Bio-Chado-Schema
homepage: http://gmod.org/wiki/Bio::Chado::Schema
repository: http://github.com/solgenomics/bio-chado-schema
version: 0.10010
version: 0.20000
x_Dist_Zilla:
plugins:
-
class: Dist::Zilla::Plugin::GatherDir
name: '@Filter/@Basic/GatherDir'
version: 4.200003
version: 4.300014
-
class: Dist::Zilla::Plugin::PruneCruft
name: '@Filter/@Basic/PruneCruft'
version: 4.200003
version: 4.300014
-
class: Dist::Zilla::Plugin::ManifestSkip
name: '@Filter/@Basic/ManifestSkip'
version: 4.200003
version: 4.300014
-
class: Dist::Zilla::Plugin::MetaYAML
name: '@Filter/@Basic/MetaYAML'
version: 4.200003
version: 4.300014
-
class: Dist::Zilla::Plugin::License
name: '@Filter/@Basic/License'
version: 4.200003
version: 4.300014
-
class: Dist::Zilla::Plugin::ExtraTests
name: '@Filter/@Basic/ExtraTests'
version: 4.200003
version: 4.300014
-
class: Dist::Zilla::Plugin::ExecDir
name: '@Filter/@Basic/ExecDir'
version: 4.200003
version: 4.300014
-
class: Dist::Zilla::Plugin::ShareDir
name: '@Filter/@Basic/ShareDir'
version: 4.200003
version: 4.300014
-
class: Dist::Zilla::Plugin::MakeMaker
name: '@Filter/@Basic/MakeMaker'
version: 4.200003
version: 4.300014
-
class: Dist::Zilla::Plugin::Manifest
name: '@Filter/@Basic/Manifest'
version: 4.200003
version: 4.300014
-
class: Dist::Zilla::Plugin::TestRelease
name: '@Filter/@Basic/TestRelease'
version: 4.200003
version: 4.300014
-
class: Dist::Zilla::Plugin::ConfirmRelease
name: '@Filter/@Basic/ConfirmRelease'
version: 4.200003
version: 4.300014
-
class: Dist::Zilla::Plugin::UploadToCPAN
name: '@Filter/@Basic/UploadToCPAN'
version: 4.200003
version: 4.300014
-
class: Dist::Zilla::Plugin::MetaConfig
name: '@Filter/MetaConfig'
version: 4.200003
version: 4.300014
-
class: Dist::Zilla::Plugin::MetaJSON
name: '@Filter/MetaJSON'
version: 4.200003
version: 4.300014
-
class: Dist::Zilla::Plugin::PkgVersion
name: '@Filter/PkgVersion'
version: 4.200003
version: 4.300014
-
class: Dist::Zilla::Plugin::PodSyntaxTests
name: '@Filter/PodSyntaxTests'
version: 4.200003
version: 4.300014
-
class: Dist::Zilla::Plugin::NoTabsTests
name: '@Filter/NoTabsTests'
......@@ -111,11 +114,11 @@ x_Dist_Zilla:
-
class: Dist::Zilla::Plugin::PodCoverageTests
name: '@Filter/PodCoverageTests'
version: 4.200003
version: 4.300014
-
class: Dist::Zilla::Plugin::MetaResources
name: '@Filter/MetaResources'
version: 4.200003
version: 4.300014
-
class: Dist::Zilla::Plugin::Authority
name: '@Filter/Authority'
......@@ -127,11 +130,11 @@ x_Dist_Zilla:
-
class: Dist::Zilla::Plugin::AutoPrereqs
name: '@Filter/AutoPrereqs'
version: 4.200003
version: 4.300014
-
class: Dist::Zilla::Plugin::NextRelease
name: '@Filter/NextRelease'
version: 4.200003
version: 4.300014
-
class: Dist::Zilla::Plugin::Prereqs
config:
......@@ -139,7 +142,7 @@ x_Dist_Zilla:
phase: runtime
type: requires
name: Prereqs
version: 4.200003
version: 4.300014
-
class: Dist::Zilla::Plugin::Prereqs
config:
......@@ -147,26 +150,34 @@ x_Dist_Zilla:
phase: test
type: requires
name: TestRequires
version: 4.200003
version: 4.300014
-
class: Dist::Zilla::Plugin::FinderCode
name: ':InstallModules'
version: 4.200003
version: 4.300014
-
class: Dist::Zilla::Plugin::FinderCode
name: ':IncModules'
version: 4.300014
-
class: Dist::Zilla::Plugin::FinderCode
name: ':TestFiles'
version: 4.200003
version: 4.300014
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ExecFiles'
version: 4.200003
version: 4.300014
-
class: Dist::Zilla::Plugin::FinderCode
name: ':ShareFiles'
version: 4.200003
version: 4.300014
-
class: Dist::Zilla::Plugin::FinderCode
name: ':MainModule'
version: 4.300014
zilla:
class: Dist::Zilla::Dist::Builder
config:
is_trial: 0
version: 4.200003
version: 4.300014
x_authority: cpan:RBUELS
......@@ -4,43 +4,46 @@ use warnings;
use ExtUtils::MakeMaker 6.31;
use ExtUtils::MakeMaker 6.30;
my %WriteMakefileArgs = (
'ABSTRACT' => 'A standard DBIx::Class layer for the Chado database schema.',
'AUTHOR' => 'Robert Buels <rbuels@cpan.org>',
'BUILD_REQUIRES' => {
'DBD::SQLite' => '1.14',
'FindBin' => '0',
'SQL::Translator' => '0.11005',
'Test::Exception' => '0.27',
'Test::More' => '0.87',
'Test::Warn' => '0'
"ABSTRACT" => "A standard DBIx::Class layer for the Chado database schema.",
"AUTHOR" => "Robert Buels <rbuels\@cpan.org>",
"BUILD_REQUIRES" => {
"DBD::SQLite" => "1.14",
"FindBin" => 0,
"SQL::Translator" => "0.11005",
"Test::Exception" => "0.27",
"Test::More" => "0.87",
"Test::Warn" => 0
},
'CONFIGURE_REQUIRES' => {
'ExtUtils::MakeMaker' => '6.31'
"CONFIGURE_REQUIRES" => {
"ExtUtils::MakeMaker" => "6.30"
},
'DISTNAME' => 'Bio-Chado-Schema',
'EXE_FILES' => [],
'LICENSE' => 'perl',
'NAME' => 'Bio::Chado::Schema',
'PREREQ_PM' => {
'Bio::PrimarySeq' => '0',
'Bio::Range' => '0',
'Bio::Root::Version' => '1.005002',
'Carp' => '0',
'Carp::Clan' => '0',
'DBIx::Class' => '0',
'DBIx::Class::Core' => '0',
'DBIx::Class::ResultSet' => '0',
'DBIx::Class::Schema' => '0',
'DBIx::Class::Tree::NestedSet' => '0.07'
"DISTNAME" => "Bio-Chado-Schema",
"EXE_FILES" => [],
"LICENSE" => "perl",
"NAME" => "Bio::Chado::Schema",
"PREREQ_PM" => {
"Bio::PrimarySeq" => 0,
"Bio::Range" => 0,
"Bio::Root::Version" => "1.005002",
"Carp" => 0,
"Carp::Clan" => 0,
"DBIx::Class" => 0,
"DBIx::Class::Core" => 0,
"DBIx::Class::ResultSet" => 0,
"DBIx::Class::Schema" => 0,
"DBIx::Class::Tree::NestedSet" => "0.07",
"base" => 0,
"strict" => 0,
"warnings" => 0
},
'VERSION' => '0.10010',
'test' => {
'TESTS' => 't/*.t t/Cv/*.t t/Phylogeny/*.t t/Sequence/*.t t/Stock/*.t'
"VERSION" => "0.20000",
"test" => {
"TESTS" => "t/*.t t/Cv/*.t t/Phylogeny/*.t t/Sequence/*.t t/Stock/*.t"
}
);
......
name = Bio-Chado-Schema
author = Robert Buels <rbuels@cpan.org>
license = Perl_5
version = 0.10010
version = 0.20000
copyright_holder = Robert Buels
copyright_year = 2011
......
package Bio::Chado::NaturalDiversity::Reports;
BEGIN {
$Bio::Chado::NaturalDiversity::Reports::AUTHORITY = 'cpan:RBUELS';
}
{
$Bio::Chado::NaturalDiversity::Reports::VERSION = '0.20000';
}
=head1 NAME
Bio::Chado::NaturalDiversity::Reports
=head1 SYNOPSIS
use Bio::Chado::NaturalDiversity::Reports
my $sreport = Bio::Chado::NaturalDiversity::Reports->new;
my $data = $sreport->phenotypes_by_trait($phenotypes);
=head1 DESCRIPTION
A collection of functions for formatting Chado stock related data in
different data structures which can be useful for passing to different
programs and software. Because the Chado stock table is the key for
storing samples subjected to genotyping and phenotyping experiments,
it interacts with several other Chado modules, such as
NaturalDiversity for storing the experiment data, Project for storing
the metadata about the experiments, Phenotype for the phenotyping
values Genotype for the genotyping values.
This module generates several reports for easier access to such data.
Note that all data reports heavily rely on the Natural Diversity
schema. The results in each report may differ based on how the
experiment data is stored in the databse.
There is no one correct way
of loading phenotyping and genotyping data in this module, however
there are some examples for 'best practice' in the GMOD Wiki
(http://gmod.org/wiki/Chado_Natural_Diversity_Module)
=head1 METHODS
=cut
use strict;
use warnings;
=head2 new
Make a new Reports object.
=cut
sub new {
bless {}, shift;
}
=head2 phenotypes_by_trait
Usage: $self->phenotypes_by_trait($phenotype_rs , { %args } )
Desc: generate a report of phenotype values by trait name/accession
Args: an arrayref of L<Bio::Chado::Schema::Result::Phenotype::Phenotype> ResultSets
[optional] list of args to filter the report. Currently supported args are
Ret: arrayref of tab delimited data
=cut
sub phenotypes_by_trait {
my $self = shift;
my $phenotypes = shift;
my $phen_hashref; #hashref of hashes for the phenotype data
my %cvterms ; #hash for unique cvterms
my $replicate = 1;
my $cvterm_name;
foreach my $rs (@$phenotypes) {
while ( my $r = $rs->next ) {
my $observable = $r->get_column('observable');
next if !$observable;
no warnings 'uninitialized';
if ($cvterm_name eq $observable) { $replicate ++ ; } else { $replicate = 1 ; }
$cvterm_name = $observable;
my $accession = $r->get_column('accession');
my $db_name = $r->get_column('db_name');