.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Bio::NexmlIO 3pm" .TH Bio::NexmlIO 3pm "2018-10-27" "perl v5.26.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Bio::NexmlIO \- stream handler for NeXML documents .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& #Instantiate a Bio::Nexml object and link it to a file \& my $in_nexml = Bio::Nexml\->new(\-file => \*(Aqnexml_doc.xml\*(Aq, \-format => \*(AqNexml\*(Aq); \& \& #Read in some data \& my $bptree1 = $in_nexml\->next_tree(); \& my $bpaln1 = $in_nexml\->next_aln(); \& my $bpseq1 = $in_nexml\->next_seq(); \& \& #Use/manipulate data \& ... \& \& #Write data to nexml file \& my $out_nexml = Bio::Nexml\->new(\-file => \*(Aq>new_nexml_doc.xml\*(Aq, \-format => \*(AqNexml\*(Aq); \& $out_nexml\->to_xml(); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Bio::NexmlIO is an I/O handler for a NeXML document. A NeXML document can represent three different data types: simple sequences, alignments, and trees. NexmlIO has four main methods next_tree, next_seq, next_aln, and write. NexmlIO returns bioperl seq, tree, and aln objects which can be manipulated then passed to the write method of a new NexmlIO instance to allow the creation of a NeXML document. .PP Each bioperl object contains all the information necessary to recreate a Bio::Phylo::Taxa object, so each time a bioperl object is converted to a biophylo object, the bioperl object is checked to see if its associated taxa has already been created (against a hash using the NexmlIO_ID and Taxa_ID to create a unique string). If not, it is created; if so, that taxa object is used to link the Bio::Phylo tree or matrix. .PP For more information on the NeXML format, see . .SH "FEEDBACK" .IX Header "FEEDBACK" .SS "Mailing Lists" .IX Subsection "Mailing Lists" User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to one of the Bioperl mailing lists. .PP Your participation is much appreciated. .PP .Vb 2 \& bioperl\-l@bioperl.org \- General discussion \& http://bioperl.org/wiki/Mailing_lists \- About the mailing lists .Ve .SS "Support" .IX Subsection "Support" Please direct usage questions or support issues to the mailing list: .PP \&\fIbioperl\-l@bioperl.org\fR .PP rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible. .SS "Reporting Bugs" .IX Subsection "Reporting Bugs" Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via the web: .PP .Vb 1 \& https://github.com/bioperl/bioperl\-live/issues .Ve .SH "AUTHOR \- Chase Miller" .IX Header "AUTHOR - Chase Miller" Email chmille4@gmail.com .SH "CONTRIBUTORS" .IX Header "CONTRIBUTORS" Mark A. Jensen, maj \-at\- fortinbras \-dot\- com .SH "APPENDIX" .IX Header "APPENDIX" The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ .SH "CONSTRUCTOR" .IX Header "CONSTRUCTOR" .SS "new" .IX Subsection "new" .Vb 5 \& Title : new \& Usage : my $in_nexmlIO = Bio::NexmlIO\->new(\-file => \*(Aqdata.nexml.xml\*(Aq); \& Function: Creates a L object linked to a stream \& Returns : a L object \& Args : file name \& \& See L .Ve .SS "doc" .IX Subsection "doc" .Vb 5 \& Title : doc \& Usage : my $nexml_doc = $in_nexmlIO\->doc(); \& Function: returns a L object that contains all the Bio::Phylo data objects parsed from the stream \& Returns : a L object \& Args : none .Ve .SH "ITERATORS" .IX Header "ITERATORS" .SS "next_tree" .IX Subsection "next_tree" .Vb 5 \& Title : next_tree \& Usage : $tree = $stream\->next_tree \& Function: Reads the next tree object from the stream and returns it. \& Returns : a L object \& Args : none .Ve .PP See Bio::Root::IO, Bio::Tree::Tree .SS "next_seq" .IX Subsection "next_seq" .Vb 5 \& Title : next_seq \& Usage : $seq = $stream\->next_seq \& Function: Reads the next seq object from the stream and returns it. \& Returns : a L object \& Args : none .Ve .PP See Bio::Root::IO, Bio::Seq .SS "next_aln" .IX Subsection "next_aln" .Vb 5 \& Title : next_aln \& Usage : $aln = $stream\->next_aln \& Function: Reads the next aln object from the stream and returns it. \& Returns : a L object \& Args : none .Ve .PP See Bio::Root::IO, Bio::SimpleAlign .SS "rewind_seq" .IX Subsection "rewind_seq" .Vb 5 \& Title : rewind_seq \& Usage : $stream\->rewind_seq \& Function: Resets the stream for seqs \& Returns : none \& Args : none .Ve .PP See Bio::Root::IO, Bio::Seq .SS "rewind_aln" .IX Subsection "rewind_aln" .Vb 5 \& Title : rewind_aln \& Usage : $stream\->rewind_aln \& Function: Resets the stream for alns \& Returns : none \& Args : none .Ve .PP See Bio::Root::IO, Bio::Simple::Align .SS "rewind_tree" .IX Subsection "rewind_tree" .Vb 5 \& Title : rewind_tree \& Usage : $stream\->rewind_tree \& Function: Resets the stream for trees \& Returns : none \& Args : none .Ve .PP See Bio::Root::IO, Bio::tree::tree .SS "write" .IX Subsection "write" .Vb 9 \& Title : write \& Usage : $stream\->write(\-alns => $alns,\-seqs => $seqs,\-trees => $trees) \& Function: converts BioPerl seq, tree, and aln objects into Bio::Phylo \& seq, tree, and aln objects, constructs a Bio::Phylo::Project \& object made up of the newly created Bio::Phylo objects, and \& writes the Bio::Phylo:Project object to the stream as a valid \& nexml document \& Returns : none \& Args : \e@L, \e@L, \e@L .Ve .PP See Bio::Root::IO, Bio::tree::tree, Bio::Seq, Bio::SimpleAlign .SS "extract_seqs" .IX Subsection "extract_seqs" .Vb 7 \& Title : extract_seqs \& Usage : $nexmlIO\->extract_seqs(\-file => ">$outfile", \-format => $format) \& Function: converts BioPerl seqs stored in the NexmlIO object into the provided \& format and writes it to the provided file. Uses L to do \& the conversion and writing. \& Returns : none \& Args : file to write to, format to be converted to .Ve .PP See Bio::Seq, Bio::SeqIO .SS "extract_alns" .IX Subsection "extract_alns" .Vb 7 \& Title : extract_alns \& Usage : $nexmlIO\->extract_alns(\-file => ">$outfile", \-format => $format) \& Function: converts BioPerl alns stored in the NexmlIO object into the provided \& format and writes it to the provided file. Uses L to do \& the conversion and writing. \& Returns : none \& Args : file to write to, format to be converted to .Ve .PP See Bio::SimpleAlign, Bio::AlignIO .SS "extract_trees" .IX Subsection "extract_trees" .Vb 7 \& Title : extract_trees \& Usage : $nexmlIO\->extract_trees(\-file => ">$outfile", \-format => $format) \& Function: converts BioPerl trees stored in the NexmlIO object into the provided \& format and writes it to the provided file. Uses L to do \& the conversion and writing. \& Returns : none \& Args : file to write to, format to be converted to .Ve .PP See Bio::Tree::Tree, Bio::TreeIO