Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

swiss::de(3pm) [debian man page]

SWISS::DE(3pm)						User Contributed Perl Documentation					    SWISS::DE(3pm)

Name
       SWISS::DE.pm

Description
       Each DE object represents one protein name. The container object for all names of an entry is SWISS::DEs

Inherits from
       SWISS::BaseClass

Attributes
       "text"
	   The raw text of the protein name.  Note: as SwissKnife works with both new and old DE line formats, for backward rcompatibility, with
	   both formats everything is parsed and stored the same way as it was with the old format. Therefore the raw text for a name of type 'EC'
	   e.g.  6.3.5.5 will be "EC 6.3.5.5" (instead of "6.3.5.5"). Other strings only present in old DE line text format ('precursor' flag and
	   'Allergen', 'antigen' strings) are also added in the stored raw text.  The safe method to get the DE text is "toText" (with both the
	   new and old DE line format), which for "EC=6.3.5.5" (new DE line format), will return "6.3.5.5" (DE object of 'EC' type). For "(EC
	   6.3.5.5)" (old DE line format), will return "EC 6.3.5.5"

       "category"
	   The category of the protein name: 'RecName', 'AltName', 'SubName' (TrEMBL only)

	    DE	 RecName: Full=CAD protein;
	    DE		  Short=CAD;

	    Here both names (DE objects), are of category 'RecName'

	   Category can be set/modified using "category(string)"

	   Note: with the old DE line format, this field is undef

       "type"
	   The type of the protein name: 'Full', 'Short', 'EC' 'Allergen', 'CD_antigen', 'Biotech','INN'

	    DE	 RecName: Full=CAD protein;
	    DE		  Short=CAD;

	    Here the first name (DE object), is of type 'Full', the second one
	    is of type 'Short'

	   Type can be set/modified using "type(string)"

	   Note: with the old DE line format, this field is undef

   Standard methods
       new
       fromText
       toText ($addParen)
	    addParen : (meaningful only with old DE line format) if set to true,
	    the name will be surrounded by parentheses, but not the evidence
	    tags, e.g. : '(UMP SYNTHASE){E1}'.

Evidence Tags
       Each protein name (DE object) can have independent evidence tags.

	DE   SubName: Full=Histone H3{EI1};
	DE	      EC=3.4.21.9{EC3};
	DE   AltName: Full=Enterokinase{EC5};

       The following methods have their prototype defined in SWISS::BaseClass instead of the direct parent of SWISS::DEs, SWISS::ListBase :

	addEvidenceTag
	deleteEvidenceTags
	getEvidenceTags
	getEvidenceTagsString
	hasEvidenceTag
	setEvidenceTags

       example :

	$evidenceTag = $entry->Stars->EV->addEvidence('P', 'DEfix', '-', 'v1.3');
	$entry->DEs->head->addEvidenceTag($evidenceTag);

       The easiest way to read the evidence tags of a protein name is to use c<getEvidenceTagsString> that will return the evidence tags as a
       string with the enclosing {} brackets. If there are no evidence tags, will return an empty string.

POD ERRORS
Hey! The above document had some coding errors, which are explained below: Around line 165: =back doesn't take any parameters, but you said =back =head1 Methods perl v5.10.1 2008-07-17 SWISS::DE(3pm)

Check Out this Related Man Page

SWISS::BaseClass(3pm)					User Contributed Perl Documentation				     SWISS::BaseClass(3pm)

NAME
SWISS::BaseClass DESCRIPTION
This class is designed to impliment many of the properties that you expect in inheritance. All the housekeeping functions are defined in this module. See the notes on use for a description of how to make use of it. Functions new Returns a new SWISS::BaseClass object. rebless Converts a base class into your class! Call as $self->rebless($class) where $self is a base class object. It returns $self, reblessed, with the correct member variables. initialize Override this in each derived class to provide class specific initialization. For example, initialize may put arrays into member variables that need them. You must provide an initialize function. reformat Some line objects are implementing "lazy writing". This means that on writing an entry, they are only reformatted if they have been modified. The method reformat forces an object to be reformatted even if its content has not been modified. This may be useful e.g. to make sure the current formatting rules are applied. setEvidenceTags @array Sets the evidence tags of the object to the list passed in @array. addEvidenceTag string Adds the evidence tag to the object. deleteEvidenceTag string Deletes the evidence tag from the object. hasEvidenceTag string returns true if the object has the evidence tag. getEvidenceTags returns the array of evidence tags of the object Check4Clashes This function checks your classes member variable list for clashes with any class that it inherits from (any class that can(_containsFields) returns true on!). If it detects that in any base class that any data members have been already defined, it dies with a listing of the variables already used. It stops searching a root of an inheritance hierachy when it can find no baseclasses that support _containsFields. It will find all clashes in an entire inheritance tree. So in the inheritance hierachy of SWISS::BaseClass -> A -> B - > E SWISS::BaseClass -> C -> D -/ where E is the most derived class, if E contains names that clash with A members and names that clash with B members, both the A and B member clashes will be reported. If there were clashes with B and C, say, then again, all of the clashes would be reported. _containsFields This function is responsible for comparing a classes fields with the set in the calling package. This implimentation will work for cases where all of the classes that contribute fields are derived from SWISS::BaseClass. You may wish to make your own class fit this interface, so what follows is an interface API. _containsFields assumes that the first argument is the package that it is being called in. The following arguments are taken to be a list of fields which to check are not found in members of the current package. It should return either "undef" or a reference to an array of name clashes in the format "package::variable". It should call it's self for each parental class that supports this function. So it would look something like _containsFields { my $class = shift; my @toCheck = @_; foreach @toCheck { check that they are not in me. If they are, add them to the list of clashes to return. } add all base class clashes to your list of clashes if there were name clashes return a reference to them otherwise return undef } equal If two objects are equal, it returns true. Warning: This funktion compares two objects using a simple dump in Perl format, see Data::Dumper module. The comparison also takes private variables into account. Therefore: If the method 'equal' returns true, the objects are guaranteed to be equal, but it might return false although the two objects are equal in they public attributes. copy Returns a "deep copy" of the object. A skeletal derived class package myDerived; use vars qw ( @ISA %fields ); BEGIN { @ISA = ('SWISS::BaseClass'); %fields = ( 'i' => 1, 'hash' => undef ); myDerived->check4Clashes(); } sub new { print "myDerived::new(@_) "; my $class = shift; my $self = new SWISS::BaseClass; $self->rebless ($class); return $self; } sub initialize { my $self = shift; $self->{'hash'} = {}; } A class derived from myDerived would just substitute the name myDerived for SWISS::BaseClass. Hey presto - all sorted! perl v5.10.1 2006-01-26 SWISS::BaseClass(3pm)
Man Page