1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205
|
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>SWISS::GNs</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:support@ActiveState.com" />
</head>
<body>
<ul id="index">
<li><a href="#Name">Name</a></li>
<li><a href="#Description">Description</a></li>
<li><a href="#Inherits-from">Inherits from</a></li>
<li><a href="#Attributes">Attributes</a></li>
<li><a href="#Methods">Methods</a>
<ul>
<li><a href="#Standard-methods">Standard methods</a></li>
<li><a href="#Reading-Writing-methods">Reading/Writing methods</a></li>
</ul>
</li>
<li><a href="#TRANSITION">TRANSITION</a></li>
</ul>
<h1 id="Name">Name</h1>
<p>SWISS::GNs.pm</p>
<h1 id="Description">Description</h1>
<p><b>SWISS::GNs</b> represents the GN lines within an SWISS-PROT + TrEMBL entry as specified in the user manual http://www.expasy.org/sprot/userman.html . The GNs object is a container object which holds a list of SWISS::GeneGroup objects.</p>
<h1 id="Inherits-from">Inherits from</h1>
<p>SWISS::ListBase.pm</p>
<h1 id="Attributes">Attributes</h1>
<dl>
<dt id="list"><code>list</code></dt>
<dd>
<pre><code> Each list element is a SWISS::GeneGroup object.</code></pre>
</dd>
<dt id="and-deprecated-for-old-format-only"><code>and</code> <i>(deprecated, for old format only)</i></dt>
<dd>
<pre><code> Delimiter used between genes. Defaults to " AND ".</code></pre>
</dd>
<dt id="or-deprecated-for-old-format-only"><code>or</code> <i>(deprecated, for old format only)</i></dt>
<dd>
<pre><code> Delimiter used between gene names. Defaults to " OR ".</code></pre>
</dd>
</dl>
<h1 id="Methods">Methods</h1>
<h2 id="Standard-methods">Standard methods</h2>
<dl>
<dt id="new">new</dt>
<dd>
</dd>
<dt id="fromText">fromText</dt>
<dd>
</dd>
<dt id="toText">toText</dt>
<dd>
</dd>
</dl>
<h2 id="Reading-Writing-methods">Reading/Writing methods</h2>
<dl>
<dt id="text-newText">text [($newText)]</dt>
<dd>
<p>Sets the text of the GN line to the parameter if it is present, and returns the (unwrapped) text of the line. Also sets 'and' and 'or' delimiters to the first occurrences of the words "OR" and "AND" in the line, conserving the case.</p>
</dd>
<dt id="lowercase-deprecated-for-old-format-only">lowercase <i>(deprecated, for old format only)</i></dt>
<dd>
<p>Sets the GNs::and and GNs::or delimiters to their lower case values.</p>
</dd>
<dt id="uppercase-deprecated-for-old-format-only">uppercase <i>(deprecated, for old format only)</i></dt>
<dd>
<p>Sets the GNs::and and GNs::or delimiters to their upper case values.</p>
</dd>
<dt id="getFirst">getFirst()</dt>
<dd>
<p>Returns first gene name in gene line</p>
</dd>
<dt id="getTags-target">getTags($target)</dt>
<dd>
<p>Returns evidence tags associated with $target</p>
<p>$target is a string</p>
</dd>
<dt id="isPresent-target">isPresent($target)</dt>
<dd>
<p>Returns 1 if $target is present in the GN line</p>
<p>$target is a string</p>
</dd>
<dt id="needsReCasing-target">needsReCasing($target)</dt>
<dd>
<p>If $target is present in the GN line, but wrongly cased, method returns the matching name in its current case</p>
<p>$target is a string</p>
</dd>
<dt id="replace-newName-target-evidenceTag">replace($newName, $target, $evidenceTag)</dt>
<dd>
<p>Replaces the first GN object in the GN line whose text attribute is $target with a new GN object whose text attribute is set to $newName and whose evidenceTags attribute is is set using values set by splitting $evidenceTag on /, / (as name is not being changed, programs should keep old tag and add new tag). Does nothing if $target is not found.</p>
</dd>
<dt id="delete-target">delete($target)</dt>
<dd>
<p>Removes synonym/single-member gene group matching $target. Note that if a "Name" is deleted, the first "Synonym" will be promoted to "Name"</p>
</dd>
<dt id="addAsNewSynonym-newName-target-evidenceTag-location">addAsNewSynonym($newName, $target, $evidenceTag, $location)</dt>
<dd>
<p>Adds a new GN object (with text attribute set to new $newName, and evidenceTags attribute set to ($evidenceTag)), as a synonym to the first gene group in which $target is a gene name. Does nothing if $target is not found. Will not add a duplicate gene name. $location determines where in gene group new object is added: if $location == 1, 2, 3, ..., new object added in the 1st, 2nd, 3rd, ... position; if $location == 0, new object added before $target; if $location == -1, new object added after $target (default); if $location == -2, new object added at end of gene group. Note that if the new synonym is inserted in the first postion, it will become the "Name" and the previous "Name" will be downgraded to first "Synonym"</p>
</dd>
<dt id="addAsNewGeneGroup-newName-target-evidenceTag-location">addAsNewGeneGroup($newName, $target, $evidenceTag, $location)</dt>
<dd>
<p>Adds a new GeneGroup object, comprising 1 GN object (with text attribute set to new $newName, and evidenceTags attribute set to ($evidenceTag)). Will not add a duplicate gene name. $location and $target determine where in GNs line new group is added: if $location == 1, 2, 3, ..., new object added in the 1st, 2nd, 3rd, ... position; if $location == 0, new object added before $target; if $location == -1, new object added after $target (default); if $location == -2, new object added at end of GNs line. Does nothing if $target is not found, and $location == 0 or -1; otherwise $target does not need to be set.</p>
</dd>
<dt id="replaceGeneGroup-newGeneGroup-target">replaceGeneGroup($newGeneGroup, $target)</dt>
<dd>
<p>Replaces the first gene group containing $target with $newGeneGroup. Creating the $newGeneGroup correctly is the user's responsibility</p>
</dd>
<dt id="getGeneGroup-target">getGeneGroup($target)</dt>
<dd>
<p>Returns the first gene group that contains $target</p>
</dd>
<dt id="setToOr">setToOr()</dt>
<dd>
<p>Retruns a new GNs object, but with all GNs objects in a single gene group. Needed when adding 'C' to 'A and B', when the relationship of 'C' to 'A' and 'B' is unknown: the universal use of ' or ' is the default delimeter for TrEMBL entries</p>
</dd>
</dl>
<h1 id="TRANSITION">TRANSITION</h1>
<p>The format of the GN line will change in 2004 from:</p>
<pre><code> GN (CYSA1 OR CYSA OR RV3117 OR MT3199 OR MTCY164.27) AND (CYSA2 OR
GN RV0815C OR MT0837 OR MTV043.07C).</code></pre>
<p>to:</p>
<pre><code> <span class="variable">GN</span> <span class="variable">Name</span><span class="operator">=</span><span class="variable">CysA1</span><span class="operator">;</span> <span class="variable">Synonyms</span><span class="operator">=</span><span class="variable">CysA</span><span class="operator">;</span> <span class="variable">OrderedLocusNames</span><span class="operator">=</span><span class="variable">Rv3117</span><span class="operator">,</span> <span class="variable">MT3199</span><span class="operator">;</span>
<span class="variable">GN</span> <span class="variable">ORFNames</span><span class="operator">=</span><span class="variable">MtCY164</span><span class="number">.27</span><span class="operator">;</span>
<span class="variable">GN</span> <span class="keyword">and</span>
<span class="variable">GN</span> <span class="variable">Name</span><span class="operator">=</span><span class="variable">CysA2</span><span class="operator">;</span> <span class="variable">OrderedLocusNames</span><span class="operator">=</span><span class="variable">Rv0815c</span><span class="operator">,</span> <span class="variable">MT0837</span><span class="operator">;</span> <span class="variable">ORFNames</span><span class="operator">=</span><span class="variable">MTV043</span><span class="number">.07</span><span class="variable">c</span><span class="operator">;</span>
</code></pre>
<p>This module supports both formats. To convert an entry from the old to the new format, do:</p>
<pre><code> <span class="variable">$entry</span><span class="operator">-></span><span class="variable">GNs</span><span class="operator">-></span><span class="variable">is_old_format</span><span class="operator">(</span><span class="number">0</span><span class="operator">);</span>
</code></pre>
</body>
</html>
|