A test to ensure Bio::PrimarySeqI->trunc() doesn't use clone() for a Bio::Seq::RichSe...
[bioperl-live.git] / t / data / characters.nexml.old.xml
blobd6c40791d28fd3166a1d592a7eb8085d976005b0
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!--  
3     This file shows encodings of character state data.
4 -->
5 <!--
6     For more discussion of the structure of the root element,
7     refer to 'taxa.xml' 
8 -->
9 <nex:nexml 
10     version="0.8" 
11     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
12     xsi:schemaLocation="http://www.nexml.org/1.0 ../../nexml/xsd/nexml.xsd"
13     xmlns:nex="http://www.nexml.org/1.0"
14     xmlns="http://www.nexml.org/1.0">
15     
16     <!-- revision control metadata -->
17     <dict id="dict1">
18         <string id="author">$Author: rvos $</string>
19         <string id="date">$Date: 2009-03-13 01:57:49 -0400 (Fri, 13 Mar 2009) $</string>
20         <string id="header">$Header: $</string>
21         <string id="id">$Id: characters.xml 970 2009-03-13 05:57:49Z rvos $</string>
22         <string id="rev">$Rev: 970 $</string>
23         <string id="url">$URL: http://nexml.svn.sourceforge.net/svnroot/nexml/trunk/nexml/examples/characters.xml $</string>
24     </dict>          
25     
26     <!--  
27         For more discussion of the structure of the taxa
28         element, refer to 'taxa.xml'
29     -->    
30     <otus id="taxa1" label="Primary taxa block">
31         <otu id="t1" label="Homo sapiens"/>
32         <otu id="t2" label="Pan paniscus"/>
33         <otu id="t3" label="Pan troglodytes"/>
34         <otu id="t4" label="Gorilla gorilla"/>
35         <otu id="t5" label="Pongo pygmaeus"/>
36     </otus>
37     <!--
38         This characters block encodes restriction site data, i.e.
39         presence (1) / absence (0) observations. Because the states
40         that can occur - and what they mean - are known, there is no
41         'format' element to define states (see below for examples of
42         that). In this example, restriction site data is encoded
43         as a sequence of characters (rather than individual cells),
44         hence we use the subclass xsi:type="RestrictionSeqs".
45         
46         All characters blocks must have an id attribute and a 
47         reference to a taxa block that precedes it. In addition,
48         it may have the same additional attributes (label, xml:base, 
49         xml:lang, xml:id, xlink:href and class) as the taxa element. 
50     -->
51     <characters otus="taxa1" id="m1" xsi:type="nex:RestrictionSeqs">
52         <format>
53               <states id="states3">
54                 <state id="s1" symbol="0"/>
55                 <state id="s2" symbol="1"/>
56               </states>
57               <char id="c1" states="states3"/>
58               <char id="c2" states="states3"/>
59               <char id="c3" states="states3"/>
60               <char id="c4" states="states3"/>
61         </format>
62         <matrix>
63         <!--
64             The matrix element is a container for row elements. 
65         -->        
66             <!--
67                 Each row element must have an id and a reference
68                 to a taxon element that precedes it. 
69             -->
70             <row otu="t1" id="r1">
71                 <!--
72                     Because this characters block is an instance
73                     of the subclass RestrictionSeqs it contains
74                     'seq' elements with 1's and 0's. 
75                 -->
76                 <seq>0101</seq>
77             </row>
78             <row otu="t2" id="r2">
79                 <seq>0101</seq>
80             </row>
81             <row otu="t3" id="r3">
82                 <seq>0101</seq>
83             </row>
84             <row otu="t4" id="r4">
85                 <seq>0101</seq>
86             </row>
87             <row otu="t5" id="r5">
88                 <seq>0101</seq>
89             </row>
90         </matrix>
91     </characters>
92     <!--
93         This characters block encodes 'standard' categorical characters,
94         marked up granularly, as cells. 
95     -->
96     <characters otus="taxa1" id="m2" xsi:type="nex:StandardCells" label="Categorical characters">
97         <!--
98             Because categorical characters in instances of this subclass
99             don't have a priori known numbers of states, they must be
100             defined using the 'format' element. 
101         -->
102         <format>
103             <!--
104                 The first elements inside a format element are stateset
105                 definitions. In this example, there is a set of four
106                 states, each tagged with an id. The symbol attribute is
107                 a shorthand token. 
108             -->
109             <states id="states1">
110                 <state id="s1" symbol="1"/>                                
111                 <state id="s2" symbol="2"/>                
112                 <state id="s3" symbol="3"/>                 
113                 <polymorphic_state_set symbol="4" id="s4">                    
114                     <member state="s1"/>
115                     <member state="s2"/>                    
116                 </polymorphic_state_set>
117                 <uncertain_state_set symbol="5" id="s5">
118                     <member state="s3"/>
119                     <member state="s1"/>
120                 </uncertain_state_set>      
121             </states>
122             <!--
123                 The matrix in this example contains two columns, both
124                 referring to the same stateset - and so cells in both
125                 columns can occupy one of four states. 
126              -->
127             <char states="states1" id="c1"/>
128             <char states="states1" id="c2"/>
129         </format>
130         <!--
131             In this subclass, the matrix contains rows consisting of
132             individual cells. 
133         -->
134         <matrix>
135             <row id="r1" otu="t1">
136                 <!--
137                     Each cell must contain a reference to the column 
138                     it belongs to, and to a state allowed within that
139                     column. 
140                  -->
141                 <cell char="c1" state="s1"/>
142                 <cell char="c2" state="s2"/>
143             </row>
144             <row id="r2" otu="t2">
145                 <cell char="c1" state="s2"/>
146                 <cell char="c2" state="s2"/>
147             </row>
148             <row id="r3" otu="t3">
149                 <cell char="c1" state="s3"/>
150                 <cell char="c2" state="s4"/>
151             </row>
152             <row id="r4" otu="t4">
153                 <cell char="c1" state="s2"/>
154                 <cell char="c2" state="s3"/>
155             </row>
156             <row id="r5" otu="t5">
157                 <cell char="c1" state="s4"/>
158                 <cell char="c2" state="s1"/>
159             </row>
160         </matrix>
161     </characters>
162     <!--
163         This example is a characters block for continuous characters, marked
164         up as individual cells. 
165     -->
166     <characters otus="taxa1" id="m3" xsi:type="nex:ContinuousCells" label="Continuous characters">
167         <format>
168             <!--
169                 Because in this subclass, characters are marked up granularly -
170                 as cells - we must define the columns these cells belong to.
171                 Because this is continuous data, we don't (can't) define the
172                 states cells in these columns may occupy, hence there are no
173                 'states' elements in this subclass.  
174             -->
175             <char id="c1" label="this is character 1" class="something"/>
176             <char id="c2"/>
177             <char id="c3"/>
178             <char id="c4"/>
179             <char id="c5"/>
180         </format>
181         <matrix>
182             <row id="r1" otu="t1">
183                 <!--  
184                     In this subclass, the 'state' attribute holds the raw
185                     value of the cell (i.e. a floating point number), not
186                     a reference to a state defined previously.
187                 -->
188                 <cell char="c1" state="-1.545414144070023"/>
189                 <cell char="c2" state="-2.3905621575431044"/>
190                 <cell char="c3" state="-2.9610221833467265"/>
191                 <cell char="c4" state="0.7868662069161243"/>
192                 <cell char="c5" state="0.22968509237534918"/>
193             </row>
194             <row id="r2" otu="t2">
195                 <cell char="c1" state="-1.6259836379710066"/>
196                 <cell char="c2" state="3.649352410850134"/>
197                 <cell char="c3" state="1.778885099660406"/>
198                 <cell char="c4" state="-1.2580877968480846"/>
199                 <cell char="c5" state="0.22335354995610862"/>
200             </row>
201             <row id="r3" otu="t3">
202                 <cell char="c1" state="-1.5798979984134964"/>
203                 <cell char="c2" state="2.9548251411133157"/>
204                 <cell char="c3" state="1.522005675256233"/>
205                 <cell char="c4" state="-0.8642016921755289"/>
206                 <cell char="c5" state="-0.938129801832388"/>
207             </row>
208             <row id="r4" otu="t4">
209                 <cell char="c1" state="2.7436692306788086"/>
210                 <cell char="c2" state="-0.7151148143399818"/>
211                 <cell char="c3" state="4.592207937774776"/>
212                 <cell char="c4" state="-0.6898841440534845"/>
213                 <cell char="c5" state="0.5769509574453064"/>
214             </row>
215             <row id="r5" otu="t5">
216                 <cell char="c1" state="3.1060827493657683"/>
217                 <cell char="c2" state="-1.0453787389160105"/>
218                 <cell char="c3" state="2.67416332763427"/>
219                 <cell char="c4" state="-1.4045634106692808"/>
220                 <cell char="c5" state="0.019890469925520196"/>
221             </row>
222         </matrix>
223     </characters>
224     <!--
225         This subclass encodes DNA as sequences (not cells). Like the restriction
226         site data block shown above, the states are known (being IUPAC single
227         character nucleotide symbols), hence there is no 'format' element. In 
228         addition to the IUPAC symbols, '-' is used for gaps, '?' is used for
229         missing. Spaces are allowed (so that long lines can be broken up, some
230         parsers might otherwise complain) but have no meaning.
231     -->
232     <characters otus="taxa1" id="c3" xsi:type="nex:DnaSeqs" label="DNA sequences">
233     <format>
234         <states id="states7">
235                 <state id="s1" symbol="A" />
236                 <state id="s2" symbol="C" />
237                 <state id="s3" symbol="G" />
238                 <state id="s4" symbol="T" />
239                 <uncertain_state_set id="s5" symbol="K">
240                         <member state="s3" />
241                         <member state="s4" />
242                 </uncertain_state_set>
243                 <uncertain_state_set id="s6" symbol="M">
244                         <member state="s1" />
245                         <member state="s2" />
246                 </uncertain_state_set>
247                 <uncertain_state_set id="s7" symbol="R">
248                         <member state="s1" />
249                         <member state="s3" />
250                 </uncertain_state_set>
251                 <uncertain_state_set id="s8" symbol="S">
252                         <member state="s2" />
253                         <member state="s3" />
254                 </uncertain_state_set>
255                 <uncertain_state_set id="s9" symbol="W">
256                         <member state="s1" />
257                         <member state="s4" />
258                 </uncertain_state_set>
259                 <uncertain_state_set id="s10" symbol="Y">
260                         <member state="s2" />
261                         <member state="s4" />
262                 </uncertain_state_set>
263                 <uncertain_state_set id="s11" symbol="B">
264                         <member state="s2" />
265                         <member state="s3" />
266                         <member state="s4" />
267                 </uncertain_state_set>
268                 <uncertain_state_set id="s12" symbol="D">
269                         <member state="s1" />
270                         <member state="s3" />
271                         <member state="s4" />
272                 </uncertain_state_set>
273                 <uncertain_state_set id="s13" symbol="H">
274                         <member state="s1" />
275                         <member state="s2" />
276                         <member state="s4" />
277                 </uncertain_state_set>
278                 <uncertain_state_set id="s14" symbol="V">
279                         <member state="s1" />
280                         <member state="s2" />
281                         <member state="s3" />
282                 </uncertain_state_set>
283                 <uncertain_state_set id="s15" symbol="N">
284                         <member state="s3" />
285                         <member state="s1" />
286                         <member state="s4" />
287                         <member state="s2" />
288                 </uncertain_state_set>
289                 <uncertain_state_set id="s16" symbol="X">
290                         <member state="s3" />
291                         <member state="s1" />
292                         <member state="s4" />
293                         <member state="s2" />
294                 </uncertain_state_set>
295                 <uncertain_state_set id="s17" symbol="-" />
296                 <uncertain_state_set id="s18" symbol="?">
297                         <member state="s1" />
298                         <member state="s2" />
299                         <member state="s3" />
300                         <member state="s4" />
301                         <member state="s5" />
302                         <member state="s6" />
303                         <member state="s7" />
304                         <member state="s8" />
305                         <member state="s9" />
306                         <member state="s10" />
307                         <member state="s11" />
308                         <member state="s12" />
309                         <member state="s13" />
310                         <member state="s14" />
311                         <member state="s15" />
312                         <member state="s16" />
313                         <member state="s17" />
314                 </uncertain_state_set>
315         </states>
316         <char id="c1" states="states7" />
317         <char id="c2" states="states7" />
318         <char id="c3" states="states7" />
319         <char id="c4" states="states7" />
320         <char id="c5" states="states7" />
321         <char id="c6" states="states7" />
322         <char id="c7" states="states7" />
323         <char id="c8" states="states7" />
324         <char id="c9" states="states7" />
325         <char id="c10" states="states7" />
326         <char id="c11" states="states7" />
327         <char id="c12" states="states7" />
328         <char id="c13" states="states7" />
329         <char id="c14" states="states7" />
330         <char id="c15" states="states7" />
331         <char id="c16" states="states7" />
332     </format>
333     <matrix>
334             <row otu="t1" id="r1" label="dna_seq_1">
335                 <seq>A C G C T C G C A T C G C A T C</seq>
336             </row>
337             <row otu="t2" id="r2" label="dna_seq_2">
338                 <seq>A C G C T C G C A T C G C A T T</seq>
339             </row>
340             <row otu="t3" id="r3" label="dna_seq_3">
341                 <seq>A C G C T C G C A T C G C A T G</seq>
342             </row>
343         </matrix>
344     </characters>
345     <!--
346         RNA only differs from the previous example by using U instead of T 
347     -->
348     <characters otus="taxa1" id="rnaseqs4" xsi:type="nex:RnaSeqs" label="RNA sequences">
349     <format>
350       <states id="states3">
351         <state id="s1" symbol="A"/>
352         <state id="s2" symbol="C"/>
353         <state id="s3" symbol="G"/>
354         <state id="s4" symbol="U"/>
355         <uncertain_state_set id="s5" symbol="K">
356           <member state="s3"/>
357           <member state="s4"/>
358         </uncertain_state_set>
359         <uncertain_state_set id="s6" symbol="M">
360           <member state="s1"/>
361           <member state="s2"/>
362         </uncertain_state_set>
363         <uncertain_state_set id="s7" symbol="R">
364           <member state="s1"/>
365           <member state="s3"/>
366         </uncertain_state_set>
367         <uncertain_state_set id="s8" symbol="S">
368           <member state="s2"/>
369           <member state="s3"/>
370         </uncertain_state_set>
371         <uncertain_state_set id="s9" symbol="W">
372           <member state="s1"/>
373           <member state="s4"/>
374         </uncertain_state_set>
375         <uncertain_state_set id="s10" symbol="Y">
376           <member state="s2"/>
377           <member state="s4"/>
378         </uncertain_state_set>
379         <uncertain_state_set id="s11" symbol="B">
380           <member state="s2"/>
381           <member state="s3"/>
382           <member state="s4"/>
383         </uncertain_state_set>
384         <uncertain_state_set id="s12" symbol="D">
385           <member state="s1"/>
386           <member state="s3"/>
387           <member state="s4"/>
388         </uncertain_state_set>
389         <uncertain_state_set id="s13" symbol="H">
390           <member state="s1"/>
391           <member state="s2"/>
392           <member state="s4"/>
393         </uncertain_state_set>
394         <uncertain_state_set id="s14" symbol="V">
395           <member state="s1"/>
396           <member state="s2"/>
397           <member state="s3"/>
398         </uncertain_state_set>
399         <uncertain_state_set id="s15" symbol="N">
400           <member state="s3"/>
401           <member state="s1"/>
402           <member state="s4"/>
403           <member state="s2"/>
404         </uncertain_state_set>
405         <uncertain_state_set id="s16" symbol="X">
406           <member state="s3"/>
407           <member state="s1"/>
408           <member state="s4"/>
409           <member state="s2"/>
410         </uncertain_state_set>
411         <uncertain_state_set id="s17" symbol="-"/>
412         <uncertain_state_set id="s18" symbol="?">
413           <member state="s1"/>
414           <member state="s2"/>
415           <member state="s3"/>
416           <member state="s4"/>
417           <member state="s5"/>
418           <member state="s6"/>
419           <member state="s7"/>
420           <member state="s8"/>
421           <member state="s9"/>
422           <member state="s10"/>
423           <member state="s11"/>
424           <member state="s12"/>
425           <member state="s13"/>
426           <member state="s14"/>
427           <member state="s15"/>
428           <member state="s16"/>
429           <member state="s17"/>
430         </uncertain_state_set>
431       </states>
432       <char id="c1" states="states3"/>
433       <char id="c2" states="states3"/>
434       <char id="c3" states="states3"/>
435       <char id="c4" states="states3"/>
436       <char id="c5" states="states3"/>
437       <char id="c6" states="states3"/>
438       <char id="c7" states="states3"/>
439       <char id="c8" states="states3"/>
440       <char id="c9" states="states3"/>
441       <char id="c10" states="states3"/>
442       <char id="c11" states="states3"/>
443       <char id="c12" states="states3"/>
444       <char id="c13" states="states3"/>
445       <char id="c14" states="states3"/>
446       <char id="c15" states="states3"/>
447       <char id="c16" states="states3"/>
448       <char id="c17" states="states3"/>
449       <char id="c18" states="states3"/>
450       <char id="c19" states="states3"/>
451       <char id="c20" states="states3"/>    
452       </format>
453         <matrix>
454             <row otu="t1" id="r1">
455                 <seq>ACGCUCGCAUCGCAUC</seq>
456             </row>
457             <row otu="t2" id="r2">
458                 <seq>ACGCUCGCAUCGCAUC</seq>
459             </row>
460             <row otu="t3" id="r3">
461                 <seq>ACGCUCGCAUCGCAUC</seq>
462             </row>
463         </matrix>
464     </characters>
465     <!-- 
466         A more compact example of encoding of continuous characters as raw sequences.    
467     -->
468     <characters otus="taxa1" id="c5" xsi:type="nex:ContinuousSeqs" label="Continuous sequences">
469             <format>
470               <char id="c1"/>
471               <char id="c2"/>
472               <char id="c3"/>
473               <char id="c4"/>
474               <char id="c5"/>                 
475             </format>    
476         <matrix>
477             <row id="r1" otu="t1">
478                 <seq>-1.545414144070023 -2.3905621575431044 -2.9610221833467265 0.7868662069161243 0.22968509237534918</seq>
479             </row>
480             <row id="r2" otu="t2">
481                 <seq>-1.6259836379710066 3.649352410850134 1.778885099660406 -1.2580877968480846 0.22335354995610862</seq>
482             </row>
483             <row id="r3" otu="t3">
484                 <seq>-1.5798979984134964 2.9548251411133157 1.522005675256233 -0.8642016921755289 -0.938129801832388</seq>
485             </row>
486             <row id="r4" otu="t4">
487                 <seq>2.7436692306788086 -0.7151148143399818 4.592207937774776 -0.6898841440534845 0.5769509574453064</seq>
488             </row>
489             <row id="r5" otu="t5">
490                 <seq>3.1060827493657683 -1.0453787389160105 2.67416332763427 -1.4045634106692808 0.019890469925520196</seq>
491             </row>
492         </matrix>
493     </characters>
494     <!-- 
495         A more compact example of encoding of standard data. Note that the symbols used here
496         are integers (also above 9) and so characters must be space-separated. The symbols used
497         here are the same as the symbol attributes used in characters block m2, earlier.    
498     -->
499     <characters otus="taxa1" id="c6" xsi:type="nex:StandardSeqs" label="Standard sequences">
500         <format>
501             <!--
502                 The first elements inside a format element are stateset
503                 definitions. In this example, there is a set of four
504                 states, each tagged with an id. The symbol attribute is
505                 a shorthand token. 
506             -->
507             <states id="states1">
508                 <state id="s1" symbol="1"/>                                
509                 <state id="s2" symbol="2"/>                
510                 <state id="s3" symbol="3"/>                 
511                 <polymorphic_state_set symbol="4" id="s4">                    
512                     <member state="s1"/>
513                     <member state="s2"/>                    
514                 </polymorphic_state_set>
515                 <uncertain_state_set symbol="5" id="s5">
516                     <member state="s3"/>
517                     <member state="s1"/>
518                 </uncertain_state_set>      
519             </states>
520             <!--
521                 The matrix in this example contains two columns, both
522                 referring to the same stateset - and so cells in both
523                 columns can occupy one of four states. 
524              -->
525             <char states="states1" id="c1"/>
526             <char states="states1" id="c2"/>
527         </format>    
528         <matrix>
529             <row id="r1" otu="t1">
530                 <seq>1 2</seq>
531             </row>
532             <row id="r2" otu="t2">
533                 <seq>2 2</seq>
534             </row>
535             <row id="r3" otu="t3">
536                 <seq>3 4</seq>
537             </row>
538             <row id="r4" otu="t4">
539                 <seq>2 3</seq>
540             </row>
541             <row id="r5" otu="t5">
542                 <seq>4 1</seq>
543             </row>
544         </matrix>
545     </characters>
546 </nex:nexml>