Bio-Procedural-1.7.4000755000766000024 013570301633 14403 5ustar00cjfieldsstaff000000000000Changes100644000766000024 52213570301633 15736 0ustar00cjfieldsstaff000000000000Bio-Procedural-1.7.4Summary of important user-visible changes for Bio-Procedural ------------------------------------------------------------ 1.7.4 2019-11-29 14:46:16-06:00 America/Chicago * Make abstract for distribution more specific (minor fix) 1.7.3 2019-11-29 14:32:24-06:00 America/Chicago * First release after split from bioperl-live. LICENSE100644000766000024 4374313570301633 15524 0ustar00cjfieldsstaff000000000000Bio-Procedural-1.7.4This software is copyright (c) 2019 by Ewan Birney . This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2019 by Ewan Birney . This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2019 by Ewan Birney . This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End dist.ini100644000766000024 34113570301633 16106 0ustar00cjfieldsstaff000000000000Bio-Procedural-1.7.4name = Bio-Procedural version = 1.7.4 author = Ewan Birney copyright_holder = Ewan Birney license = Perl_5 ;; Modules should be fixed so that these don't have to be removed. [@BioPerl] t000755000766000024 013570301633 14567 5ustar00cjfieldsstaff000000000000Bio-Procedural-1.7.4Perl.t100644000766000024 672613570301633 16031 0ustar00cjfieldsstaff000000000000Bio-Procedural-1.7.4/t# -*-Perl-*- Test Harness script for Bioperl # $Id$ use strict; BEGIN { use lib '.'; use Bio::Root::Test; test_begin(-tests => 31, -requires_module => 'IO::String'); use_ok('Bio::Perl'); } # Bio::Perl isn't OO so we don't see Bio::Perl->new() here my ($seq_object,$filename,$blast_report,@seq_object_array); # will guess file format from extension $filename = test_input_file('cysprot1.fa'); ok ($seq_object = read_sequence($filename)); isa_ok $seq_object, 'Bio::SeqI'; # forces genbank format $filename = test_input_file('AF165282.gb'); ok ($seq_object = read_sequence($filename,'genbank')); isa_ok $seq_object, 'Bio::SeqI'; # reads an array of sequences $filename = test_input_file('amino.fa'); is (@seq_object_array = read_all_sequences($filename,'fasta'), 2); isa_ok $seq_object_array[0], 'Bio::SeqI'; isa_ok $seq_object_array[1], 'Bio::SeqI'; $filename = test_output_file(); ok write_sequence(">$filename",'genbank',$seq_object); ok ($seq_object = new_sequence("ATTGGTTTGGGGACCCAATTTGTGTGTTATATGTA","myname","AL12232")); isa_ok $seq_object, 'Bio::SeqI'; my $trans; ok ($trans = translate($seq_object)); isa_ok $trans, 'Bio::SeqI'; ok ($trans = translate("ATTGGTTTGGGGACCCAATTTGTGTGTTATATGTA")); isa_ok $trans, 'Bio::PrimarySeqI'; ok ($trans = translate_as_string($seq_object)); is $trans, 'IGLGTQFVCYM'; $trans = ''; ok ($trans = translate_as_string("ATTGGTTTGGGGACCCAATTTGTGTGTTATATGTA")); is $trans, 'IGLGTQFVCYM'; # we need to keep tests that depend on net connection at the end # these now run only with BIOPERLDEBUG set SKIP: { test_skip(-tests => 12, -requires_networking => 1, -requires_module => 'LWP::UserAgent'); # swissprot SKIP: { test_skip(-tests => 2, -requires_module => 'Data::Stag'); eval { $seq_object = get_sequence('swissprot',"ROA1_HUMAN"); }; if ($@) { skip("problem connecting to SwissProt:$@",2); } else { ok $seq_object; isa_ok $seq_object, 'Bio::SeqI'; } } # embl SKIP: { eval { $seq_object = get_sequence('embl',"J00522"); }; if ($@) { skip("problem connecting to EMBL:$@",2); } else { ok $seq_object; isa_ok $seq_object, 'Bio::SeqI'; } } # genbank SKIP: { eval { $seq_object = get_sequence('genbank',"AI129902"); }; if ($@) { skip("problem connecting to GenBank:$@",2); } else { ok $seq_object; isa_ok $seq_object, 'Bio::SeqI'; } } # refseq SKIP: { eval { $seq_object = get_sequence('genbank',"NM_006732"); }; if( $@ ) { skip("problem connecting to RefSeq:$@",2); } else { ok $seq_object; isa_ok $seq_object, 'Bio::SeqI'; } } # genpept SKIP: { eval { $seq_object = get_sequence('genpept',"AAC06201"); }; if ($@) { skip("problem connecting to RefSeq:$@",2); } else { ok $seq_object; isa_ok $seq_object, 'Bio::SeqI'; } } # blast SKIP: { eval { $blast_report = blast_sequence($seq_object, 0); }; if ($@) { skip("problem connecting to NCBI BLAST:$@",2); } else { ok $blast_report; isa_ok $blast_report, 'Bio::Search::Result::ResultI'; } } } META.yml100644000766000024 2620213570301633 15757 0ustar00cjfieldsstaff000000000000Bio-Procedural-1.7.4--- abstract: 'Simple low-dependency procedural interfaces to BioPerl' author: - 'Ewan Birney ' build_requires: Bio::Root::Test: '0' File::Spec: '0' IO::Handle: '0' IPC::Open3: '0' Test::More: '0' lib: '0' perl: '5.006' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 generated_by: 'Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Bio-Procedural requires: Bio::DB::EMBL: '0' Bio::DB::GenBank: '0' Bio::DB::GenPept: '0' Bio::DB::RefSeq: '0' Bio::DB::SwissProt: '0' Bio::Root::Version: '0' Bio::Seq: '0' Bio::SeqIO: '0' Bio::Tools::Run::RemoteBlast: '0' Carp: '0' Exporter: '0' base: '0' strict: '0' utf8: '0' vars: '0' warnings: '0' resources: bugtracker: https://github.com/bioperl/bio-procedural/issues homepage: https://metacpan.org/release/Bio-Procedural repository: git://github.com/bioperl/bio-procedural.git version: 1.7.4 x_Dist_Zilla: perl: version: '5.028001' plugins: - class: Dist::Zilla::Plugin::GatherDir config: Dist::Zilla::Plugin::GatherDir: exclude_filename: [] exclude_match: [] follow_symlinks: 0 include_dotfiles: 0 prefix: '' prune_directory: [] root: . name: '@BioPerl/@Filter/GatherDir' version: '6.012' - class: Dist::Zilla::Plugin::PruneCruft name: '@BioPerl/@Filter/PruneCruft' version: '6.012' - class: Dist::Zilla::Plugin::ManifestSkip name: '@BioPerl/@Filter/ManifestSkip' version: '6.012' - class: Dist::Zilla::Plugin::MetaYAML name: '@BioPerl/@Filter/MetaYAML' version: '6.012' - class: Dist::Zilla::Plugin::License name: '@BioPerl/@Filter/License' version: '6.012' - class: Dist::Zilla::Plugin::ExtraTests name: '@BioPerl/@Filter/ExtraTests' version: '6.012' - class: Dist::Zilla::Plugin::ExecDir name: '@BioPerl/@Filter/ExecDir' version: '6.012' - class: Dist::Zilla::Plugin::ShareDir name: '@BioPerl/@Filter/ShareDir' version: '6.012' - class: Dist::Zilla::Plugin::MakeMaker config: Dist::Zilla::Role::TestRunner: default_jobs: 1 name: '@BioPerl/@Filter/MakeMaker' version: '6.012' - class: Dist::Zilla::Plugin::Manifest name: '@BioPerl/@Filter/Manifest' version: '6.012' - class: Dist::Zilla::Plugin::TestRelease name: '@BioPerl/@Filter/TestRelease' version: '6.012' - class: Dist::Zilla::Plugin::ConfirmRelease name: '@BioPerl/@Filter/ConfirmRelease' version: '6.012' - class: Dist::Zilla::Plugin::UploadToCPAN name: '@BioPerl/@Filter/UploadToCPAN' version: '6.012' - class: Dist::Zilla::Plugin::MetaConfig name: '@BioPerl/MetaConfig' version: '6.012' - class: Dist::Zilla::Plugin::MetaJSON name: '@BioPerl/MetaJSON' version: '6.012' - class: Dist::Zilla::Plugin::PkgVersion name: '@BioPerl/PkgVersion' version: '6.012' - class: Dist::Zilla::Plugin::PodSyntaxTests name: '@BioPerl/PodSyntaxTests' version: '6.012' - class: Dist::Zilla::Plugin::Test::NoTabs config: Dist::Zilla::Plugin::Test::NoTabs: filename: xt/author/no-tabs.t finder: - ':InstallModules' - ':ExecFiles' - ':TestFiles' name: '@BioPerl/Test::NoTabs' version: '0.15' - class: Dist::Zilla::Plugin::Test::Compile config: Dist::Zilla::Plugin::Test::Compile: bail_out_on_fail: '0' fail_on_warning: author fake_home: 0 filename: t/00-compile.t module_finder: - ':InstallModules' needs_display: 0 phase: test script_finder: - ':PerlExecFiles' skips: [] switch: [] name: '@BioPerl/Test::Compile' version: '2.058' - class: Dist::Zilla::Plugin::PodCoverageTests name: '@BioPerl/PodCoverageTests' version: '6.012' - class: Dist::Zilla::Plugin::MojibakeTests name: '@BioPerl/MojibakeTests' version: '0.8' - class: Dist::Zilla::Plugin::AutoPrereqs name: '@BioPerl/AutoPrereqs' version: '6.012' - class: Dist::Zilla::Plugin::AutoMetaResources name: '@BioPerl/AutoMetaResources' version: '1.21' - class: Dist::Zilla::Plugin::MetaResources name: '@BioPerl/MetaResources' version: '6.012' - class: Dist::Zilla::Plugin::Test::EOL config: Dist::Zilla::Plugin::Test::EOL: filename: xt/author/eol.t finder: - ':ExecFiles' - ':InstallModules' - ':TestFiles' trailing_whitespace: 1 name: '@BioPerl/Test::EOL' version: '0.19' - class: Dist::Zilla::Plugin::Encoding name: '@BioPerl/Encoding' version: '6.012' - class: Dist::Zilla::Plugin::PodWeaver config: Dist::Zilla::Plugin::PodWeaver: config_plugins: - '@BioPerl' finder: - ':InstallModules' - ':ExecFiles' plugins: - class: Pod::Weaver::Plugin::EnsurePod5 name: '@CorePrep/EnsurePod5' version: '4.015' - class: Pod::Weaver::Plugin::H1Nester name: '@CorePrep/H1Nester' version: '4.015' - class: Pod::Weaver::Section::Name name: '@BioPerl/Name' version: '4.015' - class: Pod::Weaver::Section::Version name: '@BioPerl/Version' version: '4.015' - class: Pod::Weaver::Section::Region name: '@BioPerl/prelude' version: '4.015' - class: Pod::Weaver::Section::Generic name: SYNOPSIS version: '4.015' - class: Pod::Weaver::Section::Generic name: DESCRIPTION version: '4.015' - class: Pod::Weaver::Section::Generic name: OVERVIEW version: '4.015' - class: Pod::Weaver::Section::Collect name: ATTRIBUTES version: '4.015' - class: Pod::Weaver::Section::Collect name: METHODS version: '4.015' - class: Pod::Weaver::Section::Collect name: FUNCTIONS version: '4.015' - class: Pod::Weaver::Section::Collect name: 'INTERNAL METHODS' version: '4.015' - class: Pod::Weaver::Section::Leftovers name: '@BioPerl/Leftovers' version: '4.015' - class: Pod::Weaver::Section::Region name: '@BioPerl/postlude' version: '4.015' - class: Pod::Weaver::Section::GenerateSection name: FEEDBACK version: '1.06' - class: Pod::Weaver::Section::GenerateSection name: 'Mailing lists' version: '1.06' - class: Pod::Weaver::Section::GenerateSection name: Support version: '1.06' - class: Pod::Weaver::Section::GenerateSection name: 'Reporting bugs' version: '1.06' - class: Pod::Weaver::Section::Legal::Complicated name: '@BioPerl/Legal' version: '1.23' - class: Pod::Weaver::Section::Contributors name: '@BioPerl/Contributors' version: '0.009' - class: Pod::Weaver::Plugin::SingleEncoding name: SingleEncoding version: '4.015' - class: Pod::Weaver::Plugin::Transformer name: '@BioPerl/List' version: '4.015' - class: Pod::Weaver::Plugin::EnsureUniqueSections name: EnsureUniqueSections version: '0.163250' name: '@BioPerl/PodWeaver' version: '4.008' - class: Dist::Zilla::Plugin::NextRelease name: '@BioPerl/NextRelease' version: '6.012' - class: Dist::Zilla::Plugin::Git::Check config: Dist::Zilla::Plugin::Git::Check: untracked_files: die Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - Changes - dist.ini allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: git_version: 2.20.1 repo_root: . name: '@BioPerl/Git::Check' version: '2.045' - class: Dist::Zilla::Plugin::Git::Commit config: Dist::Zilla::Plugin::Git::Commit: add_files_in: [] commit_msg: v%v%n%n%c Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - Changes - dist.ini allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: git_version: 2.20.1 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@BioPerl/Git::Commit' version: '2.045' - class: Dist::Zilla::Plugin::Git::Tag config: Dist::Zilla::Plugin::Git::Tag: branch: ~ changelog: Changes signed: 0 tag: Bio-Procedural-v1.7.4 tag_format: '%N-v%v' tag_message: '%N-v%v' Dist::Zilla::Role::Git::Repo: git_version: 2.20.1 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@BioPerl/Git::Tag' version: '2.045' - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':ExtraTestFiles' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':PerlExecFiles' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':AllFiles' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':NoFiles' version: '6.012' zilla: class: Dist::Zilla::Dist::Builder config: is_trial: '0' version: '6.012' x_generated_by_perl: v5.28.1 x_serialization_backend: 'YAML::Tiny version 1.73' MANIFEST100644000766000024 57613570301633 15605 0ustar00cjfieldsstaff000000000000Bio-Procedural-1.7.4# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.012. Changes LICENSE MANIFEST META.json META.yml Makefile.PL dist.ini examples/bioperl.pl lib/Bio/Perl.pm lib/Bio/Procedural.pm t/00-compile.t t/Perl.t t/author-eol.t t/author-mojibake.t t/author-no-tabs.t t/author-pod-coverage.t t/author-pod-syntax.t t/data/AF165282.gb t/data/amino.fa t/data/cysprot1.fa META.json100644000766000024 4325213570301633 16133 0ustar00cjfieldsstaff000000000000Bio-Procedural-1.7.4{ "abstract" : "Simple low-dependency procedural interfaces to BioPerl", "author" : [ "Ewan Birney " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "Bio-Procedural", "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "develop" : { "requires" : { "Pod::Coverage::TrustPod" : "0", "Test::EOL" : "0", "Test::Mojibake" : "0", "Test::More" : "0.88", "Test::NoTabs" : "0", "Test::Pod" : "1.41", "Test::Pod::Coverage" : "1.08" } }, "runtime" : { "requires" : { "Bio::DB::EMBL" : "0", "Bio::DB::GenBank" : "0", "Bio::DB::GenPept" : "0", "Bio::DB::RefSeq" : "0", "Bio::DB::SwissProt" : "0", "Bio::Root::Version" : "0", "Bio::Seq" : "0", "Bio::SeqIO" : "0", "Bio::Tools::Run::RemoteBlast" : "0", "Carp" : "0", "Exporter" : "0", "base" : "0", "strict" : "0", "utf8" : "0", "vars" : "0", "warnings" : "0" } }, "test" : { "requires" : { "Bio::Root::Test" : "0", "File::Spec" : "0", "IO::Handle" : "0", "IPC::Open3" : "0", "Test::More" : "0", "lib" : "0", "perl" : "5.006" } } }, "release_status" : "stable", "resources" : { "bugtracker" : { "mailto" : "bioperl-l@bioperl.org", "web" : "https://github.com/bioperl/bio-procedural/issues" }, "homepage" : "https://metacpan.org/release/Bio-Procedural", "repository" : { "type" : "git", "url" : "git://github.com/bioperl/bio-procedural.git", "web" : "https://github.com/bioperl/bio-procedural" } }, "version" : "1.7.4", "x_Dist_Zilla" : { "perl" : { "version" : "5.028001" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::GatherDir", "config" : { "Dist::Zilla::Plugin::GatherDir" : { "exclude_filename" : [], "exclude_match" : [], "follow_symlinks" : 0, "include_dotfiles" : 0, "prefix" : "", "prune_directory" : [], "root" : "." } }, "name" : "@BioPerl/@Filter/GatherDir", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::PruneCruft", "name" : "@BioPerl/@Filter/PruneCruft", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::ManifestSkip", "name" : "@BioPerl/@Filter/ManifestSkip", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@BioPerl/@Filter/MetaYAML", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "@BioPerl/@Filter/License", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::ExtraTests", "name" : "@BioPerl/@Filter/ExtraTests", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::ExecDir", "name" : "@BioPerl/@Filter/ExecDir", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::ShareDir", "name" : "@BioPerl/@Filter/ShareDir", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::MakeMaker", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 1 } }, "name" : "@BioPerl/@Filter/MakeMaker", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@BioPerl/@Filter/Manifest", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@BioPerl/@Filter/TestRelease", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@BioPerl/@Filter/ConfirmRelease", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@BioPerl/@Filter/UploadToCPAN", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "@BioPerl/MetaConfig", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@BioPerl/MetaJSON", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::PkgVersion", "name" : "@BioPerl/PkgVersion", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "@BioPerl/PodSyntaxTests", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::Test::NoTabs", "config" : { "Dist::Zilla::Plugin::Test::NoTabs" : { "filename" : "xt/author/no-tabs.t", "finder" : [ ":InstallModules", ":ExecFiles", ":TestFiles" ] } }, "name" : "@BioPerl/Test::NoTabs", "version" : "0.15" }, { "class" : "Dist::Zilla::Plugin::Test::Compile", "config" : { "Dist::Zilla::Plugin::Test::Compile" : { "bail_out_on_fail" : 0, "fail_on_warning" : "author", "fake_home" : 0, "filename" : "t/00-compile.t", "module_finder" : [ ":InstallModules" ], "needs_display" : 0, "phase" : "test", "script_finder" : [ ":PerlExecFiles" ], "skips" : [], "switch" : [] } }, "name" : "@BioPerl/Test::Compile", "version" : "2.058" }, { "class" : "Dist::Zilla::Plugin::PodCoverageTests", "name" : "@BioPerl/PodCoverageTests", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::MojibakeTests", "name" : "@BioPerl/MojibakeTests", "version" : "0.8" }, { "class" : "Dist::Zilla::Plugin::AutoPrereqs", "name" : "@BioPerl/AutoPrereqs", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::AutoMetaResources", "name" : "@BioPerl/AutoMetaResources", "version" : "1.21" }, { "class" : "Dist::Zilla::Plugin::MetaResources", "name" : "@BioPerl/MetaResources", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::Test::EOL", "config" : { "Dist::Zilla::Plugin::Test::EOL" : { "filename" : "xt/author/eol.t", "finder" : [ ":ExecFiles", ":InstallModules", ":TestFiles" ], "trailing_whitespace" : 1 } }, "name" : "@BioPerl/Test::EOL", "version" : "0.19" }, { "class" : "Dist::Zilla::Plugin::Encoding", "name" : "@BioPerl/Encoding", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::PodWeaver", "config" : { "Dist::Zilla::Plugin::PodWeaver" : { "config_plugins" : [ "@BioPerl" ], "finder" : [ ":InstallModules", ":ExecFiles" ], "plugins" : [ { "class" : "Pod::Weaver::Plugin::EnsurePod5", "name" : "@CorePrep/EnsurePod5", "version" : "4.015" }, { "class" : "Pod::Weaver::Plugin::H1Nester", "name" : "@CorePrep/H1Nester", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Name", "name" : "@BioPerl/Name", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Version", "name" : "@BioPerl/Version", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@BioPerl/prelude", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "SYNOPSIS", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "DESCRIPTION", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "OVERVIEW", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "ATTRIBUTES", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "METHODS", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "FUNCTIONS", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "INTERNAL METHODS", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Leftovers", "name" : "@BioPerl/Leftovers", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@BioPerl/postlude", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::GenerateSection", "name" : "FEEDBACK", "version" : "1.06" }, { "class" : "Pod::Weaver::Section::GenerateSection", "name" : "Mailing lists", "version" : "1.06" }, { "class" : "Pod::Weaver::Section::GenerateSection", "name" : "Support", "version" : "1.06" }, { "class" : "Pod::Weaver::Section::GenerateSection", "name" : "Reporting bugs", "version" : "1.06" }, { "class" : "Pod::Weaver::Section::Legal::Complicated", "name" : "@BioPerl/Legal", "version" : "1.23" }, { "class" : "Pod::Weaver::Section::Contributors", "name" : "@BioPerl/Contributors", "version" : "0.009" }, { "class" : "Pod::Weaver::Plugin::SingleEncoding", "name" : "SingleEncoding", "version" : "4.015" }, { "class" : "Pod::Weaver::Plugin::Transformer", "name" : "@BioPerl/List", "version" : "4.015" }, { "class" : "Pod::Weaver::Plugin::EnsureUniqueSections", "name" : "EnsureUniqueSections", "version" : "0.163250" } ] } }, "name" : "@BioPerl/PodWeaver", "version" : "4.008" }, { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "@BioPerl/NextRelease", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "config" : { "Dist::Zilla::Plugin::Git::Check" : { "untracked_files" : "die" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "Changes", "dist.ini" ], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.20.1", "repo_root" : "." } }, "name" : "@BioPerl/Git::Check", "version" : "2.045" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "config" : { "Dist::Zilla::Plugin::Git::Commit" : { "add_files_in" : [], "commit_msg" : "v%v%n%n%c" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "Changes", "dist.ini" ], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.20.1", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@BioPerl/Git::Commit", "version" : "2.045" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "config" : { "Dist::Zilla::Plugin::Git::Tag" : { "branch" : null, "changelog" : "Changes", "signed" : 0, "tag" : "Bio-Procedural-v1.7.4", "tag_format" : "%N-v%v", "tag_message" : "%N-v%v" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.20.1", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@BioPerl/Git::Tag", "version" : "2.045" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExtraTestFiles", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":PerlExecFiles", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":AllFiles", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":NoFiles", "version" : "6.012" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : 0 }, "version" : "6.012" } }, "x_generated_by_perl" : "v5.28.1", "x_serialization_backend" : "Cpanel::JSON::XS version 4.09" } Makefile.PL100644000766000024 366613570301633 16451 0ustar00cjfieldsstaff000000000000Bio-Procedural-1.7.4# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.012. use strict; use warnings; use 5.006; use ExtUtils::MakeMaker; my %WriteMakefileArgs = ( "ABSTRACT" => "Simple low-dependency procedural interfaces to BioPerl", "AUTHOR" => "Ewan Birney ", "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => 0 }, "DISTNAME" => "Bio-Procedural", "LICENSE" => "perl", "MIN_PERL_VERSION" => "5.006", "NAME" => "Bio::Procedural", "PREREQ_PM" => { "Bio::DB::EMBL" => 0, "Bio::DB::GenBank" => 0, "Bio::DB::GenPept" => 0, "Bio::DB::RefSeq" => 0, "Bio::DB::SwissProt" => 0, "Bio::Root::Version" => 0, "Bio::Seq" => 0, "Bio::SeqIO" => 0, "Bio::Tools::Run::RemoteBlast" => 0, "Carp" => 0, "Exporter" => 0, "base" => 0, "strict" => 0, "utf8" => 0, "vars" => 0, "warnings" => 0 }, "TEST_REQUIRES" => { "Bio::Root::Test" => 0, "File::Spec" => 0, "IO::Handle" => 0, "IPC::Open3" => 0, "Test::More" => 0, "lib" => 0 }, "VERSION" => "1.7.4", "test" => { "TESTS" => "t/*.t" } ); my %FallbackPrereqs = ( "Bio::DB::EMBL" => 0, "Bio::DB::GenBank" => 0, "Bio::DB::GenPept" => 0, "Bio::DB::RefSeq" => 0, "Bio::DB::SwissProt" => 0, "Bio::Root::Test" => 0, "Bio::Root::Version" => 0, "Bio::Seq" => 0, "Bio::SeqIO" => 0, "Bio::Tools::Run::RemoteBlast" => 0, "Carp" => 0, "Exporter" => 0, "File::Spec" => 0, "IO::Handle" => 0, "IPC::Open3" => 0, "Test::More" => 0, "base" => 0, "lib" => 0, "strict" => 0, "utf8" => 0, "vars" => 0, "warnings" => 0 ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { delete $WriteMakefileArgs{TEST_REQUIRES}; delete $WriteMakefileArgs{BUILD_REQUIRES}; $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); 00-compile.t100644000766000024 266213570301633 16767 0ustar00cjfieldsstaff000000000000Bio-Procedural-1.7.4/tuse 5.006; use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::Compile 2.058 use Test::More; plan tests => 2 + ($ENV{AUTHOR_TESTING} ? 1 : 0); my @module_files = ( 'Bio/Perl.pm', 'Bio/Procedural.pm' ); # no fake home requested my @switches = ( -d 'blib' ? '-Mblib' : '-Ilib', ); use File::Spec; use IPC::Open3; use IO::Handle; open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; my @warnings; for my $lib (@module_files) { # see L my $stderr = IO::Handle->new; diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} } $^X, @switches, '-e', "require q[$lib]")) if $ENV{PERL_COMPILE_TEST_DEBUG}; my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]"); binmode $stderr, ':crlf' if $^O eq 'MSWin32'; my @_warnings = <$stderr>; waitpid($pid, 0); is($?, 0, "$lib loaded ok"); shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/ and not eval { +require blib; blib->VERSION('1.01') }; if (@_warnings) { warn @_warnings; push @warnings, @_warnings; } } is(scalar(@warnings), 0, 'no warnings found') or diag 'got warnings: ', ( Test::More->can('explain') ? Test::More::explain(\@warnings) : join("\n", '', @warnings) ) if $ENV{AUTHOR_TESTING}; author-eol.t100644000766000024 110413570301633 17167 0ustar00cjfieldsstaff000000000000Bio-Procedural-1.7.4/t BEGIN { unless ($ENV{AUTHOR_TESTING}) { print qq{1..0 # SKIP these tests are for testing by the author\n}; exit } } use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::EOL 0.19 use Test::More 0.88; use Test::EOL; my @files = ( 'lib/Bio/Perl.pm', 'lib/Bio/Procedural.pm', 't/00-compile.t', 't/Perl.t', 't/author-eol.t', 't/author-mojibake.t', 't/author-no-tabs.t', 't/author-pod-coverage.t', 't/author-pod-syntax.t' ); eol_unix_ok($_, { trailing_whitespace => 1 }) foreach @files; done_testing; data000755000766000024 013570301633 15500 5ustar00cjfieldsstaff000000000000Bio-Procedural-1.7.4/tamino.fa100644000766000024 67613570301633 17244 0ustar00cjfieldsstaff000000000000Bio-Procedural-1.7.4/t/data>CYS1_DICDI fragment SCWSFSTTGNVEGQHFISQNKLVSLSEQNLVDCDHECMEYEGE >ALEU_HORVU MAHARVLLLALAVLATAAVAVASSSSFADSNPIRPVTDRAASTLESAVLGALGRTRHALRFARFAVRYGK SYESAAEVRRRFRIFSESLEEVRSTNRKGLPYRLGINRFSDMSWEEFQATRLGAAQTCSATLAGNHLMRD AAALPETKDWREDGIVSPVKNQAHCGSCWTFSTTGALEAAYTQATGKNISLSEQQLVDCAGGFNNFGCNG GLPSQAFEYIKYNGGIDTEESYPYKGVNGVCHYKAENAAVQVLDSVNITLNAEDELKNAVGLVRPVSVAF QVIDGFRQYKSGVYTSDHCGTTPDDVNHAVLAVGYGVENGVPYWLIKNSWGADWGDNGYFKMEMGKNMCA IATCASYPVVAA Bio000755000766000024 013570301633 15603 5ustar00cjfieldsstaff000000000000Bio-Procedural-1.7.4/libPerl.pm100644000766000024 4373513570301633 17237 0ustar00cjfieldsstaff000000000000Bio-Procedural-1.7.4/lib/Bio package Bio::Perl; $Bio::Perl::VERSION = '1.7.4'; use vars qw(@EXPORT @EXPORT_OK $DBOKAY); use strict; use Carp; use Bio::SeqIO; use Bio::Seq; use Bio::Root::Version '$VERSION'; BEGIN { eval { require Bio::DB::EMBL; require Bio::DB::GenBank; require Bio::DB::SwissProt; require Bio::DB::RefSeq; require Bio::DB::GenPept; }; if( $@ ) { $DBOKAY = 0; } else { $DBOKAY = 1; } } use base qw(Exporter); @EXPORT = qw(read_sequence read_all_sequences write_sequence new_sequence get_sequence translate translate_as_string reverse_complement revcom revcom_as_string reverse_complement_as_string blast_sequence write_blast); @EXPORT_OK = @EXPORT; sub read_sequence{ my ($filename,$format) = @_; if( !defined $filename ) { confess "read_sequence($filename) - usage incorrect"; } my $seqio; if( defined $format ) { $seqio = Bio::SeqIO->new( '-file' => $filename, '-format' => $format); } else { $seqio = Bio::SeqIO->new( '-file' => $filename); } my $seq = $seqio->next_seq(); return $seq; } sub read_all_sequences{ my ($filename,$format) = @_; if( !defined $filename ) { confess "read_all_sequences($filename) - usage incorrect"; } my $seqio; if( defined $format ) { $seqio = Bio::SeqIO->new( '-file' => $filename, '-format' => $format); } else { $seqio = Bio::SeqIO->new( '-file' => $filename); } my @seq_array; while( my $seq = $seqio->next_seq() ) { push(@seq_array,$seq); } return @seq_array; } sub write_sequence{ my ($filename,$format,@sequence_objects) = @_; if( scalar(@sequence_objects) == 0 ) { confess("write_sequence(filename,format,sequence_object)"); } my $error = 0; my $seqname = "sequence1"; # catch users who haven't passed us a filename we can open if( $filename !~ /^\>/ && $filename !~ /^|/ ) { $filename = ">".$filename; } my $seqio = Bio::SeqIO->new('-file' => $filename, '-format' => $format); foreach my $seq ( @sequence_objects ) { my $seq_obj; if( !ref $seq ) { if( length $seq > 50 ) { # odds are this is a sequence as a string, and someone has not figured out # how to make objects. Warn him/her and then make a sequence object # from this if( $error == 0 ) { carp("WARNING: You have put in a long string into write_sequence.\n". "I suspect this means that this is the actual sequence\n". "In the future try the\n". " new_sequence method of this module to make a new sequence object.\n". "Doing this for you here\n"); $error = 1; } $seq_obj = new_sequence($seq,$seqname); $seqname++; } else { confess("You have a non object [$seq] passed to write_sequence. It maybe that you". "want to use new_sequence to make this string into a sequence object?"); } } else { if( !$seq->isa("Bio::SeqI") ) { confess("object [$seq] is not a Bio::Seq object; can't write it out"); } $seq_obj = $seq; } # finally... we get to write out the sequence! $seqio->write_seq($seq_obj); } 1; } sub new_sequence{ my ($seq,$name,$accession) = @_; if( !defined $seq ) { confess("new_sequence(sequence_as_string) usage"); } $name ||= "no-name-for-sequence"; my $seq_object = Bio::Seq->new( -seq => $seq, -id => $name); $accession && $seq_object->accession_number($accession); return $seq_object; } sub blast_sequence { my ($seq,$verbose) = @_; if( !defined $verbose ) { $verbose = 1; } if( !ref $seq ) { $seq = Bio::Seq->new( -seq => $seq, -id => 'blast-sequence-temp-id'); } elsif ( !$seq->isa('Bio::PrimarySeqI') ) { croak("[$seq] is an object, but not a Bio::Seq object, cannot be blasted"); } require Bio::Tools::Run::RemoteBlast; my $prog = ( $seq->alphabet eq 'protein' ) ? 'blastp' : 'blastn'; my $e_val= '1e-10'; my @params = ( '-prog' => $prog, '-expect' => $e_val, '-readmethod' => 'SearchIO' ); my $factory = Bio::Tools::Run::RemoteBlast->new(@params); my $r = $factory->submit_blast($seq); if( $verbose ) { print STDERR "Submitted Blast for [".$seq->id."] "; } sleep 5; my $result; LOOP : while( my @rids = $factory->each_rid) { foreach my $rid ( @rids ) { my $rc = $factory->retrieve_blast($rid); if( !ref($rc) ) { if( $rc < 0 ) { $factory->remove_rid($rid); } if( $verbose ) { print STDERR "."; } sleep 10; } else { $result = $rc->next_result(); $factory->remove_rid($rid); last LOOP; } } } if( $verbose ) { print STDERR "\n"; } return $result; } sub write_blast { my ($filename,$blast) = @_; if( $filename !~ /^\>/ && $filename !~ /^|/ ) { $filename = ">".$filename; } my $output = Bio::SearchIO->new( -output_format => 'blast', -file => $filename); $output->write_result($blast); } my $genbank_db = undef; my $genpept_db = undef; my $embl_db = undef; my $swiss_db = undef; my $refseq_db = undef; sub get_sequence{ my ($db_type,$identifier) = @_; if( ! $DBOKAY ) { confess ("Your system does not have one of LWP, HTTP::Request::Common, IO::String\n". "installed so the DB retrieval method is not available.\n". "Full error message is:\n $!\n"); return; } $db_type = lc($db_type); my $db; if( $db_type =~ /genbank/ ) { if( !defined $genbank_db ) { $genbank_db = Bio::DB::GenBank->new(); } $db = $genbank_db; } if( $db_type =~ /genpept/ ) { if( !defined $genpept_db ) { $genpept_db = Bio::DB::GenPept->new(); } $db = $genpept_db; } if( $db_type =~ /swiss/ ) { if( !defined $swiss_db ) { $swiss_db = Bio::DB::SwissProt->new(); } $db = $swiss_db; } if( $db_type =~ /embl/ ) { if( !defined $embl_db ) { $embl_db = Bio::DB::EMBL->new(); } $db = $embl_db; } if( $db_type =~ /refseq/ or ($db_type !~ /swiss/ and $identifier =~ /^\s*N\S+_/)) { if( !defined $refseq_db ) { $refseq_db = Bio::DB::RefSeq->new(); } $db = $refseq_db; } my $seq; if( $identifier =~ /^\w+\d+$/ ) { $seq = $db->get_Seq_by_acc($identifier); } else { $seq = $db->get_Seq_by_id($identifier); } return $seq; } sub translate { my ($scalar) = shift; my $obj; if( ref $scalar ) { if( !$scalar->isa("Bio::PrimarySeqI") ) { confess("Expecting a sequence object not a $scalar"); } else { $obj= $scalar; } } else { # check this looks vaguely like DNA my $n = ( $scalar =~ tr/ATGCNatgcn/ATGCNatgcn/ ); if( $n < length($scalar) * 0.85 ) { confess("Sequence [$scalar] is less than 85% ATGCN, which doesn't look very DNA to me"); } $obj = Bio::PrimarySeq->new(-id => 'internalbioperlseq',-seq => $scalar); } return $obj->translate(); } sub translate_as_string { my ($scalar) = shift; my $obj = Bio::Perl::translate($scalar); return $obj->seq; } sub reverse_complement { my ($scalar) = shift; my $obj; if( ref $scalar ) { if( !$scalar->isa("Bio::PrimarySeqI") ) { confess("Expecting a sequence object not a $scalar"); } else { $obj= $scalar; } } else { # check this looks vaguely like DNA my $n = ( $scalar =~ tr/ATGCNatgcn/ATGCNatgcn/ ); if( $n < length($scalar) * 0.85 ) { confess("Sequence [$scalar] is less than 85% ATGCN, which doesn't look very DNA to me"); } $obj = Bio::PrimarySeq->new(-id => 'internalbioperlseq',-seq => $scalar); } return $obj->revcom(); } sub revcom { return &Bio::Perl::reverse_complement(@_); } sub reverse_complement_as_string { my ($scalar) = shift; my $obj = &Bio::Perl::reverse_complement($scalar); return $obj->seq; } sub revcom_as_string { my ($scalar) = shift; my $obj = &Bio::Perl::reverse_complement($scalar); return $obj->seq; } 1; # ABSTRACT: Functional access to BioPerl for people who don't know objects # AUTHOR: Ewan Birney # OWNER: many people (see the individual modules for their copyright holders) # LICENSE: Perl_5 __END__ =pod =encoding UTF-8 =head1 NAME Bio::Perl - Functional access to BioPerl for people who don't know objects =head1 VERSION version 1.7.4 =head1 SYNOPSIS use Bio::Perl; # will guess file format from extension $seq_object = read_sequence($filename); # forces genbank format $seq_object = read_sequence($filename,'genbank'); # reads an array of sequences @seq_object_array = read_all_sequences($filename,'fasta'); # sequences are Bio::Seq objects, so the following methods work # for more info see Bio::Seq, or do 'perldoc Bio/Seq.pm' print "Sequence name is ",$seq_object->display_id,"\n"; print "Sequence acc is ",$seq_object->accession_number,"\n"; print "First 5 bases is ",$seq_object->subseq(1,5),"\n"; # get the whole sequence as a single string $sequence_as_a_string = $seq_object->seq(); # writing sequences write_sequence(">$filename",'genbank',$seq_object); write_sequence(">$filename",'genbank',@seq_object_array); # making a new sequence from just a string $seq_object = new_sequence("ATTGGTTTGGGGACCCAATTTGTGTGTTATATGTA", "myname","AL12232"); # getting a sequence from a database (assumes internet connection) $seq_object = get_sequence('swissprot',"ROA1_HUMAN"); $seq_object = get_sequence('embl',"AI129902"); $seq_object = get_sequence('genbank',"AI129902"); # BLAST a sequence (assumes an internet connection) $blast_report = blast_sequence($seq_object); write_blast(">blast.out",$blast_report); =head1 DESCRIPTION Easy first time access to BioPerl via functions. =head2 read_sequence Title : read_sequence Usage : $seq = read_sequence('sequences.fa') $seq = read_sequence($filename,'genbank'); # pipes are fine $seq = read_sequence("my_fetching_program $id |",'fasta'); Function: Reads the top sequence from the file. If no format is given, it will try to guess the format from the filename. If a format is given, it forces that format. The filename can be any valid perl open() string - in particular, you can put in pipes Returns : A Bio::Seq object. A quick synopsis: $seq_object->display_id - name of the sequence $seq_object->seq - sequence as a string Args : Two strings, first the filename - any Perl open() string is ok Second string is the format, which is optional For more information on Seq objects see L. =head2 read_all_sequences Title : read_all_sequences Usage : @seq_object_array = read_all_sequences($filename); @seq_object_array = read_all_sequences($filename,'genbank'); Function: Just as the function above, but reads all the sequences in the file and loads them into an array. For very large files, you will run out of memory. When this happens, you've got to use the SeqIO system directly (this is not so hard! Don't worry about it!). Returns : array of Bio::Seq objects Args : two strings, first the filename (any open() string is ok) second the format (which is optional) See L and L for more information =head2 write_sequence Title : write_sequence Usage : write_sequence(">new_file.gb",'genbank',$seq) write_sequence(">new_file.gb",'genbank',@array_of_sequence_objects) Function: writes sequences in the specified format Returns : true Args : filename as a string, must provide an open() output file format as a string one or more sequence objects =head2 new_sequence Title : new_sequence Usage : $seq_obj = new_sequence("GATTACA", "kino-enzyme"); Function: Construct a sequency object from sequence string Returns : A Bio::Seq object Args : sequence string name string (optional, default "no-name-for-sequence") accession - accession number (optional, no default) =head2 blast_sequence Title : blast_sequence Usage : $blast_result = blast_sequence($seq) $blast_result = blast_sequence('MFVEGGTFASEDDDSASAEDE'); Function: If the computer has Internet accessibility, blasts the sequence using the NCBI BLAST server against nrdb. It chooses the flavour of BLAST on the basis of the sequence. This function uses Bio::Tools::Run::RemoteBlast, which itself use Bio::SearchIO - as soon as you want to know more, check out these modules Returns : Bio::Search::Result::GenericResult.pm Args : Either a string of protein letters or nucleotides, or a Bio::Seq object =head2 write_blast Title : write_blast Usage : write_blast($filename,$blast_report); Function: Writes a BLAST result object (or more formally a SearchIO result object) out to a filename in BLAST-like format Returns : none Args : filename as a string Bio::SearchIO::Results object =head2 get_sequence Title : get_sequence Usage : $seq_object = get_sequence('swiss',"ROA1_HUMAN"); Function: If the computer has Internet access this method gets the sequence from Internet accessible databases. Currently this supports Swissprot ('swiss'), EMBL ('embl'), GenBank ('genbank'), GenPept ('genpept'), and RefSeq ('refseq'). Swissprot and EMBL are more robust than GenBank fetching. If the user is trying to retrieve a RefSeq entry from GenBank/EMBL, the query is silently redirected. Returns : A Bio::Seq object Args : database type - one of swiss, embl, genbank, genpept, or refseq =head2 translate Title : translate Usage : $seqobj = translate($seq_or_string_scalar) Function: translates a DNA sequence object OR just a plain string of DNA to amino acids Returns : A Bio::Seq object Args : Either a sequence object or a string of just DNA sequence characters =head2 translate_as_string Title : translate_as_string Usage : $seqstring = translate_as_string($seq_or_string_scalar) Function: translates a DNA sequence object OR just a plain string of DNA to amino acids Returns : A string of just amino acids Args : Either a sequence object or a string of just DNA sequence characters =head2 reverse_complement Title : reverse_complement Usage : $seqobj = reverse_complement($seq_or_string_scalar) Function: reverse complements a string or sequence argument producing a Bio::Seq - if you want a string, you can use reverse_complement_as_string Returns : A Bio::Seq object Args : Either a sequence object or a string of just DNA sequence characters =head2 revcom Title : revcom Usage : $seqobj = revcom($seq_or_string_scalar) Function: reverse complements a string or sequence argument producing a Bio::Seq - if you want a string, you can use reverse_complement_as_string This is an alias for reverse_complement Returns : A Bio::Seq object Args : Either a sequence object or a string of just DNA sequence characters =head2 reverse_complement_as_string Title : reverse_complement_as_string Usage : $string = reverse_complement_as_string($seq_or_string_scalar) Function: reverse complements a string or sequence argument producing a string Returns : A string of DNA letters Args : Either a sequence object or a string of just DNA sequence characters =head2 revcom_as_string Title : revcom_as_string Usage : $string = revcom_as_string($seq_or_string_scalar) Function: reverse complements a string or sequence argument producing a string Returns : A string of DNA letters Args : Either a sequence object or a string of just DNA sequence characters =head1 APPENDIX The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ =head1 FEEDBACK =head2 Mailing lists User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to the Bioperl mailing list. Your participation is much appreciated. bioperl-l@bioperl.org - General discussion https://bioperl.org/Support.html - About the mailing lists =head2 Support Please direct usage questions or support issues to the mailing list: I 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. =head2 Reporting bugs Report bugs to the Bioperl bug tracking system to help us keep track of the bugs and their resolution. Bug reports can be submitted via the web: https://github.com/bioperl/bio-procedural/issues =head1 AUTHOR Ewan Birney =head1 COPYRIGHT This software is copyright (c) by many people (see the individual modules for their copyright holders). This software is available under the same terms as the perl 5 programming language system itself. =cut AF165282.gb100644000766000024 602013570301633 17126 0ustar00cjfieldsstaff000000000000Bio-Procedural-1.7.4/t/dataLOCUS HSATPCB01 226 bp DNA PRI 17-AUG-1999 DEFINITION Homo sapiens ATP cassette binding transporter 1 (ABC1) gene, exon 12. ACCESSION AF165282 VERSION AF165282.1 GI:5734104 KEYWORDS . SOURCE human. ORGANISM Homo sapiens Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia; Eutheria; Primates; Catarrhini; Hominidae; Homo. REFERENCE 1 (bases 1 to 226) AUTHORS Rust,S., Rosier,M., Funke,H., Real,J., Amoura,Z., Piette,J.C., Deleuze,J.F., Brewer,H.B., Duverger,N., Denefle,P. and Assmann,G. TITLE Tangier disease is caused by mutations in the gene encoding ATP-binding cassette transporter 1 JOURNAL Nat. Genet. 22 (4), 352-355 (1999) MEDLINE 99364413 PUBMED 10431238 REFERENCE 2 (bases 1 to 226) AUTHORS Rust,S., Rosier,M., Funke,H., Real,J., Amoura,Z., Piette,J.C., Deleuze,J.F., Brewer,H.B., Duverger,N., Denefle,P. and Assmann,G. TITLE Direct Submission JOURNAL Submitted (06-JUL-1999) Genomics, Rhone-Poulenc Rorer, 2 rue Gaston Cremieux, Evry 91006, France FEATURES Location/Qualifiers source 1..226 /organism="Homo sapiens" /db_xref="taxon:9606" /chromosome="9" /map="9q31" gene join(<1..226,AF165283.1:1..197,AF165284.1:1..243, AF165285.1:1..242,AF165286.1:1..225,AF165287.1:1..152, AF165288.1:1..163,AF165289.1:1..158,AF165290.1:1..241, AF165291.1:1..93,AF165292.1:1..223,AF165293.1:1..69, AF165294.1:1..134,AF165295.1:1..169,AF165296.1:1..145, AF165297.1:1..119,AF165298.1:1..209,AF165299.1:1..115, AF165300.1:1..53,AF165301.1:1..126,AF165302.1:1..95, AF165303.1:1..190,AF165304.1:1..198,AF165305.1:1..136, AF165306.1:1..165,AF165307.1:1..150,AF165308.1:1..141, AF165309.1:1..83,AF165310.1:1..>264) /gene="ABC1" mRNA join(<16..221,AF165283.1:16..192,AF165284.1:16..238, AF165285.1:16..237,AF165286.1:16..>220) /gene="ABC1" /product="ATP cassette binding transporter 1" exon 16..221 /gene="ABC1" /number=12 CDS join(<16..221,AF165283.1:16..192,AF165284.1:16..238, AF165285.1:16..237,AF165286.1:16..>220) /gene="ABC1" /codon_start=1 /db_xref="GI:5734134" BASE COUNT 69 a 46 c 58 g 53 t ORIGIN 1 ctgttcttct atcagtgtgt caacctgaac aagctagaac ccatagcaac agaagtctgg 61 ctcatcaaca agtccatgga gctgctggat gagaggaagt tctgggctgg tattgtgttc 121 actggaatta ctccaggcag cattgagctg ccccatcatg tcaagtacaa gatccgaatg 181 gacattgaca atgtggagag gacaaataaa atcaaggatg ggtaag // cysprot1.fa100644000766000024 55013570301633 17714 0ustar00cjfieldsstaff000000000000Bio-Procedural-1.7.4/t/data>CYS1_DICDI MKVILLFVLAVFTVFVSSRGIPPEEQSQFLEFQDKFNKKYSHEEYLERFEIFKSNLGKIEELNLIAINHK ADTKFGVNKFADLSSDEFKNYYLNNKEAIFTDDLPVADYLDDEFINSIPTAFDWRTRGAVTPVKNQGQCG SCWSFSTTGNVEGQHFISQNKLVSLSEQNLVDCDHECMEYEGEEACDEGCNGGLQPNAYNYIIKNGGIQT ESSYPYTAETGTQCNFNSANIGAKISNFTMIPKNETVMAGYIVSTGPLAIAADAVEWQFYIGGVFDIPCN PNSLDHGILIVGYSAKNTIFRKNMPYWIVKNSWGADWGEQGYIYLRRGKNTCGVSNFVSTSII author-no-tabs.t100644000766000024 105213570301633 17755 0ustar00cjfieldsstaff000000000000Bio-Procedural-1.7.4/t BEGIN { unless ($ENV{AUTHOR_TESTING}) { print qq{1..0 # SKIP these tests are for testing by the author\n}; exit } } use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::NoTabs 0.15 use Test::More 0.88; use Test::NoTabs; my @files = ( 'lib/Bio/Perl.pm', 'lib/Bio/Procedural.pm', 't/00-compile.t', 't/Perl.t', 't/author-eol.t', 't/author-mojibake.t', 't/author-no-tabs.t', 't/author-pod-coverage.t', 't/author-pod-syntax.t' ); notabs_ok($_) foreach @files; done_testing; examples000755000766000024 013570301633 16142 5ustar00cjfieldsstaff000000000000Bio-Procedural-1.7.4bioperl.pl100755000766000024 4051713570301633 20325 0ustar00cjfieldsstaff000000000000Bio-Procedural-1.7.4/examples#!/usr/bin/perl # bioperl.pl # cjm@fruitfly.org use strict; use lib '.'; no strict "vars"; use Data::Dumper; use Bio::Perl; use Bio::SeqIO; use Getopt::Long; my $h = {}; GetOptions($h, "file|f=s", ); my @cmds = get_default_cmds(); shell($h, \@cmds, @ARGV); # prepare for some seriously hacky code.... sub shell { my $h = shift; my @cmds = @{shift || []}; my @args = @_; my $prompt = $ENV{BIOPERL_PROMPT} || "BioPerl> "; my $quit = 0; my @lines = (); my $r; my $rv; my $seq; my @pseqs = (); my $seqio; my $wseqio; my $fastadb; my $options = {echo=>0, chatty=>10}; my $loadfn = $h->{'file'}; if ($loadfn) { @lines = ("load '$loadfn'"); } sub hr { print "\n===============================\n"; } sub nl { print "\n"; } sub demo { if (! -d 't/data') { print "To run the demo, you must be in the bioperl directory\n"; } @lines = split(/\n/, q[ %keep = %$options; +format '' +outformat '' +echo 1 # BioPerl shell utility - Demo # # We're now going to take a tour # through some of the features of # this tool. # # # This demo will go through some of # the major commands, feeding you # the commands as you go. all you have # to do is hit every time # you see the prompt $prompt # you will then see the output of # the command on your terminal window. # type 'q' to end the tour # at any time. # waitenter # PARSING GENBANK RECORDS # ----------------------- # to parse genbank files, use # the read_seq() method, or # simply use the '<' command. # # First of all we're going to # take a look at the file # 't/data/test.genbank' # Let's examine the file itself # using the unix command "cat" # (you can use any unix command # using the ! at the beginning # of a line) ^!cat t/data/test.genbank waitenter # Ok, you can see this is a # typical file of genbank records. # Let's get the first sequence # from the file ^seq() waitenter # # we can cycle through all the # sequences in the file using # the ',' command. ^, waitenter # this fetched the second sequence # and placed it in the $seq variable # # we can change the output format # by setting the 'outformat' parameter # like this: ^+outformat fasta ^, waitenter # now the sequences are output in # fasta format # to change to embl format: ^+outformat embl ^, waitenter # we can also fetch _all_ seqs from # a file; for this example we will # use t/data/swiss.dat, which is in # swiss format. usually bioperl can guess # the file format from the file extension # but this isn't possible here, so we # must help by setting the input format: ^+format swiss # now lets get all the sequences, like this: ^<*t/data/swiss.dat waitenter # typing <* is equivalent to # using the read_seqs() function, # like this: ^read_seqs('t/data/swiss.dat') waitenter # we now have all the sequences in # the array @seqs # we can write these all out as fasta ^+outformat fasta ^>* # we can also write these out to a file: ^>*myfile.tmp ^!cat myfile.tmp # # RANDOM ACCESS OF FASTA FILES # END +echo 0 %$options = %keep ]); @lines = map { s/^ *//; $_; } @lines; } sub error { if ($error) { print "Error:\n$error"; } else { print "No errors have been reported\n"; } } sub fmt { $options->{format} = shift if @_; print "format=$options->{format}\n"; } # should this move to Bio::Perl ? sub seqio { my $filename = shift; $options->{format} = shift if @_; if( !defined $filename ) { warn "read_sequence($filename) - usage incorrect"; } if( defined $options->{format} ) { $seqio = Bio::SeqIO->new( '-file' => $filename, '-format' => $options->{format}); } else { $seqio = Bio::SeqIO->new( '-file' => $filename); } $seqio; } sub wseqio { my $filename = shift; $options->{format} = shift if @_; my @args = (); if ($filename && $filename !~ /^\>/) { $filename = ">$filename"; } push(@args, -file => "$filename") if $filename; push(@args, -fh => \*STDOUT) unless $filename; push(@args, -format => $options->{outformat}) if $options->{outformat}; $wseqio = Bio::SeqIO->new( @args ); $wseqio; } sub show_seq { return unless $seq; if ($wseqio) { $wseqio->write_seq($seq); } else { printf "seq display id: %s\n", $seq->display_id; } } sub addseq { push(@pseqs, @_); while (scalar(@pseqs) > 50) { # todo - history variable shift @pseqs; } } sub next_seq { if ($seqio) { eval { $seq = $seqio->next_seq; }; if ($@) { $error = $@; print "There was an error getting the seq. Type 'error'\n"; print "for full details\n"; print "(Maybe you have to explicitly set the format?)"; } addseq($seq); } else { print STDERR "use read_seq first\n"; } show_seq; $seq; } sub next_seqs { @seqs = (); if ($seqio) { while ($seq = $seqio->next_seq) { printf "%s\n", $seq->display_id; push(@seqs, $seq); } } $seq = $seqs[$#seqs] if @seqs; @seqs } sub read_seq { seqio(@_); next_seq(); } sub read_seqs { seqio(@_); next_seqs(); } sub write_seq { wseqio(@_); $wseqio->write_seq($seq) if $seq; } sub write_seqs { wseqio(@_); map { $wseqio->write_seq($_) } @seqs; } sub pod { if (!-d "Bio") { print "You need to be in the bioperl directory!\n"; } else { my $mod = shift; unix("pod2text", "Bio/$mod.pm"); } } sub fastadb { require "Bio/DB/Fasta.pm"; my $f = shift; $fastadb = Bio::DB::Fasta->new($f); print "Set \$fastadb object\n"; $fastadb; } sub subseq { if (!$fastadb) { fastadb(shift); } $seq = $fastadb->get_Seq_by_id(shift); if (@_) { printf "%s\n", $seq->subseq(@_); } $seq; } sub load { open(F, shift); @lines = map {chomp;$_} ; close(F); } sub waitenter { print ""; ; } sub showintro { hr; print "This is a text-based commandline interface to BioPerl;\n"; print "\n"; } sub checkoptions { } sub showoptions { my $k = shift; my @k = defined $k ? ($k) : keys %$options; foreach my $ok ($k) { my $v = sprintf("%s", $options->{$k}); if ($v =~ /HASH/) { # hide perl internal details # from user; if they are experienced # perlhackers they can just # type "x $options" to see the # gory details $v = "undisplayable"; } printf("%20s:%s\n", $ok, $b); } } sub set { my ($k,$v) = @_; if (defined($v)) { $options->{$k} = $v; checkoptions; } else { showoptions($k); } # if ($k eq "format") { # seqio; # } if ($k eq "outformat") { wseqio; } } sub echo { my $e = shift; if (defined($e)) { set("echo", $e); } else { set("echo", !$options->{echo}); } } sub options { map {print "$_ = $options->{$_}\n"} keys%$options; } sub showcommands { hr; print "BioPerl Shell Commands:\n"; my $layout = "%5s : %-20s - %s\n"; printf $layout, "cmd", "function", "summary"; printf "%s\n", ("-" x 40); foreach my $c (@cmds) { my $sc = $c->{shortcut}; $sc =~ s/\\//g; printf($layout, $sc, $c->{'func'} . "()", $c->{'summary'} ); } } sub showexamples { print "\nExamples:\n-------\n"; } sub showvariables { hr; print "Shell variables:\n"; print q[ $seq : Bio::SeqI object $seqio : Bio::SeqIO object @pseqs : array of previous Bio::SeqI objects ]; nl; } sub welcome { print "Welcome to the BioPerl shell interface!\n\n"; print "\n\nType 'help' for instructions\n"; print "\n\nType 'demo' for demonstration\n"; print "\n\nThis is ALPHA software - commands may change\n"; print "-lots more commands need to be added to take full\n"; print "advantage of the bioperl functionality\n\n"; } sub help { my $topic = shift; my $c; if ($topic) { ($c) = grep {$_->{func} eq $topic} @cmds; } if ($c) { print "Function: $c->{func}\n"; print "Shortcut: $c->{shortcut}\n" if $c->{shortcut}; print "Summary: $c->{summary}\n" if $c->{summary}; print "=======\n"; print "$c->{docs}\n" if $c->{docs}; } elsif ($topic eq "advanced") { hr; nl; } else { hr; print "\nBioPerl Shell Help\n\n"; showintro; waitenter; showcommands; waitenter; showvariables; waitenter; showexamples; nl; nl; nl; print "Type \"demo\" for an interactive demo of commands\n\n"; print "Type \"help advanced\" for advanced options\n\n"; hr; nl; } } sub p { print shift; print "\n"; } sub x { print Dumper shift; print "\n"; } # trick to allow barewords as keywords... sub advanced {"advanced"} sub unix { my @cmds = @_; my $c = join(" ", @cmds); print `$c`; } welcome; require Term::ReadLine; require Shell; checkoptions; print "\n"; my $termline = shift || Term::ReadLine->new($prompt); my $rcfile = "$ENV{HOME}/.goshellrc"; if (-f $rcfile) { open(F, $rcfile); @lines = ; close(F); } my $end_signal = ""; while (!$quit) { if ($end_signal) { @lines = ($lines); while ($end_signal && ($line = $termline->readline("? "))) { if($line !~ /$end_signal/) { $lines[0].= "\n$line"; } else { $end_signal = ""; } } next; } my $line = @lines ? shift @lines : $termline->readline($prompt); if ($line =~ /^\^/) { $line =~ s/^\^//; print "$prompt$line"; my $e = ; if ($e =~ /^q/) { $line = ""; @lines = (); } } if ($options->{echo} && $line !~ /\+?wait/) { if ($line =~ /^\#/) { print "$line\n"; } else { print "$prompt$line\n"; } if ($options->{sleep}) { sleep $options->{sleep}; } if ($options->{wait}) { sleep $options->{wait}; } } my ($cmd, @w) = split(' ',$line); $_ = $cmd; if (/^\<\<(.*)/) { $end_signal = $1; } # check for shortcuts my $selected; foreach my $c (@cmds) { my $shortcut = $c->{'shortcut'}; next unless $shortcut; if ($line =~ /^$shortcut(.*)/) { if (!defined($selected) || length($shortcut) > length($selected->{shortcut} || "")) { # get the most specific match $selected = $c; } } } if ($selected) { my $shortcut = $selected->{'shortcut'}; if ($line =~ /^$shortcut(.*)/) { my @w = map {"'".$_."'" } split(' ', $1); $line = $selected->{'func'}." ".join(", ", @w); } } $rv = eval $line; # print "\n"; # print "RV=$rv;;;\n"; if ($@) { print STDERR $@; } if ($options->{sleep}) { sleep $options->{sleep}; } if ($options->{wait}) { sleep $options->{wait}; $options->{wait} = 0; } } } sub get_default_cmds { my @cmds = ( { func => 'read_seq', shortcut => '\<', summary => 'read a Seq from a file', }, { func => 'next_seq', shortcut => ',', summary => 'get the next Seq', }, { func => 'read_seqs', shortcut => '\<\*', summary => 'read all Seqs from a file', }, { func => 'write_seq', shortcut => '\>', summary => 'write a Seq to screen/file', }, { func => 'write_seqs', shortcut => '\>\*', summary => 'write a Seq to screen/file', }, { func => 'fastadb', shortcut => 'fa', summary => 'fast fasta access', }, { func => 'subseq', summary => 'get a subseq from a fastadb', }, { func => 'set', shortcut => '\+', summary => 'set a shell parameter', }, { func => 'unix', shortcut => '\!', summary => 'run a unix command', }, { func => 'x', summary => 'display variable (and internals) using dumper', }, ); return @cmds; } author-mojibake.t100644000766000024 35313570301633 20156 0ustar00cjfieldsstaff000000000000Bio-Procedural-1.7.4/t#!perl BEGIN { unless ($ENV{AUTHOR_TESTING}) { print qq{1..0 # SKIP these tests are for testing by the author\n}; exit } } use strict; use warnings qw(all); use Test::More; use Test::Mojibake; all_files_encoding_ok(); Procedural.pm100644000766000024 361313570301633 20404 0ustar00cjfieldsstaff000000000000Bio-Procedural-1.7.4/lib/Biopackage Bio::Procedural; $Bio::Procedural::VERSION = '1.7.4'; use utf8; use strict; use warnings; 1; # ABSTRACT: Simple low-dependency procedural interfaces to BioPerl # AUTHOR: See the individual modules for their authors. # OWNER: many people (see the individual modules for their copyright holders) # LICENSE: Perl_5 __END__ =pod =encoding UTF-8 =head1 NAME Bio::Procedural - Simple low-dependency procedural interfaces to BioPerl =head1 VERSION version 1.7.4 =head1 SYNOPSIS See L for examples. =head1 DESCRIPTION The code in this distribution focuses on simple low-dependency procedural interfaces to BioPerl that don't require knowledge of BioPerl classes and methods. =head1 FEEDBACK =head2 Mailing lists User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to the Bioperl mailing list. Your participation is much appreciated. bioperl-l@bioperl.org - General discussion https://bioperl.org/Support.html - About the mailing lists =head2 Support Please direct usage questions or support issues to the mailing list: I 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. =head2 Reporting bugs Report bugs to the Bioperl bug tracking system to help us keep track of the bugs and their resolution. Bug reports can be submitted via the web: https://github.com/bioperl/bio-procedural/issues =head1 AUTHOR See the individual modules for their authors. =head1 COPYRIGHT This software is copyright (c) by many people (see the individual modules for their copyright holders). This software is available under the same terms as the perl 5 programming language system itself. =cut author-pod-syntax.t100644000766000024 45413570301633 20505 0ustar00cjfieldsstaff000000000000Bio-Procedural-1.7.4/t#!perl BEGIN { unless ($ENV{AUTHOR_TESTING}) { print qq{1..0 # SKIP these tests are for testing by the author\n}; exit } } # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. use strict; use warnings; use Test::More; use Test::Pod 1.41; all_pod_files_ok(); author-pod-coverage.t100644000766000024 53613570301633 20753 0ustar00cjfieldsstaff000000000000Bio-Procedural-1.7.4/t#!perl BEGIN { unless ($ENV{AUTHOR_TESTING}) { print qq{1..0 # SKIP these tests are for testing by the author\n}; exit } } # This file was automatically generated by Dist::Zilla::Plugin::PodCoverageTests. use Test::Pod::Coverage 1.08; use Pod::Coverage::TrustPod; all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' });