Mercurial > repos > mahtabm > ensembl
comparison variant_effect_predictor/Bio/Biblio/MedlineArticle.pm @ 0:1f6dce3d34e0
Uploaded
| author | mahtabm |
|---|---|
| date | Thu, 11 Apr 2013 02:01:53 -0400 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:1f6dce3d34e0 |
|---|---|
| 1 # $Id: MedlineArticle.pm,v 1.5 2002/10/22 07:45:11 lapp Exp $ | |
| 2 # | |
| 3 # BioPerl module for Bio::Biblio::MedlineArticle | |
| 4 # | |
| 5 # Cared for by Martin Senger <senger@ebi.ac.uk> | |
| 6 # For copyright and disclaimer see below. | |
| 7 | |
| 8 # POD documentation - main docs before the code | |
| 9 | |
| 10 =head1 NAME | |
| 11 | |
| 12 Bio::Biblio::MedlineArticle - Representation of a MEDLINE article | |
| 13 | |
| 14 =head1 SYNOPSIS | |
| 15 | |
| 16 $obj = new Bio::Biblio::MedlineArticle (-mesh_headings => ...); | |
| 17 | |
| 18 # how are Mesh terms stored: | |
| 19 use Data::Dumper; | |
| 20 print Data::Dumper->Dump ( [$obj->mesh_headings], ['MeshHeadings']); | |
| 21 | |
| 22 It produces (something like) this: | |
| 23 'MeshHeadings' => [ | |
| 24 { 'descriptorName' => 'Adult' }, | |
| 25 { 'descriptorName' => 'Cardiovascular Diseases', | |
| 26 'subHeadings' => [ { 'subHeading' => 'etiology' }, | |
| 27 { 'majorTopic' => 'Y', | |
| 28 'subHeading' => 'mortality' } ] }, | |
| 29 { 'descriptorName' => 'Child Development', | |
| 30 'subHeadings' => [ { 'majorTopic' => 'Y', | |
| 31 'subHeading' => 'physiology' } ] }, | |
| 32 { 'descriptorName' => 'Human' }, | |
| 33 ] | |
| 34 | |
| 35 =head1 DESCRIPTION | |
| 36 | |
| 37 A storage object for a MEDLINE article. | |
| 38 See its place in the class hierarchy in | |
| 39 http://industry.ebi.ac.uk/openBQS/images/bibobjects_perl.gif | |
| 40 | |
| 41 =head2 Attributes | |
| 42 | |
| 43 The following attributes are specific to this class | |
| 44 (however, you can also set and get all attributes defined in the parent classes): | |
| 45 | |
| 46 affiliation | |
| 47 chemicals type: array ref of hashes | |
| 48 citation_owner | |
| 49 comment_ins type: array ref of hashes | |
| 50 comment_ons type: array ref of hashes | |
| 51 date_of_electronic_publication | |
| 52 erratum_fors type: array ref of hashes | |
| 53 erratum_in type: array ref of hashes | |
| 54 gene_symbols | |
| 55 general_notes type: array ref of hashes | |
| 56 grant_list_complete | |
| 57 grants type: array ref of hashes | |
| 58 medline_date | |
| 59 medline_id | |
| 60 medline_page | |
| 61 mesh_headings type: array ref of hashes | |
| 62 number_of_references | |
| 63 original_report_ins type: array ref of hashes | |
| 64 other_abstracts type: array ref of hashes | |
| 65 other_ids type: array ref of hashes | |
| 66 other_languages | |
| 67 pmid | |
| 68 republished_froms type: array ref of hashes | |
| 69 republished_ins type: array ref of hashes | |
| 70 retraction_ins type: array ref of hashes | |
| 71 retraction_ofs type: array ref of hashes | |
| 72 season | |
| 73 status | |
| 74 summary_for_patients_ins type: array ref of hashes | |
| 75 update_ins type: array ref of hashes | |
| 76 update_ofs type: array ref of hashes | |
| 77 vernacular_title | |
| 78 | |
| 79 =head1 SEE ALSO | |
| 80 | |
| 81 =over | |
| 82 | |
| 83 =item * | |
| 84 | |
| 85 OpenBQS home page: http://industry.ebi.ac.uk/openBQS | |
| 86 | |
| 87 =item * | |
| 88 | |
| 89 Comments to the Perl client: http://industry.ebi.ac.uk/openBQS/Client_perl.html | |
| 90 | |
| 91 =back | |
| 92 | |
| 93 =head1 FEEDBACK | |
| 94 | |
| 95 =head2 Mailing Lists | |
| 96 | |
| 97 User feedback is an integral part of the evolution of this and other | |
| 98 Bioperl modules. Send your comments and suggestions preferably to | |
| 99 the Bioperl mailing list. Your participation is much appreciated. | |
| 100 | |
| 101 bioperl-l@bioperl.org - General discussion | |
| 102 http://bioperl.org/MailList.shtml - About the mailing lists | |
| 103 | |
| 104 =head2 Reporting Bugs | |
| 105 | |
| 106 Report bugs to the Bioperl bug tracking system to help us keep track | |
| 107 of the bugs and their resolution. Bug reports can be submitted via | |
| 108 email or the web: | |
| 109 | |
| 110 bioperl-bugs@bioperl.org | |
| 111 http://bugzilla.bioperl.org/ | |
| 112 | |
| 113 =head1 AUTHORS | |
| 114 | |
| 115 Heikki Lehvaslaiho (heikki@ebi.ac.uk), | |
| 116 Martin Senger (senger@ebi.ac.uk) | |
| 117 | |
| 118 =head1 COPYRIGHT | |
| 119 | |
| 120 Copyright (c) 2002 European Bioinformatics Institute. All Rights Reserved. | |
| 121 | |
| 122 This module is free software; you can redistribute it and/or modify | |
| 123 it under the same terms as Perl itself. | |
| 124 | |
| 125 =head1 DISCLAIMER | |
| 126 | |
| 127 This software is provided "as is" without warranty of any kind. | |
| 128 | |
| 129 =cut | |
| 130 | |
| 131 | |
| 132 # Let the code begin... | |
| 133 | |
| 134 | |
| 135 package Bio::Biblio::MedlineArticle; | |
| 136 use strict; | |
| 137 use vars qw(@ISA); | |
| 138 | |
| 139 use Bio::Biblio::Article; | |
| 140 | |
| 141 @ISA = qw(Bio::Biblio::Article); | |
| 142 | |
| 143 # | |
| 144 # a closure with a list of allowed attribute names (these names | |
| 145 # correspond with the allowed 'get' and 'set' methods); each name also | |
| 146 # keep what type the attribute should be (use 'undef' if it is a | |
| 147 # simple scalar) | |
| 148 # | |
| 149 { | |
| 150 my %_allowed = | |
| 151 ( | |
| 152 _affiliation => undef, | |
| 153 _chemicals => 'ARRAY', | |
| 154 _citation_owner => undef, | |
| 155 _comment_ins => 'ARRAY', | |
| 156 _comment_ons => 'ARRAY', | |
| 157 _date_of_electronic_publication => undef, | |
| 158 _erratum_fors => 'ARRAY', | |
| 159 _erratum_ins => 'ARRAY', | |
| 160 _gene_symbols => undef, | |
| 161 _general_notes => 'ARRAY', | |
| 162 _grant_list_complete => undef, | |
| 163 _grants => 'ARRAY', | |
| 164 _medline_date => undef, | |
| 165 _medline_id => undef, | |
| 166 _medline_page => undef, | |
| 167 _mesh_headings => 'ARRAY', | |
| 168 _number_of_references => undef, | |
| 169 _original_report_ins => 'ARRAY', | |
| 170 _other_abstracts => 'ARRAY', | |
| 171 _other_ids => 'ARRAY', | |
| 172 _other_languages => undef, | |
| 173 _pmid => undef, | |
| 174 _republished_froms => 'ARRAY', | |
| 175 _republished_ins => 'ARRAY', | |
| 176 _retraction_ins => 'ARRAY', | |
| 177 _retraction_ofs => 'ARRAY', | |
| 178 _season => undef, | |
| 179 _status => undef, | |
| 180 _summary_for_patients_ins => 'ARRAY', | |
| 181 _update_ins => 'ARRAY', | |
| 182 _update_ofs => 'ARRAY', | |
| 183 _vernacular_title => undef, | |
| 184 ); | |
| 185 | |
| 186 # return 1 if $attr is allowed to be set/get in this class | |
| 187 sub _accessible { | |
| 188 my ($self, $attr) = @_; | |
| 189 exists $_allowed{$attr} or $self->SUPER::_accessible ($attr); | |
| 190 } | |
| 191 | |
| 192 # return an expected type of given $attr | |
| 193 sub _attr_type { | |
| 194 my ($self, $attr) = @_; | |
| 195 if (exists $_allowed{$attr}) { | |
| 196 return $_allowed{$attr}; | |
| 197 } else { | |
| 198 return $self->SUPER::_attr_type ($attr); | |
| 199 } | |
| 200 } | |
| 201 } | |
| 202 | |
| 203 | |
| 204 1; | |
| 205 __END__ |
