Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ensembl
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
ensembl
Commits
ff5a50b6
Commit
ff5a50b6
authored
16 years ago
by
Daniel Rios
Browse files
Options
Downloads
Patches
Plain Diff
added method new_fast to allow quick creation of objects avoiding rearrange method
parent
320d2a58
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/Bio/EnsEMBL/Attribute.pm
+41
-28
41 additions, 28 deletions
modules/Bio/EnsEMBL/Attribute.pm
with
41 additions
and
28 deletions
modules/Bio/EnsEMBL/Attribute.pm
+
41
−
28
View file @
ff5a50b6
=head1 LICENSE
#
# Ensembl module for Bio::EnsEMBL::Attribute
#
# Copyright (c) 2004 Ensembl
#
# You may distribute this module under the same terms as perl itself
Copyright (c) 1999-2009 The European Bioinformatics Institute and
Genome Research Limited. All rights reserved.
This software is distributed under a modified Apache license.
For license details, please see
http://www.ensembl.org/info/about/code_licence.html
=head1 CONTACT
Please email comments or questions to the public Ensembl
developers list at <ensembl-dev@ebi.ac.uk>.
Questions may also be sent to the Ensembl help desk at
<helpdesk@ensembl.org>.
=cut
# POD documentation - main docs before the code
=head1 NAME
...
...
@@ -26,17 +15,16 @@ Bio::EnsEMBL::Attribute - A generic Attribute class.
use Bio::EnsEMBL::Attribute;
my $attribute = Bio::EnsEMBL::Attribute->new(
-CODE => 'myCode',
-NAME => 'My Attribute',
-DESCRIPTION => 'This is my attribute description.',
-VALUE => '10023'
);
my $attribute = Bio::EnsEMBL::Attribute->new
(-CODE => 'myCode',
-NAME => 'My Attribute',
-DESCRIPTION => 'This is my attribute description.',
-VALUE => '10023');
print $attrib->name(),
"\n";
print $attrib->code(),
"\n";
print $attrib->name(), "\n";
print $attrib->code(), "\n";
print $attrib->description(), "\n";
print $attrib->value(),
"\n";
print $attrib->value(), "\n";
=head1 DESCRIPTION
...
...
@@ -46,6 +34,13 @@ associated with seq_regions (and their Slices) and MiscFeatures.
Also see B<Bio::EnsEMBL::Slice>, B<Bio::EnsEMBL::MiscFeature> and
B<Bio::EnsEMBL::DBSQL::AttributeAdaptor>.
=head1 CONTACT
This modules is part of the Ensembl project http://www.ensembl.org
Questions can be posted to the ensembl-dev mailing list:
ensembl-dev@ebi.ac.uk
=head1 METHODS
=cut
...
...
@@ -88,10 +83,28 @@ sub new {
return
bless
{'
code
'
=>
$code
,
'
name
'
=>
$name
,
'
description
'
=>
$desc
,
'
description
'
=>
$desc
,
'
value
'
=>
$value
},
$class
;
}
=head2 new_fast
Arg [1] : hashref to be blessed
Description: Construct a new Bio::EnsEMBL::Attribute using the hashref.
Exceptions : none
Returntype : Bio::EnsEMBL::Attribute
Caller : general, subclass constructors
Status : Stable
=cut
sub
new_fast
{
my
$class
=
shift
;
my
$hashref
=
shift
;
return
bless
$hashref
,
$class
;
}
=head2 code
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment