Bio::Gonzales::SummarizedExperiment - represent experimental matrix-like data (assay) with features and sample info
http://bioconductor.org/packages/devel/bioc/vignettes/SummarizedExperiment/inst/doc/SummarizedExperiment.html
my $assay = $se->assay;
Return the assay of the summarized experiment.
my $col_data = $se->col_data; $se->col_data(\@col_data);
Set the NA value if the object is stored. Internally, while in memory, undef will be used. So this value will only have an effect if data is read or written somewhere. Default is Bio::Gonzales::SummarizedExperiment::NA_VALUE.
Bio::Gonzales::SummarizedExperiment::NA_VALUE
my $assay = $se->data;
A alias for assay.
$se = $se->aggregate_by_idcs(\@idcs, sub { ... }, \@col_names)
The callback gets passed the grouping keys, rows and row indices. $_ is set to the group has that comes from the (internally used) $se->group function.
$_
$se->group
sub { my ($key, $rows, $row_idcs) = @_; my $group = $_; }
$se = $se->aggregate_by_names(\@names, sub { ... }, \@col_names)
my $I = $se->col_idx_map; my %I = $se->col_idx_map;
Returns a hash that maps the column names to their column index. col_idx_map is context sensitve and returns a hash in list context and a hash reference in scalar context.
Merge two SummarizedExperiment objects.
use Bio::Gonzales::SummarizedExperiment; my $se_x = Bio::Gonzales::SummarizedExperiment->new( assay => [ [ 1, "homer", "simpson" ], [ 2, "bart", "simpson" ], [ 3, "lisa simpson" ] ], col_names => [qw(user_id first_name surname)] ); my $se_y = Bio::Gonzales::SummarizedExperiment->new( assay => [ [ 1, 120 ], [ 2, 20 ] ], col_names => [qw(user_id weight_kg)] ); # inner join by default my $merged_se = $se_x->merge($se_y, { by => [ 'user_id' ] }); # user_id first_name surname weight_kg # 1 homer simpson 120 # 2 bart simpson 20 # Lisa is missing, because the $se_y lacks weight information.
Apply a callback to each row. $se-row_apply(@args)> is equivalent to $se-apply(1, @args)>
$se-
use Bio::Gonzales::SummarizedExperiment; my $se = Bio::Gonzales::SummarizedExperiment->new( assay => [ [ 1, "homer", "simpson" ], [ 2, "bart", "simpson" ], [ 3, "lisa", "simpson" ] ], col_names => [qw(user_id first_name surname)] ); # WITHOUT MODIFYING THE SUMMARIZEDEXPERIMENT OBJECT $se->row_apply(sub { (my $name = $_->[1]) =~ s/[ra]/z/; $name }); # [ 'homez', 'bzrt', 'lisz' ]; $se->extract_col_by_idx(1); # [ 'homer', 'bart', 'lisa' ]; # WITH MODIFYING THE SUMMARIZEDEXPERIMENT OBJECT $se->row_apply(sub { $_->[1] =~ s/[ra]/z/; $_->[1] }); # [ 'homez', 'bzrt', 'lisz' ]; $se->extract_col_by_idx(1); # [ 'homez', 'bzrt', 'lisz' ];
$se->slice_by_idcs(\@idcs); $se->slice_by_idcs([0,5,13]);
Extract a column-"slice" from the summarized experiment. The indices select the columns.
my $se = Bio::Gonzales::SummarizedExperiment->slurp_assay($source, \%params); my $se = Bio::Gonzales::SummarizedExperiment->slurp_assay("data.csv", { header => 1, sep => ';' });
Create a new summarized experiment from matrix/tabular data.
By convention,
constructor or function arguments ending in ? are optional
?
methods ending in ! will modify the object it is called on
!
jw bargsten, <jwb at cpan dot org>
<jwb at cpan dot org>
2 POD Errors
The following errors were encountered while parsing the POD:
Unterminated C< ... > sequence
To install Bio::Gonzales, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bio::Gonzales
CPAN shell
perl -MCPAN -e shell install Bio::Gonzales
For more information on module installation, please visit the detailed CPAN module installation guide.