SWISS::CCs(3pm) User Contributed Perl Documentation SWISS::CCs(3pm)Name
SWISS::CCs
Description
SWISS::CCs represents the CC lines within a Swiss-Prot or TrEMBL entry as specified in the user manual
http://www.expasy.org/sprot/userman.html . The CCs object is a container object which holds a list comprised of object of the type
SWISS::CC or derived classes (see below).
Code example
local $/="
//
";
while (<>) {
my $entry = SWISS::Entry-> fromText($_);
my @CCs = $entry -> CCs -> elements();
for my $CC (@CCs) {
if ($CC -> topic eq 'ALTERNATIVE PRODUCTS') {
# now can call methods of CCalt_prod
} elsif ($CC -> topic eq 'Copyright') {
# now can call methods of CCcopyright
} else {
# now can call methods of CC
}
}
}
Inherits from
SWISS::ListBase.pm
Attributes
"list"
Each list element is an object of one of the following classes, depending of the type of comment:
topic object
----------------------------------------
ALTERNATIVE PRODUCTS SWISS::CCalt_prod
RNA EDITING SWISS::CCrna_editing
BIOPHYSICOCHEMICAL PROPERTIES SWISS::CCbpc_properties
INTERACTION SWISS::CCinteraction
Copyright SWISS::CCcopyright
(all other topics) SWISS::CC
Methods
Standard methods
new
fromText
sort
Sort the CC block according to the order given in Swiss-Prot annotation note ANN017.
toText
update
Reading/Writing methods
ccTopic ($topic)
Returns true if entry contains a comment block with the specified topic.
copyright
Returns a string representation of the copyright text.
del (@patternList)
Deletes all comment elements whose topic matches the first element of the pattern list. The second element is the used to specify a
requirement for the comment to match as well.
get (@patternList)
An array is returned consisting of all comment elements elements whose topic matches any elements of the pattern list.
getObject (@patternList)
Same as get, but returns the results wrapped in a new ListBase object.
toString
Returns a string representation of the CCs object.
perl v5.10.1 2008-07-16 SWISS::CCs(3pm)
Check Out this Related Man Page
SWISS::Entry(3pm) User Contributed Perl Documentation SWISS::Entry(3pm)Name
SWISS::Entry
Description
Main module to handle SWISS-PROT entries. One Entry object represents one SWISS-PROT entry and provides an API for its modification.
The basic concept is the idea of lazy parsing. If an Entry object is created from the entry in flat file format, the text is simply stored
in the private text attribute of the entry object. The member objects of the entry are only created if they are dereferenced.
Example
This minimum program reads entries from a file in SWISS-PROT format and prints the primary accession number for each of the entries.
Attributes
The following attributes represent member objects. They can be accessed like e.g. $entry->IDs
IDs ID line object
ACs
DTs
DEs
GNs
OSs
OCs
Refs
The reference block object
CCs
KWs
DRs
FTs
Stars
Object for the annotator's section stored in the ** lines.
SQs The sequence object.
Methods
new Return a new Entry object
initialize
Initialise an Entry object and return it.
update [force]
Update an entry. The content of the member objects is written back into the private text attribute of the entry if necessary. If $force
is true, an update of all member objects is forced.
reformat
Reformat all fields of an entry.
fromText $text [, $fullParse[, $removeInternalComments]]
Create an Entry object from the text $text. If $fullParse is true, the entry is parsed at creation time. Otherwise the individual line
objects are only created if they are dereferenced. If $removeInternalComments is true, wild comments and indentation will be removed
from the text before the parsing is done. [NOTE: wild comments are lines starting with a double asterisk located outside the Stars
section, and indented lines are lines starting with spaces. Both are used internally by SWISS-PROT annotators during their work and
excluded from internal and external releases.]
toText [$insertInternalComments]
Return the entry in flat file text format. If internal comments and indentation have been removed as specified in the parameters to
fromText(), you may wish to reinsert them in the text output by setting $insertInternalComments to true.
toFasta
Return the entry in Fasta format.
equal
Returns True if two entries are equal, False otherwise
The following methods are provided for your convenience. They are shortcuts for methods of the individual line objects.
ID Returns the primary ID of the entry.
AC Returns the primary AC of the entry.
SQ Returns the sequence of the entry.
EV Returns the EV (evidence) object of an entry. SWISS-PROT internal method.
Data access methods
text
Returns the current text of the entry. Quick and dirty! No update of the text is performed before.
database_code
Is it a SWISS-PROT, TREMBL or TREMBLNEW entry? database_code tries to find it out. Return values are S for SWISS-PROT, 3 for TREMBL,
Q for TREMBLNEW, ? for unknown.
isFragment
Returns true if the DE line indicates a fragment, or of the entry contains a NON_CONS or NON_TER feature.
isCurated
Returns 1 if the entry is a curated entry, 0 otherwise.
SWISS-PROT internal use only.
perl v5.10.1 2008-07-16 SWISS::Entry(3pm)