maq-0.7.1/0000755000076600000240000000000011067173056010655 5ustar lh3staffmaq-0.7.1/AUTHORS0000644000076600000240000000005710766735650011740 0ustar lh3staff Heng Li wrote all the codes of this project. maq-0.7.1/COPYING0000644000076600000240000010451311043135375011710 0ustar lh3staff GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), 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 prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey 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; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU 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 that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. 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. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 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. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS 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 the public, 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 state 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) 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 3 of the License, 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, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program 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, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . maq-0.7.1/ChangeLog0000644000076600000240000043310711065656462012444 0ustar lh3staff------------------------------------------------------------------------ r666 | lh3lh3 | 2008-09-21 20:31:54 +0100 (Sun, 21 Sep 2008) | 2 lines Changed paths: M /branches/lh3/maq/ChangeLog M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/eland2maq.cc updated novo2maq ------------------------------------------------------------------------ r665 | lh3lh3 | 2008-09-17 13:09:01 +0100 (Wed, 17 Sep 2008) | 3 lines Changed paths: M /branches/lh3/maq/scripts/fq_all2std.pl * fq_all2std.pl-0.1.7 * convert fastq to .seq+.qual format ------------------------------------------------------------------------ r662 | lh3lh3 | 2008-09-08 14:09:02 +0100 (Mon, 08 Sep 2008) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/simulate.c * maq-0.6.8-5 * fixed a flaw in simulate.c ------------------------------------------------------------------------ r661 | lh3lh3 | 2008-09-04 22:44:59 +0100 (Thu, 04 Sep 2008) | 5 lines Changed paths: M /branches/lh3/maq/ChangeLog M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/dword.hh M /branches/lh3/maq/eland2maq.cc M /branches/lh3/maq/indel_pe.cc M /branches/lh3/maq/maqmap.h M /branches/lh3/maq/match.cc M /branches/lh3/maq/match.hh M /branches/lh3/maq/match_aux.cc M /branches/lh3/maq/sort_mapping.cc * maq-0.6.8-4 * support long reads and this is the default. It works on toy examples. Further testing is needed. * Fixed a bug in novo2maq ------------------------------------------------------------------------ r660 | lh3lh3 | 2008-09-04 20:01:44 +0100 (Thu, 04 Sep 2008) | 4 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/indel_pe.cc M /branches/lh3/maq/stdaln.c M /branches/lh3/maq/stdaln.h * maq-0.6.8-3 * apparently fixed a segfault in indelpe * reduce debugging information in indelpe ------------------------------------------------------------------------ r659 | lh3lh3 | 2008-08-27 09:25:33 +0100 (Wed, 27 Aug 2008) | 4 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/bfa.c M /branches/lh3/maq/bfa.h M /branches/lh3/maq/configure.ac M /branches/lh3/maq/indel_pe.cc M /branches/lh3/maq/match.cc * maq-0.6.8-2 * map: better stats * indelpe: better boundary check, but it still segfaults ------------------------------------------------------------------------ r657 | lh3lh3 | 2008-08-19 09:53:26 +0100 (Tue, 19 Aug 2008) | 9 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/eland2maq.cc M /branches/lh3/maq/indel_pe.cc M /branches/lh3/maq/main.c M /branches/lh3/maq/main.h M /branches/lh3/maq/match.cc M /branches/lh3/maq/match.hh M /branches/lh3/maq/match_aux.cc M /branches/lh3/maq/scripts/asub M /branches/lh3/maq/scripts/fq_all2std.pl * maq-0.6.8-1 * map: added -W to disable Smith-Waterman alignment. It segfaults for Aylwyn's alignment and I have not figured out the cause. * Added novo2map to convert novocraft alignment to .map, provided by Colin. * fq_all2std.pl: added std2sol to convert Sanger fastq to Solexa fastq * asub-0.1.5: added -M to set maximum memory on Sanger's farm; added -n to specify the maximum cores for parallel jobs ------------------------------------------------------------------------ r651 | lh3lh3 | 2008-07-27 17:07:44 +0100 (Sun, 27 Jul 2008) | 2 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/NEWS M /branches/lh3/maq/configure.ac M /branches/lh3/maq/maq.pod Release maq-0.6.8 ------------------------------------------------------------------------ r648 | lh3lh3 | 2008-07-27 13:38:43 +0100 (Sun, 27 Jul 2008) | 2 lines Changed paths: M /branches/lh3/maq/maq.pod update man page ------------------------------------------------------------------------ r647 | lh3lh3 | 2008-07-27 00:19:13 +0100 (Sun, 27 Jul 2008) | 3 lines Changed paths: M /branches/lh3/maq/ChangeLog M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/assopt.c M /branches/lh3/maq/configure.ac * maq-0.6.8-9 * fixed a potential compiling error in assopt.c ------------------------------------------------------------------------ r646 | lh3lh3 | 2008-07-24 15:46:31 +0100 (Thu, 24 Jul 2008) | 4 lines Changed paths: M /branches/lh3/maq/COPYING M /branches/lh3/maq/ChangeLog M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/indel_pe.cc * maq-0.6.7-8 * fixed a potential bug in indel_pe.cc * change COPYING to GPLv3 ------------------------------------------------------------------------ r645 | lh3lh3 | 2008-07-24 15:45:47 +0100 (Thu, 24 Jul 2008) | 2 lines Changed paths: M /branches/lh3/maq/scripts/maq_plot.pl use /usr/bin/perl instead of /usr/local/bin/perl ------------------------------------------------------------------------ r644 | lh3lh3 | 2008-07-24 15:45:08 +0100 (Thu, 24 Jul 2008) | 3 lines Changed paths: M /branches/lh3/maq/scripts/maq_sanger.pl * maq_sanger.pl-0.1.16 * support .fq ------------------------------------------------------------------------ r643 | lh3lh3 | 2008-07-16 10:08:41 +0100 (Wed, 16 Jul 2008) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/mapcheck.cc * maq-0.6.7-7 * mapcheck: fixed a bug caused by previous modification ------------------------------------------------------------------------ r642 | lh3lh3 | 2008-07-16 09:51:40 +0100 (Wed, 16 Jul 2008) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/mapcheck.cc * maq-0.6.7-6 * mapcheck: fixed a bug in the last modification ------------------------------------------------------------------------ r641 | lh3lh3 | 2008-07-15 15:16:52 +0100 (Tue, 15 Jul 2008) | 7 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/mapcheck.cc M /branches/lh3/maq/scripts/maq_sanger.pl M /branches/lh3/maq/scripts/paf_utils.pl * paf_utils.pl-0.3.2 * partially support novoalign/novopaired * maq_sanger.pl-0.1.15 * dump unmapped reads * maq-0.6.7-5 * filter out know polymorphic positions ------------------------------------------------------------------------ r640 | lh3lh3 | 2008-06-29 09:58:27 +0100 (Sun, 29 Jun 2008) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/sort_mapping.cc * maq-0.6.7-4 * map: only dump unmapped reads ------------------------------------------------------------------------ r637 | lh3lh3 | 2008-06-26 13:57:37 +0100 (Thu, 26 Jun 2008) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/glfgen.cc * maq-0.6.7-3 * fixed a memory leak ------------------------------------------------------------------------ r635 | lh3lh3 | 2008-06-25 20:36:31 +0100 (Wed, 25 Jun 2008) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/assopt.c M /branches/lh3/maq/configure.ac * maq-0.6.7-2 * assemble: change default -t to 0.85 ------------------------------------------------------------------------ r634 | lh3lh3 | 2008-06-25 17:02:41 +0100 (Wed, 25 Jun 2008) | 2 lines Changed paths: A /branches/lh3/glf A /branches/lh3/glf/Makefile A /branches/lh3/glf/glf.c A /branches/lh3/glf/glf.h A /branches/lh3/glf/glf_main.c A /branches/lh3/glf/izlib A /branches/lh3/glf/izlib/Makefile A /branches/lh3/glf/izlib/adler32.c A /branches/lh3/glf/izlib/compress.c A /branches/lh3/glf/izlib/crc32.c A /branches/lh3/glf/izlib/crc32.h A /branches/lh3/glf/izlib/deflate.c A /branches/lh3/glf/izlib/deflate.h A /branches/lh3/glf/izlib/gzio.c A /branches/lh3/glf/izlib/infback.c A /branches/lh3/glf/izlib/inffast.c A /branches/lh3/glf/izlib/inffast.h A /branches/lh3/glf/izlib/inffixed.h A /branches/lh3/glf/izlib/inflate.c A /branches/lh3/glf/izlib/inflate.h A /branches/lh3/glf/izlib/inftrees.c A /branches/lh3/glf/izlib/inftrees.h A /branches/lh3/glf/izlib/izio.c A /branches/lh3/glf/izlib/izlib.h A /branches/lh3/glf/izlib/trees.c A /branches/lh3/glf/izlib/trees.h A /branches/lh3/glf/izlib/uncompr.c A /branches/lh3/glf/izlib/zconf.h A /branches/lh3/glf/izlib/zindex.c A /branches/lh3/glf/izlib/zlib.h A /branches/lh3/glf/izlib/zran.c A /branches/lh3/glf/izlib/zutil.c A /branches/lh3/glf/izlib/zutil.h A /branches/lh3/glf/stdhash A /branches/lh3/glf/stdhash/Makefile A /branches/lh3/glf/stdhash/simple_test.c A /branches/lh3/glf/stdhash/stdhash.hh A /branches/lh3/glf/stdhash/stdhash_test.cc A /branches/lh3/glf/stdhash/stdhashc.cc A /branches/lh3/glf/stdhash/stdhashc.h M /branches/lh3/maq/configure.ac utilities for .glz format ------------------------------------------------------------------------ r633 | lh3lh3 | 2008-06-25 15:20:49 +0100 (Wed, 25 Jun 2008) | 5 lines Changed paths: M /branches/lh3/maq/Makefile.am M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/assemble.cc A /branches/lh3/maq/glf.h A /branches/lh3/maq/glfgen.cc M /branches/lh3/maq/main.c M /branches/lh3/maq/main.h * maq-0.6.7-1 * add glfgen * fixed a bug in assemble * the default parameters should be updated due to that bug!!! ------------------------------------------------------------------------ r630 | lh3lh3 | 2008-06-23 15:03:02 +0100 (Mon, 23 Jun 2008) | 2 lines Changed paths: M /branches/lh3/maq/NEWS M /branches/lh3/maq/maq.pod Release maq-0.6.7 ------------------------------------------------------------------------ r629 | lh3lh3 | 2008-06-23 14:48:36 +0100 (Mon, 23 Jun 2008) | 3 lines Changed paths: M /branches/lh3/maq/ChangeLog M /branches/lh3/maq/maq.pod * update ChangeLog and maq.pod * prepare to release maq-0.6.7 ------------------------------------------------------------------------ r628 | lh3lh3 | 2008-06-23 14:47:15 +0100 (Mon, 23 Jun 2008) | 6 lines Changed paths: M /branches/lh3/maq/scripts/maq.pl * maq.pl-0.4.7 * SNPfilter: also filter on consensus quality * easyrun: change for SNPfilter. cns.filter.snp is now a symbolic link to cns.final.snp * easyrun: do not apply splitread by default ------------------------------------------------------------------------ r627 | lh3lh3 | 2008-06-23 14:45:15 +0100 (Mon, 23 Jun 2008) | 3 lines Changed paths: M /branches/lh3/maq/scripts/maq_eval.pl * maq_eval.pl-0.1.11 * geno: print lines where genotyping calls a hom, but maq calls differently ------------------------------------------------------------------------ r626 | lh3lh3 | 2008-06-17 15:54:06 +0100 (Tue, 17 Jun 2008) | 4 lines Changed paths: M /branches/lh3/maq/Makefile.am M /branches/lh3/maq/Makefile.generic A /branches/lh3/maq/break_pair.c M /branches/lh3/maq/configure.ac M /branches/lh3/maq/main.c M /branches/lh3/maq/main.h M /branches/lh3/maq/mapcheck.cc * maq-0.6.6-14 * add breakpair: for David's script * mapcheck: output the count of qualities - also for David's script ------------------------------------------------------------------------ r625 | lh3lh3 | 2008-06-17 14:46:26 +0100 (Tue, 17 Jun 2008) | 5 lines Changed paths: M /branches/lh3/maq/scripts/maq.pl * maq.pl-0.4.6 * SNPfilter: improve indel filter, as maq always puts the indel at the beginning of a homopolymer run * easyrun: allow to skip splitread indel detection ------------------------------------------------------------------------ r624 | lh3lh3 | 2008-06-17 14:43:52 +0100 (Tue, 17 Jun 2008) | 3 lines Changed paths: M /branches/lh3/maq/scripts/maq_eval.pl * maq_eval.pl-0.1.10 * improve the evaluation of indelpe ------------------------------------------------------------------------ r623 | lh3lh3 | 2008-06-06 14:05:20 +0100 (Fri, 06 Jun 2008) | 4 lines Changed paths: M /branches/lh3/maq/scripts/maq.pl * maq.pl-0.4.4 * indelpe: fix a bug in parsing command-line options * indelpe: change the default options ------------------------------------------------------------------------ r622 | lh3lh3 | 2008-06-05 20:54:14 +0100 (Thu, 05 Jun 2008) | 5 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/assemble.h M /branches/lh3/maq/configure.ac M /branches/lh3/maq/get_pos.c M /branches/lh3/maq/indel_call.cc M /branches/lh3/maq/merge.cc M /branches/lh3/maq/scripts/maq.pl * maq-0.6.6-13 * indelpe: output number of mismatches of reads mapped without indels * maq.pl-0.4.3 * filter based on this information ------------------------------------------------------------------------ r621 | lh3lh3 | 2008-05-30 00:04:55 +0100 (Fri, 30 May 2008) | 7 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/assemble.h M /branches/lh3/maq/configure.ac M /branches/lh3/maq/get_pos.c M /branches/lh3/maq/indel_call.cc M /branches/lh3/maq/main.c M /branches/lh3/maq/main.h M /branches/lh3/maq/maqmap.c M /branches/lh3/maq/merge.cc M /branches/lh3/maq/scripts/maq.pl * maq-0.6.6-11 * indelpe: output indel bases * mapmerge: detect corrupted .map files * add mapvalidate: detect correpted .map files * maq.pl * add indelpe: correct counts for homopolymer runs ------------------------------------------------------------------------ r620 | lh3lh3 | 2008-05-24 10:06:20 +0100 (Sat, 24 May 2008) | 5 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/assemble.h M /branches/lh3/maq/configure.ac M /branches/lh3/maq/get_pos.c M /branches/lh3/maq/indel_call.cc M /branches/lh3/maq/indel_pe.cc * maq-0.6.6-10 * fixed bug in map: positions for insertions are shifted by 1bp * output more information about indel * have NOT tested yet ------------------------------------------------------------------------ r619 | lh3lh3 | 2008-05-23 12:40:03 +0100 (Fri, 23 May 2008) | 7 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match.cc M /branches/lh3/maq/sort_mapping.cc M /branches/lh3/maq/submap.c * maq-0.6.6-9 * also put unmapped reads in a pair in the alignment file. it will get a flag 192 * fix a bug in submap * map: give an error when -n 0 is used ------------------------------------------------------------------------ r618 | lh3lh3 | 2008-05-21 15:14:57 +0100 (Wed, 21 May 2008) | 3 lines Changed paths: M /branches/lh3/maq/scripts/maq.pl * maq.pl-0.4.2 * change filters for splitread indels ------------------------------------------------------------------------ r617 | lh3lh3 | 2008-05-19 11:58:17 +0100 (Mon, 19 May 2008) | 5 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match.cc M /branches/lh3/maq/scripts/maq_sanger.pl M /branches/lh3/maq/sort_mapping.cc * maq-0.6.6-8 * map: fix a bug for alignment on Illumina long insert-size library * maq_sanger.pl-0.1.14 * support long insert library ------------------------------------------------------------------------ r616 | lh3lh3 | 2008-05-18 23:56:48 +0100 (Sun, 18 May 2008) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match.cc M /branches/lh3/maq/match.hh M /branches/lh3/maq/match_aux.cc M /branches/lh3/maq/sort_mapping.cc * maq-0.6.6-7 * map: option to output pair-2-diff flag (for splitread ONLY) ------------------------------------------------------------------------ r615 | lh3lh3 | 2008-05-18 23:55:09 +0100 (Sun, 18 May 2008) | 7 lines Changed paths: M /branches/lh3/maq/scripts/maq.pl * maq.pl-0.4.1 * easyrun: more options for parameter tuning * SNPfilter: filter for splitread indels * SNPfilter: change default indel window to 5 * SNPfilter: remove the hidden filter * easyrun: filter for splitread indels ------------------------------------------------------------------------ r614 | lh3lh3 | 2008-05-18 18:31:38 +0100 (Sun, 18 May 2008) | 3 lines Changed paths: M /branches/lh3/maq/scripts/maq.pl * maq.pl-0.4.0 * splitread: find short indels by SplitRead (VERY SLOW) ------------------------------------------------------------------------ r613 | lh3lh3 | 2008-05-17 16:00:09 +0100 (Sat, 17 May 2008) | 3 lines Changed paths: M /branches/lh3/maq/ChangeLog M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match.cc M /branches/lh3/maq/scripts/maq.pl * maq-0.6.6-6 * reduce the minimum read length to 12 ------------------------------------------------------------------------ r612 | lh3lh3 | 2008-05-17 13:56:45 +0100 (Sat, 17 May 2008) | 3 lines Changed paths: M /branches/lh3/maq/scripts/maq.pl * maq.pl-0.3.13 * sv: fix a bug ------------------------------------------------------------------------ r611 | lh3lh3 | 2008-05-14 22:37:24 +0100 (Wed, 14 May 2008) | 5 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/scripts/maq.pl M /branches/lh3/maq/sort_mapping.cc * maq.pl-0.3.13 * change default quality cut-off to 40 * maq-0.6.6-5 * map: long insert-size seems to work ------------------------------------------------------------------------ r610 | lh3lh3 | 2008-05-14 17:11:00 +0100 (Wed, 14 May 2008) | 13 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/assemble.cc M /branches/lh3/maq/assopt.c M /branches/lh3/maq/aux_utils.c M /branches/lh3/maq/configure.ac M /branches/lh3/maq/scripts/maq.pl * maq-0.6.6-4 * assemble: fix a minor bug since 0.6.4, which may affect a small fraction of SNP calls. * assemble: a tiny fix for approximation * assemble: add independent model, but it does not work well at all (maybe another bug?). * assemble: output debugging information * cns2snp/cns2view: output base2, base3 and qual2 * map: long insert-size codes have not been tested at all * maq.pl-0.3.12 * easyrun: add more options * easyrun: change consensus quality filter to (I think) the correct way ------------------------------------------------------------------------ r609 | lh3lh3 | 2008-05-11 19:57:27 +0100 (Sun, 11 May 2008) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/indel_pe.cc M /branches/lh3/maq/match.cc M /branches/lh3/maq/match.hh M /branches/lh3/maq/sort_mapping.cc * maq-0.6.6-3 * initial codes for Illumina long insert library, not tested at all ------------------------------------------------------------------------ r608 | lh3lh3 | 2008-05-05 21:32:46 +0100 (Mon, 05 May 2008) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/NEWS M /branches/lh3/maq/assemble.cc M /branches/lh3/maq/assemble.h M /branches/lh3/maq/assopt.c M /branches/lh3/maq/configure.ac * maq-0.6.6-2 * initial codes for pooled sample, which apparently work but not tested. ------------------------------------------------------------------------ r607 | lh3lh3 | 2008-05-01 10:55:49 +0100 (Thu, 01 May 2008) | 5 lines Changed paths: M /branches/lh3/maq/scripts/maq_eval.pl M /branches/lh3/maq/scripts/maq_post.pl * maq_eval.pl-0.1.8 * fix a bug when length >2Gbp * maq_post.pl-0.1.2 * fix a bug when hapmap2.snp is not present ------------------------------------------------------------------------ r606 | lh3lh3 | 2008-04-30 14:04:41 +0100 (Wed, 30 Apr 2008) | 3 lines Changed paths: A /branches/lh3/maq/scripts/maq_post.pl M /branches/lh3/maq/scripts/maq_sanger.pl * add maq_post.pl: post process the maq alignment (for Sanger only) * remove aln.map.touch in the end ------------------------------------------------------------------------ r601 | lh3lh3 | 2008-04-27 19:52:12 +0100 (Sun, 27 Apr 2008) | 2 lines Changed paths: M /branches/lh3/maq/FUTURES M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/NEWS M /branches/lh3/maq/configure.ac M /branches/lh3/maq/maq.pod Release maq-0.6.6 ------------------------------------------------------------------------ r600 | lh3lh3 | 2008-04-27 19:24:25 +0100 (Sun, 27 Apr 2008) | 4 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/maq.pod M /branches/lh3/maq/match.cc * maq-0.6.5-3 * map: fix a bug in dumping multi-hit * add "map -H/-C" to manual page ------------------------------------------------------------------------ r597 | lh3lh3 | 2008-04-22 23:19:43 +0100 (Tue, 22 Apr 2008) | 4 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/assemble.h M /branches/lh3/maq/configure.ac M /branches/lh3/maq/mapcheck.cc M /branches/lh3/maq/match.cc M /branches/lh3/maq/match.hh M /branches/lh3/maq/match_aux.cc M /branches/lh3/maq/read.cc M /branches/lh3/maq/read.h * maq-0.6.5-2 * add to mapcheck.cc * output multiple 01-mismatch hits ------------------------------------------------------------------------ r596 | lh3lh3 | 2008-04-22 21:57:19 +0100 (Tue, 22 Apr 2008) | 2 lines Changed paths: M /branches/lh3/maq/scripts/maq_eval.pl trivial... ------------------------------------------------------------------------ r595 | lh3lh3 | 2008-04-22 13:10:32 +0100 (Tue, 22 Apr 2008) | 3 lines Changed paths: M /branches/lh3/maq/scripts/maq_eval.pl * maq_eval.pl-0.1.7 * print out wrong SNPs for mono sites ------------------------------------------------------------------------ r593 | lh3lh3 | 2008-04-20 22:03:15 +0100 (Sun, 20 Apr 2008) | 4 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/aux_utils.c M /branches/lh3/maq/configure.ac M /branches/lh3/maq/simulate.c * maq-0.6.5-1 * spot a bug in simulate.c. not fixed, yet * non-SNPable regions are masked as lowcase letters ------------------------------------------------------------------------ r592 | lh3lh3 | 2008-04-20 22:01:49 +0100 (Sun, 20 Apr 2008) | 3 lines Changed paths: M /branches/lh3/maq/scripts/maq_sanger.pl * maq_sanger.pl-0.1.12 * allow to set maximum read length ------------------------------------------------------------------------ r590 | lh3lh3 | 2008-04-19 21:58:27 +0100 (Sat, 19 Apr 2008) | 4 lines Changed paths: M /branches/lh3/maq/scripts/maq_sanger.pl * maq_sanger.pl-0.1.11 * remove read name filtering * support alignment for reads in Solexa fastq format ------------------------------------------------------------------------ r589 | lh3lh3 | 2008-04-19 20:29:15 +0100 (Sat, 19 Apr 2008) | 4 lines Changed paths: M /branches/lh3/maq/scripts/maq_sanger.pl * maq_sanger.pl-0.1.10 * add gzip support * filtering read names (NOT use that!) ------------------------------------------------------------------------ r588 | lh3lh3 | 2008-04-19 20:25:54 +0100 (Sat, 19 Apr 2008) | 3 lines Changed paths: M /branches/lh3/maq/scripts/maq.pl * maq.pl-0.3.11 * support .gz files in cat2pair ------------------------------------------------------------------------ r587 | lh3lh3 | 2008-04-18 19:34:32 +0100 (Fri, 18 Apr 2008) | 2 lines Changed paths: M /branches/lh3/maq/scripts/maq_sanger.pl fix a bug ------------------------------------------------------------------------ r586 | lh3lh3 | 2008-04-12 00:01:50 +0100 (Sat, 12 Apr 2008) | 4 lines Changed paths: M /branches/lh3/maq/scripts/asub * asub-0.1.3 * add job dependency for SGE (have not tested yet) * add instructions ------------------------------------------------------------------------ r585 | lh3lh3 | 2008-04-12 00:01:04 +0100 (Sat, 12 Apr 2008) | 3 lines Changed paths: M /branches/lh3/maq/scripts/maq_sanger.pl * maq_sanger.pl-0.1.8 * change default parameters ------------------------------------------------------------------------ r581 | lh3lh3 | 2008-04-01 22:48:26 +0100 (Tue, 01 Apr 2008) | 2 lines Changed paths: M /branches/lh3/maq/NEWS clarifying some ambiguous point ------------------------------------------------------------------------ r580 | lh3lh3 | 2008-04-01 22:10:33 +0100 (Tue, 01 Apr 2008) | 4 lines Changed paths: M /branches/lh3/maq/scripts/fq_all2std.pl M /branches/lh3/maq/scripts/maq.pl * fq_all2std.pl-0.1.6 * maq.pl-0.3.10 * for convert the latest Illumina data ------------------------------------------------------------------------ r577 | lh3lh3 | 2008-03-28 23:26:11 +0000 (Fri, 28 Mar 2008) | 2 lines Changed paths: M /branches/lh3/maq/ChangeLog M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/NEWS M /branches/lh3/maq/configure.ac M /branches/lh3/maq/maq.pod Release maq-0.6.5 ------------------------------------------------------------------------ r576 | lh3lh3 | 2008-03-28 22:17:11 +0000 (Fri, 28 Mar 2008) | 5 lines Changed paths: M /branches/lh3/maq/ChangeLog M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/assemble.cc M /branches/lh3/maq/configure.ac * maq-0.6.4-9 * assemble: fix a bug when reference is shorter than 3bp * update ChangeLog * prepare to release maq-0.6.5 ------------------------------------------------------------------------ r575 | lh3lh3 | 2008-03-28 22:12:40 +0000 (Fri, 28 Mar 2008) | 3 lines Changed paths: M /branches/lh3/maq/scripts/paf_utils.pl * paf_utils.pl-0.3.1 * output normodds score if available ------------------------------------------------------------------------ r574 | lh3lh3 | 2008-03-27 13:02:07 +0000 (Thu, 27 Mar 2008) | 4 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/csmap2ntmap.cc M /branches/lh3/maq/simulate.c * maq-0.6.4-8 * fix a critical bug in csmap2nt * fix a potential memory violation in simulate. Thank Zamin Iqbal. ------------------------------------------------------------------------ r572 | lh3lh3 | 2008-03-26 23:06:33 +0000 (Wed, 26 Mar 2008) | 5 lines Changed paths: M /branches/lh3/maq/ChangeLog M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/csmap2ntmap.cc * maq-0.6.4-7 * csmap2nt: remove the last color (this will not affect the result) * update ChangeLog * prepare to do the final test before release ------------------------------------------------------------------------ r570 | lh3lh3 | 2008-03-26 11:22:10 +0000 (Wed, 26 Mar 2008) | 8 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/rmdup.cc M /branches/lh3/maq/sort_mapping.cc * maq-0.6.4-6 * pair-dist is now the distance between 5'-end of the read. SOLiD distance will be affected. * the new distance may avoid potential inconsistency in previous version * for SOLiD, use PE mapping quality if there are 3 or fewer mismatches * in rmdup, avoid discarding some read pairs. However, it may still drop some read pairs with very short insert size. ------------------------------------------------------------------------ r569 | lh3lh3 | 2008-03-25 22:16:43 +0000 (Tue, 25 Mar 2008) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/indel_soa.cc * maq-0.6.4-5 * fix a potential memory violation indelsoa ------------------------------------------------------------------------ r568 | lh3lh3 | 2008-03-25 15:28:11 +0000 (Tue, 25 Mar 2008) | 4 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/csmap2ntmap.cc * maq-0.6.4-4 * use dynamic programming to decode the nucleotide sequence. DP is more robust and consistent. ------------------------------------------------------------------------ r563 | lh3lh3 | 2008-03-25 13:08:06 +0000 (Tue, 25 Mar 2008) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/csmap2ntmap.cc A /branches/lh3/maq-nt (from /branches/lh3/maq-xp:468) D /branches/lh3/maq-xp * maq (unfinished changes) * rename maq-xp as maq-nt ------------------------------------------------------------------------ r559 | lh3lh3 | 2008-03-24 22:06:29 +0000 (Mon, 24 Mar 2008) | 3 lines Changed paths: M /branches/lh3/maq/scripts/maq.pl * maq.pl-0.3.9 * add "-n" to SNPfilter ------------------------------------------------------------------------ r558 | lh3lh3 | 2008-03-24 21:59:50 +0000 (Mon, 24 Mar 2008) | 3 lines Changed paths: M /branches/lh3/maq/scripts/maq_eval.pl * maq_eval.pl-0.1.6 * improve geno ------------------------------------------------------------------------ r557 | lh3lh3 | 2008-03-24 20:33:32 +0000 (Mon, 24 Mar 2008) | 3 lines Changed paths: M /branches/lh3/maq/scripts/maq.pl * maq.pl-0.3.8 * add a hidden parameter to SNPfilter ------------------------------------------------------------------------ r554 | lh3lh3 | 2008-03-23 21:02:23 +0000 (Sun, 23 Mar 2008) | 5 lines Changed paths: M /branches/lh3/maq/Makefile.am M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/assemble.cc M /branches/lh3/maq/configure.ac A /branches/lh3/maq/csmap2ntmap.cc M /branches/lh3/maq/indel_call.cc M /branches/lh3/maq/indel_soa.cc M /branches/lh3/maq/main.c M /branches/lh3/maq/main.h M /branches/lh3/maq/mapcheck.cc M /branches/lh3/maq/pileup.cc * maq-0.6.4-2 * fix potential memory leak in assemble, pileup, indelpe, indelsoa, mapcheck * add csmap2nt, which converts cs .map file to nt .map file now SOLiD support has been accompished ------------------------------------------------------------------------ r553 | lh3lh3 | 2008-03-23 16:07:24 +0000 (Sun, 23 Mar 2008) | 6 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/scripts/paf_utils.pl M /branches/lh3/maq/sort_mapping.cc * paf_utils.pl-0.3.0 * add parser for shrimp * fix various bugs * maq-0.6.4-1 * fix a bug related to long read names ------------------------------------------------------------------------ r549 | lh3lh3 | 2008-03-21 14:33:14 +0000 (Fri, 21 Mar 2008) | 2 lines Changed paths: M /branches/lh3/maq/scripts/solid2fastq.pl A /branches/lh3/raf A /branches/lh3/raf/Makefile A /branches/lh3/raf/btree.c A /branches/lh3/raf/btree.h A /branches/lh3/raf/raf.c A /branches/lh3/raf/raf.h A /branches/lh3/raf/raf_index.c A /branches/lh3/raf/raf_index.h A /branches/lh3/raf/raf_main.c A /branches/lh3/raf/stdhash A /branches/lh3/raf/stdhash/stdhash.hh A /branches/lh3/raf/stdhash/stdhashc.cc A /branches/lh3/raf/stdhash/stdhashc.h A /branches/lh3/raf/zrlib A /branches/lh3/raf/zrlib/Makefile A /branches/lh3/raf/zrlib/adler32.c A /branches/lh3/raf/zrlib/compress.c A /branches/lh3/raf/zrlib/crc32.c A /branches/lh3/raf/zrlib/crc32.h A /branches/lh3/raf/zrlib/deflate.c A /branches/lh3/raf/zrlib/deflate.h A /branches/lh3/raf/zrlib/gzio.c A /branches/lh3/raf/zrlib/infback.c A /branches/lh3/raf/zrlib/inffast.c A /branches/lh3/raf/zrlib/inffast.h A /branches/lh3/raf/zrlib/inffixed.h A /branches/lh3/raf/zrlib/inflate.c A /branches/lh3/raf/zrlib/inflate.h A /branches/lh3/raf/zrlib/inftrees.c A /branches/lh3/raf/zrlib/inftrees.h A /branches/lh3/raf/zrlib/trees.c A /branches/lh3/raf/zrlib/trees.h A /branches/lh3/raf/zrlib/uncompr.c A /branches/lh3/raf/zrlib/zconf.h A /branches/lh3/raf/zrlib/zlib.h A /branches/lh3/raf/zrlib/zrio.c A /branches/lh3/raf/zrlib/zrio.h A /branches/lh3/raf/zrlib/zrio_main.c A /branches/lh3/raf/zrlib/zutil.c A /branches/lh3/raf/zrlib/zutil.h This is Jue's maqindex, but C interface has been changed by me. ------------------------------------------------------------------------ r545 | lh3lh3 | 2008-03-16 19:57:55 +0000 (Sun, 16 Mar 2008) | 2 lines Changed paths: A /branches/lh3/maq/scripts/solid2fastq.pl convert SOLiD read format to fastq ------------------------------------------------------------------------ r536 | lh3lh3 | 2008-03-15 11:51:08 +0000 (Sat, 15 Mar 2008) | 2 lines Changed paths: M /branches/lh3/maq/ChangeLog M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/NEWS M /branches/lh3/maq/configure.ac Release maq-0.6.4 ------------------------------------------------------------------------ r535 | lh3lh3 | 2008-03-15 11:03:40 +0000 (Sat, 15 Mar 2008) | 3 lines Changed paths: M /branches/lh3/maq/scripts/maq.pl * maq.pl-0.3.7 * fixed a bug in path recognization ------------------------------------------------------------------------ r534 | lh3lh3 | 2008-03-15 11:02:36 +0000 (Sat, 15 Mar 2008) | 3 lines Changed paths: M /branches/lh3/maq/scripts/maq_sanger.pl * maq_sanger.pl-0.1.6 * fix a bug ------------------------------------------------------------------------ r533 | lh3lh3 | 2008-03-14 23:26:02 +0000 (Fri, 14 Mar 2008) | 4 lines Changed paths: M /branches/lh3/maq/scripts/paf_utils.pl * paf_utils.pl-0.2.1 * improve the parser * add instructions ------------------------------------------------------------------------ r532 | lh3lh3 | 2008-03-14 21:38:01 +0000 (Fri, 14 Mar 2008) | 3 lines Changed paths: M /branches/lh3/maq/scripts/paf_utils.pl * paf_utils.pl-0.2.0 * convert .mapview file to .map ------------------------------------------------------------------------ r531 | lh3lh3 | 2008-03-14 12:52:21 +0000 (Fri, 14 Mar 2008) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/subsnp.cc * maq-0.6.3-34 * snpreg: also filter on the neighbouring quality ------------------------------------------------------------------------ r530 | lh3lh3 | 2008-03-14 10:36:28 +0000 (Fri, 14 Mar 2008) | 3 lines Changed paths: M /branches/lh3/maq/scripts/fq_all2std.pl * fq_all2std.pl-0.1.5 * change for latest Illumina format ------------------------------------------------------------------------ r529 | lh3lh3 | 2008-03-13 23:54:17 +0000 (Thu, 13 Mar 2008) | 6 lines Changed paths: M /branches/lh3/maq/maq.pod M /branches/lh3/maq/scripts/maq.pl M /branches/lh3/maq/scripts/maq_sanger.pl * maq.pl-0.3.6 * change default -D in SNPfilter * maq_sanger.pl-0.1.5 * skip directories * update documentations ------------------------------------------------------------------------ r528 | lh3lh3 | 2008-03-12 23:18:08 +0000 (Wed, 12 Mar 2008) | 4 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match.cc * maq-0.6.3-33 * Contradictary to my intuition, use 24bit in indexing is faster than 25bit indexing. Probably due to the cache efficiency (again)... ------------------------------------------------------------------------ r527 | lh3lh3 | 2008-03-12 21:26:59 +0000 (Wed, 12 Mar 2008) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match.cc * maq-0.6.3-32 * further improve cache efficiency a bit ------------------------------------------------------------------------ r526 | lh3lh3 | 2008-03-12 15:09:55 +0000 (Wed, 12 Mar 2008) | 2 lines Changed paths: M /branches/lh3/maq/configure.ac fix a bug in configure ------------------------------------------------------------------------ r525 | lh3lh3 | 2008-03-12 14:58:16 +0000 (Wed, 12 Mar 2008) | 6 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match.cc M /branches/lh3/maq/match.hh M /branches/lh3/maq/match_aux.cc * maq-0.6.3-31 * change macro _LONGSEED to _FASTMAP * in `fastmap' mode, seed_length=28, max_mismatch=3 and index_length=25 * attempt to reduce the cache misses to the retrieval of seq->* * from this veersion, only seed length is at most 32bp ------------------------------------------------------------------------ r524 | lh3lh3 | 2008-03-11 23:57:58 +0000 (Tue, 11 Mar 2008) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match.cc M /branches/lh3/maq/match.hh M /branches/lh3/maq/match_aux.cc * maq-0.6.3-30 * further improve cache efficiency a bit ------------------------------------------------------------------------ r523 | lh3lh3 | 2008-03-11 19:37:50 +0000 (Tue, 11 Mar 2008) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match.cc M /branches/lh3/maq/match.hh * maq-0.6.3-29 * add macro to use longer seed ------------------------------------------------------------------------ r522 | lh3lh3 | 2008-03-10 09:44:10 +0000 (Mon, 10 Mar 2008) | 3 lines Changed paths: M /branches/lh3/maq/ChangeLog M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/submap.c * maq-0.6.3-28 * submap now acts as a filter for .map file ------------------------------------------------------------------------ r521 | lh3lh3 | 2008-03-07 11:07:48 +0000 (Fri, 07 Mar 2008) | 6 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/fastq2bfq.c M /branches/lh3/maq/match.cc M /branches/lh3/maq/match.hh M /branches/lh3/maq/match_aux.cc M /branches/lh3/maq/sort_mapping.cc * maq-0.6.3-27 * fix a bug in "maq map -N" * replace dw_shrink with a bit-shift function * a bit code clean up * attempt to improve the cache efficiency a bit (little effect though) ------------------------------------------------------------------------ r520 | lh3lh3 | 2008-03-07 08:53:22 +0000 (Fri, 07 Mar 2008) | 2 lines Changed paths: M /branches/lh3/maq/ChangeLog M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match.cc M /branches/lh3/maq/match.hh M /branches/lh3/maq/match_aux.cc M /branches/lh3/maq/sort_mapping.cc * maq-0.6.3-26 ------------------------------------------------------------------------ r519 | lh3lh3 | 2008-03-06 20:31:19 +0000 (Thu, 06 Mar 2008) | 3 lines Changed paths: M /branches/lh3/maq/scripts/paf_utils.pl * paf_utils.pl-0.1.3 * add parser for rmap ------------------------------------------------------------------------ r518 | lh3lh3 | 2008-03-06 20:30:36 +0000 (Thu, 06 Mar 2008) | 3 lines Changed paths: M /branches/lh3/maq/scripts/maq_sanger.pl * maq_sanger.pl-0.1.4 * fix a bug about the path of asub ------------------------------------------------------------------------ r517 | lh3lh3 | 2008-03-04 21:12:00 +0000 (Tue, 04 Mar 2008) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/indel_pe.cc * maq-0.6.3-25 * indel-pe apprarently works for SOLiD ------------------------------------------------------------------------ r516 | lh3lh3 | 2008-03-04 20:42:33 +0000 (Tue, 04 Mar 2008) | 4 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/sort_mapping.cc * maq-0.6.3-24 * for SOLiD: "add pair afterward" now works * wait, I am going to add gapped alignment for SOLiD ------------------------------------------------------------------------ r515 | lh3lh3 | 2008-03-04 20:24:26 +0000 (Tue, 04 Mar 2008) | 4 lines Changed paths: M /branches/lh3/maq/ChangeLog M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/dword.hh M /branches/lh3/maq/match_aux.cc * maq-0.6.3-23 * fix an ever existing bug. it is a typo actually... * wait, I will improve the part for SOLiD a bit later... ------------------------------------------------------------------------ r514 | lh3lh3 | 2008-03-04 16:02:25 +0000 (Tue, 04 Mar 2008) | 6 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/indel_pe.cc M /branches/lh3/maq/match.cc M /branches/lh3/maq/scripts/maq_sanger.pl M /branches/lh3/maq/sort_mapping.cc * maq-0.6.3-22 * fix a rare bug about minus insert size for ungapped alignment * fix a rare bug about extensive insert size for gapped alignment * maq_sanger.pl-0.1.4 * add resource request by default ------------------------------------------------------------------------ r513 | lh3lh3 | 2008-03-03 15:36:15 +0000 (Mon, 03 Mar 2008) | 5 lines Changed paths: M /branches/lh3/maq/scripts/fq_all2std.pl M /branches/lh3/maq/scripts/maq_sanger.pl * fq_all2std.pl-0.1.4 * export2xxx: change for the latest export format * maq_sanger.pl-0.1.3 * add an example ------------------------------------------------------------------------ r512 | lh3lh3 | 2008-03-03 11:01:57 +0000 (Mon, 03 Mar 2008) | 5 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/indel_pe.cc M /branches/lh3/maq/match.cc M /branches/lh3/maq/read.cc * maq-0.6.3-21 * skip Smith-Waterman alignment if too few reads get mapped in pairs. * abort (instead of segfault) if all the reads are full of "N". * filtering polyA for single end reads now works ------------------------------------------------------------------------ r511 | lh3lh3 | 2008-03-03 10:57:16 +0000 (Mon, 03 Mar 2008) | 2 lines Changed paths: M /branches/lh3/maq/scripts/maq_sanger.pl maq_sanger.pl now works with single end data from the Sanger Inst. ------------------------------------------------------------------------ r510 | lh3lh3 | 2008-03-02 10:51:57 +0000 (Sun, 02 Mar 2008) | 4 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match.cc M /branches/lh3/maq/scripts/maq_sanger.pl * maq-0.6.3-20 * fix a stupid bug caused by the last modification * improve maq_sanger.pl ------------------------------------------------------------------------ r509 | lh3lh3 | 2008-03-01 23:02:25 +0000 (Sat, 01 Mar 2008) | 3 lines Changed paths: A /branches/lh3/maq/scripts/asub A /branches/lh3/maq/scripts/maq_sanger.pl * asub: array-sub * maq_sanger.pl: do alignment in batch, for Sanger Inst's format ONLY ------------------------------------------------------------------------ r508 | lh3lh3 | 2008-03-01 22:33:01 +0000 (Sat, 01 Mar 2008) | 2 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match.cc a bug in SOLiD PE alignment ------------------------------------------------------------------------ r507 | lh3lh3 | 2008-03-01 17:10:28 +0000 (Sat, 01 Mar 2008) | 5 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/assemble.cc M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match.cc M /branches/lh3/maq/sort_mapping.cc * maq-0.6.3-18 * assemble: change default -t to 0.93 * map: for SOLiD reads, the correct orientation is: FF-read2-read1 or RR-read1-read2 ------------------------------------------------------------------------ r506 | lh3lh3 | 2008-03-01 17:08:23 +0000 (Sat, 01 Mar 2008) | 5 lines Changed paths: M /branches/lh3/maq/scripts/maq.pl M /branches/lh3/maq/scripts/paf_utils.pl * paf_utils.pl-0.1.2 * loose the criterion for a correct alignment (SOAP is troublesome) * maq.pl-0.3.5 * filter on neighboring qualities ------------------------------------------------------------------------ r505 | lh3lh3 | 2008-03-01 00:09:05 +0000 (Sat, 01 Mar 2008) | 5 lines Changed paths: M /branches/lh3/maq/ChangeLog M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/assopt.c M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match_aux.cc * maq-0.6.3-17 * mapstat: set the maximum mapQ as 99 * update ChangeLog * fix a theoretical flaw in assemble. the accuracy affected little. ------------------------------------------------------------------------ r504 | lh3lh3 | 2008-02-29 13:31:26 +0000 (Fri, 29 Feb 2008) | 5 lines Changed paths: M /branches/lh3/maq/scripts/fq_all2std.pl M /branches/lh3/maq/scripts/paf_utils.pl * paf_utils.pl-0.1.1 * print wrong alignment on demand * fq_all2std.pl-0.1.3 * convert Bustard output (_prb.txt and _seq.txt) to fastq ------------------------------------------------------------------------ r503 | lh3lh3 | 2008-02-27 23:37:39 +0000 (Wed, 27 Feb 2008) | 4 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/assemble.cc M /branches/lh3/maq/aux_utils.c M /branches/lh3/maq/configure.ac M /branches/lh3/maq/subsnp.cc * maq-0.6.3-16 * calclate minimum neighbouring quality for each site * cns2snp/subpos are revised accordingly ------------------------------------------------------------------------ r502 | lh3lh3 | 2008-02-27 22:17:53 +0000 (Wed, 27 Feb 2008) | 4 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/assemble.cc M /branches/lh3/maq/configure.ac * maq-0.6.3.-15 * fix a theoretical error in `assemble' * the performance is quite close to the previous version ------------------------------------------------------------------------ r501 | lh3lh3 | 2008-02-25 14:42:28 +0000 (Mon, 25 Feb 2008) | 4 lines Changed paths: M /branches/lh3/maq/scripts/maq_eval.pl D /branches/lh3/maq/scripts/parse_aln.pl * maq_eval.pl-0.1.5 * add a less used hidden command for estimating FP. only for my own use. * parse_aln.pl has been renamed as saf_utils.pl ------------------------------------------------------------------------ r500 | lh3lh3 | 2008-02-25 11:39:29 +0000 (Mon, 25 Feb 2008) | 2 lines Changed paths: A /branches/lh3/maq/scripts/paf_utils.pl (from /branches/lh3/maq/scripts/saf_utils.pl:499) D /branches/lh3/maq/scripts/saf_utils.pl rename saf_utils.pl as paf_utils.pl ------------------------------------------------------------------------ r499 | lh3lh3 | 2008-02-25 11:38:57 +0000 (Mon, 25 Feb 2008) | 2 lines Changed paths: M /branches/lh3/maq/scripts/saf_utils.pl prepare to rename as paf_utils.pl ------------------------------------------------------------------------ r498 | lh3lh3 | 2008-02-25 11:22:07 +0000 (Mon, 25 Feb 2008) | 2 lines Changed paths: D /branches/lh3/maq/scripts/gaf_utils.pl A /branches/lh3/maq/scripts/saf_utils.pl (from /branches/lh3/maq/scripts/gaf_utils.pl:497) rename gaf_utils.pl to saf_utils.pl ------------------------------------------------------------------------ r497 | lh3lh3 | 2008-02-25 11:21:20 +0000 (Mon, 25 Feb 2008) | 2 lines Changed paths: M /branches/lh3/maq/scripts/gaf_utils.pl prepare to rename it as saf_utils.pl ------------------------------------------------------------------------ r496 | lh3lh3 | 2008-02-22 16:09:01 +0000 (Fri, 22 Feb 2008) | 2 lines Changed paths: A /branches/lh3/maq/scripts/gaf_utils.pl (from /branches/lh3/maq/scripts/parse_aln.pl:495) rename parse_aln.pl to gaf_utils.pl ------------------------------------------------------------------------ r495 | lh3lh3 | 2008-02-21 23:41:44 +0000 (Thu, 21 Feb 2008) | 3 lines Changed paths: M /branches/lh3/maq/scripts/parse_aln.pl * uaf converter for maq * improve evaluation ------------------------------------------------------------------------ r494 | lh3lh3 | 2008-02-21 22:32:50 +0000 (Thu, 21 Feb 2008) | 3 lines Changed paths: D /branches/lh3/maq/scripts/mapview.pl A /branches/lh3/maq/scripts/parse_aln.pl * convert parse_aln.pl to UAF alignment format * move mapview.pl to parse_aln.pl ------------------------------------------------------------------------ r493 | lh3lh3 | 2008-02-21 20:28:08 +0000 (Thu, 21 Feb 2008) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/pileup.cc * maq-0.6.3-14 * output base position on the read (for pileup) ------------------------------------------------------------------------ r492 | lh3lh3 | 2008-02-21 10:45:56 +0000 (Thu, 21 Feb 2008) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match.cc M /branches/lh3/maq/match_aux.cc M /branches/lh3/maq/read.cc M /branches/lh3/maq/read.h M /branches/lh3/maq/scripts/maq.pl * maq-0.6.3-13 * trim long adapter contaminations before alignment ------------------------------------------------------------------------ r491 | lh3lh3 | 2008-02-19 10:26:44 +0000 (Tue, 19 Feb 2008) | 4 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/fasta2bfa.c M /branches/lh3/maq/simulate.c * maq-0.6.3-12 * fix a bug in fasta2csfa: missing new line * more error output for simulate.c ------------------------------------------------------------------------ r490 | lh3lh3 | 2008-02-17 15:48:53 +0000 (Sun, 17 Feb 2008) | 5 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/assemble.h M /branches/lh3/maq/configure.ac M /branches/lh3/maq/mapcheck.cc * maq-0.6.3-11 * improve comments a bit * mapcheck: remove unused codes which never correctly worked * mapcheck: more stat ------------------------------------------------------------------------ r489 | lh3lh3 | 2008-02-17 14:33:25 +0000 (Sun, 17 Feb 2008) | 5 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match_aux.cc M /branches/lh3/maq/scripts/maq.pl * maq-0.6.3-10 * mapstat: output error rate * maq.pl-0.3.4 * cat2pair: modified by "maq catfilter" ------------------------------------------------------------------------ r488 | lh3lh3 | 2008-02-16 19:29:21 +0000 (Sat, 16 Feb 2008) | 2 lines Changed paths: M /branches/lh3/maq/read.cc no change, actually ------------------------------------------------------------------------ r487 | lh3lh3 | 2008-02-16 19:10:49 +0000 (Sat, 16 Feb 2008) | 2 lines Changed paths: M /branches/lh3/maq/read.cc remove debug codes in read.cc ------------------------------------------------------------------------ r486 | lh3lh3 | 2008-02-16 19:07:42 +0000 (Sat, 16 Feb 2008) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/main.c M /branches/lh3/maq/main.h M /branches/lh3/maq/read.cc * maq-0.6.3-9 * filter for continous A. Only work for Sanger's PE cat format ------------------------------------------------------------------------ r485 | lh3lh3 | 2008-02-14 11:46:11 +0000 (Thu, 14 Feb 2008) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/main.c M /branches/lh3/maq/match_aux.cc * maq-0.6.3-8 * update mapstat command ------------------------------------------------------------------------ r484 | lh3lh3 | 2008-02-13 16:02:19 +0000 (Wed, 13 Feb 2008) | 3 lines Changed paths: M /branches/lh3/maq/scripts/fq_all2std.pl * fq_all2std.pl-0.1.2 * add support for SOLiD read format ------------------------------------------------------------------------ r483 | lh3lh3 | 2008-02-13 12:52:26 +0000 (Wed, 13 Feb 2008) | 6 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/rmdup.cc M /branches/lh3/maq/scripts/maq.pl * maq.pl-0.3.3 * cat2pair: discriminate the two ends with "/1" and "/2" * improve fastq2bfq * maq-0.6.3-7 * rmdup now records the number of checked pairs and removed pairs ------------------------------------------------------------------------ r482 | lh3lh3 | 2008-02-06 10:04:54 +0000 (Wed, 06 Feb 2008) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/maqmap.c * maq-0.6.3-6 * fixed a neglectable bug in mapview ------------------------------------------------------------------------ r481 | lh3lh3 | 2008-02-04 22:21:27 +0000 (Mon, 04 Feb 2008) | 2 lines Changed paths: M /branches/lh3/maq/scripts/fq_all2std.pl add /[12] when converting export format ------------------------------------------------------------------------ r480 | lh3lh3 | 2008-02-04 20:29:26 +0000 (Mon, 04 Feb 2008) | 5 lines Changed paths: M /branches/lh3/maq/ChangeLog M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/read.cc M /branches/lh3/maq/rmdup.cc M /branches/lh3/maq/simulate.c M /branches/lh3/maq/sort_mapping.cc * maq-0.6.3-5 * update ChangeLog * recognize "@read1/1" for the first read and "@read1/2" for the second * simulation/rmdup/map are all modified accordingly ------------------------------------------------------------------------ r479 | lh3lh3 | 2008-02-04 20:21:47 +0000 (Mon, 04 Feb 2008) | 2 lines Changed paths: M /branches/lh3/maq/scripts/maq_plot.pl maq_plot.pl: make a bit better plot ------------------------------------------------------------------------ r478 | lh3lh3 | 2008-01-28 21:47:06 +0000 (Mon, 28 Jan 2008) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/indel_pe.cc * maq-0.6.3-4 * completely disable indelpe for SOLiD reads. It needs a lot of coding. ------------------------------------------------------------------------ r477 | lh3lh3 | 2008-01-28 21:29:38 +0000 (Mon, 28 Jan 2008) | 5 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/aux_utils.c M /branches/lh3/maq/configure.ac M /branches/lh3/maq/maqmap.c M /branches/lh3/maq/match.cc M /branches/lh3/maq/match.hh M /branches/lh3/maq/match_aux.cc M /branches/lh3/maq/sort_mapping.cc * maq-0.6.3-3 * store mismatch positions in .map file, at the cost of shorter read length * fix a bug in cns2win * mapview support for showing mismatch positions ------------------------------------------------------------------------ r473 | lh3lh3 | 2008-01-25 14:52:36 +0000 (Fri, 25 Jan 2008) | 5 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/sort_mapping.cc * maq-0.6.3-2 * change the meaning of "alternative mapping quality". Now it means: the lower SE mapping quality of the two ends (previously not) * have not tested, but I think I cannot be wrong... (hope I am right) ------------------------------------------------------------------------ r472 | lh3lh3 | 2008-01-23 20:00:55 +0000 (Wed, 23 Jan 2008) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/indel_pe.cc M /branches/lh3/maq/match.cc M /branches/lh3/maq/sort_mapping.cc * maq-0.6.3-1 * SOLiD PE reads are mapped as FF or RR, not FR ------------------------------------------------------------------------ r471 | lh3lh3 | 2008-01-23 11:02:20 +0000 (Wed, 23 Jan 2008) | 2 lines Changed paths: M /branches/lh3/maq/scripts/mapview.pl fix a minor error in reading the data ------------------------------------------------------------------------ r470 | lh3lh3 | 2008-01-18 20:00:23 +0000 (Fri, 18 Jan 2008) | 2 lines Changed paths: A /branches/lh3/maq/scripts/mapview.pl mapview.pl: parsing .map file with Perl ------------------------------------------------------------------------ r469 | lh3lh3 | 2008-01-18 10:12:35 +0000 (Fri, 18 Jan 2008) | 6 lines Changed paths: M /branches/lh3/maq/scripts/farm-run.pl M /branches/lh3/maq/scripts/maq.pl * farm-run.pl-0.1.3 * do not remove "/nfs" on the PATH * maq.pl-0.3.2 * recognize relative path in easyrun * improve SNPfilter (thanks, Nathan) ------------------------------------------------------------------------ r465 | lh3lh3 | 2008-01-03 20:31:33 +0000 (Thu, 03 Jan 2008) | 2 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/NEWS M /branches/lh3/maq/configure.ac Release maq-0.6.3 ------------------------------------------------------------------------ r463 | lh3lh3 | 2007-12-23 09:37:02 +0000 (Sun, 23 Dec 2007) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/NEWS M /branches/lh3/maq/configure.ac M /branches/lh3/maq/pileup.cc * maq-0.6.2-16 * '-m' in "pileup" works. (fixed a bug) ------------------------------------------------------------------------ r462 | lh3lh3 | 2007-12-19 12:36:50 +0000 (Wed, 19 Dec 2007) | 2 lines Changed paths: M /branches/lh3/maq/ChangeLog M /branches/lh3/maq/NEWS M /branches/lh3/maq/maq.pod update documentations ------------------------------------------------------------------------ r461 | lh3lh3 | 2007-12-18 11:43:28 +0000 (Tue, 18 Dec 2007) | 4 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/fasta2bfa.c M /branches/lh3/maq/main.c M /branches/lh3/maq/main.h M /branches/lh3/maq/simulate.c M /branches/lh3/maq/subsnp.cc * maq-0.6.2-15 * add "simucns" command to evaluate the consensus accuracy * add haploid support to "simulate" ------------------------------------------------------------------------ r460 | lh3lh3 | 2007-12-18 11:41:14 +0000 (Tue, 18 Dec 2007) | 3 lines Changed paths: M /branches/lh3/maq/scripts/maq.pl * maq.pl-0.3.0 * add haploid and single-end mode to "demo" ------------------------------------------------------------------------ r459 | lh3lh3 | 2007-12-18 03:24:47 +0000 (Tue, 18 Dec 2007) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/maqmap.c * maq-0.6.2-14 * in mapview, output brief information (no sequences and qualities) ------------------------------------------------------------------------ r458 | lh3lh3 | 2007-12-18 03:23:32 +0000 (Tue, 18 Dec 2007) | 3 lines Changed paths: M /branches/lh3/maq/scripts/maq.pl * maq.pl-0.3.0 * add codes to detect structural variations ------------------------------------------------------------------------ r457 | lh3lh3 | 2007-12-11 20:54:32 +0000 (Tue, 11 Dec 2007) | 4 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/indel_pe.cc M /branches/lh3/maq/match.cc M /branches/lh3/maq/sort_mapping.cc * maq-0.6.2-13 * take reads mapped with Smith-Waterman as paired * I am not sure whether this is the right to do, though. ------------------------------------------------------------------------ r456 | lh3lh3 | 2007-12-11 20:28:42 +0000 (Tue, 11 Dec 2007) | 4 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/pair_stat.cc M /branches/lh3/maq/scripts/maq_plot.pl * maq-0.6.2-12 * show abnormal pairs * plotting abnormal pairs works again ------------------------------------------------------------------------ r455 | lh3lh3 | 2007-12-10 11:51:08 +0000 (Mon, 10 Dec 2007) | 4 lines Changed paths: M /branches/lh3/maq/rmdup.cc * maq-0.6.2-11 * a typo in previous check in * still name it as 0.6.2-11 ------------------------------------------------------------------------ r454 | lh3lh3 | 2007-12-10 11:48:56 +0000 (Mon, 10 Dec 2007) | 4 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/read.cc M /branches/lh3/maq/rmdup.cc * maq-0.6.2-11 * avoid potential missing hits (a minor bug) * rmdup now recognizes "-" ------------------------------------------------------------------------ r453 | lh3lh3 | 2007-12-10 11:26:49 +0000 (Mon, 10 Dec 2007) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match.cc * maq-0.6.2-10 * increase the randomness of the seed ------------------------------------------------------------------------ r452 | lh3lh3 | 2007-12-09 12:05:15 +0000 (Sun, 09 Dec 2007) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match.cc * 0.6.2-9 * change back to random seed, which actually is more robust ------------------------------------------------------------------------ r450 | lh3lh3 | 2007-12-06 21:47:19 +0000 (Thu, 06 Dec 2007) | 6 lines Changed paths: M /branches/lh3/maq/scripts/maq.pl M /branches/lh3/maq/scripts/maq_eval.pl * maq.pl-0.2.0 * easyrun now works PE reads * add 'demo' for simulation+easyrun+maq_eval * maq_eval.pl-0.1.4 * increase robustness ------------------------------------------------------------------------ r443 | lh3lh3 | 2007-12-06 15:32:05 +0000 (Thu, 06 Dec 2007) | 4 lines Changed paths: M /branches/lh3/maq/ChangeLog M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/maq.pod M /branches/lh3/maq/match.cc M /branches/lh3/maq/pair_stat.cc * maq-0.6.2-8 * in map, change back to the previous way to score a hit * in paircov, add "count non-N region" and remove some useless codes ------------------------------------------------------------------------ r442 | lh3lh3 | 2007-12-05 14:26:22 +0000 (Wed, 05 Dec 2007) | 6 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/aux_utils.c M /branches/lh3/maq/configure.ac M /branches/lh3/maq/main.c M /branches/lh3/maq/main.h M /branches/lh3/maq/match.cc M /branches/lh3/maq/pair_stat.cc M /branches/lh3/maq/subsnp.cc * maq-0.6.2-7 * LaDeana Hillier finally persuaded me that mismatches should be counted in scoring a hit. I do that now. * `paircov' now works again, which also finds absolute break points * `snpreg' now moves to subsnp.cc. It can also filter SNPs now. ------------------------------------------------------------------------ r441 | lh3lh3 | 2007-12-03 11:48:43 +0000 (Mon, 03 Dec 2007) | 4 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/aux_utils.c M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match.cc * maq-0.6.2-6 * snpreg: output SNP-callable regions given different quality threshold * map: use fixed seed to random numbers ------------------------------------------------------------------------ r440 | lh3lh3 | 2007-12-03 11:46:58 +0000 (Mon, 03 Dec 2007) | 4 lines Changed paths: M /branches/lh3/maq/scripts/maq_eval.pl * maq_eval.pl-0.1.3 * in indelsoa, filter SNPs * in indelpe, output FN and FP ------------------------------------------------------------------------ r439 | lh3lh3 | 2007-12-01 16:14:38 +0000 (Sat, 01 Dec 2007) | 3 lines Changed paths: M /branches/lh3/maq/scripts/maq_eval.pl * maq_eval.pl-0.1.2 * evaluate genotyping sites ------------------------------------------------------------------------ r438 | lh3lh3 | 2007-11-30 12:34:24 +0000 (Fri, 30 Nov 2007) | 3 lines Changed paths: M /branches/lh3/maq/scripts/maq.pl * maq.pl-0.1.10 * change the option names in SNPfilter ------------------------------------------------------------------------ r437 | lh3lh3 | 2007-11-29 15:10:28 +0000 (Thu, 29 Nov 2007) | 3 lines Changed paths: M /branches/lh3/maq/ChangeLog M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/aux_utils.c M /branches/lh3/maq/configure.ac M /branches/lh3/maq/main.c M /branches/lh3/maq/main.h * maq-0.6.2-5 * add "snpreg" command: calculate regions where SNP can be called ------------------------------------------------------------------------ r436 | lh3lh3 | 2007-11-26 13:09:15 +0000 (Mon, 26 Nov 2007) | 3 lines Changed paths: M /branches/lh3/maq/scripts/maq.pl * maq.pl-0.1.9 * in easyrun, fix a typo caused by the last revision ------------------------------------------------------------------------ r435 | lh3lh3 | 2007-11-26 09:53:29 +0000 (Mon, 26 Nov 2007) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/fastq2bfq.c * maq-0.6.2-4 * in fastq2bfq, avoid generating empty files ------------------------------------------------------------------------ r434 | lh3lh3 | 2007-11-26 09:52:22 +0000 (Mon, 26 Nov 2007) | 3 lines Changed paths: M /branches/lh3/maq/scripts/maq.pl * maq.pl-0.1.8 * in easyrun, split the input fastq to smaller files if necessary ------------------------------------------------------------------------ r433 | lh3lh3 | 2007-11-25 23:19:38 +0000 (Sun, 25 Nov 2007) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/simulate.c * maq-0.6.3 * fix a stupid bug in simulation ------------------------------------------------------------------------ r432 | lh3lh3 | 2007-11-25 23:01:03 +0000 (Sun, 25 Nov 2007) | 4 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/simulate.c * maq-0.6.2-2 * make coordinate more accurate, but cannot be absolutely accurate * improve simustat to tolerate indel alignment ------------------------------------------------------------------------ r430 | lh3lh3 | 2007-11-25 21:07:18 +0000 (Sun, 25 Nov 2007) | 4 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/simulate.c * maq-0.6.2-1 * simulate reads for diploid reference * known bug: the coordinate of some reads is wrong. ------------------------------------------------------------------------ r427 | lh3lh3 | 2007-11-23 22:19:15 +0000 (Fri, 23 Nov 2007) | 2 lines Changed paths: M /branches/lh3/maq/ChangeLog M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/NEWS M /branches/lh3/maq/configure.ac M /branches/lh3/maq/maq.pod Release maq-0.6.2 ------------------------------------------------------------------------ r426 | lh3lh3 | 2007-11-23 17:17:47 +0000 (Fri, 23 Nov 2007) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/eland2maq.cc * maq-0.6.1-18 * export2maq: fix a bug in converting base qualities ------------------------------------------------------------------------ r425 | lh3lh3 | 2007-11-23 16:03:21 +0000 (Fri, 23 Nov 2007) | 4 lines Changed paths: M /branches/lh3/maq/ChangeLog M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/NEWS M /branches/lh3/maq/configure.ac M /branches/lh3/maq/eland2maq.cc M /branches/lh3/maq/main.c M /branches/lh3/maq/main.h * maq-0.6.1-17 * convert Solexa's export format to maq's .map format * add NEWS and prepare to release maq-0.6.2 ------------------------------------------------------------------------ r424 | lh3lh3 | 2007-11-19 16:30:56 +0000 (Mon, 19 Nov 2007) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/assopt.c M /branches/lh3/maq/configure.ac M /branches/lh3/maq/mapcheck.cc * maq-0.6.1-15 * fix a compiling error for some powerpc64-linux ------------------------------------------------------------------------ r422 | lh3lh3 | 2007-11-19 09:33:41 +0000 (Mon, 19 Nov 2007) | 3 lines Changed paths: M /branches/lh3/maq/scripts/fq_all2std.pl * fq_all2std.pl-0.1.1 * fix a bug for "export" format ------------------------------------------------------------------------ r420 | lh3lh3 | 2007-11-18 23:16:49 +0000 (Sun, 18 Nov 2007) | 3 lines Changed paths: M /branches/lh3/maq/scripts/maq.pl * maq.pl-0.1.1 * for Solexa's new export format ------------------------------------------------------------------------ r419 | lh3lh3 | 2007-11-18 23:16:02 +0000 (Sun, 18 Nov 2007) | 3 lines Changed paths: M /branches/lh3/maq/scripts/farm-run.pl * farm-run.pl-0.12 * correct uname for a Linux machine ------------------------------------------------------------------------ r418 | lh3lh3 | 2007-11-16 10:19:35 +0000 (Fri, 16 Nov 2007) | 3 lines Changed paths: M /branches/lh3/maq/scripts/maq.pl * maq.pl-0.1.6 * fastq2bfq: for Solexa's new "export" format ------------------------------------------------------------------------ r417 | lh3lh3 | 2007-11-16 10:11:59 +0000 (Fri, 16 Nov 2007) | 3 lines Changed paths: A /branches/lh3/maq/scripts/fq_all2std.pl * fq_all2std.pl-0.1.0 * script for converting between various formats ------------------------------------------------------------------------ r414 | lh3lh3 | 2007-11-15 10:01:48 +0000 (Thu, 15 Nov 2007) | 3 lines Changed paths: M /branches/lh3/maq/ChangeLog M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match.cc * maq-0.6.1-15 * fix a bug related to max_err10 ------------------------------------------------------------------------ r411 | lh3lh3 | 2007-11-08 15:48:01 +0000 (Thu, 08 Nov 2007) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/assemble.cc M /branches/lh3/maq/aux_utils.c M /branches/lh3/maq/configure.ac M /branches/lh3/maq/pileup.cc * 0.6.1-14 * allow to use "-" in many more commands ------------------------------------------------------------------------ r410 | lh3lh3 | 2007-11-08 10:40:14 +0000 (Thu, 08 Nov 2007) | 3 lines Changed paths: M /branches/lh3/maq/ChangeLog M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/assemble.cc M /branches/lh3/maq/configure.ac * 0.6.1-13 * allow to use "-" in "assemble" ------------------------------------------------------------------------ r401 | lh3lh3 | 2007-11-01 15:50:37 +0000 (Thu, 01 Nov 2007) | 3 lines Changed paths: M /branches/lh3/maq/scripts/maq.pl * maq.pl-0.1.5 * sorry, fix another bug ------------------------------------------------------------------------ r400 | lh3lh3 | 2007-11-01 15:20:52 +0000 (Thu, 01 Nov 2007) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/indel_pe.cc * maq-0.6.1-12 * fix a bug in indelpe (caused by previous debugging codes) ------------------------------------------------------------------------ r399 | lh3lh3 | 2007-11-01 15:20:00 +0000 (Thu, 01 Nov 2007) | 4 lines Changed paths: M /branches/lh3/maq/scripts/maq.pl * maq.pl-0.1.4 * fix a bug in fastq2bfq * improve cat2pair ------------------------------------------------------------------------ r395 | lh3lh3 | 2007-10-31 15:22:40 +0000 (Wed, 31 Oct 2007) | 3 lines Changed paths: M /branches/lh3/maq/scripts/maq.pl * maq.pl-0.1.3 * improve fastq2bfq powered by the new 'maq fastq2bfq' ------------------------------------------------------------------------ r394 | lh3lh3 | 2007-10-31 11:59:10 +0000 (Wed, 31 Oct 2007) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/fastq2bfq.c * 0.6.1-11 * improve fastq2bfq command ------------------------------------------------------------------------ r393 | lh3lh3 | 2007-10-31 11:13:12 +0000 (Wed, 31 Oct 2007) | 4 lines Changed paths: M /branches/lh3/maq/ChangeLog M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match.cc M /branches/lh3/maq/match.hh M /branches/lh3/maq/match_aux.cc * maq-0.6.1-10 * allow to change max_err10 on the command-line * set the minimum length of reads to 16bp, instead of 20bp ------------------------------------------------------------------------ r392 | lh3lh3 | 2007-10-31 11:10:57 +0000 (Wed, 31 Oct 2007) | 4 lines Changed paths: M /branches/lh3/maq/scripts/maq.pl * maq.pl-0.1.2 * allow to set the maximum read depth in SNPfilter * improve fastq2bfq a bit ------------------------------------------------------------------------ r384 | lh3lh3 | 2007-10-30 09:35:43 +0000 (Tue, 30 Oct 2007) | 4 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/indel_pe.cc M /branches/lh3/maq/maq.pod * 0.6.1-9 * update documentations * fix a bug in indelpe ------------------------------------------------------------------------ r379 | lh3lh3 | 2007-10-29 09:23:46 +0000 (Mon, 29 Oct 2007) | 3 lines Changed paths: M /branches/lh3/maq/scripts/maq_eval.pl * maq_eval.pl-0.1.1 * better evaluation for indelsoa ------------------------------------------------------------------------ r378 | lh3lh3 | 2007-10-28 21:59:46 +0000 (Sun, 28 Oct 2007) | 2 lines Changed paths: M /branches/lh3/maq/maq.pod explain SNPfilter and indelsoa ------------------------------------------------------------------------ r377 | lh3lh3 | 2007-10-28 20:59:40 +0000 (Sun, 28 Oct 2007) | 6 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/aux_utils.c M /branches/lh3/maq/configure.ac M /branches/lh3/maq/indel_soa.cc M /branches/lh3/maq/main.c * maq-0.6.1-8 * make indelsoa public * indelsoa should be able to work with multiple references (not tested) * output an alternative score in indelsoa * change a threshold in aux_utils.c ------------------------------------------------------------------------ r376 | lh3lh3 | 2007-10-28 20:53:07 +0000 (Sun, 28 Oct 2007) | 4 lines Changed paths: M /branches/lh3/maq/scripts/maq.pl * maq.pl-0.1.1 * change the SNPfilter for indelsoa (left+right-across>=3 && across<=1) * in easyrun, indelsoa-filtered SNPs become the default. ------------------------------------------------------------------------ r375 | lh3lh3 | 2007-10-28 18:32:51 +0000 (Sun, 28 Oct 2007) | 6 lines Changed paths: M /branches/lh3/maq/scripts/maq.pl * maq.pl-0.1.0 * improve `SNPfilter' command * improve `gwhich()' * improve `easyrun' command * add `statmap' command (previously known as `stat_err.pl')) ------------------------------------------------------------------------ r374 | lh3lh3 | 2007-10-28 15:54:01 +0000 (Sun, 28 Oct 2007) | 2 lines Changed paths: M /branches/lh3/maq/scripts/maq_eval.pl put indel evaluation in the script ------------------------------------------------------------------------ r373 | lh3lh3 | 2007-10-26 22:25:20 +0100 (Fri, 26 Oct 2007) | 4 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/eland2maq.cc M /branches/lh3/maq/main.c M /branches/lh3/maq/maq.pod * 0.6.1-7 * change the default quality to 25 * update the documentation ------------------------------------------------------------------------ r372 | lh3lh3 | 2007-10-26 22:23:08 +0100 (Fri, 26 Oct 2007) | 2 lines Changed paths: M /branches/lh3/maq/scripts/maq.pl change the SNP filter ------------------------------------------------------------------------ r371 | lh3lh3 | 2007-10-26 14:29:54 +0100 (Fri, 26 Oct 2007) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match.cc M /branches/lh3/maq/match.hh M /branches/lh3/maq/match_aux.cc M /branches/lh3/maq/sort_mapping.cc * 0.6.1-6 * dump unmapped reads to a separate file ------------------------------------------------------------------------ r370 | lh3lh3 | 2007-10-26 12:51:09 +0100 (Fri, 26 Oct 2007) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match.cc M /branches/lh3/maq/match.hh M /branches/lh3/maq/match_aux.cc M /branches/lh3/maq/sort_mapping.cc * 0.6.1-5 * dump unmapped reads and poorly mapped reads ------------------------------------------------------------------------ r369 | lh3lh3 | 2007-10-26 11:12:12 +0100 (Fri, 26 Oct 2007) | 3 lines Changed paths: M /branches/lh3/maq/ChangeLog M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/assemble.cc M /branches/lh3/maq/assemble.h M /branches/lh3/maq/assopt.c M /branches/lh3/maq/configure.ac M /branches/lh3/maq/get_pos.c M /branches/lh3/maq/main.c M /branches/lh3/maq/mapcheck.cc M /branches/lh3/maq/pileup.cc * 0.6.1-4 * bring back 'assemble/pileup -m' to meet users' request ------------------------------------------------------------------------ r361 | lh3lh3 | 2007-10-13 22:13:01 +0100 (Sat, 13 Oct 2007) | 5 lines Changed paths: M /branches/lh3/maq/Makefile.am M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/eland2maq.cc M /branches/lh3/maq/match.cc M /branches/lh3/maq/read.cc * 0.6.1-3 * fix the bug in methy_mode * eland2maq now works properly * allow G->A alignment in methy_mode ------------------------------------------------------------------------ r360 | lh3lh3 | 2007-10-13 14:22:57 +0100 (Sat, 13 Oct 2007) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac A /branches/lh3/maq/eland2maq.cc M /branches/lh3/maq/main.c M /branches/lh3/maq/main.h M /branches/lh3/maq/maqmap.h * 0.6.1-2 * add eland2maq: convert eland output to maq alignment ------------------------------------------------------------------------ r347 | lh3lh3 | 2007-10-10 16:01:58 +0100 (Wed, 10 Oct 2007) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match.cc * 0.6.1-1 * fix a bug in methylation alignment ------------------------------------------------------------------------ r332 | lh3lh3 | 2007-10-03 20:55:06 +0100 (Wed, 03 Oct 2007) | 2 lines Changed paths: M /branches/lh3/maq/ChangeLog M /branches/lh3/maq/FUTURES M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/NEWS M /branches/lh3/maq/configure.ac Release maq-0.6.1 ------------------------------------------------------------------------ r328 | lh3lh3 | 2007-10-02 13:38:41 +0100 (Tue, 02 Oct 2007) | 3 lines Changed paths: M /branches/lh3/maq/ChangeLog M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/read.cc * 0.6.0-6 * fix a bug for methy-mode. I know few are using this, but it is a bug anyway. ------------------------------------------------------------------------ r327 | lh3lh3 | 2007-10-02 13:05:22 +0100 (Tue, 02 Oct 2007) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/get_pos.c * 0.6.0-5 * fix a rare bug in get_pos.c ------------------------------------------------------------------------ r315 | lh3lh3 | 2007-09-26 11:14:17 +0100 (Wed, 26 Sep 2007) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match.cc M /branches/lh3/maq/match.hh M /branches/lh3/maq/match_aux.cc M /branches/lh3/maq/read.cc M /branches/lh3/maq/read.h M /branches/lh3/maq/sort_mapping.cc * 0.6.0-4 * make trim-adapter work properly ------------------------------------------------------------------------ r284 | lh3lh3 | 2007-09-19 15:13:42 +0100 (Wed, 19 Sep 2007) | 4 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/fastq2bfq.c * 0.6.0-3 * 0.6.0-2 is prematured. * change zero quality to 1 (in fastq2bfq) ------------------------------------------------------------------------ r251 | lh3lh3 | 2007-09-10 13:43:36 +0100 (Mon, 10 Sep 2007) | 6 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match.cc M /branches/lh3/maq/sort_mapping.cc * 0.6.0-1 * map a read to the position that gives the minimum sum of quality values of mismatched bases. Previously maq first compares the number of mismatches in the first 24bp and then check the sum. * on simulated data, this gives slightly better accuracy. ------------------------------------------------------------------------ r248 | lh3lh3 | 2007-09-05 13:11:06 +0100 (Wed, 05 Sep 2007) | 2 lines Changed paths: M /branches/lh3/maq/ChangeLog M /branches/lh3/maq/FUTURES M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/NEWS M /branches/lh3/maq/configure.ac M /branches/lh3/maq/maq.pod Release 0.6.0 ------------------------------------------------------------------------ r247 | lh3lh3 | 2007-09-05 10:24:26 +0100 (Wed, 05 Sep 2007) | 7 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/NEWS M /branches/lh3/maq/configure.ac M /branches/lh3/maq/get_pos.c M /branches/lh3/maq/indel_pe.cc M /branches/lh3/maq/maq.pod M /branches/lh3/maq/maqmap.c M /branches/lh3/maq/rmdup.cc * 0.5.1-24 * output number of 0- and 1-mismatch hits in mapview * when '-p' is flagged with assemble, abnormal pairs will be discarded, instead of being assigned a quality zero * fix a bug in rmdup which may causes segmentation fault in rare cases * add more documentations ------------------------------------------------------------------------ r244 | lh3lh3 | 2007-08-29 17:07:08 +0100 (Wed, 29 Aug 2007) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match.hh M /branches/lh3/maq/sort_mapping.cc * 0.5.1-23 * revert some codes from 0.5.1-6 ------------------------------------------------------------------------ r243 | lh3lh3 | 2007-08-29 16:43:52 +0100 (Wed, 29 Aug 2007) | 4 lines Changed paths: M /branches/lh3/maq/ChangeLog M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/maq.pod M /branches/lh3/maq/simulate.c M /branches/lh3/maq/sort_mapping.cc * 0.5.1-22 * remove debugging codes from simulate.c * fix two trivial/potential bugs in sort_mapping.c ------------------------------------------------------------------------ r242 | lh3lh3 | 2007-08-29 10:53:29 +0100 (Wed, 29 Aug 2007) | 5 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/indel_pe.cc M /branches/lh3/maq/simulate.c * 0.5.1-21 * fix a bug in calculating the average insert size (caused by latest modifications) * simulate now generates reads on both strand (previously read1 from forward, and read2 always from reverse strand) ------------------------------------------------------------------------ r241 | lh3lh3 | 2007-08-28 13:49:52 +0100 (Tue, 28 Aug 2007) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/get_pos.c M /branches/lh3/maq/maqmap.c M /branches/lh3/maq/simulate.c * 0.5.1-20 * fix problems caused by previous revision ------------------------------------------------------------------------ r240 | lh3lh3 | 2007-08-28 10:53:18 +0100 (Tue, 28 Aug 2007) | 7 lines Changed paths: M /branches/lh3/maq/Makefile.am M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/get_pos.c M /branches/lh3/maq/indel_pe.cc M /branches/lh3/maq/main.c M /branches/lh3/maq/main.h M /branches/lh3/maq/maq.pod M /branches/lh3/maq/maqmap.h A /branches/lh3/maq/rmdup.cc D /branches/lh3/maq/rmpair.cc M /branches/lh3/maq/simulate.c M /branches/lh3/maq/sort_mapping.cc * 0.5.1-19 * in maqmap1_t, dist now shows the insert size. * rmdup is rewritten. it now handles abnormal pairs. * after Smith-Waterman, reads without indels will also be saved, though not used at later step * simulate is able to generate different read lengths from the length in the fqc_t * this revision has not been thoroughly tested. ------------------------------------------------------------------------ r238 | lh3lh3 | 2007-08-23 10:21:48 +0100 (Thu, 23 Aug 2007) | 2 lines Changed paths: M /branches/lh3/maq/maq.pod for changes after 0.5.1 ------------------------------------------------------------------------ r235 | lh3lh3 | 2007-08-22 09:09:04 +0100 (Wed, 22 Aug 2007) | 7 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/aux_utils.c M /branches/lh3/maq/configure.ac M /branches/lh3/maq/indel_pe.cc M /branches/lh3/maq/match.cc M /branches/lh3/maq/rmpair.cc M /branches/lh3/maq/simulate.c M /branches/lh3/maq/sort_mapping.cc * 0.5.1-18 * output version number in 'map' * detect duplicated read names in 'rmdup' * in attempt to use another filter * initiate Smith-Waterman alignment for Q20 reads (not Q30) * generate unique read names in 'simulate' ------------------------------------------------------------------------ r234 | lh3lh3 | 2007-08-20 09:49:23 +0100 (Mon, 20 Aug 2007) | 4 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/indel_pe.cc M /branches/lh3/maq/merge.cc * 0.5.1-17 * mapmerge: allow to dump .map to stdout * indel_pe: check boundaries before alignment ------------------------------------------------------------------------ r233 | lh3lh3 | 2007-08-13 20:36:50 +0100 (Mon, 13 Aug 2007) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/read.cc * 0.5.1-16 * fix a bug in adapter trimming ------------------------------------------------------------------------ r232 | lh3lh3 | 2007-08-10 23:05:48 +0100 (Fri, 10 Aug 2007) | 4 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/get_pos.c A /branches/lh3/maq/indel_call.cc * 0.5.1-15 * indelpe: indel calling from PE reads * better combine indelsoa and indelpe to give better results (future plan) ------------------------------------------------------------------------ r231 | lh3lh3 | 2007-08-10 21:27:32 +0100 (Fri, 10 Aug 2007) | 2 lines Changed paths: M /branches/lh3/maq/Makefile.am M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/assemble.h A /branches/lh3/maq/get_pos.c (from /branches/lh3/maq/get_pos.cc:230) D /branches/lh3/maq/get_pos.cc M /branches/lh3/maq/main.c M /branches/lh3/maq/main.h rename get_pos.cc->get_pos.c ------------------------------------------------------------------------ r230 | lh3lh3 | 2007-08-10 20:27:35 +0100 (Fri, 10 Aug 2007) | 4 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/assemble.h M /branches/lh3/maq/bfa.c M /branches/lh3/maq/configure.ac M /branches/lh3/maq/get_pos.cc M /branches/lh3/maq/indel_pe.cc * 0.5.1-14 * fix a minor bug in indel_pe.cc * prepare to rename get_pos.cc ------------------------------------------------------------------------ r229 | lh3lh3 | 2007-08-10 14:02:35 +0100 (Fri, 10 Aug 2007) | 4 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/get_pos.cc M /branches/lh3/maq/indel_pe.cc M /branches/lh3/maq/match.hh M /branches/lh3/maq/match_aux.cc M /branches/lh3/maq/sort_mapping.cc * 0.5.1-13 * indel_pe seems to work properly * need to write someting to pull out all the indel sites ------------------------------------------------------------------------ r228 | lh3lh3 | 2007-08-09 23:27:47 +0100 (Thu, 09 Aug 2007) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/indel_pe.cc M /branches/lh3/maq/match.hh M /branches/lh3/maq/sort_mapping.cc * 0.5.1.-12 * the core part of indelpe works. more work need to be done, though ------------------------------------------------------------------------ r227 | lh3lh3 | 2007-08-09 14:30:38 +0100 (Thu, 09 Aug 2007) | 6 lines Changed paths: M /branches/lh3/maq/ChangeLog M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/indel_pe.cc M /branches/lh3/maq/maqmap.h M /branches/lh3/maq/match.cc M /branches/lh3/maq/read.cc M /branches/lh3/maq/rmpair.cc M /branches/lh3/maq/simulate.c M /branches/lh3/maq/sort_mapping.cc * 0.5.1-11 * in methylation alignment mode, change all C to T. this is the only right way. * a little change in calculating mapping qualities. should not matter much for high-quality reads * write more codes for the indel detector * this revision probably cannot work! ------------------------------------------------------------------------ r226 | lh3lh3 | 2007-08-08 16:41:24 +0100 (Wed, 08 Aug 2007) | 5 lines Changed paths: M /branches/lh3/maq/Makefile.am M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac A /branches/lh3/maq/indel_pe.cc M /branches/lh3/maq/match.cc M /branches/lh3/maq/match.hh M /branches/lh3/maq/rmpair.cc M /branches/lh3/maq/scripts/maq.pl M /branches/lh3/maq/sort_mapping.cc A /branches/lh3/maq/stdaln.c A /branches/lh3/maq/stdaln.h * 0.5.1-10 * rmdup: fix a bug * easyrun: allow to filter adapter at the command-line * prepare to add indel detector for PE reads. just started. ------------------------------------------------------------------------ r225 | lh3lh3 | 2007-08-07 16:09:30 +0100 (Tue, 07 Aug 2007) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match.cc M /branches/lh3/maq/read.cc M /branches/lh3/maq/read.h * 0.5.1-9 * more sophisticated 3'-adapter trimmer ------------------------------------------------------------------------ r224 | lh3lh3 | 2007-08-06 23:29:29 +0100 (Mon, 06 Aug 2007) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match.cc M /branches/lh3/maq/match.hh M /branches/lh3/maq/match_aux.cc M /branches/lh3/maq/read.cc M /branches/lh3/maq/read.h * 0.5.1-8 * alignment for methylated data ------------------------------------------------------------------------ r223 | lh3lh3 | 2007-08-06 00:20:36 +0100 (Mon, 06 Aug 2007) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match.cc M /branches/lh3/maq/read.cc * 0.5.1-7 * fix bug in auto_trim(), but this does not work well... ------------------------------------------------------------------------ r222 | lh3lh3 | 2007-08-05 17:11:23 +0100 (Sun, 05 Aug 2007) | 2 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match.cc 0.5.1-6: trivial changes ------------------------------------------------------------------------ r221 | lh3lh3 | 2007-08-04 22:57:40 +0100 (Sat, 04 Aug 2007) | 5 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/assemble.cc M /branches/lh3/maq/assemble.h M /branches/lh3/maq/assopt.c M /branches/lh3/maq/configure.ac M /branches/lh3/maq/get_pos.cc M /branches/lh3/maq/mapcheck.cc M /branches/lh3/maq/maq.pod M /branches/lh3/maq/maqmap.c M /branches/lh3/maq/maqmap.h M /branches/lh3/maq/match.cc M /branches/lh3/maq/match.hh M /branches/lh3/maq/match_aux.cc M /branches/lh3/maq/pileup.cc M /branches/lh3/maq/sort_mapping.cc * 0.5.1-5 * discard reads that give large sum of errors. For real data, this helps A LOT! * maqstat is now disfunctional... * allow to adjust MAF in assemble ------------------------------------------------------------------------ r220 | lh3lh3 | 2007-08-04 16:30:12 +0100 (Sat, 04 Aug 2007) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match.cc M /branches/lh3/maq/sort_mapping.cc * 0.5.1-4 * fix a bug caused by the operator precedence ------------------------------------------------------------------------ r218 | lh3lh3 | 2007-08-04 14:53:43 +0100 (Sat, 04 Aug 2007) | 7 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match.cc M /branches/lh3/maq/match.hh M /branches/lh3/maq/sort_mapping.cc * 0.5.1-3 * reduce unnecessary memory usage (a bit) * fix a subtle and minor bug in calculating paired end mapping qualities * hash word in a more efficient way, especially for long reads * now the mapping quality seems to be underestimated... * at least on bacteria, the new code is giving better alignments ------------------------------------------------------------------------ r217 | lh3lh3 | 2007-08-04 00:38:41 +0100 (Sat, 04 Aug 2007) | 6 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match.cc M /branches/lh3/maq/match.hh M /branches/lh3/maq/match_aux.cc M /branches/lh3/maq/rmpair.cc M /branches/lh3/maq/simulate.c M /branches/lh3/maq/sort_mapping.cc * 0.5.1-2 * simulate.c: fixed a bug for the reverse read * simulate.c: added forgotten gzclose() * align long but low-quality reads * mapping quality is overestimated a bit ------------------------------------------------------------------------ r216 | lh3lh3 | 2007-08-03 22:50:40 +0100 (Fri, 03 Aug 2007) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/rmpair.cc * 0.5.1-1 * fix a minor bug in rmpair.cc ------------------------------------------------------------------------ r212 | lh3lh3 | 2007-07-31 11:19:16 +0100 (Tue, 31 Jul 2007) | 2 lines Changed paths: M /branches/lh3/maq/FUTURES M /branches/lh3/maq/Makefile.am M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/NEWS M /branches/lh3/maq/configure.ac M /branches/lh3/maq/maq.pod M /branches/lh3/maq/match.cc Release 0.5.1 ------------------------------------------------------------------------ r211 | lh3lh3 | 2007-07-31 09:12:07 +0100 (Tue, 31 Jul 2007) | 6 lines Changed paths: M /branches/lh3/maq/ChangeLog M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/main.c M /branches/lh3/maq/mapcheck.cc M /branches/lh3/maq/maq.pod M /branches/lh3/maq/match.cc M /branches/lh3/maq/rmpair.cc * 0.5.0-14 (the following also shows changes in 0.5.0-13) * change the way the final mapping quality is determined in "assemble" * output clean up * better POD * prepare to release 0.5.1 ------------------------------------------------------------------------ r210 | lh3lh3 | 2007-07-30 17:18:49 +0100 (Mon, 30 Jul 2007) | 3 lines Changed paths: M /branches/lh3/maq/ChangeLog M /branches/lh3/maq/configure.ac M /branches/lh3/maq/get_pos.cc M /branches/lh3/maq/maq.pod * 0.5.0-13 * later... I am catching bus... ------------------------------------------------------------------------ r209 | lh3lh3 | 2007-07-30 10:31:57 +0100 (Mon, 30 Jul 2007) | 2 lines Changed paths: M /branches/lh3/maq/maq.pod better documentations ------------------------------------------------------------------------ r207 | lh3lh3 | 2007-07-29 23:32:33 +0100 (Sun, 29 Jul 2007) | 2 lines Changed paths: M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/main.c A /branches/lh3/maq/maq.pod add POD manual ------------------------------------------------------------------------ r206 | lh3lh3 | 2007-07-29 16:19:38 +0100 (Sun, 29 Jul 2007) | 3 lines Changed paths: M /branches/lh3/maq/configure.ac M /branches/lh3/maq/main.c M /branches/lh3/maq/main.h M /branches/lh3/maq/match.cc M /branches/lh3/maq/scripts/maq.pl M /branches/lh3/maq/simulate.c * 0.5.0-12 * dump fastq statistics into a separate data file. ------------------------------------------------------------------------ r205 | lh3lh3 | 2007-07-27 13:39:10 +0100 (Fri, 27 Jul 2007) | 3 lines Changed paths: M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match.cc M /branches/lh3/maq/read.cc M /branches/lh3/maq/read.h M /branches/lh3/maq/scripts/maq.pl * 0.5.0-11 * automatically trim all reads (not the default option) ------------------------------------------------------------------------ r204 | lh3lh3 | 2007-07-27 08:47:59 +0100 (Fri, 27 Jul 2007) | 3 lines Changed paths: M /branches/lh3/maq/configure.ac M /branches/lh3/maq/fasta2bfa.c * 0.5.0-10 * fix bug in fakemut ------------------------------------------------------------------------ r202 | lh3lh3 | 2007-07-26 10:27:52 +0100 (Thu, 26 Jul 2007) | 3 lines Changed paths: M /branches/lh3/maq/configure.ac M /branches/lh3/maq/match.cc M /branches/lh3/maq/simulate.c * 0.5.0-9 * fix a bug in "map". ------------------------------------------------------------------------ r201 | lh3lh3 | 2007-07-25 12:54:43 +0100 (Wed, 25 Jul 2007) | 7 lines Changed paths: M /branches/lh3/maq/configure.ac M /branches/lh3/maq/main.c M /branches/lh3/maq/main.h M /branches/lh3/maq/match.cc M /branches/lh3/maq/match_aux.cc M /branches/lh3/maq/simulate.c M /branches/lh3/maq/sort_mapping.cc * 0.5.0-8 * match.cc: fix a bug which will cause tandem repetitive pairs lost * change the default minimum insert size to 0 * sort_mapping.cc: fix a bug in calculating paired mapping qualities. However, decide to make it more conservative at last. * simulate.c: add codes to evaluate mappings based on simulated reads ------------------------------------------------------------------------ r199 | lh3lh3 | 2007-07-23 17:17:55 +0100 (Mon, 23 Jul 2007) | 4 lines Changed paths: M /branches/lh3/maq/configure.ac M /branches/lh3/maq/main.c M /branches/lh3/maq/match.cc M /branches/lh3/maq/match_aux.cc * 0.5.0-7 * improve help * change default paired end distance to [60,250] ------------------------------------------------------------------------ r198 | lh3lh3 | 2007-07-23 16:45:49 +0100 (Mon, 23 Jul 2007) | 6 lines Changed paths: M /branches/lh3/maq/Makefile.am M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/assemble.cc M /branches/lh3/maq/configure.ac A /branches/lh3/maq/genran.c A /branches/lh3/maq/genran.h M /branches/lh3/maq/main.c M /branches/lh3/maq/main.h A /branches/lh3/maq/rmpair.cc M /branches/lh3/maq/scripts/maq_eval.pl M /branches/lh3/maq/simulate.c A /branches/lh3/maq/submap.c * 0.5.0-6 * It seems that I forgot to add files at the last check-in * add rmpair.cc: remove pairs with the exact coordinates * add submap.c: extract a submap. Note that the resultant file is slightly different in teh format. * finish simulate.c: simulate paired reads ------------------------------------------------------------------------ r188 | lh3lh3 | 2007-07-19 12:29:51 +0100 (Thu, 19 Jul 2007) | 3 lines Changed paths: M /branches/lh3/maq/assemble.cc M /branches/lh3/maq/assemble.h M /branches/lh3/maq/aux_utils.c M /branches/lh3/maq/configure.ac M /branches/lh3/maq/subsnp.cc * 0.5.0-4 * distinguish het1 and het2 ------------------------------------------------------------------------ r187 | lh3lh3 | 2007-07-19 00:39:08 +0100 (Thu, 19 Jul 2007) | 3 lines Changed paths: M /branches/lh3/maq/assemble.cc M /branches/lh3/maq/assemble.h M /branches/lh3/maq/assopt.c M /branches/lh3/maq/configure.ac M /branches/lh3/maq/get_pos.cc M /branches/lh3/maq/main.c M /branches/lh3/maq/main.h M /branches/lh3/maq/mapcheck.cc M /branches/lh3/maq/pileup.cc M /branches/lh3/maq/stdhash.hh * 0.5.0-3 * add a few trivial things. little improvement, though ------------------------------------------------------------------------ r185 | lh3lh3 | 2007-07-18 11:20:51 +0100 (Wed, 18 Jul 2007) | 4 lines Changed paths: M /branches/lh3/maq/Makefile.am M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/configure.ac M /branches/lh3/maq/main.h M /branches/lh3/maq/maqmap.c * 0.5.0-2 * write D codes as C/C++ codes * have not test it yet ------------------------------------------------------------------------ r183 | lh3lh3 | 2007-07-18 00:05:47 +0100 (Wed, 18 Jul 2007) | 3 lines Changed paths: M /branches/lh3/maq/configure.ac M /branches/lh3/maq/maqmap.c M /branches/lh3/maq/match_aux.cc * 0.5.0-1 * avoid using maqmap_t::n_mapped_reads ------------------------------------------------------------------------ r170 | lh3lh3 | 2007-07-14 17:45:40 +0100 (Sat, 14 Jul 2007) | 2 lines Changed paths: M /branches/lh3/maq/NEWS change to r171 ------------------------------------------------------------------------ r169 | lh3lh3 | 2007-07-14 17:44:42 +0100 (Sat, 14 Jul 2007) | 2 lines Changed paths: M /branches/lh3/maq/ChangeLog M /branches/lh3/maq/Makefile.am M /branches/lh3/maq/NEWS M /branches/lh3/maq/configure.ac M /branches/lh3/maq/main.c MAQ Release 0.5.0 ------------------------------------------------------------------------ r167 | lh3lh3 | 2007-07-13 15:02:44 +0100 (Fri, 13 Jul 2007) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.am M /branches/lh3/maq/altchr.cc M /branches/lh3/maq/configure.ac * fix a bug in altchr.cc * 0.4.3-13 ------------------------------------------------------------------------ r166 | lh3lh3 | 2007-07-13 10:09:00 +0100 (Fri, 13 Jul 2007) | 3 lines Changed paths: M /branches/lh3/maq/Makefile.am M /branches/lh3/maq/Makefile.generic A /branches/lh3/maq/altchr.cc M /branches/lh3/maq/configure.ac M /branches/lh3/maq/const.c M /branches/lh3/maq/const.h M /branches/lh3/maq/main.c M /branches/lh3/maq/main.h * 0.4.3-12 * add altchr.cc ------------------------------------------------------------------------ r165 | lh3lh3 | 2007-07-12 15:30:32 +0100 (Thu, 12 Jul 2007) | 2 lines Changed paths: M /branches/lh3/maq/scripts/maq.pl allow to trim reads on the command line. ------------------------------------------------------------------------ r164 | lh3lh3 | 2007-07-12 14:47:20 +0100 (Thu, 12 Jul 2007) | 6 lines Changed paths: M /branches/lh3/maq/configure.ac M /branches/lh3/maq/maqmap.c M /branches/lh3/maq/maqmap_conv.c D /branches/lh3/maq/scripts/eval_snp.pl M /branches/lh3/maq/scripts/maq.pl A /branches/lh3/maq/scripts/maq_eval.pl (from /branches/lh3/maq/scripts/eval_snp.pl:160) M /branches/lh3/maq/scripts/maq_plot.pl * 0.4.3-11 * format check in maqmap.c and maqmap_conv.c * rename eval_snp.pl as maq_eval.pl * allow to change xtics in maq_plot.pl * improve maq.pl ------------------------------------------------------------------------ r163 | lh3lh3 | 2007-07-11 23:23:15 +0100 (Wed, 11 Jul 2007) | 7 lines Changed paths: M /branches/lh3/maq/configure.ac M /branches/lh3/maq/main.c M /branches/lh3/maq/main.h M /branches/lh3/maq/maqmap.c M /branches/lh3/maq/maqmap.h M /branches/lh3/maq/maqmap_conv.c M /branches/lh3/maq/match.cc M /branches/lh3/maq/match_aux.cc M /branches/lh3/maq/merge.cc M /branches/lh3/maq/sort_mapping.cc * 0.4.3-10 * move mapview to maqmap.c. it is a good example * fix a bug in mapmerge, which is caused by the new maqmap interface * run valgrind on a couple of commands: map, mapmerge, indelsoa, assemble, pileup, mapcheck, mapview and mapass2maq ------------------------------------------------------------------------ r162 | lh3lh3 | 2007-07-11 22:27:31 +0100 (Wed, 11 Jul 2007) | 5 lines Changed paths: M /branches/lh3/maq/Makefile.am M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/assemble.cc M /branches/lh3/maq/assemble.h M /branches/lh3/maq/configure.ac M /branches/lh3/maq/get_pos.cc M /branches/lh3/maq/indel_soa.cc M /branches/lh3/maq/main.c M /branches/lh3/maq/main.h M /branches/lh3/maq/mapcheck.cc A /branches/lh3/maq/maqmap.c A /branches/lh3/maq/maqmap.h A /branches/lh3/maq/maqmap_conv.c M /branches/lh3/maq/match.cc M /branches/lh3/maq/match.hh M /branches/lh3/maq/match_aux.cc M /branches/lh3/maq/merge.cc M /branches/lh3/maq/pair_stat.cc M /branches/lh3/maq/pileup.cc M /branches/lh3/maq/sort_mapping.cc * 0.4.3-9 * new interface to .map format. read names will be stored. * match seemingly generates correct result * other functions need thorough testing ------------------------------------------------------------------------ r161 | lh3lh3 | 2007-07-11 13:43:49 +0100 (Wed, 11 Jul 2007) | 3 lines Changed paths: M /branches/lh3/maq/INSTALL M /branches/lh3/maq/Makefile.am M /branches/lh3/maq/Makefile.generic M /branches/lh3/maq/README M /branches/lh3/maq/assemble.cc M /branches/lh3/maq/aux_utils.c M /branches/lh3/maq/configure.ac M /branches/lh3/maq/fasta2bfa.c M /branches/lh3/maq/fastq2bfq.c M /branches/lh3/maq/indel_soa.cc M /branches/lh3/maq/main.c M /branches/lh3/maq/mapcheck.cc M /branches/lh3/maq/match.cc M /branches/lh3/maq/match_aux.cc M /branches/lh3/maq/merge.cc M /branches/lh3/maq/pair_stat.cc M /branches/lh3/maq/pileup.cc M /branches/lh3/maq/rbcc.cc M /branches/lh3/maq/read.cc D /branches/lh3/maq/scripts/mapass2.pl D /branches/lh3/maq/scripts/mapass2_plot.pl A /branches/lh3/maq/scripts/maq.pl (from /branches/lh3/maq/scripts/mapass2.pl:160) A /branches/lh3/maq/scripts/maq_plot.pl (from /branches/lh3/maq/scripts/mapass2_plot.pl:160) M /branches/lh3/maq/subsnp.cc * rename mapass2 as maq * 0.4.3-8 ------------------------------------------------------------------------ r159 | lh3lh3 | 2007-07-11 13:26:43 +0100 (Wed, 11 Jul 2007) | 9 lines Changed paths: A /branches/lh3/maq (from /branches/lh3/mapass2:158) Mapass2 is renamed as "maq", which stands for Mapping and Assembly with Qualities. It is pronounced in the same way as "Mac", the Apple's operating system. The mapass2 will be stopped and all the new development will happen in /branches/lh3/maq. The current version of mapass2 at this branching point is: 0.4.3-7. Today is 11 July 2007. ------------------------------------------------------------------------ r158 | lh3lh3 | 2007-07-10 21:39:12 +0100 (Tue, 10 Jul 2007) | 4 lines Changed paths: M /branches/lh3/mapass2/configure.ac M /branches/lh3/mapass2/indel_soa.cc M /branches/lh3/mapass2/scripts/mapass2.pl * 0.4.3-7 * improve indel detection (only works for homozygous indels!) * mapass2.pl: filter out SNPs falling in indels regions ------------------------------------------------------------------------ r157 | lh3lh3 | 2007-07-10 19:34:22 +0100 (Tue, 10 Jul 2007) | 3 lines Changed paths: M /branches/lh3/mapass2/Makefile.am M /branches/lh3/mapass2/Makefile.generic M /branches/lh3/mapass2/configure.ac A /branches/lh3/mapass2/indel_soa.cc M /branches/lh3/mapass2/main.c M /branches/lh3/mapass2/main.h M /branches/lh3/mapass2/pair_stat.cc * 0.4.3-5 * state-of-art indel detector (will be improved later) ------------------------------------------------------------------------ r156 | lh3lh3 | 2007-07-09 23:53:07 +0100 (Mon, 09 Jul 2007) | 4 lines Changed paths: M /branches/lh3/mapass2/configure.ac M /branches/lh3/mapass2/fasta2bfa.c M /branches/lh3/mapass2/scripts/mapass2.pl * 0.4.3-5 * mapass2.pl: bugfix in SNPfilter * fake quality in "fakemut" ------------------------------------------------------------------------ r155 | lh3lh3 | 2007-07-09 18:08:00 +0100 (Mon, 09 Jul 2007) | 4 lines Changed paths: M /branches/lh3/mapass2/configure.ac M /branches/lh3/mapass2/fasta2bfa.c M /branches/lh3/mapass2/main.h M /branches/lh3/mapass2/pair_stat.cc * 0.4.3-4 * pair_stat.cc: also output depth * fasta2bfa.c: fake indels in the reference ------------------------------------------------------------------------ r154 | lh3lh3 | 2007-07-09 11:30:52 +0100 (Mon, 09 Jul 2007) | 4 lines Changed paths: M /branches/lh3/mapass2/configure.ac M /branches/lh3/mapass2/pair_stat.cc M /branches/lh3/mapass2/scripts/mapass2.pl * 0.4.3-3 * pair_stat.cc: skip "N" regions. * mapass2.pl: add usage for "SNPfilter" ------------------------------------------------------------------------ r153 | lh3lh3 | 2007-07-08 23:50:10 +0100 (Sun, 08 Jul 2007) | 2 lines Changed paths: M /branches/lh3/mapass2/scripts/mapass2.pl filter SNPs ------------------------------------------------------------------------ r152 | lh3lh3 | 2007-07-08 21:58:21 +0100 (Sun, 08 Jul 2007) | 7 lines Changed paths: M /branches/lh3/mapass2/aux_utils.c M /branches/lh3/mapass2/configure.ac M /branches/lh3/mapass2/main.c M /branches/lh3/mapass2/main.h M /branches/lh3/mapass2/pair_stat.cc A /branches/lh3/mapass2/scripts/eval_snp.pl M /branches/lh3/mapass2/scripts/mapass2_plot.pl * 0.4.3-2 * add eval_snp.pl * mapass2_plot.pl: add depth plot * pair_stat.cc: pick up regions that are not covered by pairs * aux_utils.c: output alternative depth * not finished, though ------------------------------------------------------------------------ r151 | lh3lh3 | 2007-07-06 15:56:18 +0100 (Fri, 06 Jul 2007) | 6 lines Changed paths: M /branches/lh3/mapass2/Makefile.am M /branches/lh3/mapass2/Makefile.generic M /branches/lh3/mapass2/configure.ac M /branches/lh3/mapass2/main.c M /branches/lh3/mapass2/main.h A /branches/lh3/mapass2/pair_stat.cc M /branches/lh3/mapass2/scripts/mapass2.pl A /branches/lh3/mapass2/scripts/mapass2_plot.pl A /branches/lh3/mapass2/simulate.c * 0.4.3-1 * add pair_stat.cc: statistics on paired end data * add mapass2_plot.pl: plot utilities * mapass2.pl: use find -follow * add simulate.c: unfinished ------------------------------------------------------------------------ r147 | lh3lh3 | 2007-07-04 16:04:31 +0100 (Wed, 04 Jul 2007) | 2 lines Changed paths: M /branches/lh3/mapass2/ChangeLog M /branches/lh3/mapass2/NEWS M /branches/lh3/mapass2/configure.ac M /branches/lh3/mapass2/main.c Release 0.4.3 ------------------------------------------------------------------------ r146 | lh3lh3 | 2007-07-04 14:27:38 +0100 (Wed, 04 Jul 2007) | 4 lines Changed paths: M /branches/lh3/mapass2/scripts/farm-run.pl M /branches/lh3/mapass2/scripts/mapass2.pl * mapass2.pl fastq2bfq: add more descriptions * mapass2.pl fastq2bfq: change default number of reads to 1000000 * farm-run.pl: for easy-to-use ------------------------------------------------------------------------ r145 | lh3lh3 | 2007-07-04 13:51:36 +0100 (Wed, 04 Jul 2007) | 4 lines Changed paths: M /branches/lh3/mapass2/configure.ac M /branches/lh3/mapass2/sort_mapping.cc * outputing all information with "match -N" * 0.4.2-4 * prepare to release 0.4.3 ------------------------------------------------------------------------ r144 | lh3lh3 | 2007-07-03 21:52:34 +0100 (Tue, 03 Jul 2007) | 3 lines Changed paths: M /branches/lh3/mapass2/configure.ac M /branches/lh3/mapass2/mapcheck.cc M /branches/lh3/mapass2/sort_mapping.cc * fix a bug in paired end alignment * 0.4.2-3 ------------------------------------------------------------------------ r143 | lh3lh3 | 2007-06-29 20:24:11 +0100 (Fri, 29 Jun 2007) | 4 lines Changed paths: M /branches/lh3/mapass2/assopt.c M /branches/lh3/mapass2/configure.ac M /branches/lh3/mapass2/mapcheck.cc M /branches/lh3/mapass2/match_aux.cc * mapstat: output mapping quality histograph * mapcheck: add several command line options and fix two bugs * 0.4.2-2 ------------------------------------------------------------------------ r142 | lh3lh3 | 2007-06-27 23:43:44 +0100 (Wed, 27 Jun 2007) | 4 lines Changed paths: M /branches/lh3/mapass2/assemble.cc M /branches/lh3/mapass2/assemble.h M /branches/lh3/mapass2/assopt.c M /branches/lh3/mapass2/configure.ac M /branches/lh3/mapass2/get_pos.cc M /branches/lh3/mapass2/mapcheck.cc M /branches/lh3/mapass2/pileup.cc * allow to use single-end mapping qualities * check error dependency in mapcheck (testing) * 0.4.2-1 ------------------------------------------------------------------------ r133 | lh3lh3 | 2007-06-22 14:53:46 +0100 (Fri, 22 Jun 2007) | 2 lines Changed paths: M /branches/lh3/mapass2/scripts/mapass2.pl * bugfix: fixed for "mapmerge" when multiple read files are given ------------------------------------------------------------------------ r129 | lh3lh3 | 2007-06-21 16:50:13 +0100 (Thu, 21 Jun 2007) | 2 lines Changed paths: M /branches/lh3/mapass2/ChangeLog M /branches/lh3/mapass2/NEWS M /branches/lh3/mapass2/configure.ac sorry, a trivial error in version. True Release 0.4.2 ------------------------------------------------------------------------ r128 | lh3lh3 | 2007-06-21 16:45:50 +0100 (Thu, 21 Jun 2007) | 2 lines Changed paths: M /branches/lh3/mapass2/NEWS Release 0.4.2 ------------------------------------------------------------------------ r127 | lh3lh3 | 2007-06-21 16:35:35 +0100 (Thu, 21 Jun 2007) | 5 lines Changed paths: M /branches/lh3/mapass2/configure.ac M /branches/lh3/mapass2/fasta2bfa.c M /branches/lh3/mapass2/main.c M /branches/lh3/mapass2/match.cc M /branches/lh3/mapass2/match.hh M /branches/lh3/mapass2/match_aux.cc M /branches/lh3/mapass2/scripts/mapass2.pl M /branches/lh3/mapass2/sort_mapping.cc * mapass2.pl: split concatenated paired end reads into two files * match command: output read names in stderr * 0.4.1-1 * prepare to release 0.4.2 ------------------------------------------------------------------------ r123 | lh3lh3 | 2007-06-17 16:41:14 +0100 (Sun, 17 Jun 2007) | 2 lines Changed paths: M /branches/lh3/mapass2/ChangeLog M /branches/lh3/mapass2/NEWS M /branches/lh3/mapass2/configure.ac Release 0.4.1 ------------------------------------------------------------------------ r122 | lh3lh3 | 2007-06-16 17:22:20 +0100 (Sat, 16 Jun 2007) | 3 lines Changed paths: M /branches/lh3/mapass2/configure.ac M /branches/lh3/mapass2/fasta2bfa.c M /branches/lh3/mapass2/main.c M /branches/lh3/mapass2/main.h * 0.4.0-6 * randomly mutate a sequence, used for evaluation ------------------------------------------------------------------------ r121 | lh3lh3 | 2007-06-11 16:35:55 +0100 (Mon, 11 Jun 2007) | 4 lines Changed paths: M /branches/lh3/mapass2/configure.ac M /branches/lh3/mapass2/match.hh M /branches/lh3/mapass2/scripts/mapass2.pl M /branches/lh3/mapass2/sort_mapping.cc * recognize "*.fastq.gz" in mapass2.pl * record single end quality, but for the moment it has not use. * 0.4.0-5 ------------------------------------------------------------------------ r120 | lh3lh3 | 2007-06-04 12:52:58 +0100 (Mon, 04 Jun 2007) | 2 lines Changed paths: M /branches/lh3/mapass2/configure.ac M /branches/lh3/mapass2/fastq2bfq.c fix a bug in sol2sanger. Now it should work properly. ------------------------------------------------------------------------ r119 | lh3lh3 | 2007-06-02 17:39:58 +0100 (Sat, 02 Jun 2007) | 3 lines Changed paths: M /branches/lh3/mapass2/configure.ac M /branches/lh3/mapass2/fastq2bfq.c M /branches/lh3/mapass2/main.c M /branches/lh3/mapass2/main.h M /branches/lh3/mapass2/read.cc * add two commands: sol2sanger and bfq2fastq * 0.4.0-3 ------------------------------------------------------------------------ r118 | lh3lh3 | 2007-06-01 17:07:58 +0100 (Fri, 01 Jun 2007) | 5 lines Changed paths: M /branches/lh3/mapass2/aux_utils.c M /branches/lh3/mapass2/configure.ac M /branches/lh3/mapass2/mapcheck.cc * fix a bug in cns2win: when no chr is given, it should report all chrs. * allow to change minimum quality at the command-line. * in mapcheck, change the default number of mismatches to 4 * 0.4.0-2 ------------------------------------------------------------------------ r117 | lh3lh3 | 2007-06-01 13:52:46 +0100 (Fri, 01 Jun 2007) | 3 lines Changed paths: M /branches/lh3/mapass2/configure.ac M /branches/lh3/mapass2/mapcheck.cc * fix a bug: bases on the reverse strand are not complemented * 0.4.0-1 ------------------------------------------------------------------------ r113 | lh3lh3 | 2007-05-15 21:12:51 +0100 (Tue, 15 May 2007) | 2 lines Changed paths: M /branches/lh3/mapass2/ChangeLog M /branches/lh3/mapass2/NEWS M /branches/lh3/mapass2/README M /branches/lh3/mapass2/configure.ac M /branches/lh3/mapass2/main.c Release 0.4.0 ------------------------------------------------------------------------ r112 | lh3lh3 | 2007-05-15 20:18:47 +0100 (Tue, 15 May 2007) | 6 lines Changed paths: M /branches/lh3/mapass2/ChangeLog M /branches/lh3/mapass2/assemble.cc M /branches/lh3/mapass2/assemble.h M /branches/lh3/mapass2/assopt.c M /branches/lh3/mapass2/configure.ac M /branches/lh3/mapass2/get_pos.cc M /branches/lh3/mapass2/mapcheck.cc M /branches/lh3/mapass2/match.cc M /branches/lh3/mapass2/pileup.cc M /branches/lh3/mapass2/read.cc M /branches/lh3/mapass2/scripts/mapass2.pl * Use hash to search sequence names * Allow to set a minimum mapping quality when assembling * Print out an example of farm-run.pl config * 0.3.1-7 * Prepare to release 0.4.0 ------------------------------------------------------------------------ r111 | lh3lh3 | 2007-05-14 22:54:08 +0100 (Mon, 14 May 2007) | 8 lines Changed paths: M /branches/lh3/mapass2/assemble.cc M /branches/lh3/mapass2/configure.ac * Hide the alternative model on the command-line. It still works, though, and has an accuracy (when -a -t 0.5) quite similar to the default one. * 0.3.1-6 * Prepare to release 0.4.0 ------------------------------------------------------------------------ r110 | lh3lh3 | 2007-05-14 13:48:28 +0100 (Mon, 14 May 2007) | 10 lines Changed paths: M /branches/lh3/mapass2/assemble.cc M /branches/lh3/mapass2/assopt.c M /branches/lh3/mapass2/aux_utils.c M /branches/lh3/mapass2/configure.ac * Change the default model to $\theta^k$. * Forward and reverse strand should be considered together, not separately. They are indenpendent in some way, but not totally. * The revised model can achieve a similar accuracy in comparison to 0.3.0. * 0.3.1-5 ------------------------------------------------------------------------ r109 | lh3lh3 | 2007-05-13 22:51:15 +0100 (Sun, 13 May 2007) | 9 lines Changed paths: M /branches/lh3/mapass2/Makefile.am M /branches/lh3/mapass2/Makefile.generic M /branches/lh3/mapass2/assemble.cc M /branches/lh3/mapass2/assemble.h A /branches/lh3/mapass2/assopt.c M /branches/lh3/mapass2/configure.ac A /branches/lh3/mapass2/get_pos.cc A /branches/lh3/mapass2/mapcheck.cc M /branches/lh3/mapass2/match.hh A /branches/lh3/mapass2/pileup.cc * The consensus calling model is changed again. Like always, the performance is worse, but I will still stick to that model. Now I feel quite happy with the theory of current model, which is the first one that satisfies me. * Split assemble.cc into several files. * 0.3.1-4 ------------------------------------------------------------------------ r108 | lh3lh3 | 2007-05-12 16:04:12 +0100 (Sat, 12 May 2007) | 2 lines Changed paths: M /branches/lh3/mapass2/INSTALL A /branches/lh3/mapass2/Makefile.generic D /branches/lh3/mapass2/clean.sh A /branches/lh3/mapass2/cleanup.sh (from /branches/lh3/mapass2/clean.sh:107) M /branches/lh3/mapass2/main.c Make without "configuration". ------------------------------------------------------------------------ r107 | lh3lh3 | 2007-05-11 17:21:19 +0100 (Fri, 11 May 2007) | 2 lines Changed paths: A /branches/lh3/mapass2/clean.sh add a script to clean up all unnecessary files ------------------------------------------------------------------------ r106 | lh3lh3 | 2007-05-11 16:48:52 +0100 (Fri, 11 May 2007) | 4 lines Changed paths: M /branches/lh3/mapass2/INSTALL M /branches/lh3/mapass2/Makefile.am M /branches/lh3/mapass2/configure.ac * 0.3.1-3 * `make install' now works. * INSTALL is updated. ------------------------------------------------------------------------ r105 | lh3lh3 | 2007-05-11 16:26:44 +0100 (Fri, 11 May 2007) | 3 lines Changed paths: M /branches/lh3/mapass2/Makefile.am M /branches/lh3/mapass2/match_aux.cc now, mapass2 is known to be compiled under: i686-linux/x86_64-linux/i386-darwin/i386-Win32/alpha-True64 ------------------------------------------------------------------------ r104 | lh3lh3 | 2007-05-11 16:15:45 +0100 (Fri, 11 May 2007) | 2 lines Changed paths: M /branches/lh3/mapass2/fastq2bfq.c for TRUE64 ------------------------------------------------------------------------ r103 | lh3lh3 | 2007-05-11 15:52:25 +0100 (Fri, 11 May 2007) | 2 lines Changed paths: A /branches/lh3/mapass2/README add README file ------------------------------------------------------------------------ r102 | lh3lh3 | 2007-05-11 15:48:23 +0100 (Fri, 11 May 2007) | 2 lines Changed paths: M /branches/lh3/mapass2/ChangeLog D /branches/lh3/mapass2/Makefile A /branches/lh3/mapass2/Makefile.am D /branches/lh3/mapass2/Makefile.mac A /branches/lh3/mapass2/autogen.sh A /branches/lh3/mapass2/configure.ac M /branches/lh3/mapass2/main.c M /branches/lh3/mapass2/match.cc use GNU building systems ------------------------------------------------------------------------ r100 | lh3lh3 | 2007-05-10 11:48:06 +0100 (Thu, 10 May 2007) | 3 lines Changed paths: M /branches/lh3/mapass2/match.cc M /branches/lh3/mapass2/match.hh M /branches/lh3/mapass2/match_aux.cc M /branches/lh3/mapass2/sort_mapping.cc * 0.3.1-2 * alignment can be done in color-space ------------------------------------------------------------------------ r99 | lh3lh3 | 2007-05-10 10:18:16 +0100 (Thu, 10 May 2007) | 2 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/aux_utils.c now SNPs in color-space can be correctly called. ------------------------------------------------------------------------ r98 | lh3lh3 | 2007-05-10 00:22:27 +0100 (Thu, 10 May 2007) | 3 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/aux_utils.c M /branches/lh3/mapass2/fasta2bfa.c M /branches/lh3/mapass2/main.c M /branches/lh3/mapass2/main.h * convert reference to color-space * testing command for SNP calling in SOLiD ------------------------------------------------------------------------ r97 | lh3lh3 | 2007-05-09 17:09:50 +0100 (Wed, 09 May 2007) | 2 lines Changed paths: A /branches/lh3/mapass2/Makefile.mac Makefile for Mac OS X: compiling universal binaries. ------------------------------------------------------------------------ r93 | lh3lh3 | 2007-05-09 13:05:04 +0100 (Wed, 09 May 2007) | 2 lines Changed paths: M /branches/lh3/mapass2/ChangeLog M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/NEWS necessary files for release 0.3.1 ------------------------------------------------------------------------ r92 | lh3lh3 | 2007-05-09 10:22:23 +0100 (Wed, 09 May 2007) | 5 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/NEWS M /branches/lh3/mapass2/assemble.cc M /branches/lh3/mapass2/subsnp.cc * 0.3.0-5 * pileup: verbose mode * pileup: sub positions * reformat NEWS ------------------------------------------------------------------------ r91 | lh3lh3 | 2007-05-08 22:58:57 +0100 (Tue, 08 May 2007) | 7 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/algo.hh M /branches/lh3/mapass2/assemble.cc - 0.3.0-4 - fix a memory violation in k-small - Modify the consensus calling model. The modified model is more correct in theory, but unfortunately with the same command-line options this new model yields worse results. However, I will use this model. This is my way. ------------------------------------------------------------------------ r90 | lh3lh3 | 2007-05-08 19:12:47 +0100 (Tue, 08 May 2007) | 3 lines Changed paths: M /branches/lh3/mapass2/ChangeLog M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/aux_utils.c - 0.3.0-3 - more options for cns2win ------------------------------------------------------------------------ r89 | lh3lh3 | 2007-05-04 10:55:48 +0100 (Fri, 04 May 2007) | 3 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/assemble.cc - 0.3.0-2 - fix a bug when overflow happens given large genome ------------------------------------------------------------------------ r88 | lh3lh3 | 2007-05-04 08:51:21 +0100 (Fri, 04 May 2007) | 2 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/main.c M /branches/lh3/mapass2/main.h M /branches/lh3/mapass2/subsnp.cc add subpos: extract a demanded subset from .cns ------------------------------------------------------------------------ r85 | lh3lh3 | 2007-05-03 09:48:47 +0100 (Thu, 03 May 2007) | 2 lines Changed paths: M /branches/lh3/mapass2/ChangeLog M /branches/lh3/mapass2/FUTURES M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/NEWS Necessary files for release ------------------------------------------------------------------------ r84 | lh3lh3 | 2007-05-02 15:31:53 +0100 (Wed, 02 May 2007) | 7 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/assemble.cc M /branches/lh3/mapass2/aux_utils.c M /branches/lh3/mapass2/main.c M /branches/lh3/mapass2/main.h A /branches/lh3/mapass2/subsnp.cc - 0.2.1-8 - assemble.cc: fix a bug in calculating avg01match - assemble.cc: change default parameters: zita=0.7, max_mm=4 - subsnp.cc: extract a subset of snps - cns2win: information in a window ------------------------------------------------------------------------ r83 | lh3lh3 | 2007-05-02 13:11:57 +0100 (Wed, 02 May 2007) | 5 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/algo.hh M /branches/lh3/mapass2/assemble.cc M /branches/lh3/mapass2/assemble.h M /branches/lh3/mapass2/aux_utils.c M /branches/lh3/mapass2/scripts/mapass2.pl - 0.2.1-7 - mapass2.pl: split fastq files and run fastq2bfq in batch - save the median and maximum of mapping qualities at a position - other codes are modified accordingly ------------------------------------------------------------------------ r82 | lh3lh3 | 2007-04-30 23:37:34 +0100 (Mon, 30 Apr 2007) | 2 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/assemble.cc trivial modifications ------------------------------------------------------------------------ r81 | lh3lh3 | 2007-04-30 21:54:34 +0100 (Mon, 30 Apr 2007) | 5 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/main.c M /branches/lh3/mapass2/main.h A /branches/lh3/mapass2/rbcc.cc M /branches/lh3/mapass2/scripts/mapass2.pl A /branches/lh3/mapass2/stdhash.hh - extract main information from dbSNP's chr_rpt.txt - add reference based consensus calling method - add my hash template class ------------------------------------------------------------------------ r80 | lh3lh3 | 2007-04-30 17:07:05 +0100 (Mon, 30 Apr 2007) | 4 lines Changed paths: M /branches/lh3/mapass2/assemble.cc M /branches/lh3/mapass2/scripts/mapass2.pl - output more information in mapcheck - run 'mapcheck' in mapass2.pl ------------------------------------------------------------------------ r79 | lh3lh3 | 2007-04-30 15:53:57 +0100 (Mon, 30 Apr 2007) | 7 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/assemble.cc Start to use a modified model to call genotypes. The new model is quite similar to the old one. It does not yield better results than the old. I change to use this new one just because it is theoretically meaningful. The old model was designed at the era of mapass-1 when only the best three bases can be held in the memory. ------------------------------------------------------------------------ r70 | lh3lh3 | 2007-04-25 16:23:31 +0100 (Wed, 25 Apr 2007) | 2 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/assemble.cc M /branches/lh3/mapass2/aux_utils.c do not output b2_ratio and b3_ratio ------------------------------------------------------------------------ r69 | lh3lh3 | 2007-04-24 21:26:23 +0100 (Tue, 24 Apr 2007) | 2 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/main.c M /branches/lh3/mapass2/sort_mapping.cc revert some of old codes to improve the calculation of paired mapping qualities ------------------------------------------------------------------------ r66 | lh3lh3 | 2007-04-23 23:56:16 +0100 (Mon, 23 Apr 2007) | 2 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/NEWS Release 0.2.1 ------------------------------------------------------------------------ r65 | lh3lh3 | 2007-04-23 23:31:26 +0100 (Mon, 23 Apr 2007) | 2 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/assemble.cc M /branches/lh3/mapass2/main.c M /branches/lh3/mapass2/main.h add mapcheck command. ------------------------------------------------------------------------ r64 | lh3lh3 | 2007-04-23 20:00:43 +0100 (Mon, 23 Apr 2007) | 2 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/assemble.cc fix a bug in `assemble' when multiple sequences are provided. ------------------------------------------------------------------------ r59 | lh3lh3 | 2007-04-22 20:22:04 +0100 (Sun, 22 Apr 2007) | 2 lines Changed paths: M /branches/lh3/mapass2/ChangeLog M /branches/lh3/mapass2/FUTURES M /branches/lh3/mapass2/INSTALL M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/NEWS Release mapass2-0.2.0 ------------------------------------------------------------------------ r57 | lh3lh3 | 2007-04-22 00:28:15 +0100 (Sun, 22 Apr 2007) | 2 lines Changed paths: A /branches/lh3/mapass2/AUTHORS A /branches/lh3/mapass2/COPYING A /branches/lh3/mapass2/ChangeLog A /branches/lh3/mapass2/FUTURES A /branches/lh3/mapass2/INSTALL A /branches/lh3/mapass2/NEWS A /branches/lh3/mapass2/PROBLEMS necessary files for release ------------------------------------------------------------------------ r55 | lh3lh3 | 2007-04-21 21:16:28 +0100 (Sat, 21 Apr 2007) | 3 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/match.cc M /branches/lh3/mapass2/match.hh M /branches/lh3/mapass2/match_aux.cc M /branches/lh3/mapass2/merge.cc M /branches/lh3/mapass2/sort_mapping.cc - a few code clean-up, no principal change - 0.1.2-11 ------------------------------------------------------------------------ r54 | lh3lh3 | 2007-04-21 00:59:11 +0100 (Sat, 21 Apr 2007) | 5 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/assemble.cc M /branches/lh3/mapass2/match.hh M /branches/lh3/mapass2/match_aux.cc M /branches/lh3/mapass2/read.cc M /branches/lh3/mapass2/sort_mapping.cc - add back missing read pairs - better model to calculate paired quality - find abnormal reads - 0.1.2-10 ------------------------------------------------------------------------ r53 | lh3lh3 | 2007-04-20 10:45:32 +0100 (Fri, 20 Apr 2007) | 10 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/assemble.cc M /branches/lh3/mapass2/sort_mapping.cc Finally, I decide to use the new model to calculate mapping qualities. This new model produce 0.6% more FN+FP at the quality around 20, but it is more theoretically correct and outperforms the old one at high-quality end. However, this new model cannot will overestimate qualities when the reads has 3 or more mismatches. To compensate this, my program now discards reads with 3 or more mismatches. Surprisingly more or less, this decreases the FP but not increase FN. We should align reads with "match -n 3" even if we take this strategy. Allowing more mismatches at the alignment stage helps to calculate better mapping qualities. ------------------------------------------------------------------------ r52 | lh3lh3 | 2007-04-19 16:34:58 +0100 (Thu, 19 Apr 2007) | 6 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/assemble.cc M /branches/lh3/mapass2/assemble.h M /branches/lh3/mapass2/aux_utils.c M /branches/lh3/mapass2/main.c M /branches/lh3/mapass2/main.h M /branches/lh3/mapass2/read.cc M /branches/lh3/mapass2/sort_mapping.cc - output additional information in .cns - 'cns2view': check details for all sites - fix a memory violation in assemble.cc - attempt to raise the mapping qualities according to my theory, but fail again. The SNPs are less accurate. ------------------------------------------------------------------------ r51 | lh3lh3 | 2007-04-19 00:41:48 +0100 (Thu, 19 Apr 2007) | 2 lines Changed paths: M /branches/lh3/mapass2/main.c M /branches/lh3/mapass2/main.h M /branches/lh3/mapass2/match_aux.cc do statistics about the .map file ------------------------------------------------------------------------ r50 | lh3lh3 | 2007-04-18 22:58:34 +0100 (Wed, 18 Apr 2007) | 3 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/read.cc M /branches/lh3/mapass2/sort_mapping.cc - sort_mapping.cc: back ported from r42 - read.cc: change adaptor quality to zero, instead of masking them ------------------------------------------------------------------------ r49 | lh3lh3 | 2007-04-18 22:28:35 +0100 (Wed, 18 Apr 2007) | 10 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/read.cc M /branches/lh3/mapass2/scripts/farm-run.pl M /branches/lh3/mapass2/sort_mapping.cc All the efforts to implement a "correct" model of mapping quality turn out to be a complete failure in the end. I still think the current model is correct when the genome is fully random. However, this is not the truth. Wrong SNPs tend to arise from the regions where similar sequences existing. My previous model assumes there is always similar sequences. This is too conservative, but in practice it works just fine. What am I going to do next? Probably revert to the old one. I am so frustrating. ------------------------------------------------------------------------ r48 | lh3lh3 | 2007-04-18 13:57:51 +0100 (Wed, 18 Apr 2007) | 2 lines Changed paths: M /branches/lh3/mapass2/match.cc g++-3.3 was complaining this... ------------------------------------------------------------------------ r47 | lh3lh3 | 2007-04-18 11:50:45 +0100 (Wed, 18 Apr 2007) | 3 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/match.cc M /branches/lh3/mapass2/read.cc M /branches/lh3/mapass2/read.h - allow mismatches when trimming the adaptor sequence - even a single base-pair match to the adapator will be masked ------------------------------------------------------------------------ r46 | lh3lh3 | 2007-04-18 00:34:37 +0100 (Wed, 18 Apr 2007) | 3 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/const.h M /branches/lh3/mapass2/match.cc M /branches/lh3/mapass2/read.cc M /branches/lh3/mapass2/read.h - dropping adaptor sequences seemingly works - I think I should allow mismatches to the adaptor ------------------------------------------------------------------------ r45 | lh3lh3 | 2007-04-17 23:36:07 +0100 (Tue, 17 Apr 2007) | 4 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/match.cc M /branches/lh3/mapass2/match.hh M /branches/lh3/mapass2/sort_mapping.cc - I was wrong in calculating of mapping quality. I fixed it, but I am afraid that we may get more false positives. Anyway, we should stick to the theory, I think. - Prepare to add codes to remove the adaptor sequence. ------------------------------------------------------------------------ r42 | lh3lh3 | 2007-04-16 17:12:31 +0100 (Mon, 16 Apr 2007) | 8 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/algo.hh M /branches/lh3/mapass2/assemble.cc A /branches/lh3/mapass2/aux_utils.c M /branches/lh3/mapass2/main.c M /branches/lh3/mapass2/main.h A /branches/lh3/mapass2/scripts A /branches/lh3/mapass2/scripts/farm-run.pl A /branches/lh3/mapass2/scripts/mapass2.pl M /branches/lh3/mapass2/sort_mapping.cc - fix a memory leak in assemble.cc - fix a bug in algo_heap_adjust(), which subsequently fails 'mapmerge'. - output a little more statistics from 'match' - add 'cns2snp' and other command to extract information for '.cns' dump - add farm-run.pl, my script to facilitate running large jobs on Sanger's farm. - add mapass2.pl, a pipeline script - 0.1.2-1 ------------------------------------------------------------------------ r37 | lh3lh3 | 2007-04-15 22:45:16 +0100 (Sun, 15 Apr 2007) | 5 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/match.cc - Paired-end data works better, but we need more large-scale test. - For some reason, mapass2 is pretty slow on some reads. I have not figured out the reason. - Prepare to release 0.1.2. ------------------------------------------------------------------------ r35 | lh3lh3 | 2007-04-15 00:05:56 +0100 (Sun, 15 Apr 2007) | 5 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/match.cc M /branches/lh3/mapass2/match.hh M /branches/lh3/mapass2/match_aux.cc A /branches/lh3/mapass2/sort_mapping.cc - put some codes in match_aux.cc into sort_mapping.cc - mapview can handle large input files - trim_end works again - on S. suis data, this version works fine. ------------------------------------------------------------------------ r34 | lh3lh3 | 2007-04-14 18:10:47 +0100 (Sat, 14 Apr 2007) | 6 lines Changed paths: M /branches/lh3/mapass2/match.cc M /branches/lh3/mapass2/match.hh M /branches/lh3/mapass2/match_aux.cc M /branches/lh3/mapass2/read.cc - just read-pair in the correct way... - correct read pair distance - high-resolution pair quality (at the cost of memory, though) - fix a bug where log_n[] always equals to 0 - still need more work... ------------------------------------------------------------------------ r33 | lh3lh3 | 2007-04-13 12:41:16 +0100 (Fri, 13 Apr 2007) | 4 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/match.cc M /branches/lh3/mapass2/match.hh M /branches/lh3/mapass2/match_aux.cc M /branches/lh3/mapass2/read.cc - Paired-end alignment seems to work properly. - The next move is to fine tune the matching program. - version 0.1.1-2 ------------------------------------------------------------------------ r32 | lh3lh3 | 2007-04-12 15:00:18 +0100 (Thu, 12 Apr 2007) | 4 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/fastq2bfq.c M /branches/lh3/mapass2/match.cc M /branches/lh3/mapass2/match.hh M /branches/lh3/mapass2/match_aux.cc M /branches/lh3/mapass2/read.cc M /branches/lh3/mapass2/read.h - Paired reads should be provided in two files. - Automatically find the read length. - Codes for paired alignment have been written partly. ------------------------------------------------------------------------ r30 | lh3lh3 | 2007-04-11 17:19:05 +0100 (Wed, 11 Apr 2007) | 3 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/assemble.cc Mapass2 now works reasonably well for un-paired reads. I will work on paired reads, which should not be hard in the current frame-work. I will release this single-end version as 0.1.1. ------------------------------------------------------------------------ r29 | lh3lh3 | 2007-04-10 22:04:25 +0100 (Tue, 10 Apr 2007) | 7 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/algo.hh M /branches/lh3/mapass2/main.c M /branches/lh3/mapass2/main.h M /branches/lh3/mapass2/match.cc M /branches/lh3/mapass2/match.hh M /branches/lh3/mapass2/match_aux.cc A /branches/lh3/mapass2/merge.cc - Finish "mapmerge" component, which means mapass2 should be able to deal with large-scale data such as chrX data. - fix a bug: lname was added for several times - add heap related functions ------------------------------------------------------------------------ r28 | lh3lh3 | 2007-04-10 16:34:28 +0100 (Tue, 10 Apr 2007) | 2 lines Changed paths: A /branches/lh3/mapass2/assemble.h I forget this header file... ------------------------------------------------------------------------ r27 | lh3lh3 | 2007-04-10 16:33:46 +0100 (Tue, 10 Apr 2007) | 8 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/assemble.cc M /branches/lh3/mapass2/match.cc M /branches/lh3/mapass2/match.hh M /branches/lh3/mapass2/match_aux.cc - output depth in the "pileup" file - print 10-based intervals as statistics - calculate a little more accurate alignment quality - allow to change read-reference difference rate on the command line - lower read qualities if mismatches happen at the end of a read - on S. suis data, mapass2 can yield similar results to mapass(1) ------------------------------------------------------------------------ r26 | lh3lh3 | 2007-04-10 13:44:54 +0100 (Tue, 10 Apr 2007) | 2 lines Changed paths: M /branches/lh3/mapass2/dword.hh M /branches/lh3/mapass2/match.cc M /branches/lh3/mapass2/match.hh M /branches/lh3/mapass2/match_aux.cc Only hold two index in the memory instead of six. This is a compromise... ------------------------------------------------------------------------ r25 | lh3lh3 | 2007-04-10 11:11:06 +0100 (Tue, 10 Apr 2007) | 6 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/assemble.cc M /branches/lh3/mapass2/const.c M /branches/lh3/mapass2/const.h M /branches/lh3/mapass2/match_aux.cc - fix a bug when a sequence is reversed. - fix a bug for quality mis-calculation - The result looks sensible now, but it is not so accurate as the previous version. Possibly this is due to the reduced resolution of mapping qualities. ------------------------------------------------------------------------ r24 | lh3lh3 | 2007-04-09 23:31:35 +0100 (Mon, 09 Apr 2007) | 2 lines Changed paths: M /branches/lh3/mapass2/Makefile A /branches/lh3/mapass2/assemble.cc M /branches/lh3/mapass2/main.c M /branches/lh3/mapass2/main.h M /branches/lh3/mapass2/match.hh M /branches/lh3/mapass2/match_aux.cc Add 'pileup' and 'assemble' components. They have not been tested yet. ------------------------------------------------------------------------ r23 | lh3lh3 | 2007-04-04 15:46:16 +0100 (Wed, 04 Apr 2007) | 5 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/main.c M /branches/lh3/mapass2/main.h M /branches/lh3/mapass2/match.cc M /branches/lh3/mapass2/match.hh M /branches/lh3/mapass2/match_aux.cc M /branches/lh3/mapass2/read.cc - fix maximum mismatch to 4 - dumping the results is now available - 0.1.0-3 ------------------------------------------------------------------------ r22 | lh3lh3 | 2007-04-04 13:32:00 +0100 (Wed, 04 Apr 2007) | 4 lines Changed paths: M /branches/lh3/mapass2/match.cc M /branches/lh3/mapass2/match.hh M /branches/lh3/mapass2/match_aux.cc 'match' is a little bit faster, but is still slower than 'mapass'. This is the best I can do for now. I will move forward to dealing with input/output and consensus calling. ------------------------------------------------------------------------ r21 | lh3lh3 | 2007-04-03 23:19:49 +0100 (Tue, 03 Apr 2007) | 5 lines Changed paths: M /branches/lh3/mapass2/Makefile M /branches/lh3/mapass2/match.cc M /branches/lh3/mapass2/match_aux.cc M /branches/lh3/mapass2/read.cc Fix three bugs. Now mapass2 can produce the same results on a small example. However, mapass2 is TOO SLOW!!! I am going to improve it tomorrow. Hope I can make it... It is so frustrating... ------------------------------------------------------------------------ r18 | lh3lh3 | 2007-04-03 21:08:04 +0100 (Tue, 03 Apr 2007) | 5 lines Changed paths: A /branches/lh3/mapass2 A /branches/lh3/mapass2/Makefile A /branches/lh3/mapass2/algo.hh A /branches/lh3/mapass2/bfa.c A /branches/lh3/mapass2/bfa.h A /branches/lh3/mapass2/const.c A /branches/lh3/mapass2/const.h A /branches/lh3/mapass2/dword.hh A /branches/lh3/mapass2/fasta2bfa.c A /branches/lh3/mapass2/fastq2bfq.c A /branches/lh3/mapass2/main.c A /branches/lh3/mapass2/main.h A /branches/lh3/mapass2/match.cc A /branches/lh3/mapass2/match.hh A /branches/lh3/mapass2/match_aux.cc A /branches/lh3/mapass2/read.cc A /branches/lh3/mapass2/read.h A /branches/lh3/mapass2/seq.c A /branches/lh3/mapass2/seq.h - New code base. Alignment for paired reads. - Streamable alignment file. - Non-paired alignment partially works now. ------------------------------------------------------------------------ maq-0.7.1/FUTURES0000644000076600000240000000000011005147054011712 0ustar lh3staffmaq-0.7.1/INSTALL0000644000076600000240000000074310766735650011723 0ustar lh3staff There are two ways to compile maq. The first way is to use the GNU building systems. Simply type './configure; make; make install' to compile and to install maq. Three executables 'maq', 'maq.pl' and 'farm-run.pl' will be copied to '/usr/local/bin' by default. Alternatively, one could compile with 'make -f Makefile.generic' and manually copy the three executables to the destination directory. Modification to 'Makefile.generic' is sometimes needed for different architectures. maq-0.7.1/Makefile.am0000644000076600000240000000155611043135375012714 0ustar lh3staffbin_SCRIPTS = scripts/maq.pl scripts/farm-run.pl scripts/maq_plot.pl scripts/maq_eval.pl bin_PROGRAMS = maq maq_SOURCES = main.c const.c seq.c bfa.c read.cc fasta2bfa.c fastq2bfq.c merge.cc \ match_aux.cc match.cc sort_mapping.cc assemble.cc pileup.cc mapcheck.cc get_pos.c \ assopt.c aux_utils.c rbcc.cc subsnp.cc pair_stat.cc indel_soa.cc maqmap.c maqmap_conv.c \ altchr.cc submap.c rmdup.cc simulate.c genran.c indel_pe.cc stdaln.c indel_call.cc \ eland2maq.cc csmap2ntmap.cc break_pair.c glfgen.cc maq_LDADD = -lm -lz bfa.o:bfa.h main.o:main.h const.o:const.h read.o:read.h seq.o:seq.h fasta2bfa.o:const.h seq.h fastq2bfq.o:const.h seq.h match.o:match.hh dword.hh main.h algo.hh bfa.h read.h match_aux.o:read.h match.hh main.h sort_mapping.o:match.hh algo.hh read.h assemble.o:assemble.h algo.hh main.h bfa.h assopt:assemble.h genran.o:genran.h simulate.o:genran.h maq-0.7.1/Makefile.generic0000644000076600000240000000256211067172577013744 0ustar lh3staffCC= gcc CXX= g++ CFLAGS= -g -Wall -O2 -m64 # comment out `-m64' for 32-bit compilation CXXFLAGS= $(CFLAGS) DFLAGS= -D_FASTMAP -DMAQ_LONGREADS OBJS= const.o seq.o bfa.o read.o fasta2bfa.o fastq2bfq.o \ match_aux.o match.o sort_mapping.o merge.o get_pos.o \ pileup.o mapcheck.o assopt.o assemble.o maqmap.o \ aux_utils.o rbcc.o subsnp.o pair_stat.o indel_soa.o \ maqmap_conv.o altchr.o submap.o rmdup.o simulate.o \ genran.o indel_pe.o stdaln.o indel_call.o eland2maq.o \ csmap2ntmap.o break_pair.o glfgen.o PROG= maq MANPAGE= maq.1 VERSION= 0.7.1 LIBS= -lz -lm .SUFFIXES:.c .o .cc .c.o: $(CC) -c $(CFLAGS) $(DFLAGS) $< -o $@ .cc.o: $(CXX) -c $(CXXFLAGS) $(DFLAGS) $< -o $@ all:$(PROG) $(MANPAGE) maq:$(OBJS) main.o $(CXX) $(CXXFLAGS) $(DFLAGS) $(OBJS) main.o -o $@ $(LIBS) maq.1:maq.pod pod2man --center "Bioinformatics Tools" --release "maq-$(VERSION)" maq.pod > $@ main.o:main.c main.h $(CC) -c $(CFLAGS) $(DFLAGS) -DPACKAGE_VERSION=\"$(VERSION)\" main.c -o main.o bfa.o:bfa.h const.o:const.h read.o:read.h seq.o:seq.h fasta2bfa.o:const.h seq.h fastq2bfq.o:const.h seq.h match.o:match.hh dword.hh main.h algo.hh bfa.h read.h match_aux.o:read.h match.hh main.h sort_mapping.o:match.hh algo.hh read.h assemble.o:assemble.h algo.hh main.h bfa.h assopt:assemble.h genran.o:genran.h simulate.o:genran.h clean: rm -f *.o a.out *~ *.a $(PROG) $(MANPAGE) maq-0.7.1/Makefile.in0000644000076600000240000004652711067172614012737 0ustar lh3staff# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = maq$(EXEEXT) subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ config.guess config.sub install-sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_maq_OBJECTS = main.$(OBJEXT) const.$(OBJEXT) seq.$(OBJEXT) \ bfa.$(OBJEXT) read.$(OBJEXT) fasta2bfa.$(OBJEXT) \ fastq2bfq.$(OBJEXT) merge.$(OBJEXT) match_aux.$(OBJEXT) \ match.$(OBJEXT) sort_mapping.$(OBJEXT) assemble.$(OBJEXT) \ pileup.$(OBJEXT) mapcheck.$(OBJEXT) get_pos.$(OBJEXT) \ assopt.$(OBJEXT) aux_utils.$(OBJEXT) rbcc.$(OBJEXT) \ subsnp.$(OBJEXT) pair_stat.$(OBJEXT) indel_soa.$(OBJEXT) \ maqmap.$(OBJEXT) maqmap_conv.$(OBJEXT) altchr.$(OBJEXT) \ submap.$(OBJEXT) rmdup.$(OBJEXT) simulate.$(OBJEXT) \ genran.$(OBJEXT) indel_pe.$(OBJEXT) stdaln.$(OBJEXT) \ indel_call.$(OBJEXT) eland2maq.$(OBJEXT) csmap2ntmap.$(OBJEXT) \ break_pair.$(OBJEXT) glfgen.$(OBJEXT) maq_OBJECTS = $(am_maq_OBJECTS) maq_DEPENDENCIES = binSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(bin_SCRIPTS) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = am__depfiles_maybe = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ SOURCES = $(maq_SOURCES) DIST_SOURCES = $(maq_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ bin_SCRIPTS = scripts/maq.pl scripts/farm-run.pl scripts/maq_plot.pl scripts/maq_eval.pl maq_SOURCES = main.c const.c seq.c bfa.c read.cc fasta2bfa.c fastq2bfq.c merge.cc \ match_aux.cc match.cc sort_mapping.cc assemble.cc pileup.cc mapcheck.cc get_pos.c \ assopt.c aux_utils.c rbcc.cc subsnp.cc pair_stat.cc indel_soa.cc maqmap.c maqmap_conv.c \ altchr.cc submap.c rmdup.cc simulate.c genran.c indel_pe.cc stdaln.c indel_call.cc \ eland2maq.cc csmap2ntmap.cc break_pair.c glfgen.cc maq_LDADD = -lm -lz all: config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .cc .o .obj am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu --ignore-deps'; \ cd $(srcdir) && $(AUTOMAKE) --gnu --ignore-deps \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu --ignore-deps Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu --ignore-deps Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) maq$(EXEEXT): $(maq_OBJECTS) $(maq_DEPENDENCIES) @rm -f maq$(EXEEXT) $(CXXLINK) $(maq_OBJECTS) $(maq_LDADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ else :; fi; \ done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c .c.o: $(COMPILE) -c $< .c.obj: $(COMPILE) -c `$(CYGPATH_W) '$<'` .cc.o: $(CXXCOMPILE) -c -o $@ $< .cc.obj: $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d $(distdir) || mkdir $(distdir) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) config.h installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-binPROGRAMS install-binSCRIPTS install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \ dist-gzip dist-lzma dist-shar dist-tarZ dist-zip distcheck \ distclean distclean-compile distclean-generic distclean-hdr \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-binSCRIPTS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-binSCRIPTS bfa.o:bfa.h main.o:main.h const.o:const.h read.o:read.h seq.o:seq.h fasta2bfa.o:const.h seq.h fastq2bfq.o:const.h seq.h match.o:match.hh dword.hh main.h algo.hh bfa.h read.h match_aux.o:read.h match.hh main.h sort_mapping.o:match.hh algo.hh read.h assemble.o:assemble.h algo.hh main.h bfa.h assopt:assemble.h genran.o:genran.h simulate.o:genran.h # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: maq-0.7.1/NEWS0000644000076600000240000006447411067172577011402 0ustar lh3staffBeta Release 0.7.1 (26 September, 2008) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Version 0.7.0 does not work with reads >63bp at all. I overlooked two lines of codes which assume reads are 63bp or shorter. Now I have fixed the bug and tested it on simulated long reads. It seems to work fine. I am sorry for this obvious bug. No other things are changed since 0.7.0. (0.7.1: 26 September 2008, r672) Beta Release 0.7.0 (21 September, 2008) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Since this release, MAQ can accept reads no longer than 127bp, instead of 63bp in the previous version. This is achieved at the cost of 18% slower speed and 16% more peak memory usage. The .map alignment format is also changed accordingly, which means the new format is NOT compatible with the old format. I will shortly put a converter on the MAQ website so that you can convert your alignment done by 0.6.x to the new format without redoing the alignment. In addition, you can choose to revert to the 63bp version by configure with "--enable-shortreads", but this is not recommende. Furthermore, the NovoCraft developers have implemented a converter that converts the NovoCraft alignment format to MAQ's .map format. I incorporated their codes into MAQ. NovoCraft can find short indels with single-ended reads and have most of major features of MAQ. It is also fast and well developed. NovoCraft is a good alternative to MAQ. In additional to the major changes, here are the other notable changes, only a few: * Improved progress report in maq map. Someone is using MAQ to align reads to millions of contigs. The resulting stderr output is even larger than the alignment itself. Now contig names will not be printed. * Fixed a segfault in Smith-Waterman alignment. I have not pinpointed the line that causes the segfault, but I guess this is caused by a rare out-of-boundary event. Anyway, the segfault seems to go away after enforcing the boundary check. Probably MAQ will never go to 0.8.0. Although it is cheap to make MAQ align reads up to 255bp, I am not going to do that. When reads go longer and longer, MAQ's power will be reduced due to its inability to find short indels on single ended reads. I am still experimenting novel algorithms for long reads, and BWA, which has been made public, is the unfinished product. Although BWA has not been fully developed into a comprehensive package like MAQ, it shows the potential to do ultra-fast gapped alignment on long reads. The current BWA does global alignment (w.r.t reads) for a few hundreds bp of reads by taking first few tens of bp as seed. You can find more information on the MAQ website. (0.7.0: 21 September 2008, r669) Beta Release 0.6.8 (27 July, 2008) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Most of new features in this release are mainly designed for the 1000 genome project. For other users, the most obvious change is a bug fix in the assemble command. Fixing this bug reduces error dependency coefficient from 0.93 to 0.85. The SNP accuracy remains similar to the previous version. Other notable changes include: * Formally changed the license to GPL version 3. * Added mapvalidate command, which checks whether an alignment file is corrupted. The mapmerge command also does some sanity check when merging alignments. * Support generating GLF format (for the 1000 Genome Project). Codes for manipulating GLF files are available in SVN now. * The mapcheck command can optionally dump additional information for quality recalibration (for the 1000 Genome Project). * Fixed a potential bug in indelpe.cc (thank Vaughn for reporting the bug). * Fixed a potential compiling error in assopt.c (thank Jason for the bug report). * Only dump unmapped reads with `maq map -u'. * Added more online documentation about how to call SNPs for SOLiD data and to call SNPs from pooled samples. (0.6.8: 27 July 2008, r651) Beta Release 0.6.7 (23 June, 2008) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ As promised, MAQ now works with reads from Illumina's long insert-size libraries and with reads from samples by pooling multiple individuals/strains together. Also in this release, unmapped reads with their mates mapped are also stored in the .map alignment file. This strategy helps users who do local assembly to find structural variations. Other notable changes are: * In indelpe, fixed a bug about the position of an insertion. Previously, the output position is 1bp-away from the true position. * In indelpe, output addition information about indels, which also helps to tell whether the indel is homozygous or heterozygous. * In SNPfilter, integrated the consensus quality filter. Previously, this has to be done with an awk command. * In SNPfilter and easyrun, improved the consensus quality filter. This is particularly important for SNP calling on pooled samples. * Added command to detect correputed .map files. * In mapcheck, optionally output additional information for mapping based quality calibration. (0.6.7: 23 June 2008, r631) Beta Release 0.6.6 (27 April, 2008) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Two new features are added to this release. First, cns2fq now gives regions where maq believes SNPs can be called confidentially. Second, maq can optionally dump all perfect or 1-mismatch hits to a separate file. Maq cannot make use of information of multiple hits, but I can see outputing these hits may help people who do expressional profiling. No bugs are fixed in this release and therefore people do not need to update unless using the new features. In the next release, maq will support read alignment for Illumina's long insert-size library which has different read orientation for a read pair. I will also try to implement a SNP caller for pooled sample. (0.6.6: 27 April 2008, r602) Beta Release 0.6.5 (28 March, 2008) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This is mainly a bug fix release. * Fixed bug: read names longer than 35 characters will not be stored in the alignment file. Command rmdup for PE data will also be affected when reads have no names. Short read names will not cause any problems. This bug is specific to 0.6.4. * Fixed bug: reference shorter than 3bp will cause malformed consensus file. This bug is specific to 0.6.4. * Fixed bug: potential memory violation in indelsoa. This rare bug affects all 0.6.x series. * Fixed bug: potential memory violation in simulate when the reference is short. This bug is rare if reference sequences are all long. All 0.6.x will be affected. In addition to the bug fixes, I also finished SOLiD support in this release. A new script solid2fastq.pl is introduced to convert SOLiD read format to FASTQ format accepted by maq. Furthermore, maq is able to convert color alignment to nucleotide alignment with inferred nucleotide base qualities. Nucleotide consensus and SNPs can be generated with assemble in the standard way. There are still some room left for further improvement. I will work on it in future. Another change is in the new release, the insert size of a read pair is measured between the 1st cycle of both reads in the pair, no matter whether they are mapped as a proper pair or not. Defining insert size in this way may be more conceptually consistent. Note that this change will not affect properly aligned Solexa reads at all, but will slightly affect SOLiD PE reads. I am really sorry for these bugs in maq and hope the new version is more stable. (0.6.5: 28 March 2008, r578) Beta Release 0.6.4 (15 March, 2008) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Maq is now 90% faster on human alignment. This acceleraion is partly achieved by extensive code optimization and partly by using 28bp seed, instead of 24bp in previous versions, in the alignment. As both the Sanger Inst. and Illumina company have greatly improved the data quality, using 28bp seed does not affect the final SNP accuracy. If users still intend to use 24bp seed like before, they should compile maq with "./configure --enable-slowmap". The online binaries are compilied with 28bp seed. It is important to note that Illumina/Solexa sequencing may produce many false polyA at the edges of a tile. These polyA artefacts may greatly increase the running time of maq. Users are advised to remove these artefacts with their own scripts before alignment. For the moment maq does not provide a general functionality for filtering polyA. From this version, the names of a pair of reads can be different at the tailing "/1" or "/2". For example, "read0001/1" and "read0001/2" are allowed for a read pair. In this way, the two reads in a pair can be discriminated in the mapview output. Another important change is the consensus calling model. I noticed a theoretical flaw in the statistical model behind. The sequencing errors seem to be more independent when I fixed the flaw and therefore the error dependency coefficient is increased to 0.93 by default. The final SNP accuracy is about the same as the previous version. I also improved the SOLiD support in this version. A script is provided for converting SOLiD colour reads to the maq fastq. Mate-pair SOLiD reads can also be correctly aligned. For a SOLiD read pair, the correct orientation should be F3_reverse-R3_reverse or R3_forward-F3_forward. I did not know this before. Other notable changes include: * Assemble now calculates minimum neighbouring quality in the 7bp window surrounding the current position. SNPfilter will filter unreliable SNPs based on the information. This idea is inspired by NQS (Neighbourhood Quality Standard). * Optionally store mismatching positions in .map file. The trade-off is the maximum read length is 55bp when this option is switched on. * Fixed an ever existing bug in PE alignment. Now about 1% more properly aligned pairs can be found. * Added paf_utils.pl script. This script parses soap, eland, rmap and maq alignment formats to the same format. It also presents an example about how to read/write maq's binary .map format with Perl. * Added support for converting Bustard output (_prb.txt and _seq.txt) in fq_all2std.pl. However, users should avoid using Bustard output at best. Gerald output is always better. * "Alternative mapping quality" in mapview is now the lower SE mapping quality of the two ends. Previously this does not stand for properly paired reads. * Filter polyA in reads, only for data generated by the Sanger Institute. Note that maq can be several times SLOWER if there are a lot of polyA artefacts in the reads. * Pileup can optionally output base position on the read. * Maq now trims long adapter contamination before alignment and trims short adapter contamination after the alignment. * Submap now works as a filter on .map file. Users should always extract the reads in a region with maqindex in the maqview package. * Updated mapstat command. * Fixed a bug in easyrun about relative paths. * Fixed a bug in fasta2csfasta. * Fixed a rare bug in calculating the distance of a pair. * Fixed a rare bug in determining the boundary of Smith-Waterman alignment. * Added asub, a generic script for submitting array jobs on LSF/SGE. Added maq_sanger.pl, a script for running maq at the Sanger Inst. I will work on variants calling for multiple samples and further improve SOLiD support in future versions. To find the latest development of maq, please check out: svn co https://maq.svn.sourceforge.net/svnroot/maq/branches/lh3/maq (0.6.4: 15 March 2008, r537) Beta Release 0.6.3 (3 January, 2008) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Again, most changes happened in auxilliary commands. Simulation and Perl scripts were improved a lot. Changes and bug fixes include: * Added diploid simulation mode. Given a haploid reference sequence, maq can generate a diploid sequence and add variants to both haploids. * In 'easyrun', automatically input split FASTQ. Users do not need to split the input by themselves. * Paired end reads can be used with 'easyrun'. * Added 'snpreg' command, which roughly calculates the size of regions where SNPs can be called. * Added 'simucns' command, which evaluates the accuracy of consensus mapping qualities from simulated read alignment. * Addd 'demo' command to maq.pl. It demonstrates how to simulate reads, to use easyrun and to evaluate the result with maq_eval.pl. * In 'maq map', set flag 18 for a read whose mate mapped with the Smith-Waterman algorithm as paired. Maq has several companion scripts and consists of many commands, but not all of them are well documented. I will gradually improve the documentations, especially those useful to endusers. In addition, not all maq functionalities are fully optimized. Advanced users may want to implement in their own ways. I would also like to improve Maq if you have better ideas. (0.6.3: 3 January 2008, r466) Beta Release 0.6.2 (23 November, 2007) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Most changes in this release happened in auxilliary commands instead of key commands. Except for random factors, the 0.6.2 alignment and consensus should be almost identical to those resultant from 0.6.1. Other changes and bug fixes include: * Added an option to dump unmapped reads to a separate file. Users can study why these reads cannot be aligned. * Implemented `export2maq' commands which converts Illumina's in-house Export format to maq's ".maq" binary format. Genotype calling is supported because the Export format contains mapping qualities of reads. * Implemented `eland2maq' command which convert alignments in an Eland output to Maq's ".map" format. Genotype calling is not defected due to the lack of qualities. * Made `indelsoa' command available to end users. This command implements a state-of-art homozygous break point detector for single-end reads. However, this command mainly aims to faciliate SNP filtering around break points instead of finding all the indels. The `indelpe' command always works better. * Made most of commands recognize `-' as the standard input or standard output. This may help stream-based pipeline. * Restored the `-m' option in `pileup' and `assemble' commands. Some users regard this to be useful. * Added fq_all2std.pl, a script to convert various read formats to the standard/Sanger FASTQ format. * Improved the rules in filtering SNPs and allowed to filter out SNPs beside potential indel sites. * Fixed a bug again in bisulfite alignment mode. This is to meet a user's request. I have not tried it on real data. * Added functionalities to evaluate indels in maq_eval.pl. * Improved `fastq2bfq' command in both maq and maq.pl to make them easier to use. * Fixed a weird compiling error for some powperpc64-linux machines. (0.6.2: 23 November 2007, r428) Beta Release 0.6.1 (3 October, 2007) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This is mainly a bugfix release. All of the bugs are minor or happen rarely. End users may not observe obvious changes in their results. You do not really need to re-align the reads with this version unless you feel uncomfortable with any trivial bugs. The changes and bug fixes include: * In this release, a read is mapped to the position where the sum of quality values of mismatched bases is approximately minimum. * Zero quality will be changed to one in `fastq2bfq'. This is because zero-quality bases will be regarded as `N' in alignment. * Fixed a bug in adapter trimming. The preious version does not work properly. * Fixed a very rare bug in `assemble' and `pileup'. It may lead to false zero depth at some sites (about 1 in 1,000,000 sites). * Fixed a bug for bisulfite alignment mode. This mode has not been thoroughly tested, though. (0.6.1: 3 October 2007, r333) Beta Release 0.6.0 (5 September, 2007) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This is a release with several bleeding-edge modifications which jeopardized the stability of maq. Thorough testing has been done to make sure maq works properly and that is why this release is delayed. In this new release, maq allows more mismatches after the first 24bp of a read. Trimming low-quality 3'-end of reads is usually not necessary any more. In particular, maq does not recommend to trim reads recursively because this will affect the accuracy of mapping qualities. Furthermore, since this release, maq is able to find short indels with paired end (PE) reads. As Illumina's PE protocol will become standard in the near future, this indel detector will play its role. Other notable changes include: * Changed ".map" binary format. The number of mismatches of the second best hit is replaced by the sum of errors of the best hit. The distance between the pair now equals to the outer distance. Reads with indels are also stored in the ".map" files. The mapview output is changed accordingly. * Added the number of 0- and 1-mismatch hits to the mapview output. * Rewrote rmdup command. This command now keeps all abnormal pairs as well as reads with indels. * Made simulate command generate reads on both strands. Previously read1 always come from the forward strand and read2 from the reverse strand. * Allowed to change the average MAF for heterozygous sites. This may help for pooled sample, but it has not been evaluated. * Improved 3'-adapter trimming. Fully contaiminated reads can be detected now. In this release, I am trying to stablize the alignment part and hope the alignment file generated by maq-0.6.0 can be compatible with later releases. Furthermore, maq is moving towards the first formal release 1.0.0. In the near future, I will also try to stablize the entire code instead of testing new features frequently. (0.6.0: 5 September 2007, r249) Beta Release 0.5.1 (31 July, 2007) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ All the notable changes include: * Bugfix in `map': fixed a bug which will lead to wrong alignment when two similar regions having identical coordinates but on different references. This bug can be dated back to the first piece of codes of maq. * Bugfix in `map' paired end alignment: fixed a bug which will lead to wrong alignment when there are two good hits in a small region. * New feature `simulate': a sophisticated paired end read simulator has been implemented. It builds an order-one Markov chain and trains parameters from real read data. The simulator is able to generate reads with quality distribution quite similar to real ones. In addition, three parameter sets will be provided with Maq. Endusers can simulate realistic reads even without any real data. * New feature `rmdup': remove read pairs with identical outer coordinates. Doing this may improve the SNP accuracy in practice. * Since this release, the main documentation will be maintained in a man page. PDF version will also come with Maq distributions. (0.5.1: 31 July 2007, r213) Beta Release 0.5.0 (13 July, 2007) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From this release, this program is formally renamed as `maq', which stands for Mapping and Assembly with Qualities. The version number still follows the previous series. In addition to the name of the program, another major change in this release is the format of the maq alignment file. In response to the request of several users, read names will be stored in the alignment file. The mapview output is also revised accordingly. Other notable changes and bug fixes in this release include: * Bugfix in `maq.pl': follow symbolic links. * New feature `maq_plot.pl': plot read depth and abnormal read pairs along the reference. * New feature in `maq.pl': `SNPfilter' command to rule out unreliable SNPs. * New feature in `maq.pl': more analyses added to `easyrun'. (0.5.0: 13 July 2007, r171) Beta Release 0.4.3 (4 July, 2007) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In this new release, several bugs are fixed and a number of minor features are implemented. * Bugfix in 'mapass2.pl easyrun': fixed bugs when multiple read files are provided on the command line. * New feature: allow to use single-end mapping quality in several commands. By default, mapass2 will use paired end mapping qualities if reads are paired. However, I found this quality is sometimes overestimated. It is good to check what the difference between the results of the two type of mapping qualities. * Bugfix in 'mapcheck': fixed an integer overflow and skipped 'N' regions in calculating the average depth. * Bugfix in paired end alignment: fixed wrong coordinates for 0.03% or paired reads. Single end alignment will not be affected. * New feature in 'match': when '-N' is flagged, more alignment information will be dumped to the stderr. (0.4.3: 4 July 2007, r148) Beta Release 0.4.2 (21 June, 2007) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Several people were asking me to output the name of each mapped read. Now here it is. You can tune this feature on by: mapass2 match -N out.map ref.bfa reads.bfq 2>out.log The read name, reference seqname, position, strand, paired mapping quality, single mapping quality and mismatched bases will be printed on stderr. This option `-N' should only be used in debugging. It will cost more memory and diskspace as well. That is all. People who do not need this feature can stick to 0.4.1. (0.4.2: 21 June 2007, r130) Beta Release 0.4.1 (17 June, 2007) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This is mainly a bug fix release. All users are recommended to update. New features and bug fixes include: * New command `sol2sanger': convert Solexa FASTQ to Sanger/standard FASTQ format. The difference between the two formats is how the qualities are scaled. * New command `bfq2fastq': convert mapass' binary FASTQ format to standard FASTQ. * Bugfix in `cns2win': fixed wrong report when chr is not specified on the command line. * Bugfix in `mapcheck': complemented bases on the reverse strand. (0.4.1: 17 June 2007, r124) Beta Release 0.4.0 (15 May, 2007) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ One week after the last release, 0.4.0 comes out. Several improvements make this release different from the previous ones: * New consensus base calling model. Although updating model frequently happens in the development of mapass2, this one is different. It is the first model that can satisfy me. All previous models make me feel uncomfortable in a way or another. However, good theory does not always mean better performance. The new model only improve the accuracy by less than 1 percent. * Preliminary functions to process SOLiD data. This is the first the release that is able to process AB SOLiD data. The current strategy cannot fully make use of all the colour information that is unique to SOLiD data, but it is good enough to study the strength and weakness of SOLiD data. I may improve these functions when SOLiD becomes more stable. It is being improved. * Use of the GNU build systems. Mapass2 is better compiled with 64bit support. The GNU build systems make this easier. Apple universal binaries can be compiled, too. Although I still quite like to write Makefile by myself, I think to use a more sophisticated method is the right way to go. This is the first time I have tried this. * Considerable codes clean up and minor improvements in assembling related parts. Beginning with this release, I will probably not release mapass2 so frequently as what happened in the past three weeks. Although I am not entirely satisfied with the accuracy of current performance, I am happy with the whole theory behind and the practical usefulness of mapass2. I am sure mapass2 is one of the best softwares to map and assemble short reads. (0.4.0: 15 May 2007, r114) Beta Release 0.3.1 (9 May, 2007) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This is a release with minor revisions. The consensus calling model is modified slightly which, unfortunately, decreases the accuracy by about 1%. However, I will stick to it anyway because it is more concise and correct in theory. Actually, there is a bug when I was implementing the old model. Other changes include: * Add `subpos' command: extract a required subset from .cns file * Improve `pileup' output by making it more informative and allowing to extract a required subset. * Fix two bugs: one in k-small and the other in `mapcheck'. These are trivial, though. (0.3.1: 9 May 2007, r94) Beta Release 0.3.0 (3 May, 2007) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ A new release comes out. Consensus calling model has been improved a little. Read-pair quality can be calculated more precisely. More commands are added to facilitate subsequent analyses. Detailed improvements and fixes are: * Alternative model for consensus base calling. The new model does not outperform the old one, but it tend to be more correct in theory and more flexible. * Improved model for read-pair quality. This fixes possible overestimation when a pair can be mapped to several places with correct orientation and distance. Note that the default parameter should be adjusted in some cases. For chrX data, I suggest to apply "-t 0.8". * Reference based consesus calling (RBCC). Call the consensus based on dbSNP information. Adjust the prior at the dbSNP sites. This is kind of cheating, but it does help to improve the final SNP calls. * Informative mapcheck. Command 'mapcheck' now outputs more information. It is also integrated to 'mapass2.pl'. * Fastq2bfq in batch mode. This function converts or organizes all the fastq files in a directory. 'farm-run.pl' script can be easily applied to the resultant directory structure. * A few bug fixes. (0.3.0: 3 May 2007, r86) Beta Release 0.2.1 (23 April, 2007) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This is mainly a bug fix release. The previous version cannot give correct results when there are two or more reference sequences. I am sorry for this obvious bug. Further improvements include: * Add `mapcheck' command. This command counts observed substitutions on reads with respect to the reference. It helps to check the systematic bias conatined in reads. * Consensus can be assembled from one sequence. Previously, all the consensus must be assembled together. (0.2.1: 23 April 2007, r67) Beta Release 0.2.0 (22 April, 2007) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This is the first release of mapass2, a program that maps Illumina/Solexa reads to the reference and calls the consensus. This program has been tested on real large-scale data. It is one of the few softwares that is able to handle these huge amount of data efficiently and accurately. (0.2.0: 22 April 2007, r60) maq-0.7.1/PROBLEMS0000644000076600000240000000000010766735650012022 0ustar lh3staffmaq-0.7.1/README0000644000076600000240000000165310766735650011553 0ustar lh3staff Mapass2 is a software that builds mapping assemblies from short reads generated by the next-generation sequencing machines. It is particularly designed for Illumina-Solexa 1G Genetic Analyzer, which typically generates reads 25-35bp in length. Mapass2 first aligns reads to reference sequences and then calls the consensus. At the mapping stage, maq performs ungapped alignment. For single-end reads, maq is able to find all hits with up to 2 or 3 mismatches, depending on a command-line option; for paired-end reads, it always finds all paired hits with one of the two reads containing up to 1 mismatch. At the assembling stage, maq calls the consensus based on a statistical model. It calls the base which maximizes the posterior probability and calculates a phred quality at each position along the consensus. Heterozygotes are also called in this process. For more information, see also maq website: http://mapass.sourceforge.net maq-0.7.1/aclocal.m40000644000076600000240000005077511067172612012530 0ustar lh3staff# generated automatically by aclocal 1.10.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(AC_AUTOCONF_VERSION, [2.62],, [m4_warning([this file was generated for autoconf 2.62. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.10' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.10.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.10.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 13 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.60])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR maq-0.7.1/algo.hh0000644000076600000240000000762610766735650012144 0ustar lh3staff#ifndef LH3_ALGO_HH #define LH3_ALGO_HH // algorithm, C++ version. adapted from algo.h of C version. typedef struct { size_t left,right; } ALGO_QSortStack; template void algo_sort(size_t n, ALGO_TYPE a[]) { size_t s, t, i, j, k; ALGO_QSortStack *top, *stack; ALGO_TYPE rp, swap_tmp; if (n == 0) return; /* stack = (ALGO_QSortStack*)malloc(sizeof(ALGO_QSortStack) * (size_t)((sizeof(size_t)*log(n)/ALGO_LOG2)+2)); */ stack = (ALGO_QSortStack*)malloc(sizeof(ALGO_QSortStack) * ((sizeof(size_t)*64)+2)); top = stack; s = 0; t = n-1; while (1) { if (s < t) { i = s; j = t; k = (i+j)>>1; rp = a[k]; swap_tmp = a[k]; a[k] = a[t]; a[t] = swap_tmp; do { do { ++i; } while (a[i] < rp); do { --j; } while (j && rp < a[j]); swap_tmp = a[i]; a[i] = a[j]; a[j] = swap_tmp; } while (i < j); swap_tmp = a[i]; a[i] = a[j]; a[j] = swap_tmp; swap_tmp = a[i]; a[i] = a[t]; a[t] = swap_tmp; if (i-s > t-i) { if (i-s > 9) { top->left = s; top->right = i-1; ++top; } if (t-i > 9) s = i+1; else s = t; } else { if (t-i > 9) { top->left = i+1; top->right = t; ++top; } if (i-s > 9) t = i-1; else t = s; } } else { if (top == stack) { free(stack); for (i = 1; i < n; ++i) for (j = i; j > 0 && a[j] < a[j-1]; --j) { swap_tmp = a[j]; a[j] = a[j-1]; a[j-1] = swap_tmp; } return; } else { --top; s = top->left; t = top->right; } } } } template inline void algo_swap(TYPE &a, TYPE &b) { TYPE c; c = a; a = b; b = c; } template TYPE algo_ksmall(size_t n, TYPE array[], size_t k) /* Return the kth smallest value in array array[0..n-1], The input array will be rearranged * to have this value in array[k-1], with all smaller elements moved to arr[0..k-2] (in * arbitrary order) and all larger elements in arr[k..n] (also in arbitrary order) */ { TYPE *arr, a; size_t i, ir, j, l, mid; if (k == 0) k = 1; arr = array - 1; l = 1; ir = n; for (;;) { if (ir <= l + 1) { /* Active partition contains 1 or 2 elements */ if (ir == l + 1 && arr[ir] < arr[l]) /* Case of 2 elements */ algo_swap(arr[l], arr[ir]); return arr[k]; } else { mid = (l + ir) >> 1; algo_swap(arr[mid], arr[l+1]); if (arr[ir] < arr[l]) algo_swap(arr[l], arr[ir]); if (arr[ir] < arr[l+1]) algo_swap(arr[l+1], arr[ir]); if (arr[l+1] < arr[l]) algo_swap(arr[l], arr[l+1]); i = l + 1; /* initialize pointers for partitioning */ j = ir; a = arr[l+1]; /* partition element */ for (;;) { /* beginning of innermost loop */ do ++i; while (arr[i] < a); /* scan up to find element > a */ do --j; while (a < arr[j]); /* scan down to find element < a */ if (j < i) break; /* Pointers crossed. Partitioning complete. */ algo_swap(arr[i], arr[j]); } arr[l+1] = arr[j]; /* insert partitioning element */ arr[j] = a; if (j >= k) ir = j - 1; /* Keep active the partition that contains the kth element */ if (j <= k) l = i; } } } template void algo_shuffle(int n, TYPE *array) { int i; TYPE tmp; for (i = n - 1; i > 0; --i) { int rand_ind = (int)(drand48() * i); tmp = array[i]; array[i] = array[rand_ind]; array[rand_ind] = tmp; } } // Heap related functions (binary heap) template inline void algo_heap_adjust(ALGO_TYPE l[], int i, int n) { int k; ALGO_TYPE tmp = l[i]; for (;;) { k = (i << 1) + 1; // the left child if (k >= n) { l[i] = tmp; return; } if (k < n - 1 && l[k] < l[k+1]) ++k; if (tmp < l[k]) { l[i] = l[k]; i = k; } else { l[i] = tmp; return; } } } template void algo_heap_make(ALGO_TYPE l[], int lsize) { for (int i = (lsize >> 1) - 1; i >= 0; --i) algo_heap_adjust(l, i, lsize); } template void algo_heap_sort(ALGO_TYPE l[], int lsize) { ALGO_TYPE swap_tmp; for (int i = lsize - 1; i > 0; --i) { ALGO_TYPE swap_tmp = l[0]; l[0] = l[i]; l[i] = swap_tmp; algo_heap_adjust(l, 0, i); } } #endif /* LH3_ALGO_HH */ maq-0.7.1/altchr.cc0000644000076600000240000000612610766735650012457 0ustar lh3staff#include #include #include #include "main.h" #include "const.h" #include "bfa.h" #include "stdhash.hh" typedef struct { hash_map_char *hash; bit64_t **snps; } snp_array_t; static void maq_delete_snp_array(snp_array_t *s) { for (int i = 0; i != int(s->hash->size()); ++i) free(s->snps[i]); free(s->snps); delete s->hash; free(s); } static snp_array_t *maq_load_snp_array(FILE *fp) { char name[256], str1[16], str2[16]; snp_array_t *sa = (snp_array_t*)calloc(1, sizeof(snp_array_t)); sa->hash = new hash_map_char; int pos, c; char refB, cnsB; while (fscanf(fp, "%s%d%s%s", name, &pos, str1, str2) == 4) { refB = str1[0]; cnsB = str2[0]; while ((c = fgetc(fp)) != '\n' && c != EOF); bit8_t ref = nst_nt16_table[int(refB)]; bit8_t cns = nst_nt16_table[int(cnsB)]; // if (nst_nt16_count_table[ref] != 1 || cns == 0xf || ref == cns) continue; assert(nst_nt16_count_table[ref] == 1 && cns != 0xf && ref != cns); bit8_t snp; if (nst_nt16_count_table[cns] == 2) { snp = cns ^ ref; if (nst_nt16_count_table[snp] != 1) continue; } else if (nst_nt16_count_table[cns] == 1) { snp = cns; } else continue; snp = nst_nt16_nt4_table[ref]<<4 | nst_nt16_nt4_table[snp]; bit64_t tmp; int id, n; if (sa->hash->find(name, &tmp)) { id = tmp>>32; n = tmp&0xffffffffu; } else { if ((sa->hash->size()&0xff) == 0) sa->snps = (bit64_t**)realloc(sa->snps, sizeof(bit64_t*) * (sa->hash->size() + 0x100)); id = sa->hash->size(); n = 0; } if ((n&0xffff) == 0) sa->snps[id] = (bit64_t*)realloc(sa->snps[id], sizeof(bit64_t) * (n + 0x10000)); tmp = bit64_t(id)<<32 | (n+1); sa->hash->insert(name, tmp); sa->snps[id][n++] = bit64_t(snp)<<32 | (pos-1); } return sa; } void maq_altchr_core(nst_bfa1_t *b, snp_array_t *s) { bit64_t tmp; if (!s->hash->find(b->name, &tmp)) return; int n = tmp&0xffffffffu; bit64_t *snps = s->snps[tmp>>32]; for (int k = 0; k != n; ++k) { bit32_t pos = snps[k]&0xffffffffu; bit8_t refB = snps[k]>>36 & 3; bit8_t cnsB = snps[k]>>32 & 3; int i = pos>>5; int j = 31 - (pos&0x1f); // fprintf(stderr, "%d\t%d\t%d\n", refB, cnsB, i); assert(refB == (b->seq[i]>>(j<<1)&3)); b->seq[i] = (b->seq[i] & ~(bit64_t(3) << (j<<1))) | bit64_t(cnsB) << (j<<1); } } int ma_altchr(int argc, char *argv[]) { if (argc < 4) { fprintf(stderr, "Usage: maq altchr \n"); return 1; } FILE *fp_bfa, *fp_snp, *fp_alt; fp_alt = fopen(argv[1], "w"); fp_bfa = fopen(argv[2], "r"); fp_snp = fopen(argv[3], "r"); assert(fp_alt && fp_bfa && fp_snp); snp_array_t *s = maq_load_snp_array(fp_snp); nst_bfa1_t *l; fclose(fp_snp); while ((l = nst_load_bfa1(fp_bfa)) != 0) { maq_altchr_core(l, s); int len = strlen(l->name) + 1; fwrite(&len, sizeof(int), 1, fp_alt); fwrite(l->name, sizeof(char), len, fp_alt); fwrite(&l->ori_len, sizeof(int), 1, fp_alt); fwrite(&l->len, sizeof(int), 1, fp_alt); fwrite(l->seq, sizeof(bit64_t) * l->len, 1, fp_alt); fwrite(l->mask, sizeof(bit64_t) * l->len, 1, fp_alt); } fclose(fp_alt); fclose(fp_bfa); maq_delete_snp_array(s); return 0; } maq-0.7.1/assemble.cc0000644000076600000240000002243711043135375012763 0ustar lh3staff#include #include #include #include #include #include #include "match.hh" #include "bfa.h" #include "main.h" #include "algo.hh" #include "assemble.h" #include "stdhash.hh" #define WIN_SIZE 7 typedef struct { int refN, baseN, ref_len; int called[256], hom[256], het[256]; int called10[26], hom10[26], het10[26]; } assemble_stat_t; typedef struct { float esum[4], fsum[4]; int b[3], bar_e[2]; bit32_t c[4]; bit32_t depth, avg01match, unique_ratio; bit32_t mapQ_max; } base_call_aux_t; typedef struct { int is_alt, max_err, min_q; int is_single, is_pair_only; int max_mm; int n_hap; float hetero_rate; float theta; float eta; } assemble_opt_t; inline bool operator < (const assemble_posinfo_t &a, const assemble_posinfo_t &b) { return (a.info < b.info); } /** helper structure related to doing statistics */ static inline void add_to_stat(bit64_t info, assemble_stat_t *as) { ++as->ref_len; if (info>>60 == 0xf) ++as->refN; if ((info>>56&0xf) == 0xf) ++as->baseN; else { int j, k; j = info>>48&0xff; if (j > 99) j = 99; k = j/10; ++as->called[j]; ++as->called10[k]; if (nst_nt16_count_table[info>>56&0xf] == 2) { ++as->het[j]; ++as->het10[k]; } else if (nst_nt16_count_table[info>>56&0xf] == 1 && info>>60 != (info>>56&0xf)) { ++as->hom[j]; ++as->hom10[k]; } } } static void print_stat(assemble_stat_t *as) { int sum_called, sum_hom, sum_het; fprintf(stderr, "S0 reference length: %d\n", as->ref_len); fprintf(stderr, "S0 number of gaps in the reference: %d\n", as->refN); fprintf(stderr, "S0 number of uncalled bases: %d (%.2f)\n", as->baseN, (float)(as->baseN-as->refN)/(as->ref_len-as->refN)); fprintf(stderr, "CC\n"); fprintf(stderr, "CC %4s %10s %10s %10s %10s %10s %10s\nCC\n", "qual", "cover", "cover_sum", "hom", "hom_sum", "het", "het_sum"); sum_called = sum_hom = sum_het = 0; for (int i = 99; i >= 0; --i) { sum_called += as->called[i]; sum_hom += as->hom[i]; sum_het += as->het[i]; fprintf(stderr, "S1 %.2d %10d %10d %10d %10d %10d %10d\n", i, as->called[i], sum_called, as->hom[i], sum_hom, as->het[i], sum_het); } fprintf(stderr, "CC\nCC Summary\nCC\n"); sum_called = sum_hom = sum_het = 0; for (int i = 9; i >= 0; --i) { sum_called += as->called10[i]; sum_hom += as->hom10[i]; sum_het += as->het10[i]; fprintf(stderr, "S2 %.2d-%.2d %10d %10d %10d %10d %10d %10d\n", i*10, i*10+9, as->called10[i], sum_called, as->hom10[i], sum_hom, as->het10[i], sum_het); } } /** collect information for base calling */ base_call_aux_t *assemble_cns_collect(assemble_pos_t *ap, const assemble_aux_t *aa) { base_call_aux_t *b = (base_call_aux_t*)calloc(1, sizeof(base_call_aux_t)); b->b[0] = b->b[1] = b->b[2] = -1; // uncalled if (ap->n_bases == 0) return b; int j, k, depth01, c01, w[8]; algo_sort(ap->n_bases, ap->bases); depth01 = c01 = 0; for (k = 0; k != 8; ++k) w[k] = 0; b->mapQ_max = 0; for (j = ap->n_bases - 1; j >= 0; --j) { bit32_t info = ap->bases[j].info; if (info>>24 < 4 && (info>>8&0x3f) != 0) info = 4<<24 | info&0xffffff; k = info>>16&7; if (info>>24 > 0) { b->esum[k&3] += aa->fk[w[k]] * (info>>24); b->fsum[k&3] += aa->fk[w[k]]; if (w[k] < 0xff) ++w[k]; ++b->c[k&3]; } if ((info>>19&0x3) <= 1) { ++depth01; c01 += ap->bases[j].c[info>>19&0x3]; } if (b->mapQ_max < (info&0x7f)) b->mapQ_max = info&0x7f; } if (b->mapQ_max > 63) b->mapQ_max = 63; // find the best three bases; float max[3]; max[0] = max[1] = max[2] = 0.0; for (j = 0; j != 4; ++j) { if (b->esum[j] > max[0]) { max[2] = max[1]; b->b[2] = b->b[1]; max[1] = max[0]; b->b[1] = b->b[0]; max[0] = b->esum[j]; b->b[0] = j; } else if (b->esum[j] > max[1]) { max[2] = max[1]; b->b[2] = b->b[1]; max[1] = b->esum[j]; b->b[1] = j; } else if (b->esum[j] > max[2]) { max[2] = b->esum[j]; b->b[2] = j; } } b->bar_e[0] = (b->b[0] >= 0)? (int)(b->esum[b->b[0]] / b->fsum[b->b[0]] + 0.5) : 0; b->bar_e[1] = (b->b[1] >= 0)? (int)(b->esum[b->b[1]] / b->fsum[b->b[1]] + 0.5) : 0; b->depth = (ap->n_bases >= 0xff)? 0xff : ap->n_bases; b->avg01match = bit32_t(16.0 * c01 / depth01 + 0.5); if (b->avg01match > 0xfffu) b->avg01match = 0xfff; return b; } /** base calling and depth calling */ inline bit64_t assemle_cns_call(assemble_pos_t *ap, const assemble_aux_t *aa, bit32_t ref_base) { if (ap->n_bases == 0) return ((bit64_t)ref_base<<60) | (0xfull<<56) | (0xffull<<40); // not covered base_call_aux_t *bb = assemble_cns_collect(ap, aa); bit64_t info = 0; int w[3], c[3]; float q[3]; bit32_t b[3]; c[0] = bb->b[0] >= 0 ? bb->c[bb->b[0]] : 0; c[1] = bb->b[1] >= 0 ? bb->c[bb->b[1]] : 0; if ((c[2] = c[0] + c[1]) > 255) { c[0] = int(255.0 * c[0] / c[2] + 0.5); c[1] = int(255.0 * c[1] / c[2] + 0.5); c[2] = 255; } q[0] = (c[1] ? bb->esum[bb->b[1]] : 0) + aa->coef[bb->bar_e[1]<<16|c[2]<<8|c[1]]; q[1] = (c[0] ? bb->esum[bb->b[0]] : 0) + aa->coef[bb->bar_e[0]<<16|c[2]<<8|c[0]]; q[2] = aa->q_r - 4.343 * aa->lhet[c[1]<<8|c[0]]; //if (c[1]) fprintf(stderr, "* %f\t%f\t%d\n", bb->esum[bb->b[1]], aa->coef[bb->bar_e[1]<<16|c[2]<<8|c[1]], bb->bar_e[1]); //if (c[1] >= 3 && bb->esum[bb->b[1]] >= 80.0) fprintf(stderr, "+ %f\t%f\t%f\n", q[0], q[1], q[2]); if (q[0] < 0.0) q[0] = 0.0; if (q[1] < 0.0) q[1] = 0.0; b[0] = 1<b[0]; b[1] = (bb->b[1] >= 0)? 1<b[1] : 0xf; b[2] = b[0] | b[1]; // actually, the following codes calculate the "rank" of q[0..2] w[0] = w[1] = w[2] = -1; if (q[0] <= q[1]) { // MUST use "<=" here if (q[1] < q[2]) { w[0] = 0; w[1] = 1; w[2] = 2; } else { // q[2] <= q[1] w[2] = 1; if (q[0] < q[2]) { w[0] = 0; w[1] = 2; } else { w[0] = 2; w[1] = 0; } } } else { // q[1] < q[0] if (q[0] < q[2]) { w[0] = 1; w[1] = 0; w[2] = 2; } else { // q[2] <= q[0] w[2] = 0; if (q[1] < q[2]) { w[0] = 1; w[1] = 2; } else { w[0] = 2; w[1] = 1; } } } // change to integer and do base-calling bit32_t iqual[2]; iqual[0] = (int)(q[w[1]] - q[w[0]] + 0.5); iqual[1] = (int)(q[w[2]] - q[w[1]] + 0.5); if (iqual[0] >= 0xff) iqual[0] = 0xff; if (iqual[1] >= 0xff) iqual[1] = 0xff; if (w[0] != 2 && w[0] == 1) { // in case weird things happen, and they do happen... w[0] = 0; w[1] = 1; w[2] = 2; iqual[0] = 3; iqual[1] = 3; } info = (ref_base<<28) | (b[w[0]]<<24) | (iqual[0]<<16) | (b[w[1]]<<12) | (b[w[2]]<<8) | iqual[1]; // base call info <<= 32; info |= (bb->avg01match << 20) | (bb->mapQ_max<<8) | bb->depth; // depth call free(bb); return info; } void assemble_core(assemble_aux_t *aa) { nst_bfa1_t *l; int k, seqid, half_win = WIN_SIZE/2; bit64_t rbuf[WIN_SIZE]; FILE *fp_bfa = aa->fp_bfa; gzFile fpout = aa->fpout, fp_map = aa->fp_map; rolling_buf_t *buf = (rolling_buf_t*)calloc(1, sizeof(rolling_buf_t)); assemble_pos_t *pos = (assemble_pos_t*)calloc(1, sizeof(assemble_pos_t)); maqmap_t *mm = maqmap_read_header(fp_map); // skip the sequence names assemble_stat_t *as = (assemble_stat_t*)calloc(1, sizeof(assemble_stat_t)); hash_map_char *hash = new hash_map_char; for (k = 0; k != mm->n_ref; ++k) hash->insert(mm->ref_name[k], k); buf->buf = (maqmap1_t*)calloc(ROLLING_BUF_SIZE, sizeof(maqmap1_t)); k = mm->n_mapped_reads; while ((l = nst_load_bfa1(fp_bfa)) != 0) { if (!hash->find(l->name, &seqid)) { nst_delete_bfa1(l); continue; } fprintf(stderr, "[assemble_core] Processing %s (%d bp)...\n", l->name, l->ori_len); memset(rbuf, 0, sizeof(bit64_t) * WIN_SIZE); int len = strlen(l->name) + 1; gzwrite(fpout, &len, sizeof(int)); gzwrite(fpout, l->name, len); gzwrite(fpout, &l->ori_len, sizeof(int)); for (int i = 0; i != l->len; ++i) { bit64_t word = l->seq[i]; bit64_t mask = l->mask[i]; for (int j = 31; j >= 0; --j) { int coor = (i<<5) | (31 - j); if (coor >= l->ori_len) break; bit32_t ref_base = (mask>>(j<<1)&3)? 1<<(word>>(j<<1)&3) : 0xf; assemble_get_pos(seqid, coor, fp_map, buf, pos, aa->max_mm, aa->max_err, aa->min_q, aa->is_single, aa->is_pair_only); bit64_t info = assemle_cns_call(pos, aa, ref_base); add_to_stat(info, as); rbuf[coor%WIN_SIZE] = info; if (coor >= half_win) { int min = 256; bit64_t x; info = rbuf[(coor-half_win)%WIN_SIZE]; for (k = coor + 1 - WIN_SIZE; k < coor - half_win; ++k) { x = rbuf[(k+WIN_SIZE)%WIN_SIZE]; if (min > int(x>>48&0xff)) min = x>>48&0xff; } for (k = coor - half_win + 1; k <= coor; ++k) { x = rbuf[k%WIN_SIZE]; if (min > int(x>>48&0xff)) min = x>>48&0xff; } if (min >= 62) min = 62; min >>= 1; info |= min << 15; // something like little endianness, but not exactly bit32_t high_info = (bit32_t)(info>>32); bit32_t low_info = (bit32_t)info; gzwrite(fpout, &low_info, sizeof(bit32_t)); gzwrite(fpout, &high_info, sizeof(bit32_t)); } } } for (int coor = (l->ori_len > half_win)? l->ori_len - half_win : 0; coor < l->ori_len; ++coor) { bit64_t info = rbuf[coor%WIN_SIZE]; bit32_t high_info = (bit32_t)(info>>32); bit32_t low_info = (bit32_t)info; gzwrite(fpout, &low_info, sizeof(bit32_t)); gzwrite(fpout, &high_info, sizeof(bit32_t)); } nst_delete_bfa1(l); } print_stat(as); delete hash; maq_delete_maqmap(mm); free(buf->buf); free(buf); free(pos->bases); free(pos); free(as); } int ma_assemble(int argc, char *argv[]) { assemble_aux_t *aa = assemble_parse_opt(argc, argv); assemble_core(aa); delete_assemble_aux(aa); return 0; } maq-0.7.1/assemble.h0000644000076600000240000000314111027727762012625 0ustar lh3staff#ifndef LH3_ASSEMBLE_H #define LH3_ASSEMBLE_H #include #include #include "maqmap.h" #include "const.h" #define ROLLING_BUF_SIZE 0x100000 typedef struct { // map_qual should be no bigger than 99 // empty:2, qual:6; empty:1, is_present:1, mm:3, strand:1, base:2; empty:2, base_qual:6; map_qual:8 bit32_t info; bit8_t c[2]; bit8_t pos; } assemble_posinfo_t; typedef struct { int n_bases, m_bases; assemble_posinfo_t *bases; } assemble_pos_t; typedef struct { int n_reads, n_types; bit64_t indels[256]; int n_ungap; bit8_t beg_pos[256], end_pos[256], n_mm[256]; int ins_bases[MAX_READLEN][4]; } assemble_indelpos_t; typedef struct { int head, tail, is_rounded; maqmap1_t *buf; } rolling_buf_t; typedef struct { float hetero_rate, theta, eta, maf, q_r; int max_mm, max_err, min_q, is_alt, is_single, is_pair_only; double *fk, *coef; FILE *fp_bfa; gzFile fpout, fp_map; int n_hap; double *lhet; } assemble_aux_t; // ref_base:4, base:4, qual:8; base2:4, base3:4, qual2:8; avg01:12, qNei:5, het:1, qMax:6, depth:8 // 60 56 48 44 40 32 20 15 14 8 0 #ifdef __cplusplus extern "C" { #endif void assemble_get_pos(bit32_t seqid, bit32_t pos, gzFile fpin, rolling_buf_t *ab, assemble_pos_t *ap, int max_mm, int max_err, int min_q, int is_single, int is_pair_only); assemble_aux_t *assemble_parse_opt(int argc, char *argv[]); void assemble_get_indelpos(bit32_t seqid, bit32_t pos, gzFile fpin, rolling_buf_t *ab, assemble_indelpos_t *ai); void delete_assemble_aux(assemble_aux_t *aa); #ifdef __cplusplus } #endif #endif maq-0.7.1/assopt.c0000644000076600000240000001606411043135375012335 0ustar lh3staff#include #include #include #include #include #include "assemble.h" #ifdef __cplusplus extern "C" { #endif long double expl(long double); long double logl(long double); #ifdef __cplusplus } #endif /* P() = \theta \sum_{i=1}^{N-1} 1/i P(D|) = \sum_{k=1}^{N-1} p_k 1/2 [(k/N)^n_2(1-k/N)^n_1 + (k/N)^n1(1-k/N)^n_2] p_k = i/k / \sum_{i=1}^{N-1} 1/i */ static void cal_het(assemble_aux_t *aa) { int k, n1, n2; double sum_harmo; // harmonic sum double poly_rate; double p1 = 0.0, p3 = 0.0; // just for testing aa->lhet = (double*)calloc(256 * 256, sizeof(double)); sum_harmo = 0.0; for (k = 1; k <= aa->n_hap - 1; ++k) sum_harmo += 1.0 / k; for (n1 = 0; n1 < 256; ++n1) { for (n2 = 0; n2 < 256; ++n2) { long double sum = 0.0; double lC = lgamma(n1+n2+1) - lgamma(n1+1) - lgamma(n2+1); // \binom{n1+n2}{n1} for (k = 1; k <= aa->n_hap - 1; ++k) { double pk = 1.0 / k / sum_harmo; double log1 = log((double)k/aa->n_hap); double log2 = log(1.0 - (double)k/aa->n_hap); sum += pk * 0.5 * (expl(log1*n2) * expl(log2*n1) + expl(log1*n1) * expl(log2*n2)); } aa->lhet[n1<<8|n2] = lC + logl(sum); if (n1 == 17 && n2 == 3) p3 = lC + logl(expl(logl(0.5) * 20)); if (n1 == 19 && n2 == 1) p1 = lC + logl(expl(logl(0.5) * 20)); } } poly_rate = aa->hetero_rate * sum_harmo; aa->q_r = -4.343 * log(2.0 * poly_rate / (1.0 - poly_rate)); fprintf(stderr, "[cal_het] harmonic sum: %lf\n", sum_harmo); fprintf(stderr, "[cal_het] het penalty: %.2lf vs. %.2lf\n", aa->q_r, -4.343 * log(2.0 * aa->hetero_rate / (1.0 - aa->hetero_rate))); fprintf(stderr, "[cal_het] 3 differences out of 20 bases: %.2lf vs. %.2lf\n", -4.343 * aa->lhet[17<<8|3], -4.343 * p3); fprintf(stderr, "[cal_het] 1 differences out of 20 bases: %.2lf vs. %.2lf\n", -4.343 * aa->lhet[19<<8|1], -4.343 * p1); } static void cal_coef_ind(assemble_aux_t *aa) { int n, q, k; double *lC; lC = (double*)calloc(256 * 256, sizeof(double)); aa->fk = (double*)calloc(256, sizeof(double)); aa->coef = (double*)calloc(256*256*64, sizeof(double)); for (n = 1; n != 256; ++n) for (k = 1; k <= n; ++k) lC[n<<8|k] = lgamma(n+1) - lgamma(k+1) - lgamma(n-k+1); for (n = 0; n != 256; ++n) aa->fk[n] = 1.0; for (q = 1; q != 64; ++q) { double e = pow(10.0, -q/10.0); double le1 = log(1.0-e); for (n = 1; n != 256; ++n) { double *coef = aa->coef + (q<<16|n<<8); for (k = n; k >= 0; --k) coef[k] = -4.343 * (lC[n<<8|k] + (n-k) * le1); } } free(lC); } /** initialize the helper structure */ static void cal_coef(assemble_aux_t *aa) { int k, n, q; long double sum_a[257], b[256], q_c[256], tmp[256], fk2[256]; double *lC; lC = (double*)calloc(256 * 256, sizeof(double)); // aa->lhet will be allocated and initialized aa->fk = (double*)calloc(256, sizeof(double)); aa->coef = (double*)calloc(256*256*64, sizeof(double)); aa->fk[0] = fk2[0] = 1.0; for (n = 1; n != 256; ++n) { aa->fk[n] = ((!aa->is_alt)? pow(aa->theta, n) : pow(n+1, -aa->theta)) * (1.0 - aa->eta) + aa->eta; fk2[n] = aa->fk[n>>1]; } for (n = 1; n != 256; ++n) for (k = 1; k <= n; ++k) lC[n<<8|k] = lgamma(n+1) - lgamma(k+1) - lgamma(n-k+1); for (q = 1; q != 64; ++q) { double e = pow(10.0, -q/10.0); double le = log(e); double le1 = log(1.0-e); for (n = 1; n != 256; ++n) { double *coef = aa->coef + (q<<16|n<<8); sum_a[n+1] = 0.0; for (k = n; k >= 0; --k) { // a_k = \sum_{i=k}^n C^n_k \epsilon^k (1-\epsilon)^{n-k} sum_a[k] = sum_a[k+1] + expl(lC[n<<8|k] + k*le + (n-k)*le1); b[k] = sum_a[k+1] / sum_a[k]; if (b[k] > 0.99) b[k] = 0.99; } for (k = 0; k != n; ++k) // c_k q_c[k] = -4.343 * fk2[k] * logl(b[k] / e); for (k = 1; k != n; ++k) q_c[k] += q_c[k-1]; // \prod_{i=0}^k c_i for (k = 0; k <= n; ++k) { // powl() in 64-bit mode seems broken on my Mac OS X 10.4.9 tmp[k] = -4.343 * logl(1.0 - expl(fk2[k] * logl(b[k]))); coef[k] = (k? q_c[k-1] : 0) + tmp[k]; } if (q == 1000 && n == 20) { // This never happens. I use these codes to look at values when debugging. double ttt[257], *tt; tt = ttt + 1; tt[0] = fk2[k]; for (k = 1; k != n; ++k) tt[k] = tt[k-1] + fk2[k]; for (k = 0; k != n; ++k) { fprintf(stderr, "%d\t%Lf\t%Lg\t%Lg\t%g\t%Lg\t%Lg\n", k, fk2[k], expl(lC[n<<8|k] + k*le + (n-k)*le1), expl(-coef[k]/4.343)*expl(tt[k]*le), coef[k], expl(logl(b[k])*fk2[k]), b[k]); } exit(0); } } } free(lC); } static int usage(const assemble_aux_t *aa) { fprintf(stderr, "\nUsage: maq assemble [options] \n\n"); fprintf(stderr, "Options: -r FLOAT expected rate of heterozygotes [%.3f]\n", aa->hetero_rate); fprintf(stderr, " -t FLOAT dependency coefficient (theta) [%.2f]\n", aa->theta); fprintf(stderr, " -q INT minimum mapping quality [%d]\n", aa->min_q); fprintf(stderr, " -Q INT maximum sum of errors [%d]\n", aa->max_err); fprintf(stderr, " -m INT maximum number of mismatches [%d]\n", aa->max_mm); fprintf(stderr, " -N INT number of haplotypes (>=2) [%d]\n", aa->n_hap); fprintf(stderr, " -s use single-end mapping quality\n"); fprintf(stderr, " -p discard abnormal pairs\n"); // fprintf(stderr, " -e FLOAT minimum independency (eta) [0.03] (EXPERIMENTAL)\n"); // only for me... // fprintf(stderr, " -a alternative model (EXPERIMENTAL)\n"); // only for me... fprintf(stderr, "\n"); return 1; } static assemble_aux_t *new_opt() { assemble_aux_t *aa; aa = (assemble_aux_t*)calloc(1, sizeof(assemble_aux_t)); aa->max_err = 60; aa->max_mm = 7; aa->hetero_rate = 0.001; aa->theta = 0.85; aa->eta = 0.03; aa->n_hap = 2; aa->maf = 0.5; // will be removed in future return aa; } assemble_aux_t *assemble_parse_opt(int argc, char *argv[]) { assemble_aux_t *aa; int c; aa = new_opt(); while ((c = getopt(argc, argv, "q:Q:r:t:e:aspm:N:")) >= 0) { switch (c) { case 'p': aa->is_pair_only = 1; break; case 'm': aa->max_mm = atoi(optarg); break; case 'q': aa->min_q = atoi(optarg); break; case 'Q': aa->max_err = atoi(optarg); break; case 'r': aa->hetero_rate = atof(optarg); break; case 't': aa->theta = atof(optarg); break; case 'e': aa->eta = atof(optarg); break; case 'a': aa->is_alt = 1; break; case 'N': aa->n_hap = atoi(optarg); break; case 's': aa->is_single = 1; break; default: usage(aa); free(aa); exit(1); } } if (argc - optind < 3) { usage(aa); exit(1); } aa->fpout = (strcmp(argv[optind], "-") == 0)? gzdopen(fileno(stdout), "w") : gzopen(argv[optind], "w"); aa->fp_bfa = fopen(argv[optind+1], "r"); aa->fp_map = (strcmp(argv[optind+2], "-") == 0)? gzdopen(fileno(stdin), "r") : gzopen(argv[optind+2], "r"); assert(aa->fpout && aa->fp_bfa && aa->fp_map); if (aa->theta >= 1.0) aa->theta = 1.0; // capped at 1.0 if (aa->theta >= 0.999) cal_coef_ind(aa); else cal_coef(aa); cal_het(aa); return aa; } void delete_assemble_aux(assemble_aux_t *aa) { if (aa == 0) return; free(aa->lhet); free(aa->fk); free(aa->coef); gzclose(aa->fpout); gzclose(aa->fp_map); fclose(aa->fp_bfa); free(aa); } maq-0.7.1/autogen.sh0000755000076600000240000000027710766735650012675 0ustar lh3staff#!/bin/sh run () { echo "running: $*" eval $* if test $? != 0 ; then echo "error: while running '$*'" exit 1 fi } run aclocal run autoheader run automake -a run autoconf maq-0.7.1/aux_utils.c0000644000076600000240000002101311027727762013040 0ustar lh3staff#include #include #include #include #include #include #include #include "const.h" #include "main.h" #define LINE_LEN 60 void cns_cns2snp(FILE *fpout, gzFile fp, int is_all, int is_alt) { int i, len, n_high = 0; while (gzread(fp, &len, sizeof(int))) { char *name = (char*)malloc(len); gzread(fp, name, len); gzread(fp, &len, sizeof(int)); for (i = 0; i != len; ++i) { bit32_t low, high; gzread(fp, &low, sizeof(bit32_t)); gzread(fp, &high, sizeof(bit32_t)); if (is_all || (high>>28 != (high>>24&0xf) && (high>>24&0xf) != 0xf)) { // chr, pos, refB, cnsB, cnsQ, depth, avg01, mapQmax, refDiff fprintf(fpout, "%s\t%d\t%c\t%c\t%d\t%d\t%.2f\t%d\t%d", name, i + 1, nst_nt16_rev_table[high>>28], nst_nt16_rev_table[high>>24&0xf], high>>16&0xff, low&0xff, (float)(low>>20&0xfff)/16.0, low>>8&0x3f, (low>>15&0x1f)<<1); if (is_alt) fprintf(fpout, "\t%c\t%d\t%c\n", nst_nt16_rev_table[high>>12&0xf], high&0xff, nst_nt16_rev_table[high>>8&0xf]); else fputc('\n', fpout); } if ((low>>8&0x3f) >= 40 && (float)(low>>20&0xfff)/16.0 >= 0.25 && (low&0xff) >= 3) ++n_high; } free(name); } } void cns_cns2win(FILE *fpout, gzFile fp, int win_size, const char *chr, int begin, int end, int minQ) { int i, len; while (gzread(fp, &len, sizeof(int))) { char *name = (char*)malloc(len); int n_cvg, n_snp, n_het, depth, match, gc, is_chr, n_unique, uni_depth; gzread(fp, name, len); gzread(fp, &len, sizeof(int)); n_cvg = n_snp = n_het = depth = match = gc = 0; n_unique = uni_depth = 0; is_chr = (chr == 0 || strcmp(chr, name) == 0)? 1 : 0; for (i = 0; i != len; ++i) { bit32_t low, high; gzread(fp, &low, sizeof(bit32_t)); gzread(fp, &high, sizeof(bit32_t)); if (high>>28 != 0xf) { if ((high>>16&0xff) >= minQ) { ++n_cvg; if ((low>>20&0xfff) >= 8 && (low>>20&0xfff) <= 32) { ++n_unique; uni_depth += low&0xff; } if (nst_nt16_count_table[high>>24&0xf] == 2) ++n_het; if (high>>28 != (high>>24&0xf)) ++n_snp; if (high>>28 == 2 || high>>28 == 4) ++gc; depth += low&0xff; match += low>>20&0xfff; } } if ((i+1)%win_size == 0 || i+1 == len) { // print int pos = i+(win_size>>1)+1; if (is_chr && (begin >= end || (pos >= begin && pos <= end))) { float alt_depth = (n_unique == 0)? 0.0 : (float)uni_depth/n_unique; // chr,pos,snpRate,hetRate,oriDepth,altDepth,01Match,GC% if (n_cvg > 0) { fprintf(fpout, "%s\t%.6f\t%g\t%g\t%.3f\t%.3f\t%.3f\t%.3f\n", name, pos/1000000.0, (float)n_snp/n_cvg, (float)n_het/n_cvg, (float)depth/n_cvg, alt_depth, (float)match/n_cvg/16.0, 100.0*gc/n_cvg); } else { fprintf(fpout, "%s\t%.6f\t%g\t%g\t%.3f\t%.3f\t%.3f\t%.3f\n", name, pos/1000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0); } n_cvg = n_snp = n_het = depth = match = gc = 0; n_unique = uni_depth = 0; } } } free(name); } } void cns_cns2ref(FILE *fpout, gzFile fp) { int i, len; while (gzread(fp, &len, sizeof(int))) { char *name = (char*)malloc(len); gzread(fp, name, len); fprintf(fpout, ">%s\n", name); gzread(fp, &len, sizeof(int)); for (i = 0; i != len; ++i) { bit32_t low, high; gzread(fp, &low, sizeof(bit32_t)); gzread(fp, &high, sizeof(bit32_t)); fputc(nst_nt16_rev_table[high>>28], fpout); if ((i+1)%LINE_LEN == 0) fputc('\n', fpout); } if (i%LINE_LEN != 0) fputc('\n', fpout); free(name); } } void cns_cns2cssnp(FILE *fpout, gzFile fp) { int i, len, q[2], b[2], r[2]; while (gzread(fp, &len, sizeof(int))) { char *name = (char*)malloc(len); gzread(fp, name, len); gzread(fp, &len, sizeof(int)); r[0] = b[0] = 15; q[0] = 0; for (i = 0; i != len; ++i) { bit32_t low, high; int is_snp = 0; gzread(fp, &low, sizeof(bit32_t)); gzread(fp, &high, sizeof(bit32_t)); r[1] = high>>28; b[1] = high>>24&0xf; q[1] = high>>16&0xff; if (r[0] != 15 && r[1] != 15 && b[0] != 15 && b[1] != 15 && r[0] != b[0] && r[1] != b[1] && (b[0]&r[0]) == (b[1]&r[1])) { int c = nst_nt16_count_table[b[0]|r[0]|b[1]|r[1]]; if (r[0] == r[1]) { if (b[0] == b[1]) is_snp = 1; } else { if (c == 4 || c == 2) is_snp = 1; } } if (is_snp) { fprintf(fpout, "%s\t%d\t%c%c\t%c%c\t%d\t%d\n", name, i + 1, nst_nt16_rev_table[r[0]], nst_nt16_rev_table[r[1]], nst_nt16_rev_table[b[0]], nst_nt16_rev_table[b[1]], q[0], q[1]); } r[0] = r[1]; b[0] = b[1]; q[0] = q[1]; } free(name); } } void cns_cns2fq(FILE *fpout, gzFile fp, bit32_t min_mapq, bit32_t min_depth, bit32_t max_depth, bit32_t min_nQ, float hidden) { int i, len; while (gzread(fp, &len, sizeof(int))) { char *name = (char*)malloc(len); bit8_t *qual; gzread(fp, name, len); fprintf(fpout, "@%s", name); gzread(fp, &len, sizeof(int)); qual = (bit8_t*)malloc(len); for (i = 0; i != len; ++i) { bit32_t low, high; if (i%LINE_LEN == 0) fputc('\n', fpout); gzread(fp, &low, sizeof(bit32_t)); gzread(fp, &high, sizeof(bit32_t)); if ((low>>8&0x3f) >= min_mapq && (float)(low>>20&0xfff)/16.0 >= hidden && (low&0xff) >= min_depth && (low&0xff) <= max_depth && (low>>15&0x1f)<<1 >= min_nQ) { fputc(nst_nt16_rev_table[high>>24&0xf], fpout); } else fputc(tolower(nst_nt16_rev_table[high>>24&0xf]), fpout); qual[i] = ((high>>16&0xff) + 33 > 126)? 126 : (high>>16&0xff) + 33; } fprintf(fpout, "\n+"); for (i = 0; i != len; ++i) { if (i%LINE_LEN == 0) fputc('\n', fpout); fputc(qual[i], fpout); } fputc('\n', fpout); free(name); free(qual); } } /* main() functions */ int ma_cns2ref(int argc, char *argv[]) { gzFile fp; if(argc < 2) { fprintf(stderr, "Usage: maq cns2ref \n"); return 1; } fp = (strcmp(argv[1], "-") == 0)? gzdopen(fileno(stdin), "r") : gzopen(argv[1], "r"); assert(fp); cns_cns2ref(stdout, fp); gzclose(fp); return 0; } int ma_cns2snp(int argc, char *argv[]) { gzFile fp; if(argc < 2) { fprintf(stderr, "Usage: maq cns2snp \n"); return 1; } fp = (strcmp(argv[1], "-") == 0)? gzdopen(fileno(stdin), "r") : gzopen(argv[1], "r"); assert(fp); cns_cns2snp(stdout, fp, 0, 1); gzclose(fp); return 0; } int ma_cns2cssnp(int argc, char *argv[]) { gzFile fp; if(argc < 2) { fprintf(stderr, "Usage: maq cns2cssnp \n"); return 1; } fp = (strcmp(argv[1], "-") == 0)? gzdopen(fileno(stdin), "r") : gzopen(argv[1], "r"); assert(fp); cns_cns2cssnp(stdout, fp); gzclose(fp); return 0; } int ma_cns2view(int argc, char *argv[]) { gzFile fp; if (argc < 2) { fprintf(stderr, "Usage: maq cns2view \n"); return 1; } fp = (strcmp(argv[1], "-") == 0)? gzdopen(fileno(stdin), "r") : gzopen(argv[1], "r"); assert(fp); cns_cns2snp(stdout, fp, 1, 1); gzclose(fp); return 0; } int ma_cns2win(int argc, char *argv[]) { gzFile fp; int win_size = 1000, begin, end, c, minQ; char *chr; begin = end = minQ = 0; chr = 0; while ((c = getopt(argc, argv, "w:b:e:c:q:")) >= 0) { switch (c) { case 'w': win_size = atoi(optarg); break; case 'b': begin = atoi(optarg); break; case 'e': end = atoi(optarg); break; case 'c': chr = strdup(optarg); break; case 'q': minQ = atoi(optarg); break; } } if (optind >= argc) { fprintf(stderr, "Usage: maq cns2win [-w 1000] [-b 0] [-e 0] [-c null] [-q 0] \n"); return 1; } fp = (strcmp(argv[optind], "-") == 0)? gzdopen(fileno(stdin), "r") : gzopen(argv[optind], "r"); assert(fp); cns_cns2win(stdout, fp, win_size, chr, begin, end, minQ); gzclose(fp); free(chr); return 0; } int ma_cns2fq(int argc, char *argv[]) { gzFile fp; double hidden = 0.25; int c, min_mapq = 40, min_depth = 3, max_depth = 255, min_nQ = 20; while ((c = getopt(argc, argv, "Q:d:D:n:c:")) >= 0) { switch (c) { case 'Q': min_mapq = atoi(optarg); break; case 'd': min_depth = atoi(optarg); break; case 'D': max_depth = atoi(optarg); break; case 'n': min_nQ = atoi(optarg); break; case 'c': hidden = atof(optarg); break; default: return 1; } } if (optind == argc) { fprintf(stderr, "\n"); fprintf(stderr, "Usage: maq cns2fq [options] \n\n"); fprintf(stderr, "Options: -Q INT minimum mapping quality [%d]\n", min_mapq); fprintf(stderr, " -n INT minimum neighbouring quality [%d]\n", min_nQ); fprintf(stderr, " -d INT minimum read depth [%d]\n", min_depth); fprintf(stderr, " -D INT maximum read depth [%d]\n\n", max_depth); return 1; } fp = (strcmp(argv[optind], "-") == 0)? gzdopen(fileno(stdin), "r") : gzopen(argv[optind], "r"); assert(fp); cns_cns2fq(stdout, fp, min_mapq, min_depth, max_depth, min_nQ, hidden); gzclose(fp); return 0; } maq-0.7.1/bfa.c0000644000076600000240000000330011065656462011552 0ustar lh3staff#include #include #include #include #include "bfa.h" nst_bfa1_t *nst_new_bfa1() { nst_bfa1_t *bfa1; bfa1 = (nst_bfa1_t*)malloc(sizeof(nst_bfa1_t)); bfa1->name = 0; bfa1->seq = bfa1->mask = 0; bfa1->ori_len = bfa1->len = 0; return bfa1; } void nst_delete_bfa1(nst_bfa1_t *bfa1) { if (bfa1 == 0) return; free(bfa1->name); free(bfa1->seq); free(bfa1->mask); free(bfa1); } nst_bfa1_t *nst_load_bfa1(FILE *fp) { int len; nst_bfa1_t *bfa1; if (fread(&len, sizeof(int), 1, fp) == 0) return 0; bfa1 = nst_new_bfa1(); bfa1->name = (char*)malloc(sizeof(char) * len); fread(bfa1->name, sizeof(char), len, fp); fread(&bfa1->ori_len, sizeof(int), 1, fp); fread(&bfa1->len, sizeof(int), 1, fp); bfa1->seq = (bit64_t*)malloc(sizeof(bit64_t) * bfa1->len); fread(bfa1->seq, sizeof(bit64_t), bfa1->len, fp); bfa1->mask = (bit64_t*)malloc(sizeof(bit64_t) * bfa1->len); fread(bfa1->mask, sizeof(bit64_t), bfa1->len, fp); return bfa1; } bit64_t nst_bfa_len(FILE *fp) { bit64_t x = 0; int len; while (fread(&len, sizeof(int), 1, fp)) { fseek(fp, len, 1); fread(&len, sizeof(int), 1, fp); x += len; fread(&len, sizeof(int), 1, fp); fseek(fp, 16 * len, 1); } return x; } nst_bfa_t *nst_new_bfa() { return (nst_bfa_t*)calloc(1, sizeof(nst_bfa_t)); } void nst_delete_bfa(nst_bfa_t * bfa) { int i; for (i = 0; i != bfa->n; ++i) nst_delete_bfa1(bfa->bfa1[i]); free(bfa->bfa1); free(bfa); } nst_bfa_t *nst_load_bfa(FILE *fp) { nst_bfa_t *bfa = nst_new_bfa(); nst_bfa1_t *bfa1; int n = 0; while ((bfa1 = nst_load_bfa1(fp)) != 0) { bfa->bfa1 = (nst_bfa1_t**)realloc(bfa->bfa1, sizeof(nst_bfa1_t*) * (n + 1)); bfa->bfa1[n++] = bfa1; } bfa->n = n; return bfa; } maq-0.7.1/bfa.h0000644000076600000240000000102011065656462011554 0ustar lh3staff#ifndef NST_BFA_H #define NST_BFA_H #include #include "const.h" typedef struct { char *name; int ori_len, len; bit64_t *seq, *mask; } nst_bfa1_t; typedef struct { int n; nst_bfa1_t **bfa1; } nst_bfa_t; #ifdef __cplusplus extern "C" { #endif nst_bfa1_t *nst_new_bfa1(); void nst_delete_bfa1(nst_bfa1_t*); nst_bfa1_t *nst_load_bfa1(FILE *fp); nst_bfa_t *nst_new_bfa(); void nst_delete_bfa(nst_bfa_t*); nst_bfa_t *nst_load_bfa(FILE *fp); bit64_t nst_bfa_len(FILE *fp); #ifdef __cplusplus } #endif #endif maq-0.7.1/break_pair.c0000644000076600000240000000243411027727762013130 0ustar lh3staff#include #include #include #include #include "main.h" #include "maqmap.h" static void breakpair(const char *prefix) { gzFile fp, fp0, fp1, fp2; char str[1024]; maqmap_t *mm; maqmap1_t m1; strcpy(str, prefix); strcat(str, ".map"); assert(fp = gzopen(str, "r")); strcpy(str, prefix); strcat(str, ".0.map"); fp0 = gzopen(str, "w"); strcpy(str, prefix); strcat(str, ".1.map"); fp1 = gzopen(str, "w"); strcpy(str, prefix); strcat(str, ".2.map"); fp2 = gzopen(str, "w"); mm = maqmap_read_header(fp); mm->n_mapped_reads = 0; maqmap_write_header(fp0, mm); maqmap_write_header(fp1, mm); maqmap_write_header(fp2, mm); while (gzread(fp, &m1, sizeof(maqmap1_t)) == sizeof(maqmap1_t)) { int l; if (m1.map_qual <= 40) continue; l = strlen(m1.name); if (l >= 2 && m1.name[l-2] == '/' && m1.name[l-1] == '1') gzwrite(fp1, &m1, sizeof(maqmap1_t)); else if (l >= 2 && m1.name[l-2] == '/' && m1.name[l-1] == '2') gzwrite(fp2, &m1, sizeof(maqmap1_t)); else gzwrite(fp0, &m1, sizeof(maqmap1_t)); } maq_delete_maqmap(mm); gzclose(fp); gzclose(fp0); gzclose(fp1); gzclose(fp2); } int maq_breakpair(int argc, char *argv[]) { if (argc < 2) { fprintf(stderr, "Usage: maq breakpair \n"); return 1; } breakpair(argv[1]); return 0; } maq-0.7.1/cleanup.sh0000755000076600000240000000030510766735650012652 0ustar lh3staffif [ -f "Makefile" ]; then make distclean fi rm -fr *~ .in .gdb_history Makefile.in aclocal.m4 configure autom4*.cache config.guess config.h.in config.sub depcomp install-sh missing mkinstalldirs maq-0.7.1/config.guess0000755000076600000240000012626010756564016013210 0ustar lh3staff#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. timestamp='2006-07-02' # This file 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 2 of the License, 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. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; x86:Interix*:[3456]*) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T:Interix*:[3456]*) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: maq-0.7.1/config.h.in0000644000076600000240000000253110766735725012715 0ustar lh3staff/* config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION maq-0.7.1/config.sub0000755000076600000240000007746010756564017012663 0ustar lh3staff#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. timestamp='2006-09-20' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file 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 2 of the License, 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. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16c) basic_machine=cr16c-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: maq-0.7.1/configure0000755000076600000240000050600211067172614012566 0ustar lh3staff#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.62 for MAQ 0.7.1. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell bug-autoconf@gnu.org about your system, echo including any error possibly output before this message. echo This can help us improve future autoconf versions. echo Configuration will now proceed without shell functions. } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='MAQ' PACKAGE_TARNAME='maq' PACKAGE_VERSION='0.7.1' PACKAGE_STRING='MAQ 0.7.1' PACKAGE_BUGREPORT='' # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir localstatedir includedir oldincludedir docdir infodir htmldir dvidir pdfdir psdir libdir localedir mandir DEFS ECHO_C ECHO_N ECHO_T LIBS build_alias host_alias target_alias INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA am__isrc CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP INSTALL_STRIP_PROGRAM MKDIR_P mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP GREP EGREP LIBOBJS LTLIBOBJS' ac_subst_files='' ac_user_opts=' enable_option_checking enable_universal enable_experimental enable_slowmap enable_shortread enable_intel64 ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CXX CXXFLAGS CCC CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { $as_echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { $as_echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) { $as_echo "$as_me: error: Unrecognized options: $ac_unrecognized_opts" >&2 { (exit 1); exit 1; }; } ;; *) $as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { $as_echo "$as_me: error: Working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures MAQ 0.7.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/maq] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of MAQ 0.7.1:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-universal enable universal binary (Intel Apple only) --enable-experimental enable experimental features --enable-slowmap use slowmap mode for better sensitivity --enable-shortreads use shortread mode --enable-intel64 optimize for Intel64 CPU such as Xeon and Core2 Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CXX C++ compiler command CXXFLAGS C++ compiler flags CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF MAQ configure 0.7.1 generated by GNU Autoconf 2.62 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by MAQ $as_me 0.7.1, which was generated by GNU Autoconf 2.62. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 $as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 $as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers config.h" am__api_version='1.10' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 $as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 $as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 $as_echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi { $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:$LINENO: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 $as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='maq' VERSION='0.7.1' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 $as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 $as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } { $as_echo "$as_me:$LINENO: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if test "${ac_cv_build+set}" = set; then $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 $as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 $as_echo "$as_me: error: invalid value of canonical build" >&2;} { (exit 1); exit 1; }; };; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:$LINENO: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if test "${ac_cv_host+set}" = set; then $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 $as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 $as_echo "$as_me: error: invalid value of canonical host" >&2;} { (exit 1); exit 1; }; };; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 $as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 $as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 $as_echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. $as_echo "$as_me:$LINENO: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { $as_echo "$as_me:$LINENO: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } if test -z "$ac_file"; then $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 $as_echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } { $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } { $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext { $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 $as_echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:$LINENO: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:$LINENO: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:$LINENO: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 $as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CXXFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # set CFLAGS and CXXFLAGS user_CFLAGS=${CFLAGS} generic_CFLAGS="-Wall" ext_CFLAGS="" case "${host_cpu}-${host_os}" in i386-darwin*) # Check whether --enable-universal was given. if test "${enable_universal+set}" = set; then enableval=$enable_universal; is_uni=1 else is_uni=0 fi case $is_uni in 1) CFLAGS="-m64" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ext_CFLAGS="-arch x86_64 -arch i386 -arch ppc64 -arch ppc" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ext_CFLAGS="-arch i386 -arch ppc" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext;; 0) CFLAGS="-m64" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ext_CFLAGS="-m64" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext;; esac;; *) { $as_echo "$as_me:$LINENO: checking if gcc accepts -m64" >&5 $as_echo_n "checking if gcc accepts -m64... " >&6; } CFLAGS="-m64" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ext_CFLAGS="-m64"; { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ext_CFLAGS="-D_FILE_OFFSET_BITS=64"; { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext;; esac # Check whether --enable-experimental was given. if test "${enable_experimental+set}" = set; then enableval=$enable_experimental; ext_CFLAGS="${ext_CFLAGS} -DMAQ_SHOW_EXPERIMENTAL" fi # Check whether --enable-slowmap was given. if test "${enable_slowmap+set}" = set; then enableval=$enable_slowmap; else ext_CFLAGS="${ext_CFLAGS} -D_FASTMAP" fi # Check whether --enable-shortread was given. if test "${enable_shortread+set}" = set; then enableval=$enable_shortread; else ext_CFLAGS="${ext_CFLAGS} -DMAQ_LONGREADS" fi # Check whether --enable-intel64 was given. if test "${enable_intel64+set}" = set; then enableval=$enable_intel64; ext_CFLAGS="${ext_CFLAGS} -mtune=nocona" fi CFLAGS="${generic_CFLAGS} ${ext_CFLAGS} ${user_CFLAGS}" CXXFLAGS=$CFLAGS ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:$LINENO: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 $as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:$LINENO: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if test `eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` = yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test "${ac_cv_header_zlib_h+set}" = set; then { $as_echo "$as_me:$LINENO: checking for zlib.h" >&5 $as_echo_n "checking for zlib.h... " >&6; } if test "${ac_cv_header_zlib_h+set}" = set; then $as_echo_n "(cached) " >&6 fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 $as_echo "$ac_cv_header_zlib_h" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking zlib.h usability" >&5 $as_echo_n "checking zlib.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking zlib.h presence" >&5 $as_echo_n "checking zlib.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} ;; esac { $as_echo "$as_me:$LINENO: checking for zlib.h" >&5 $as_echo_n "checking for zlib.h... " >&6; } if test "${ac_cv_header_zlib_h+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_header_zlib_h=$ac_header_preproc fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 $as_echo "$ac_cv_header_zlib_h" >&6; } fi ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 $as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by MAQ $as_me 0.7.1, which was generated by GNU Autoconf 2.62. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ MAQ config.status 0.7.1 configured by $0, generated by GNU Autoconf 2.62, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2008 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header { $as_echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; };; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { $as_echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { $as_echo "$as_me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=' ' ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` = $ac_delim_num; then break elif $ac_last_try; then { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\).*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\).*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 $as_echo "$as_me: error: could not setup config files machinery" >&2;} { (exit 1); exit 1; }; } _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_t=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_t"; then break elif $ac_last_try; then { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 $as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] if (D_is_set[macro]) { # Preserve the white space surrounding the "#". prefix = substr(line, 1, index(line, defundef) - 1) print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", line, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 $as_echo "$as_me: error: could not setup config headers machinery" >&2;} { (exit 1); exit 1; }; } fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 $as_echo "$as_me: error: Invalid tag $ac_tag." >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac ac_file_inputs="$ac_file_inputs '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 $as_echo "$as_me: error: could not create -" >&2;} { (exit 1); exit 1; }; } fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 $as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:$LINENO: WARNING: Unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2;} fi maq-0.7.1/configure.ac0000644000076600000240000000313711067172577013156 0ustar lh3staffAC_INIT(MAQ, 0.7.1) AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE([no-dependencies]) AC_CANONICAL_HOST AC_PROG_CC AC_PROG_CXX # set CFLAGS and CXXFLAGS user_CFLAGS=${CFLAGS} generic_CFLAGS="-Wall" ext_CFLAGS="" case "${host_cpu}-${host_os}" in i386-darwin*) AC_ARG_ENABLE(universal, [ --enable-universal enable universal binary (Intel Apple only)], [is_uni=1], [is_uni=0]) case $is_uni in 1) CFLAGS="-m64" AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [ext_CFLAGS="-arch x86_64 -arch i386 -arch ppc64 -arch ppc"], [ext_CFLAGS="-arch i386 -arch ppc"]);; 0) CFLAGS="-m64" AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [ext_CFLAGS="-m64"], []);; esac;; *) AC_MSG_CHECKING([if gcc accepts -m64]) CFLAGS="-m64" AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [ext_CFLAGS="-m64"; AC_MSG_RESULT([yes])], [ext_CFLAGS="-D_FILE_OFFSET_BITS=64"; AC_MSG_RESULT([no])]);; esac AC_ARG_ENABLE(experimental, [ --enable-experimental enable experimental features], [ext_CFLAGS="${ext_CFLAGS} -DMAQ_SHOW_EXPERIMENTAL"], []) AC_ARG_ENABLE(slowmap, [ --enable-slowmap use slowmap mode for better sensitivity], [], [ext_CFLAGS="${ext_CFLAGS} -D_FASTMAP"]) AC_ARG_ENABLE(shortread, [ --enable-shortreads use shortread mode], [], [ext_CFLAGS="${ext_CFLAGS} -DMAQ_LONGREADS"]) AC_ARG_ENABLE(intel64, [ --enable-intel64 optimize for Intel64 CPU such as Xeon and Core2], [ext_CFLAGS="${ext_CFLAGS} -mtune=nocona"], []) CFLAGS="${generic_CFLAGS} ${ext_CFLAGS} ${user_CFLAGS}" CXXFLAGS=$CFLAGS AC_STDC_HEADERS AC_CHECK_HEADER(zlib.h) AC_OUTPUT(Makefile) maq-0.7.1/const.c0000644000076600000240000000400310766735650012155 0ustar lh3staff#include "const.h" bit8_t nst_nt4_table[256] = { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 /*'-'*/, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 4, 1, 4, 4, 4, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 4, 1, 4, 4, 4, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }; char *nst_nt4_rev_table = "ACGTN-"; unsigned char nst_nt16_table[256] = { 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15 /*'-'*/,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15, 1,14, 2, 13,15,15, 4, 11,15,15,12, 15, 3,15,15, 15,15, 5, 6, 8,15, 7, 9, 0,10,15,15, 15,15,15,15, 15, 1,14, 2, 13,15,15, 4, 11,15,15,12, 15, 3,15,15, 15,15, 5, 6, 8,15, 7, 9, 0,10,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15 }; char *nst_nt16_rev_table = "XACMGRSVTWYHKDBN"; bit8_t nst_nt16_nt4_table[] = { 4, 0, 1, 4, 2, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4 }; int nst_nt16_count_table[] = { 4, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4 }; maq-0.7.1/const.h0000644000076600000240000000063410766735650012170 0ustar lh3staff#ifndef NST_CONST_H #define NST_CONST_H #define MAX_ULL 0xffffffffffffffffull typedef unsigned long long bit64_t; typedef unsigned bit32_t; typedef unsigned short bit16_t; typedef unsigned char bit8_t; extern bit8_t nst_nt4_table[]; extern bit8_t nst_nt16_table[]; extern char *nst_nt4_rev_table; extern char *nst_nt16_rev_table; extern bit8_t nst_nt16_nt4_table[]; extern int nst_nt16_count_table[]; #endif maq-0.7.1/csmap2ntmap.cc0000644000076600000240000001225110773300343013404 0ustar lh3staff#include #include #include #include #include #include "maqmap.h" #include "stdhash.hh" #include "main.h" #include "stdhash.hh" #include "bfa.h" /* Here is a delicate example. ref_nt=ATTAAC(RBRBG), read_cs=RBBOG. If we decode as ATTGAC(RBGOG), there are one color change and one nt change; if we decode as ATTAAC(RBRBG), there are two color changes. In DP, if color quality is smaller than COLOR_MM, we will use COLOR_MM as the penalty; otherwise, we will use color quality as the penalty. This means we always prefer two consistent color changes over a nt change, but if a color has high quality, we may prefer one nt change. In the above example, the penalties of the two types of decoding are q(B)+25 and q(B)+q(O), respectively. If q(O)>25, we prefer the first; otherwise the second. Note that no matter what we choose, the fourth base will get a low nt quality. */ #define COLOR_MM 19 #define NUCL_MM 25 const int nst_ntnt2cs_table[] = { 4, 0, 0, 1, 0, 2, 3, 4, 0, 3, 2, 4, 1, 4, 4, 4 }; const int nst_ntcs2nt_table[] = { 0, 1, 2, 3, 1, 0, 3, 2, 2, 3, 0, 1, 3, 2, 1, 0 }; // useless at the moment static inline int get_readseq(const nst_bfa1_t *l, int pos, int size, bit8_t *ntread) { int k; bit64_t *s, *m; if (pos + size >= l->ori_len) return 1; s = l->seq + (pos>>5); m = l->mask + (pos>>5); for (k = 0; k <= size; ++k) { int i = (31 - ((pos+k)&0x1f)) << 1; ntread[k] = ((*m>>i&0x3) == 3)? (*s>>i&0x3) : 4; if (31 - ((pos+k)&0x1f) == 0) { ++s; ++m; } } return 0; } static void cs2nt_dp(int size, const bit8_t *nt_ref, const bit8_t *csseq, bit8_t *nt_read, bit8_t *btarray) { int h[8], curr, last; int x, y, xmin, hmin, k; // recursion: initial value if (nt_ref[0] >= 4) memset(h, 0, sizeof(int) << 2); else { for (x = 0; x != 4; ++x) h[x] = NUCL_MM; h[nt_ref[0]] = 0; } // recursion: main loop curr = 1; last = 0; for (k = 1; k <= size; ++k) { for (x = 0; x != 4; ++x) { int min = 0x7fffffff, ymin = 0; for (y = 0; y != 4; ++y) { int s = h[last<<2|y]; if (csseq[k-1] && csseq[k-1]>>6 != nst_ntnt2cs_table[1<= 0; --k) nt_read[k] = btarray[(k+1)<<2 | nt_read[k+1]]; } static void cal_nt_qual(int size, const bit8_t *nt_read, bit8_t *seq, bit8_t *tarray) { int k, c1, c2; bit8_t *t2array = tarray + size; // get the color sequence of nt_read c1 = nt_read[0]; for (k = 1; k <= size; ++k) { c2 = nt_read[k]; // in principle, there is no 'N' in nt_read[] tarray[k-1] = (c1 >= 4 || c2 >= 4)? 4 : nst_ntnt2cs_table[1<>6 && tarray[k] == seq[k]>>6) { q = int(seq[k-1]&0x3f) + int(seq[k]&0x3f) + 10; } else if (tarray[k-1] == seq[k-1]>>6) { q = int(seq[k-1]&0x3f) - int(seq[k]&0x3f); } else if (tarray[k] == seq[k]>>6) { q = int(seq[k]&0x3f) - int(seq[k-1]&0x3f); } // else, q = 0 if (q < 1) q = 1; if (q > 63) q = 63; t2array[k] = nt_read[k]<<6 | q; if (seq[k-1] == 0 && seq[k] == 0) t2array[k] = 0; } memcpy(seq, t2array+1, size-1); // t2array[0] and t2array[size] are not copied seq[size-1] = 0; } static void csmap2nt_core(gzFile fpout, FILE *fpbfa, gzFile fpmap) { nst_bfa1_t *l = 0; bit32_t seqid = 0; int k; hash_map_char *hash_map = new hash_map_char; maqmap_t *mm = maqmap_read_header(fpmap); // skip the sequence names maqmap1_t mm1, *m1; bit8_t nt_ref[MAX_READLEN+1], nt_read[MAX_READLEN+1], tarray[(MAX_READLEN+1) * 4]; m1 = &mm1; for (k = 0; k != mm->n_ref; ++k) hash_map->insert(mm->ref_name[k], k); maqmap_write_header(fpout, mm); maqmap_read1(fpmap, m1); while ((l = nst_load_bfa1(fpbfa)) != 0) { if (!hash_map->find(l->name, &seqid)) { nst_delete_bfa1(l); continue; } do { if (m1->seqid != seqid) break; if (get_readseq(l, m1->pos>>1, m1->size, nt_ref)) continue; cs2nt_dp(m1->size, nt_ref, m1->seq, nt_read, tarray); cal_nt_qual(m1->size, nt_read, m1->seq, tarray); m1->pos += 2; --m1->size; gzwrite(fpout, m1, sizeof(maqmap1_t)); } while (maqmap_read1(fpmap, m1)); nst_delete_bfa1(l); if (gzeof(fpmap)) break; // end of alignment file } maq_delete_maqmap(mm); delete hash_map; } int maq_csmap2nt(int argc, char *argv[]) { gzFile fpin, fpout; FILE *fp_bfa; if (argc < 4) { fprintf(stderr, "Usage: maq csmap2nt \n"); return 1; } fpout = (strcmp(argv[1], "-") == 0)? gzdopen(fileno(stdout), "w") : gzopen(argv[1], "w"); fp_bfa = fopen(argv[2], "r"); fpin = (strcmp(argv[3], "-") == 0)? gzdopen(fileno(stdin), "r") : gzopen(argv[3], "r"); assert(fpout && fpin && fp_bfa); csmap2nt_core(fpout, fp_bfa, fpin); gzclose(fpin); gzclose(fpout); fclose(fp_bfa); return 0; } maq-0.7.1/dword.hh0000644000076600000240000000676411067172577012341 0ustar lh3staff#ifndef LH3_DWORD_H #define LH3_DWORD_H #include "const.h" template struct dword_t { TYPE w1, w2; static const int n_bits = sizeof(TYPE) * 8; inline dword_t() { w1 = TYPE(0); w2 = TYPE(0); } inline dword_t(bit16_t _w1) { w1 = TYPE(_w1); w2 = TYPE(0); } inline dword_t(bit32_t _w1) { w1 = TYPE(_w1); w2 = TYPE(0); } inline dword_t(bit64_t _w1) { w1 = TYPE(_w1); w2 = TYPE(0); } inline dword_t(int _w1) : w1(TYPE(_w1)), w2(TYPE(0)) {} inline dword_t(const TYPE &_w1, const TYPE &_w2) : w1(_w1), w2(_w2) {} inline dword_t(const dword_t &x) : w1(x.w1), w2(x.w2) {} inline const dword_t &operator >>= (int k) { if (k == 0) return *this; if (k < n_bits) { w1 = (w1>>k) | (TYPE(w2)<<(-k)); w2 >>= k; } else if (k < n_bits*2) { w1 = TYPE(w2)>>(k-n_bits); w2 = TYPE(0); } else w1 = w2 = TYPE(0); return *this; } inline const dword_t &operator <<= (int k) { if (k == 0) return *this; if (k < n_bits) { w2 = (w2<>(n_bits-k)); w1 <<= k; } else if (k < n_bits*2) { w2 = w1 << (k-n_bits); w1 = TYPE(0); } else w1 = w2 = TYPE(0); return *this; } inline const dword_t &operator &= (const dword_t &w) { w1 &= w.w1; w2 &= w.w2; return *this; } inline const dword_t &operator |= (const dword_t &w) { w1 |= w.w1; w2 |= w.w2; return *this; } inline dword_t &operator |= (int w) { w1 |= w; return *this; } inline dword_t &operator ^= (const dword_t &w) { w1 ^= w.w1; w2 ^= w.w2; return *this; } inline operator bit64_t() const { return bit64_t(w1); } }; template inline dword_t operator >> (const dword_t &w, int k) { return (k == 0)? w : (k < dword_t::n_bits)? dword_t((w.w1>>k) | (TYPE(w.w2)<<(dword_t::n_bits-k)), w.w2>>k) : (k < dword_t::n_bits*2)? dword_t(TYPE(w.w2)>>(k-dword_t::n_bits), TYPE(0)) : dword_t(TYPE(0), TYPE(0)); } template inline dword_t operator << (const dword_t &w, int k) { return (k == 0)? w : (k < dword_t::n_bits)? dword_t(w.w1<>(dword_t::n_bits-k))) : (k < dword_t::n_bits*2)? dword_t(TYPE(0), TYPE(w.w1<<(k-dword_t::n_bits))) : dword_t(TYPE(0), TYPE(0)); } template inline dword_t operator & (const dword_t &w, const dword_t &ww) { return dword_t(w.w1 & ww.w1, w.w2 & ww.w2); } template inline int operator < (const dword_t &w, const dword_t &ww) { return (w.w2 < ww.w2 || (w.w2 == ww.w2 && w.w1 < ww.w1)); } template inline dword_t operator | (const dword_t &w, const dword_t &ww) { return dword_t(w.w1 | ww.w1, w.w2 | ww.w2); } template inline dword_t operator ^ (const dword_t &w, const dword_t &ww) { return dword_t(w.w1 ^ ww.w1, w.w2 ^ ww.w2); } template inline int operator != (const dword_t &w, const dword_t &ww) { return (w.w1 != ww.w1 || w.w2 != ww.w2); } template inline int operator == (const dword_t &w, const dword_t &ww) { return (w.w1 == ww.w1 && w.w2 == ww.w2); } template inline dword_t operator ~ (const dword_t &w) { return dword_t(~w.w1, ~w.w2); } template inline T2 operator & (const dword_t &w, T2 k) { return T2(w.w1 & k); } template inline dword_t operator | (const dword_t &w, T2 k) { return dword_t(w.w1 | k, w.w2); } #endif maq-0.7.1/eland2maq.cc0000644000076600000240000005751111065656462013046 0ustar lh3staff/* * 19th Aug 2008, Modified by Colin Hercus to include conversion of novoalign and novopaired reports to maq format. * Released under GPL */ #include #include #include #include #include #include #include #include "maqmap.h" #include "algo.hh" #include "stdhash.hh" #include "main.h" static int DEFAULT_QUAL = 25; static int log_n[256]; static char **name_conv; static hash_map_char *read_list(FILE *fp) { hash_map_char *hash = new hash_map_char; char str[1024]; int i = 0; while (fscanf(fp, "%s", str) != 0) { if (feof(fp)) break; char *p = (str[0] == '>')? str+1 : str; int c; bit32_t x; assert(!hash->find(p, &x)); hash->insert(p, i); fscanf(fp, "%s", str); if ((i&0xff) == 0) name_conv = (char**)realloc(name_conv, sizeof(char*) * (i + 0x100)); name_conv[i++] = strdup(p); while ((c = fgetc(fp)) != EOF && c != '\n'); } return hash; } static inline int cal_map_qual(int default_qual, bit32_t *count) { if (count[0] == 1) { if (count[1] == 0 && count[2] == 0) return 3 * default_qual; if (count[1] == 0) return 2 * default_qual - log_n[count[2]]; return default_qual - log_n[count[1]]; } if (count[1] == 1) { if (count[2] == 0) return 2 * default_qual; return default_qual - log_n[count[2]]; } if (count[2] == 1) return default_qual - 3; return default_qual; } static inline int operator < (const maqmap1_t &a, const maqmap1_t &b) { return (a.seqid < b.seqid) || (a.seqid == b.seqid && a.pos < b.pos); } static void eland2maq_core(FILE *fp_list, FILE *fp_eland, gzFile fp) { hash_map_char *hash; // initialize maqmap_t maqmap_t *mm = maq_new_maqmap(); int max = 0, i, l; hash = read_list(fp_list); mm->n_ref = hash->size(); mm->ref_name = (char**)malloc(sizeof(char*) * mm->n_ref); for (i = 0; i != int(hash->size()); ++i) mm->ref_name[i] = strdup(name_conv[i]); // initialize log_n log_n[0] = -1; for (i = 1; i != 256; ++i) log_n[i] = (int)(3.434 * log((float)i) + 0.5); // read the file char str[1024], str2[1024]; bit8_t tmp_seq[MAX_READLEN]; bit32_t tmp[4]; while (fscanf(fp_eland, "%s", str) != 0) { if (feof(fp_eland)) break; if (mm->n_mapped_reads == (bit64_t)max) mm->mapped_reads = (maqmap1_t*)realloc(mm->mapped_reads, sizeof(maqmap1_t) * (max += 0x100000)); maqmap1_t *m1 = mm->mapped_reads + mm->n_mapped_reads; // set name strncpy(m1->name, str+1, MAX_NAMELEN-1); m1->name[MAX_NAMELEN - 1] = 0; // set seq fscanf(fp_eland, "%s", str); memset(m1->seq, 0, MAX_READLEN); m1->size = l = strlen(str); for (i = 0; i != l; ++i) { tmp[0] = nst_nt4_table[(int)str[i]]; m1->seq[i] = (tmp[0] > 3)? 0 : (tmp[0]<<6 | DEFAULT_QUAL); } // read flag fscanf(fp_eland, "%s", str); if (str[0] == 'U') { // there is an alignment int n_mis = str[1] - '0'; fscanf(fp_eland, "%u%u%u%s%u%s", tmp, tmp+1, tmp+2, str, tmp+3, str2); if (hash->find(str, &m1->seqid)) { if (str2[0] == 'R') { for (i = m1->size - 1; i >= 0; --i) tmp_seq[m1->size-i-1] = (m1->seq[i] == 0)? 0 : (0xc0 - (m1->seq[i]&0xc0)) | (m1->seq[i]&0x3f); memcpy(m1->seq, tmp_seq, m1->size); } m1->c[0] = tmp[0]; m1->c[1] = tmp[1]; m1->flag = 0; m1->dist = 0; m1->pos = (tmp[3]-1)<<1 | (str2[0] == 'F'? 0 : 1); m1->info1 = n_mis<<4 | n_mis; m1->info2 = n_mis * DEFAULT_QUAL; m1->map_qual = m1->seq[MAX_READLEN-1] = m1->alt_qual = cal_map_qual(DEFAULT_QUAL, tmp); } ++mm->n_mapped_reads; } while ((i = fgetc(fp_eland)) != EOF && i != '\n'); } algo_sort(mm->n_mapped_reads, mm->mapped_reads); maqmap_write_header(fp, mm); gzwrite(fp, mm->mapped_reads, sizeof(maqmap1_t) * mm->n_mapped_reads); // free maq_delete_maqmap(mm); for (i = 0; i != int(hash->size()); ++i) free(name_conv[i]); free(name_conv); delete hash; } static int usage() { fprintf(stderr, "Usage: maq eland2maq [-q qual] \n"); return 1; } int maq_eland2maq(int argc, char *argv[]) { FILE *fp_eland, *fp_list; gzFile fp_map; int c; while ((c = getopt(argc, argv, "q:")) >= 0) { switch (c) { case 'q': DEFAULT_QUAL = atoi(optarg); break; } } if (optind + 2 >= argc) return usage(); fp_eland = (strcmp(argv[optind+2], "-") == 0)? stdin : fopen(argv[optind+2], "r"); fp_list = fopen(argv[optind+1], "r"); fp_map = gzopen(argv[optind], "w"); assert(fp_eland && fp_list && fp_map); eland2maq_core(fp_list, fp_eland, fp_map); fclose(fp_eland); fclose(fp_list); gzclose(fp_map); return 0; } /* novo2maq name: read name size: the length of the read seq: read sequence (see also below) seq[MAX_READLEN-1]: single end mapping quality (equals to map_qual if not paired) map_qual: the final mapping quality alt_qual: the lower quality of the two ends (equals to map_qual if not paired) flag: status of the pair dist: offset of the mate (zero if not paired) info1: mismatches in the 24bp (higher 4 bits) and mismatches (lower 4 bits) info2: sum of errors of the best hit c[2]: count of all 0- and 1-mismatch hits on the reference */ // Recover novo indels while making sure to only pick up indels smith-waterman would find. // Needleman-Wunsch used in novo may report indels too close to the ends of the reads. static bool gapped(char * mm, char strand, int rdlen, int &readposn, int &indellen) { if(*mm == '\0') return false; int tposn = 1, qposn = 1, posn = 1; int match = 15, mismatch = 30, gapopen = 40, gapextend = 10; int maxsc = 0, maxposn = 0; bool gapped = false; int sc[256], mv[256], qp[256], tp[256]; sc[0] = qp[0] = tp[0] = '\0'; mv[0] = '|'; while(*mm != '\0') { int i = 0; while(isdigit(*mm)) i = i* 10 + (*mm++ - '0'); while(tposn < i) { sc[posn] = sc[posn-1] + match; mv[posn] = '|'; qp[posn] = qposn; tp[posn] = tposn; tposn++; qposn++; posn++; } if(sc[tposn-1] > maxsc) { maxsc = sc[tposn - 1]; maxposn = tposn - 1; } switch(*mm) { case '+': gapped = true; if(mv[posn-1] == '+') sc[posn] = sc[posn-1] - gapextend; else sc[posn] = sc[posn-1] - gapopen; if(sc[posn] < 0) sc[posn] = 0; mv[posn] = '+'; qp[posn] = qposn; tp[posn] = tposn; qposn++; posn++; mm +=3; break; case '-': gapped = true; if(mv[posn-1] == '-') sc[posn] = sc[posn-1] - gapextend; else sc[posn] = sc[posn-1] - gapopen; if(sc[posn] < 0) sc[posn] = 0; mv[posn] = '-'; qp[posn] = qposn; tp[posn] = tposn; tposn++; posn++; mm += 3; break; default: sc[posn] = sc[posn-1] - mismatch; if(sc[posn] < 0) sc[posn] = 0; mv[posn] = '|'; qp[posn] = qposn; tposn++; qposn++; posn++; mm+= 4; } } if(!gapped) return false; while(qposn <= rdlen) { sc[posn] = sc[posn-1] + match; mv[posn] = '|'; qp[posn] = qposn; tp[posn] = tposn; tposn++; qposn++; posn++; } if(sc[tposn-1] > maxsc) { maxsc = sc[tposn - 1]; maxposn = tposn - 1; } if(maxsc <= 0) return false; int j = maxposn; while(sc[j] > 0 && mv[j] == '|') j--; if(mv[j] == '|') return false; indellen = 1; while(mv[j-1] == mv[j]) { indellen++; j--; } // if(strand == 'F') readposn = qp[j] - 1; // else // readposn = rdlen - qp[j + indellen - 1] + 1; if(mv[j] == '-') indellen = -indellen; return true; } #define min(x,y) ((x)<(y)? (x):(y)) static void novo2maq_core(FILE *fp_list, FILE *fp_novo, gzFile fp) { hash_map_char *hash; // initialize maqmap_t maqmap_t *mm = maq_new_maqmap(); int max = 0, i, l; hash = read_list(fp_list); mm->n_ref = hash->size(); mm->ref_name = (char**)malloc(sizeof(char*) * mm->n_ref); for (i = 0; i != int(hash->size()); ++i) mm->ref_name[i] = strdup(name_conv[i]); // initialize log_n log_n[0] = -1; for (i = 1; i != 256; ++i) log_n[i] = (int)(3.434 * log((float)i) + 0.5); // read the file enum {n_readid, n_side, n_seq, n_qual, n_status, n_score, n_quality, n_chr, n_offset, n_strand, n_chr2, n_offset2, n_strand2, n_poly}; char * novo[n_poly + 1]; char * novo2[n_poly + 1]; char str[4096], str2[4096]; bit8_t tmp_seq[MAX_READLEN]; bit32_t tmp[4]; while (fgets( str, 4096,fp_novo ) != NULL) { if (feof(fp_novo)) break; if(str[0] == '#' || str[0] == '\0') continue; if (mm->n_mapped_reads + 1 >= (bit64_t)max) // Make sure room for a pair. mm->mapped_reads = (maqmap1_t*)realloc(mm->mapped_reads, sizeof(maqmap1_t) * (max += 0x100000)); maqmap1_t *m1 = mm->mapped_reads + mm->n_mapped_reads; char *np = str; char mtstr[1] = ""; for(i = 0; i <= n_poly; i++ ) { novo[i] = np; while(*np != '\t' && *np != '\n' && *np != '\0') np++; if(*np == '\n' || *np == '\0') break; *np++ = '\0'; } *np = '\0'; for(i++;i <= n_poly; i++ ) novo[i] = mtstr; // Read pair bool paired =false; if(novo[n_side][0] != 'S') { paired = true; fgets( str2, 4096, fp_novo ); np = str2; for(i = 0; i <= n_poly; i++ ) { novo2[i] = np; while(*np != '\t' && *np != '\n') np++; if(*np == '\n') break; *np++ = '\0'; } *np = '\0'; for(i++;i <= n_poly; i++ ) novo2[i] = mtstr; } // read flag if (novo[n_status][0] == 'U' || (paired && novo2[n_status][0] == 'U')) { // there is an alignment // set name strncpy(m1->name, novo[n_readid]+1, MAX_NAMELEN-1); m1->name[MAX_NAMELEN - 1] = 0; // set seq m1->size = l = strlen(novo[n_seq]); if(novo[n_qual][0] == '\0') for (i = 0; i != l; ++i) { tmp[0] = nst_nt4_table[(int)novo[n_seq][i]]; m1->seq[i] = (tmp[0] > 3)? 0 : (tmp[0]<<6 | DEFAULT_QUAL); } else for (i = 0; i != l; ++i) { tmp[0] = nst_nt4_table[(int)novo[n_seq][i]]; m1->seq[i] = (tmp[0] > 3)? 0 : (tmp[0]<<6 | ((int)novo[n_qual][i] - 33)); } int n_mis = (atoi(novo[n_score]) + 15)/30; if (novo[n_status][0] != 'U') n_mis = 0; bool aligned = hash->find(novo[n_chr]+1, &m1->seqid); if (novo[n_strand][0] == 'R') { for (i = m1->size - 1; i >= 0; --i) tmp_seq[m1->size-i-1] = (m1->seq[i] == 0)? 0 : (0xc0 - (m1->seq[i]&0xc0)) | (m1->seq[i]&0x3f); memcpy(m1->seq, tmp_seq, m1->size); } m1->c[0] = 0; // 0 mismatches alignments m1->c[1] = 0; // 1 mismatch alignments if(n_mis == 0) m1->c[0] = 1; // 0 mismatches alignments else m1->c[1] = 1; // 1 mismatch alignments m1->flag = 0; //paired flag FR, correct pair, 16 good pair, 32 diff chr, 64 one read of pair not mapped, 128 this read not mapped and other read is. m1->dist = 0; // Outer coordinates m1->pos = (atoi(novo[n_offset])-1)<<1 | (novo[n_strand][0] == 'F'? 0 : 1); m1->info1 = n_mis<<4 | n_mis; m1->info2 = atoi(novo[n_score])/3; m1->map_qual = m1->seq[MAX_READLEN-1] = min(60, atoi(novo[n_quality])); m1->alt_qual = m1->map_qual; // Lesser of two reads if(paired) { int dist = 0; int flag = 64; if (novo[n_status][0] != 'U') { m1->flag = 192; m1->info2 = 0; m1->map_qual = m1->seq[MAX_READLEN-1] = 0; m1->alt_qual = min(60, atoi(novo2[n_quality])); } else if (novo2[n_status][0] != 'U') { m1->flag = 64; flag = 192; m1->alt_qual = min((int)m1->map_qual, atoi(novo2[n_quality])); } else { if(novo[n_chr2][0] == '\0' && strcmp(novo[n_quality], novo2[n_quality]) == 0 && (dist = abs( atoi(novo[n_offset]) - atoi(novo[n_offset2]))) < 2000) { if(novo[n_strand][0] == 'R') dist = -(dist + strlen(novo[n_seq])); else dist += strlen(novo2[n_seq]); m1->flag = flag = 2 + 16; m1->dist = dist; } else if(novo[n_chr2][0] != '\0') m1->flag = flag = 32; else if(novo[n_strand][0] == 'R' && novo2[n_strand][0] == 'R') m1->flag = flag = 8; else if(novo[n_strand][0] == 'F' && novo2[n_strand][0] == 'F') m1->flag = flag = 1; else m1->flag = flag = 8; int gapposn, gaplen; if(gapped(novo[n_poly], novo[n_strand][0], m1->size, gapposn, gaplen)) { //gapped(novo[n_poly], novo[n_strand][0], m1->size, gapposn, gaplen); m1->flag = 130; m1->map_qual = gapposn; m1->seq[MAX_READLEN-1] = gaplen; } } if(aligned && m1->flag != 192) ++mm->n_mapped_reads; if(flag == 192) continue; m1 = mm->mapped_reads + mm->n_mapped_reads; // set name strncpy(m1->name, novo2[n_readid]+1, MAX_NAMELEN-1); m1->name[MAX_NAMELEN - 1] = 0; // set seq m1->size = l = strlen(novo2[n_seq]); if(novo2[n_qual][0] == '\0') for (i = 0; i != l; ++i) { tmp[0] = nst_nt4_table[(int)novo2[n_seq][i]]; m1->seq[i] = (tmp[0] > 3)? 0 : (tmp[0]<<6 | DEFAULT_QUAL); } else for (i = 0; i != l; ++i) { tmp[0] = nst_nt4_table[(int)novo2[n_seq][i]]; m1->seq[i] = (tmp[0] > 3)? 0 : (tmp[0]<<6 | ((int)novo2[n_qual][i] - 33)); } int n_mis = (atoi(novo2[n_score]) + 15)/30; if (novo2[n_status][0] != 'U') n_mis = 0; if (!hash->find(novo2[n_chr]+1, &m1->seqid)) { continue; } aligned = true; if (novo2[n_strand][0] == 'R') { for (i = m1->size - 1; i >= 0; --i) tmp_seq[m1->size-i-1] = (m1->seq[i] == 0)? 0 : (0xc0 - (m1->seq[i]&0xc0)) | (m1->seq[i]&0x3f); memcpy(m1->seq, tmp_seq, m1->size); } m1->c[0] = 0; // 0 mismatches alignments m1->c[1] = 0; // 1 mismatch alignments if(n_mis == 0) m1->c[0] = 1; // 0 mismatches alignments else m1->c[1] = 1; // 1 mismatch alignments m1->flag = flag; // paired flag FR, correct pair, 16 good pair, 32 diff chr, 64 one read of pair not mapped, 128 this read not mapped and other read is. m1->dist = -dist; // Outer coordinates m1->pos = (atoi(novo2[n_offset])-1)<<1 | (novo2[n_strand][0] == 'F'? 0 : 1); m1->info1 = n_mis<<4 | n_mis; m1->info2 = atoi(novo2[n_score])/3; m1->map_qual = m1->seq[MAX_READLEN-1] = min(60, atoi(novo2[n_quality])); if (novo[n_status][0] == 'U') m1->alt_qual = min(60,min((int)m1->map_qual, atoi(novo[n_quality]))); else m1->alt_qual = m1->map_qual; int gapposn, gaplen; if(gapped(novo2[n_poly], novo2[n_strand][0], m1->size, gapposn, gaplen)) { //gapped(novo2[n_poly], novo2[n_strand][0], m1->size, gapposn, gaplen); m1->flag = 130; m1->map_qual = gapposn; m1->seq[MAX_READLEN-1] = gaplen; } } else { int gapposn, gaplen; if(gapped(novo[n_poly], novo[n_strand][0], m1->size, gapposn, gaplen)) { m1->flag = 130; // m1->c[0] = 0; // 0 mismatches alignments // m1->c[1] = 0; // 1 mismatch alignments m1->alt_qual = m1->map_qual; m1->map_qual = gapposn; m1->seq[MAX_READLEN-1] = gaplen; } } if(aligned) ++mm->n_mapped_reads; } } algo_sort(mm->n_mapped_reads, mm->mapped_reads); maqmap_write_header(fp, mm); gzwrite(fp, mm->mapped_reads, sizeof(maqmap1_t) * mm->n_mapped_reads); // free maq_delete_maqmap(mm); for (i = 0; i != int(hash->size()); ++i) free(name_conv[i]); free(name_conv); delete hash; } static int novo2maqusage() { fprintf(stderr, "Usage: maq novo2maq \n"); return 1; } int maq_novo2maq(int argc, char *argv[]) { FILE *fp_novo, *fp_list; gzFile fp_map; // int c; // while ((c = getopt(argc, argv, "")) >= 0) { // switch (c) { // case 'q': DEFAULT_QUAL = atoi(optarg); break; // } // } optind = 1; if (optind + 2 >= argc) return novo2maqusage(); fp_novo = (strcmp(argv[optind+2], "-") == 0)? stdin : fopen(argv[optind+2], "r"); fp_list = fopen(argv[optind+1], "r"); fp_map = gzopen(argv[optind], "w"); assert(fp_novo && fp_list && fp_map); novo2maq_core(fp_list, fp_novo, fp_map); fclose(fp_novo); fclose(fp_list); gzclose(fp_map); return 0; } /* export2maq */ static int read_len[2], max_dist = 250, is_non_filtered = 0; static inline int tabread(FILE *fp, char buf[]) { int c; char *p = buf; while ((c = fgetc(fp)) != '\n' && c != '\t' && c != EOF) *p++ = c; *p = '\0'; return c; } static void export2maq_core(FILE *fp_list, FILE *fp_export, gzFile fp) { hash_map_char *hash; // quality conversion table int table[128]; for (int l = 0; l != 128; ++l) { table[l] = (int)(10.0 * log(1.0 + pow(10.0, (l - 64) / 10.0)) / log(10.0) + .499); if (table[l] >= 63) table[l] = 63; if (table[l] == 0) table[l] = 1; } // initialize maqmap_t maqmap_t *mm = maq_new_maqmap(); int max = 0, i, l; hash = read_list(fp_list); mm->n_ref = hash->size(); mm->ref_name = (char**)malloc(sizeof(char*) * mm->n_ref); for (i = 0; i != int(hash->size()); ++i) mm->ref_name[i] = strdup(name_conv[i]); // read the file char str[1024], str2[1024]; bit8_t tmp_seq[MAX_READLEN]; int ti[5], c; while (fscanf(fp_export, "%s%d%d%d%d%d", str, ti, ti+1, ti+2, ti+3, ti+4) != 0) { if (feof(fp_export)) break; if (mm->n_mapped_reads == (bit64_t)max) mm->mapped_reads = (maqmap1_t*)realloc(mm->mapped_reads, sizeof(maqmap1_t) * (max += 0x100000)); maqmap1_t *m1 = mm->mapped_reads + mm->n_mapped_reads; sprintf(str2, "%s_%d:%d:%d:%d:%d", str, ti[0], ti[1], ti[2], ti[3], ti[4]); // set name strncpy(m1->name, str2, MAX_NAMELEN-1); m1->name[MAX_NAMELEN - 1] = 0; // set m1->c[2] m1->c[0] = m1->c[1] = 0; // set seq and qual fgetc(fp_export); // skip '\t' c = tabread(fp_export, str); // index c = tabread(fp_export, str); // 1 or 2 int cur_read = atoi(str) - 1; c = tabread(fp_export, str); // seq c = tabread(fp_export, str2); // qual memset(m1->seq, 0, MAX_READLEN); m1->size = l = strlen(str); // update read_len read_len[cur_read] = m1->size; if (read_len[1-cur_read] == 0) read_len[1-cur_read] = m1->size; for (i = 0; i != l; ++i) { int t = nst_nt4_table[(int)str[i]]; m1->seq[i] = (t > 3)? 0 : (t<<6 | table[(int)str2[i]]); } c = tabread(fp_export, str); // target if (strcmp(str, "NM") && hash->find(str, &m1->seqid)) { c = tabread(fp_export, str); // contig c = tabread(fp_export, str); // position c = tabread(fp_export, str2); // strand m1->pos = bit32_t(atoi(str) - 1)<<1 | (str2[0] == 'F'? 0 : 1); if (m1->pos&1) { // reverse if necessary for (i = m1->size - 1; i >= 0; --i) tmp_seq[m1->size-i-1] = (m1->seq[i] == 0)? 0 : (0xc0 - (m1->seq[i]&0xc0)) | (m1->seq[i]&0x3f); memcpy(m1->seq, tmp_seq, m1->size); } // set m1->info1 and m1->info2 c = tabread(fp_export, str); // mismatches int n_mismatch = 0; l = strlen(str); for (int k = 0; k != l; ++k) if (isalpha(str[k])) ++n_mismatch; m1->info1 = n_mismatch << 4 | n_mismatch; m1->info2 = 10 * n_mismatch; if (n_mismatch < 2) m1->c[n_mismatch] = 1; // set mapping qualities c = tabread(fp_export, str); // SE mapping score c = atoi(str); if (c > 255) c = 255; m1->map_qual = m1->seq[MAX_READLEN-1] = c; c = tabread(fp_export, str); // PE mapping score c = atoi(str); if (c > 255) c = 255; if (m1->map_qual < c) m1->map_qual = c; c = tabread(fp_export, str); // target of mate int is_same_chr = (str[0] == '\0')? 1 : 0; c = tabread(fp_export, str); // contig of mate? // set m1->dist c = tabread(fp_export, str); // offset to mate int dist = atoi(str); m1->dist = (dist == 0 || !is_same_chr)? 0 : (dist > 0? dist + read_len[1-cur_read] : dist - m1->size); // set m1->flag c = tabread(fp_export, str); // strand of mate m1->flag = 0; if (str[0] == 'N') m1->flag |= PAIRFLAG_NOMATCH; else { if (!is_same_chr) m1->flag |= PAIRFLAG_DIFFCHR; else { if (dist > 0) m1->flag |= 1 << ((m1->pos&1)<<1 | (str[0] == 'F'? 0 : 1)); else m1->flag |= 1 << ((str[0] == 'F'? 0 : 1)<<1 | (m1->pos&1)); if (abs(m1->dist) < max_dist && m1->flag == PAIRFLAG_FR) m1->flag |= PAIRFLAG_PAIRED; } } c = tabread(fp_export, str); // filtered or not if (is_non_filtered || str[0] == 'Y') ++mm->n_mapped_reads; } else while ((c = fgetc(fp_export)) != EOF && c != '\n'); } algo_sort(mm->n_mapped_reads, mm->mapped_reads); maqmap_write_header(fp, mm); gzwrite(fp, mm->mapped_reads, sizeof(maqmap1_t) * mm->n_mapped_reads); // free maq_delete_maqmap(mm); for (i = 0; i != int(hash->size()); ++i) free(name_conv[i]); free(name_conv); delete hash; } static int export2maq_usage() { fprintf(stderr, "\n"); fprintf(stderr, "Usage: maq export2maq [options] \n\n"); fprintf(stderr, "Options: -1 INT length of read1 [0]\n"); fprintf(stderr, " -2 INT length of read2 [0]\n"); fprintf(stderr, " -a INT maximum insert size [250]\n"); fprintf(stderr, " -n keep filtered reads\n\n"); return 1; } int maq_export2maq(int argc, char *argv[]) { FILE *fp_export, *fp_list; gzFile fp_map; int c; while ((c = getopt(argc, argv, "1:2:a:n")) >= 0) { switch (c) { case '1': read_len[0] = atoi(optarg); break; case '2': read_len[1] = atoi(optarg); break; case 'a': max_dist = atoi(optarg); break; case 'n': is_non_filtered = 1; break; } } if (optind + 2 >= argc) return export2maq_usage(); fp_export = (strcmp(argv[optind+2], "-") == 0)? stdin : fopen(argv[optind+2], "r"); fp_list = fopen(argv[optind+1], "r"); fp_map = gzopen(argv[optind], "w"); assert(fp_export && fp_list && fp_map); export2maq_core(fp_list, fp_export, fp_map); fclose(fp_export); fclose(fp_list); gzclose(fp_map); return 0; } maq-0.7.1/fasta2bfa.c0000644000076600000240000001403510766735650012666 0ustar lh3staff#include #include #include #include #include #include #include "bfa.h" #include "main.h" #include "seq.h" const int nst_color_space_table[] = { 4, 0, 0, 1, 0, 2, 3, 4, 0, 3, 2, 4, 1, 4, 4, 4}; /* AA/CC/GG/TT -> 0 (Blue) AC/CA/GT/TG -> 1 (Green) AG/GA/CT/TC -> 2 (Orange) AT/TA/CG/GC -> 3 (Red) */ static void ma_fasta2csfa_core(FILE *fpout, FILE *fpin) { seq_t seq; int i, c1, c2, c; char name[256], comment[4096]; INIT_SEQ(seq); seq_set_block_size(0x800000); // use longer block size (8M) while (seq_read_fasta(fpin, &seq, name, comment) >= 0) { fprintf(fpout, ">%s %s", name, comment); c1 = nst_nt4_table[(int)seq.s[0]]; for (i = 1; i < seq.l; ++i) { if ((i-1)%60 == 0) fputc('\n', fpout); c2 = nst_nt4_table[(int)seq.s[i]]; c = (c1 == 4 || c2 == 4)? 4 : nst_color_space_table[((1<= 0) { int i, cur_pos, cur_mut; n_mut = 0; // rewind fprintf(fpout, ">%s %s\n", name, comment); // first round: fill mutarray for (i = 0; i < seq.l; ++i) { double r = drand48(); if (nst_nt4_table[(int)seq.s[i]] < 4 && r < rate) { bit8_t type, base; r = drand48(); base = (nst_nt4_table[(int)seq.s[i]] + (int)(r * 3.0 + 1)) & 3; if (r < irate/2.0) type = 'I'; // insert else if (r < irate) type = 'D'; // deletion else type = 'S'; // substitution if (n_mut == m_mut) { // enlarge m_mut += 0x10000; mutarray = (fakemut_t*)realloc(mutarray, sizeof(fakemut_t) * m_mut); } mutarray[n_mut].type = type; mutarray[n_mut].base = "ACGT"[base]; mutarray[n_mut].pos = i; ++n_mut; // push back } } // second round: output the sequence and mutations for (i = cur_pos = cur_mut = 0; i < seq.l; ++i) { if (cur_pos && cur_pos%60 == 0) fputc('\n', fpout); if (i == mutarray[cur_mut].pos) { bit8_t type = mutarray[cur_mut].type; if (type == 'S') { fputc(mutarray[cur_mut].base, fpout); fprintf(stderr, "%s\t%d\t%c\t%c\t99\n", name, cur_pos + 1, mutarray[cur_mut].base, seq.s[i]); ++cur_pos; } else if (type == 'I') { fputc(mutarray[cur_mut].base, fpout); // insert before the current base fputc(seq.s[i], fpout); fprintf(stderr, "%s\t%d\t%c\t-\t99\n", name, cur_pos + 1, mutarray[cur_mut].base); cur_pos += 2; } else { // else, it is a deletion. fprintf(stderr, "%s\t%d\t-\t%c\t99\n", name, cur_pos + 1, seq.s[i]); } ++cur_mut; } else { fputc(seq.s[i], fpout); ++cur_pos; } } fputc('\n', fpout); } free(seq.s); free(mutarray); } /* fasta2bfa */ static int nst_fasta2bfa1(FILE *fp_fa, FILE *fp_bfa, seq_t *seq) { int i, len; char name[256]; bit64_t s, m; nst_bfa1_t *bfa1; len = seq_read_fasta(fp_fa, seq, name, 0); if (len < 0) return -1; // no sequence bfa1 = nst_new_bfa1(); bfa1->ori_len = len; bfa1->len = len>>5; if (len&0x1f) ++(bfa1->len); bfa1->seq = (bit64_t*)malloc(sizeof(bit64_t) * bfa1->len); bfa1->mask = (bit64_t*)malloc(sizeof(bit64_t) * bfa1->len); bfa1->name = strdup(name); m = s = 0ull; for (i = 0; i != len; ++i) { int tmp = nst_nt4_table[(int)seq->s[i]]; s <<= 2; m <<= 2; if (tmp < 4) { s |= tmp; m |= 0x3; } else m &= ~0x3; if ((i&0x1f) == 0x1f) { // add to l bfa1->seq[i>>5] = s; bfa1->mask[i>>5] = m; } } if (len&0x1f) { s <<= (32 - (i&0x1f)) << 1; m <<= (32 - (i&0x1f)) << 1; bfa1->seq[len>>5] = s; bfa1->mask[len>>5] = m; } i = strlen(bfa1->name) + 1; fwrite(&i, sizeof(int), 1, fp_bfa); fwrite(bfa1->name, sizeof(char), i, fp_bfa); fwrite(&bfa1->ori_len, sizeof(int), 1, fp_bfa); fwrite(&bfa1->len, sizeof(int), 1, fp_bfa); fwrite(bfa1->seq, sizeof(bit64_t) * bfa1->len, 1, fp_bfa); fwrite(bfa1->mask, sizeof(bit64_t) * bfa1->len, 1, fp_bfa); nst_delete_bfa1(bfa1); return len; } int nst_fasta2bfa(FILE *fp_fa, FILE *fp_bfa) { seq_t seq; int n = 0; INIT_SEQ(seq); seq_set_block_size(0x800000); // use longer block size (8M) while (nst_fasta2bfa1(fp_fa, fp_bfa, &seq) >= 0) ++n; free(seq.s); return n; } int ma_fasta2bfa(int argc, char *argv[]) { FILE *fp_fa, *fp_bfa; int n; fp_fa = fp_bfa = 0; if (argc <= 2) { fprintf(stderr, "Usage: maq fasta2bfa \n"); return 1; } fp_fa = (strcmp(argv[1], "-") == 0)? stdin : fopen(argv[1], "r"); fp_bfa = (strcmp(argv[2], "-") == 0)? stdin : fopen(argv[2], "w"); if (fp_fa == 0 || fp_bfa == 0) { fprintf(stderr, "ERROR: fail to open file(s).\n"); return 2; } n = nst_fasta2bfa(fp_fa, fp_bfa); fprintf(stderr, "-- %d sequences have been converted.\n", n); fclose(fp_fa); fclose(fp_bfa); return 0; } int ma_fasta2csfa(int argc, char *argv[]) { FILE *fp_fa; if (argc < 2) { fprintf(stderr, "Usage: maq fasta2csfa \n"); return 1; } fp_fa = (strcmp(argv[1], "-") == 0)? stdin : fopen(argv[1], "r"); assert(fp_fa); ma_fasta2csfa_core(stdout, fp_fa); fclose(fp_fa); return 0; } static int fakemut_usage() { fprintf(stderr, "Usage: maq fakemut [-r 0.001] [-R 0.1] \n"); return 1; } int ma_fakemut(int argc, char *argv[]) { FILE *fp_fa; double mutrate = 0.001; double indelrate = 0.1; int c; /* mutrate is the overall mutation rate mutrate*indelrate is the indel rate mutrate*(1-indelrate) is the substitution rate */ while ((c = getopt(argc, argv, "r:R:")) >= 0) { switch (c) { case 'r': mutrate = atof(optarg); break; case 'R': indelrate = atof(optarg); break; } } if (optind == argc) return fakemut_usage(); fp_fa = (strcmp(argv[optind], "-") == 0)? stdin : fopen(argv[optind], "r"); assert(fp_fa); ma_fakemut_core(stdout, fp_fa, mutrate, indelrate); fclose(fp_fa); return 0; } maq-0.7.1/fastq2bfq.c0000644000076600000240000000603410766735650012726 0ustar lh3staff#include #include #include #include #include #include #include #include "const.h" #include "main.h" #include "seq.h" int64_t fastq2bfq(FILE *fp_fq, const char *fn_bfq, int n_reads) { seq_t seq, qual; char name[256], str[1024]; int l, is_new = 0, l_prefix = 0; bit64_t n; gzFile *fp = 0; INIT_SEQ(seq); INIT_SEQ(qual); seq_set_block_size(256); n = 0; if (n_reads <= 0) strcpy(str, fn_bfq); else { strcpy(str, fn_bfq); if (strcmp(str + strlen(fn_bfq) - 4, ".bfq") == 0) // remove ".bfq" suffix if exist str[strlen(fn_bfq) - 4] = '\0'; l_prefix = strlen(str); sprintf(str + l_prefix, "@1.bfq"); } fp = gzopen(str, "w"); while ((l = seq_read_fastq(fp_fq, &seq, &qual, name)) >= 0) { int i, nN; bit8_t t, tt; if (is_new) { sprintf(str + l_prefix, "@%lld.bfq", n+1); fp = gzopen(str, "w"); is_new = 0; } for (i = 0, nN = 0; i != l; ++i) { t = nst_nt4_table[seq.s[i]]; if (t > 3) ++nN; tt = (qual.s[i] > 0x3f)? 0x3f : qual.s[i]; if (tt == 0) tt = 1; seq.s[i] = (t > 3)? 0 : ((t<<6) | tt); } i = strlen(name) + 1; gzwrite(fp, &i, sizeof(int)); gzwrite(fp, name, sizeof(char) * i); gzwrite(fp, &l, sizeof(int)); gzwrite(fp, seq.s, sizeof(char) * l); ++n; if (n_reads > 0 && n % n_reads == 0) { gzclose(fp); fprintf(stderr, "-- finish writing file '%s'\n", str); fp = 0; is_new = 1; } } free(seq.s); free(qual.s); if (fp) { fprintf(stderr, "-- finish writing file '%s'\n", str); gzclose(fp); } fprintf(stderr, "-- %lld sequences were loaded.\n", n); return n; } void sol2sanger(FILE *fpin, FILE *fpout) { seq_t seq, qual; char name[256]; int table[128]; int l; /* calculate table */ for (l = 0; l != 128; ++l) { table[l] = (int)(33 + 10.0 * log(1.0 + pow(10.0, (l - 64 + 33) / 10.0)) / log(10.0) + .499); if (table[l] >= 126) table[l] = 126; } INIT_SEQ(seq); INIT_SEQ(qual); seq_set_block_size(256); while ((l = seq_read_fastq(fpin, &seq, &qual, name)) >= 0) { int i; fprintf(fpout, "@%s\n%s\n+\n", name, seq.s); for (i = 0; i != l; ++i) qual.s[i] = table[(int)qual.s[i]]; fprintf(fpout, "%s\n", qual.s); } free(seq.s); free(qual.s); } int ma_sol2sanger(int argc, char *argv[]) { FILE *fpin, *fpout; fpin = fpout = 0; if (argc < 3) { fprintf(stderr, "Usage: maq sol2sanger \n"); return 1; } fpin = (strcmp(argv[1], "-") == 0)? stdin : fopen(argv[1], "r"); fpout = (strcmp(argv[2], "-") == 0)? stdout : fopen(argv[2], "w"); sol2sanger(fpin, fpout); fclose(fpin); fclose(fpout); return 0; } int ma_fastq2bfq(int argc, char *argv[]) { FILE *fp_fq; int c, n_reads = 0; while ((c = getopt(argc, argv, "n:")) >= 0) { switch (c) { case 'n': n_reads = atoi(optarg); break; } } fp_fq = 0; if (optind + 1 >= argc) { fprintf(stderr, "Usage: maq fastq2bfq [-n nreads] |\n"); return 1; } fp_fq = (strcmp(argv[optind], "-") == 0)? stdin : fopen(argv[optind], "r"); fastq2bfq(fp_fq, argv[optind+1], n_reads); fclose(fp_fq); return 0; } maq-0.7.1/genran.c0000644000076600000240000000070110766735650012302 0ustar lh3staff#include #include #include "genran.h" double ran_normal() { static int iset = 0; static double gset; double fac, rsq, v1, v2; if (iset == 0) { do { v1 = 2.0 * ran_uniform() - 1.0; v2 = 2.0 * ran_uniform() - 1.0; rsq = v1 * v1 + v2 * v2; } while (rsq >= 1.0 || rsq == 0.0); fac = sqrt(-2.0 * log(rsq) / rsq); gset = v1 * fac; iset = 1; return v2 * fac; } else { iset = 0; return gset; } } maq-0.7.1/genran.h0000644000076600000240000000075710766735650012322 0ustar lh3staff#ifndef LH3_GENRAN_H_ #define LH3_GENRAN_H_ #include #include #ifndef _WIN32 /* POSIX: rand48 family */ #include #include #define ran_seed() srand48(time(0) * (long)getpid()) #define ran_uniform() drand48() #else /* Windows: this will be pretty BAD. */ #define ran_seed() srand(time(0)) #define ran_uniform() ((double)rand() / RAND_MAX) #endif #ifdef __cpluplus extern "C" { #endif double ran_normal(); #ifdef __cplusplus } #endif #endif maq-0.7.1/get_pos.c0000644000076600000240000001245211027727762012472 0ustar lh3staff#include #include #include #include "maqmap.h" #include "assemble.h" /** fill the rolling buffer */ inline void assemble_fill_buffer(gzFile fpin, rolling_buf_t *ab) { if (gzeof(fpin) || (ab->is_rounded == 1 && ab->head == ab->tail)) return; // the buffer is full int n_records, n_bytes; if (ab->tail >= ab->head) { n_records = ROLLING_BUF_SIZE - ab->tail; n_bytes = gzread(fpin, ab->buf + ab->tail, sizeof(maqmap1_t) * n_records); ab->tail += n_bytes / sizeof(maqmap1_t); if ((bit32_t)n_bytes < sizeof(maqmap1_t) * n_records) return; ab->is_rounded = 1; ab->tail = 0; } if (ab->head == 0) return; n_records = ab->head - ab->tail; n_bytes = gzread(fpin, ab->buf + ab->tail, sizeof(maqmap1_t) * n_records); ab->tail += n_bytes / sizeof(maqmap1_t); } /** get the piled bases at a specified position */ void assemble_get_pos(bit32_t seqid, bit32_t pos, gzFile fpin, rolling_buf_t *ab, assemble_pos_t *ap, int max_mm, int max_err, int min_q, int is_single, int is_pair_only) { int i, is_rounded; if (max_err < 0) max_err = 60; // default value is set here. if (max_mm < 0) max_mm = 7; // default value ap->n_bases = 0; do { assemble_fill_buffer(fpin, ab); if (gzeof(fpin) && ab->is_rounded == 0 && ab->head == ab->tail) return; // end of file and empty buffer // skip reads that are out of range. for (i = ab->head, is_rounded = ab->is_rounded; (is_rounded || i != ab->tail) && (seqid > ab->buf[i].seqid || (seqid == ab->buf[i].seqid && pos >= (ab->buf[i].pos>>1) + ab->buf[i].size));) { if ((++i) == ROLLING_BUF_SIZE) { i = 0; is_rounded = 0; } } ab->head = i; ab->is_rounded = is_rounded; // update ab } while (ab->is_rounded == 0 && ab->head == ab->tail); assemble_fill_buffer(fpin, ab); is_rounded = ab->is_rounded; // fill ap while ((is_rounded || i != ab->tail) && seqid == ab->buf[i].seqid && pos >= ab->buf[i].pos>>1) { maqmap1_t *m1 = ab->buf + i; bit32_t map_qual = is_single? m1->seq[MAX_READLEN-1] : m1->map_qual; int is_pair_rm = (is_pair_only && (m1->flag != 0 && m1->flag != (PAIRFLAG_FR|PAIRFLAG_PAIRED)))? 1 : 0; if (m1->info2 <= max_err && (m1->info1&0xf) <= max_mm && map_qual >= (bit32_t)min_q && pos < (m1->pos>>1) + m1->size && (m1->flag&PAIRFLAG_SW) == 0 && !is_pair_rm) { if (ap->n_bases == ap->m_bases) { ap->m_bases += 0x1000; ap->bases = (assemble_posinfo_t*)realloc(ap->bases, ap->m_bases * sizeof(assemble_posinfo_t)); } assemble_posinfo_t *p = ap->bases + ap->n_bases; bit32_t base_qual = m1->seq[pos - (m1->pos>>1)]&0x3f; bit32_t base = m1->seq[pos - (m1->pos>>1)]>>6&0x3; bit32_t qual = (base_qual < map_qual)? base_qual : map_qual; bit32_t is_present = (m1->seq[pos - (m1->pos>>1)] == 0)? 0 : 1; bit32_t mm = m1->info1>>4&0xf; if (qual < 1) qual = 1; bit32_t strand = m1->pos&1; p->info = (qual<<24) | (is_present<<22) | (mm<<19) | (strand<<18) | (base<<16) | (base_qual<<8) | map_qual; p->c[0] = m1->c[0]; p->c[1] = m1->c[1]; p->pos = (m1->pos&1)? m1->size - 1 - (pos - (m1->pos>>1)) : pos - (m1->pos>>1); ++ap->n_bases; } if ((++i) == ROLLING_BUF_SIZE) { i = 0; is_rounded = 0; } } } void assemble_get_indelpos(bit32_t seqid, bit32_t pos, gzFile fpin, rolling_buf_t *ab, assemble_indelpos_t *ai) { int i, is_rounded; // initialization ai->n_reads = ai->n_types = ai->n_ungap = 0; memset(ai->ins_bases[0], 0, sizeof(int) * 4 * MAX_READLEN); do { assemble_fill_buffer(fpin, ab); if (gzeof(fpin) && ab->is_rounded == 0 && ab->head == ab->tail) return; // end of file and empty buffer // skip reads that are out of range. for (i = ab->head, is_rounded = ab->is_rounded; (is_rounded || i != ab->tail) && (seqid > ab->buf[i].seqid || (seqid == ab->buf[i].seqid && pos >= (ab->buf[i].pos>>1) + ab->buf[i].size));) { if ((++i) == ROLLING_BUF_SIZE) { i = 0; is_rounded = 0; } } ab->head = i; ab->is_rounded = is_rounded; // update ab } while (ab->is_rounded == 0 && ab->head == ab->tail); assemble_fill_buffer(fpin, ab); is_rounded = ab->is_rounded; // fill ai while ((is_rounded || i != ab->tail) && seqid == ab->buf[i].seqid && pos >= ab->buf[i].pos>>1) { maqmap1_t *m1 = ab->buf + i; if (pos < (m1->pos>>1) + m1->size) { ++ai->n_reads; if ((m1->flag & PAIRFLAG_SW) && (signed char)m1->seq[MAX_READLEN-1] != 0) { // indel if (pos == (m1->pos>>1) + m1->map_qual) { int j; bit8_t b = (bit8_t)m1->seq[MAX_READLEN-1]; // force to be positive for (j = 0; j != ai->n_types; ++j) if (b == (ai->indels[j]&0xff)) break; assert(j < 256); if (j < ai->n_types) { // exist if (m1->pos&1) { ai->indels[j] += 1ull<<48; ai->indels[j] += 1ull<<16; } else { ai->indels[j] += 1ull<<48; ai->indels[j] += 1ull<<32; } } else { // new type ai->indels[j] = 1ull<<48 | b | ((m1->pos&1)? 1ull<<16 : 1ull<<32); ++ai->n_types; } if ((signed char)b > 0) { // insertion, then get inserted bases for (j = 0; j < b; ++j) ++ai->ins_bases[j][m1->seq[j+m1->map_qual]>>6&3]; } } } else { // non-indel if (pos > (m1->pos>>1) && ai->n_ungap < 255) { ai->n_mm[ai->n_ungap] = m1->info1&0xf; ai->beg_pos[ai->n_ungap] = pos - (m1->pos>>1); ai->end_pos[ai->n_ungap++] = m1->size - (pos - (m1->pos>>1)); } } } if ((++i) == ROLLING_BUF_SIZE) { i = 0; is_rounded = 0; } } } maq-0.7.1/glf.h0000644000076600000240000000057511043135375011601 0ustar lh3staff#ifndef GLF_H_ #define GLF_H_ typedef struct { unsigned char ref_base:4, dummy:4; /** "XACMGRSVTWYHKDBN"[ref_base] gives the reference base */ unsigned char max_mapQ; /** maximum mapping quality */ unsigned char lk[10]; /** log likelihood ratio, capped at 255 */ unsigned min_lk:8, depth:24; /** minimum lk capped at 255, and the number of mapped reads */ } glf1_t; #endif maq-0.7.1/glfgen.cc0000644000076600000240000001062111043135375012422 0ustar lh3staff#include #include #include #include #include #include #include "match.hh" #include "bfa.h" #include "main.h" #include "algo.hh" #include "assemble.h" #include "stdhash.hh" #include "glf.h" typedef struct { float esum[4], fsum[4]; int bar_e[4]; bit32_t c[4]; bit32_t mapQ_max; } glf_call_aux_t; inline bool operator < (const assemble_posinfo_t &a, const assemble_posinfo_t &b) { return (a.info < b.info); } /** collect information for base calling */ static glf1_t *glfgen1_core(assemble_pos_t *ap, const assemble_aux_t *aa, bit8_t ref_base) { glf_call_aux_t *b; glf1_t *g = (glf1_t*)calloc(1, sizeof(glf1_t)); g->ref_base = ref_base; if (ap->n_bases == 0) return g; int i, j, k, w[8]; b = (glf_call_aux_t*)calloc(1, sizeof(glf_call_aux_t)); algo_sort(ap->n_bases, ap->bases); for (k = 0; k != 8; ++k) w[k] = 0; b->mapQ_max = 0; for (j = ap->n_bases - 1; j >= 0; --j) { bit32_t info = ap->bases[j].info; if (info>>24 < 4 && (info>>8&0x3f) != 0) info = 4<<24 | info&0xffffff; k = info>>16&7; if (info>>24 > 0) { b->esum[k&3] += aa->fk[w[k]] * (info>>24); b->fsum[k&3] += aa->fk[w[k]]; if (w[k] < 0xff) ++w[k]; ++b->c[k&3]; } if (b->mapQ_max < (info&0x7f)) b->mapQ_max = info&0x7f; } for (j = 0; j != 4; ++j) { float tmp1, tmp2; tmp1 = tmp2 = 0.0; for (k = 0; k != 4; ++k) { if (k == j) continue; tmp1 += b->esum[k]; tmp2 += b->fsum[k]; } b->bar_e[j] = tmp2 > 0.0? (int)(tmp1 / tmp2 + 0.5) : 0; } float p[16]; int c; // rescale ->c[] for (j = c = 0; j != 4; ++j) c += b->c[j]; if (c > 255) { for (j = 0; j != 4; ++j) b->c[j] = (int)(254.0 * b->c[j] / c + 0.5); for (j = c = 0; j != 4; ++j) c += b->c[j]; } for (j = 0; j != 4; ++j) { // homozygous float sum = 0.0; for (k = 0; k != 4; ++k) { if (j == k) continue; sum += b->esum[k] + (b->bar_e[k]? aa->coef[b->bar_e[k]<<16|c<<8|b->c[k]] : 0); } p[j<<2|j] = sum; // heterozygous for (k = j + 1; k < 4; ++k) { for (i = 0, sum = 0.0; i != 4; ++i) { if (i == j || i == k) continue; sum += b->esum[i] + (b->bar_e[i]? aa->coef[b->bar_e[i]<<16|c<<8|b->c[i]] : 0); } p[j<<2|k] = p[k<<2|j] = -4.343 * aa->lhet[b->c[j]<<8|b->c[k]] + sum; } // for (k = 0; k != 4; ++k) if (p[j<<2|k] < 0.0) p[j<<2|k] = 0.0; } // convert necessary information to glf1_t g->ref_base = ref_base; g->max_mapQ = b->mapQ_max; g->depth = ap->n_bases; float min_p = 1e30; for (j = 0; j != 4; ++j) for (k = j; k < 4; ++k) if (p[j<<2|k] < min_p) min_p = p[j<<2|k]; g->min_lk = min_p > 255.0? 255 : (int)(min_p + 0.5); for (j = c = 0; j != 4; ++j) for (k = j; k < 4; ++k) g->lk[c++] = p[j<<2|k]-min_p > 255.0? 255 : (int)(p[j<<2|k]-min_p + 0.5); free(b); return g; } void glfgen_core(assemble_aux_t *aa) { nst_bfa1_t *l; int k, seqid; FILE *fp_bfa = aa->fp_bfa; gzFile fpout = aa->fpout, fp_map = aa->fp_map; rolling_buf_t *buf = (rolling_buf_t*)calloc(1, sizeof(rolling_buf_t)); assemble_pos_t *pos = (assemble_pos_t*)calloc(1, sizeof(assemble_pos_t)); maqmap_t *mm = maqmap_read_header(fp_map); // skip the sequence names hash_map_char *hash = new hash_map_char; for (k = 0; k != mm->n_ref; ++k) hash->insert(mm->ref_name[k], k); buf->buf = (maqmap1_t*)calloc(ROLLING_BUF_SIZE, sizeof(maqmap1_t)); k = mm->n_mapped_reads; while ((l = nst_load_bfa1(fp_bfa)) != 0) { if (!hash->find(l->name, &seqid)) { nst_delete_bfa1(l); continue; } fprintf(stderr, "[glfgen_core] Processing %s (%d bp)...\n", l->name, l->ori_len); int len = strlen(l->name) + 1; gzwrite(fpout, &len, sizeof(int)); gzwrite(fpout, l->name, len); gzwrite(fpout, &l->ori_len, sizeof(int)); for (int i = 0; i != l->len; ++i) { bit64_t word = l->seq[i]; bit64_t mask = l->mask[i]; for (int j = 31; j >= 0; --j) { int coor = (i<<5) | (31 - j); if (coor >= l->ori_len) break; bit32_t ref_base = (mask>>(j<<1)&3)? 1<<(word>>(j<<1)&3) : 0xf; assemble_get_pos(seqid, coor, fp_map, buf, pos, aa->max_mm, aa->max_err, aa->min_q, aa->is_single, aa->is_pair_only); glf1_t *g = glfgen1_core(pos, aa, ref_base); gzwrite(fpout, g, sizeof(glf1_t)); free(g); } } nst_delete_bfa1(l); } delete hash; maq_delete_maqmap(mm); free(buf->buf); free(buf); free(pos->bases); free(pos); } int maq_glfgen(int argc, char *argv[]) { assemble_aux_t *aa = assemble_parse_opt(argc, argv); glfgen_core(aa); delete_assemble_aux(aa); return 0; } maq-0.7.1/indel_call.cc0000644000076600000240000000730111027727762013260 0ustar lh3staff#include #include #include #include "maqmap.h" #include "assemble.h" #include "bfa.h" #include "stdhash.hh" #include "algo.hh" #include "main.h" #define MIN_INDEL_DIST 10 typedef struct { int coor, score; assemble_indelpos_t indelpos; int type; } indel_info_t; static inline void print_indelpos(const char *name, indel_info_t *ii, nst_bfa1_t *l) { if (ii->indelpos.n_types == 0) return; bit64_t x = ii->indelpos.indels[ii->indelpos.n_types-1]; char indel_bases[MAX_READLEN]; if (ii->type != 'x') { // generate reference sequence char s0[33], s1[33]; int i, j; int l_indel = (signed char)(x&0xff); for (j = 0, i = (ii->coor > 32)? ii->coor - 32 : 0; i < ii->coor; ++i) s0[j++] = (l->mask[i>>5]>>((31-(i&0x1f))<<1)&3)? "ACGT"[l->seq[i>>5]>>((31-(i&0x1f))<<1)&3] : 'N'; s0[j] = 0; for (i = ii->coor, j = 0; i < l->ori_len && i < ii->coor + 32; ++i) s1[j++] = (l->mask[i>>5]>>((31-(i&0x1f))<<1)&3)? "ACGT"[l->seq[i>>5]>>((31-(i&0x1f))<<1)&3] : 'N'; s1[j] = 0; // generate inserted bases if (l_indel > 0) { for (i = 0; i != l_indel; ++i) { int max = -1, max_j = -1; for (j = 0; j != 4; ++j) { if (ii->indelpos.ins_bases[i][j] > max) { max = ii->indelpos.ins_bases[i][j]; max_j = j; } } if (max == 0) break; // stop indel_bases[i] = "ACGT"[max_j]; } indel_bases[i] = 0; } else { for (i = 0; i < -l_indel; ++i) { if (s1[i]) indel_bases[i] = s1[i]; else break; } indel_bases[i] = 0; } // print printf("%s\t%d\t%c\t%d\t%d:%s\t%d\t%d\t%s\t%s\t%d\t@", name, ii->coor+1, ii->type, ii->indelpos.n_reads, int((signed char)(x&0xff)), indel_bases, int(x>>16&0xffff), int(x>>32&0xffff), s0, s1, ii->indelpos.n_ungap); for (i = 0; i != ii->indelpos.n_ungap; ++i) printf("%d,", ii->indelpos.beg_pos[i]); printf("\t@"); for (i = 0; i != ii->indelpos.n_ungap; ++i) printf("%d,", ii->indelpos.end_pos[i]); printf("\t@"); for (i = 0; i != ii->indelpos.n_ungap; ++i) printf("%d,", ii->indelpos.n_mm[i]); printf("\n"); } } int maq_indelpe(int argc, char *argv[]) { if (argc < 3) { fprintf(stderr, "Usage: maq indelpe \n"); return 1; } FILE *fp_bfa = fopen(argv[1], "r"); gzFile fp_map = gzopen(argv[2], "r"); rolling_buf_t *buf = (rolling_buf_t*)calloc(1, sizeof(rolling_buf_t)); maqmap_t *mm = maqmap_read_header(fp_map); hash_map_char *hash_map = new hash_map_char; nst_bfa1_t *l; int k, seqid; indel_info_t curr, last; buf->buf = (maqmap1_t*)calloc(ROLLING_BUF_SIZE, sizeof(maqmap1_t)); for (k = 0; k != mm->n_ref; ++k) hash_map->insert(mm->ref_name[k], k); while ((l = nst_load_bfa1(fp_bfa)) != 0) { if (!hash_map->find(l->name, &seqid)) { nst_delete_bfa1(l); continue; } last.type = 'x'; // not set for (int i = 0; i != l->len; ++i) { for (int j = 31; j >= 0; --j) { int coor = (i<<5) | (31 - j); if (coor >= l->ori_len) break; assemble_get_indelpos(seqid, coor, fp_map, buf, &curr.indelpos); if (curr.indelpos.n_types == 0) continue; // no potential indels int n = curr.indelpos.n_types; bit64_t *p = curr.indelpos.indels; algo_sort(n, p); curr.score = p[n-1]>>48; curr.type = '-'; if (p[n-1]>>48 >= 2) curr.type = '+'; if ((p[n-1]>>16&0xffff) && (p[n-1]>>32&0xffff)) curr.type = '*'; curr.coor = coor; if (last.type != 'x') { if (curr.coor - last.coor < MIN_INDEL_DIST) { if (last.score < curr.score) last.type = '.'; else curr.type = '.'; } } print_indelpos(l->name, &last, l); memcpy(&last, &curr, sizeof(indel_info_t)); } } print_indelpos(l->name, &last, l); nst_delete_bfa1(l); } delete hash_map; gzclose(fp_map); fclose(fp_bfa); return 0; } maq-0.7.1/indel_pe.cc0000644000076600000240000002420011065656462012746 0ustar lh3staff#include #include #include #include #include "bfa.h" #include "stdaln.h" #include "match.hh" #include "read.h" #define MATCH_RATIO 0.8 #define MATCH_LENGTH 20 #define MAPQ_THRES 20 #define MIN_ALT_QUAL 31 extern "C" { int aln_local_core(unsigned char *seq1, int len1, unsigned char *seq2, int len2, const AlnParam *ap, path_t *path, int *path_len, int do_align); }; // this is the scoring systems: typedef struct { int n, m; int *list; } simple_list_t; typedef struct { int n_lname, tot; simple_list_t *lists; } aln_candidate_t; static void destroy(aln_candidate_t *can) { int i; for (i = 0; i != can->n_lname; ++i) free(can->lists[i].list); free(can->lists); free(can); } static inline void add_candidate(aln_candidate_t *can, int seqid, int which, int strand) { simple_list_t *l = can->lists + seqid; ++can->tot; if (l->n == l->m) { l->m += 0x10000; l->list = (int*)realloc(l->list, sizeof(int) * l->m); } l->list[l->n++] = which * strand; } static int cal_insert_size(const match_aux_t *o, const match_data_t *d, double *avg, double *dev) { int i; bit64_t mean, var, n; if (o->size_l == 0) return 1; mean = var = n = 0; for (i = 0; i != d->n_reads>>1; ++i) { match_info_t *match = d->match + i; int alt_qual = bit64_t((match+1)->last_mm1 < match->last_mm1? (match+1)->last_mm1 : match->last_mm1); if ((match->last2 & PAIRFLAG_PAIRED) && match->last_seqid > 0 && alt_qual >= MIN_ALT_QUAL) { bit64_t tmp = var; int dist = match->last_seqid; ++n; mean += dist; var += dist * dist; if (var < tmp) { mean -= dist; var = tmp; --n; fprintf(stderr, "[cal_insert_size] overflow happened.\n"); break; } } } if (n < 20) { fprintf(stderr, "[cal_insert_size] too few reads mapped as pairs. Skip Smith-Waterman alignment.\n"); return 1; } *avg = (double)mean/n; *dev = sqrt((double)var/n - (*avg) * (*avg)); fprintf(stderr, "[cal_insert_size] %lld read pairs counted. insert size: %lf +/- %lf\n", n, *avg, *dev); return 0; } // match_info_t will be modified: // last1 = start position (0 based) // last2 - stop position // seqid1 = mate's seqid1 static aln_candidate_t *maq_make_aln_candidate(const match_aux_t *o, match_data_t *d, double avg, double dev) { aln_candidate_t *can = (aln_candidate_t*)calloc(1, sizeof(aln_candidate_t)); int size[2] = { o->size_l, o->size_r }; can->n_lname = d->n_lname; can->lists = (simple_list_t*)calloc(d->n_lname, sizeof(simple_list_t)); int k, max_dist, min_dist; max_dist = int(avg + 2.0 * dev + 0.5); min_dist = int(avg - 2.0 * dev + 0.5); if (min_dist < o->size_l+1) min_dist = o->size_l+1; if (min_dist < o->size_r+1) min_dist = o->size_r+1; if (max_dist > o->max_dist) max_dist = o->max_dist; for (k = 0; k != d->n_reads>>1; ++k) { match_info_t *match = d->match + (k<<1); match_info_t *nomatch = match + 1; int tmp_dist; int kk = k<<1|1; // kk is the index of the nomatch read if (match->i1 == MA_NO_MATCH && nomatch->i1 == MA_NO_MATCH) continue; if (match->i1 != MA_NO_MATCH && nomatch->i1 != MA_NO_MATCH) continue; if (match->i1 == MA_NO_MATCH) { // swap match = nomatch; nomatch = match - 1; --kk; } if (bit64_t(match->last_mm1) < MAPQ_THRES) continue; if (!o->is_color) { // nucleotide space if (match->p1&1) { // matched on the reverse strand if ((match->p1>>1) - max_dist > 0) { tmp_dist = int(match->p1>>1) - max_dist; nomatch->last1 = (tmp_dist < 0)? 0 : tmp_dist; tmp_dist = int(match->p1>>1) + size[kk&1] - min_dist; nomatch->last2 = (tmp_dist < 0)? 0 : tmp_dist; nomatch->seqid1 = match->seqid1; add_candidate(can, nomatch->seqid1, kk, 1); } } else { // the matched end on the forward strand tmp_dist = int(match->p1>>1) - size[0] - size[1] + min_dist; nomatch->last1 = (tmp_dist < 0)? 0 : tmp_dist; tmp_dist = int(match->p1>>1) - size[1-(kk&1)] + max_dist; nomatch->last2 = (tmp_dist < 0)? 0 : tmp_dist; nomatch->seqid1 = match->seqid1; add_candidate(can, nomatch->seqid1, kk, -1); } } else { // color space if (((match->p1^kk)&1) == 1) { // FF-read2-read1 or RR-read1-read2 if ((match->p1>>1) - max_dist > 0) { tmp_dist = int(match->p1>>1) - max_dist; nomatch->last1 = (tmp_dist < 0)? 0 : tmp_dist; tmp_dist = int(match->p1>>1) + size[kk&1] - min_dist; nomatch->last2 = (tmp_dist < 0)? 0 : tmp_dist; nomatch->seqid1 = match->seqid1; add_candidate(can, nomatch->seqid1, kk, (match->p1&1)? -1 : 1); } } else { tmp_dist = int(match->p1>>1) - size[0] - size[1] + min_dist; nomatch->last1 = (tmp_dist < 0)? 0 : tmp_dist; tmp_dist = int(match->p1>>1) - size[1-(kk&1)] + max_dist; nomatch->last2 = (tmp_dist < 0)? 0 : tmp_dist; nomatch->seqid1 = match->seqid1; add_candidate(can, nomatch->seqid1, kk, (match->p1&1)? -1 : 1); } } } fprintf(stderr, "[maq_make_aln_candidate] %d candidates added\n", can->tot); return can; } static void align_candidate(const nst_bfa1_t *l, const match_aux_t *o, const simple_list_t *list, const longreads_t *lr, match_data_t *d) { bit8_t *ref_seq, *read_seq, *read_qual; int i, j, size[2] = { o->size_l, o->size_r }; int n_ins, n_del, n_sub; n_ins = n_del = n_sub = 0; ref_seq = (bit8_t*)malloc(l->ori_len); read_seq = (bit8_t*)malloc(MAX_READLEN); read_qual = (bit8_t*)malloc(MAX_READLEN); for (i = 0; i != l->len; ++i) { bit64_t seqi = l->seq[i], maski = l->mask[i]; for (j = 31; j >= 0; --j) { int coor = (i << 5) | (31 - j); if (coor >= l->ori_len) break; ref_seq[coor] = ((maski>>(j<<1)&3) != 3)? 4 : seqi>>(j<<1)&3; } } for (i = 0; i != list->n; ++i) { int x = list->list[i]; int strand = 1; if (x < 0) { // reverse strand strand = -1; x = -x; } int s = size[x&1]; match_info_t *match = d->match + x; match_info_t *mate = (x&1)? match - 1: match + 1; bit8_t *seq = lr->seq[x]; // generate read sequence if (strand > 0) { // forward strand for (j = 0; j < s; ++j) { read_seq[j] = (seq[j] == 0)? 4 : seq[j]>>6&3; read_qual[j] = seq[j]&0x3f; } } else { // reverse strand if (!o->is_color) { // nucleotide space for (j = 0; j < s; ++j) { read_seq[s-1-j] = (seq[j] == 0)? 4 : 3 - (seq[j]>>6&3); read_qual[s-1-j] = seq[j]&0x3f; } } else { // color space for (j = 0; j < s; ++j) { read_seq[s-1-j] = (seq[j] == 0)? 4 : seq[j]>>6&3; read_qual[s-1-j] = seq[j]&0x3f; } } } path_t *path = (path_t*)malloc((match->last2 - match->last1 + 10 + s) * sizeof(path_t)); int path_len = 0, begin, end, do_skip = 0; begin = match->last1; end = match->last2; if (begin < l->ori_len) { if (end > l->ori_len) end = l->ori_len; if (end - begin > s) aln_local_core(ref_seq + begin, end - begin, read_seq, s, &aln_param_bwa, path, &path_len, 1); else do_skip = 1; } else do_skip = 1; if (path_len < MATCH_LENGTH || (int)match->last1 + path[path_len-1].i - path[path_len-1].j < 0) do_skip = 1; if (do_skip) { free(path); continue; } int match_length = MATCH_LENGTH; if (match_length < int(MATCH_RATIO * s + 0.5)) match_length = int(MATCH_RATIO * s + 0.5); if (path->i - path[path_len-1].i >= match_length && path->j - path[path_len-1].j >= match_length) { int tmpI = 0, tmpD = 0; for (j = path_len-2; j >= 0; --j) { path_t *p = path + j; if (p->ctype == FROM_I && (p+1)->ctype != FROM_I) ++tmpI; if (p->ctype == FROM_D && (p+1)->ctype != FROM_D) ++tmpD; } if (tmpI + tmpD <= 1) { // just one indel site int indel_j = 0, indel_len; int mm, err, n_match; indel_len = mm = err = 0; if (tmpI == 1) ++n_ins; else if (tmpD == 1) ++n_del; else ++n_sub; // get the exact indel coordinate and sum of errors, etc. for (j = path_len - 2, n_match = 1; j >= 0; --j) { path_t *p = path + j; if (p->ctype != FROM_M) { if ((p+1)->ctype == FROM_M) indel_j = j + 1; ++indel_len; } else { // this is a match/mismatch, not indel ++n_match; if (ref_seq[begin + p->i - 1] != read_seq[p->j - 1]) { // mismatch ++mm; err += read_qual[p->j - 1]; } } } // calculate coordinates, etc. path_t *pathb = path + path_len - 1; if (tmpD == 1) indel_len = -indel_len; match->i1 = 1; match->p1 = (bit32_t)(begin + (pathb->i - pathb->j + size[x&1] - 1)) << 1 | (strand>0? 0:1); int dist = (mate->p1>>1 > match->p1>>1)? int(mate->p1>>1) - int(match->p1>>1) + size[x&1] : -(int(match->p1>>1) - int(mate->p1>>1) + size[1-(x&1)]); match->last_seqid = dist; match->last1 = (indel_len == 0)? 0 : path[indel_j].j; // indel position match->last_mm1 = matches_t(bit8_t(indel_len)<<8) | ((x&1)? (match-1)->last_mm1 : (match+1)->last_mm1); match->last_mm2 = ((err <= 0xff)? err:0xff)<<8 | ((mm <= 15)? mm:15); // n_mismatch and sum of err // update mate mate->last_seqid = -dist; // set/update flag if (!o->is_color) { // nucleotide space match->last2 = PAIRFLAG_SW | PAIRFLAG_FR; // flag mate->last2 = PAIRFLAG_FR | PAIRFLAG_PAIRED; } else { match->last2 = PAIRFLAG_SW | (strand>0? PAIRFLAG_FF : PAIRFLAG_RR); mate->last2 = PAIRFLAG_PAIRED | (strand>0? PAIRFLAG_FF : PAIRFLAG_RR); } } } free(path); } free(ref_seq); free(read_seq); free(read_qual); //fprintf(stderr, "[align_candidate] %s: (%d, %d, %d) out of %d\n", l->name, n_ins, n_del, n_sub, list->n); } void maq_indel_pe(FILE *fp_bfa, const match_aux_t *o, const longreads_t *lr, match_data_t *d) { aln_candidate_t *can; clock_t begin = clock(); double avg, dev; nst_bfa1_t *l; int ref_id = 0; avg = dev = 0.0; if (o->is_sw == 0) { fprintf(stderr, "[maq_indel_pe] Smith-Waterman alignment is disabled.\n"); return; } if (o->size_r == 0 || o->RF_max_dist) { fprintf(stderr, "[maq_indel_pe] the indel detector only works with short-insert mate-pair reads.\n"); return; } if (cal_insert_size(o, d, &avg, &dev) != 0) return; can = maq_make_aln_candidate(o, d, avg, dev); fprintf(stderr, "[maq_indel_pe] %d candidates for alignment\n", can->tot); rewind(fp_bfa); while ((l = nst_load_bfa1(fp_bfa)) != 0) { align_candidate(l, o, can->lists + (ref_id++), lr, d); nst_delete_bfa1(l); } fprintf(stderr, "[maq_indel_pe] CPU time: %.3lf sec\n", (double)(clock() - begin) / CLOCKS_PER_SEC); destroy(can); } maq-0.7.1/indel_soa.cc0000644000076600000240000001164510773300343013122 0ustar lh3staff// State-of-art indel detector #include #include #include #include #include #include "stdhash.hh" #include "bfa.h" #include "main.h" #include "match.hh" static int MM_PENALTY = 2; static int SEARCH_WIN = 5; static int SKIP_WIN = 10; typedef struct { int i5, i3; bit8_t c3, c5, min; float score; } indel_candidate_t; // counter - empty:8, 5'-clipping:8, 3'-clipping:8, cross:8 static void fill_counter(bit32_t *counter, int seqid, nst_bfa1_t *l, gzFile fp_map) { maqmap1_t *m1, mm1; m1 = &mm1; while (maqmap_read1(fp_map, m1)) { if (int(m1->seqid) < seqid) continue; if (int(m1->seqid) > seqid) break; // WARNING: the last read will be lost int begin, end, mid = (m1->pos>>1) + (m1->size>>1); int i, j, score, max, max_k, k; bit64_t s; // right clipping i = mid >> 5; j = mid & 0x1f; for (k = m1->size>>1, max_k = -1, score = max = 0, s = l->seq[i]; k != m1->size; ++k, ++j) { if (j == 32) { // jump to the next word s = l->seq[++i]; j = 0; } if (int(m1->seq[k]>>6) == int(s>>(31-j<<1)&3)) ++score; else score -= MM_PENALTY; if (score > max) { max = score; max_k = k; } } end = max_k; // > end should be clipped out // left clipping i = mid >> 5; j = mid & 0x1f; for (k = m1->size>>1, max_k = -1, score = max = 0, s = l->seq[i]; k >= 0; --k, --j) { if (j == -1) { // jump to the previous word s = l->seq[--i]; j = 31; } if (int(m1->seq[k]>>6) == int(s>>(31-j<<1)&3)) ++score; else score -= MM_PENALTY; if (score > max) { max = score; max_k = k; } } begin = max_k; // < begin should be clipped out // count int pos = m1->pos>>1; k = pos + begin - 1; if (begin != 0 && k >= 0 && k < l->ori_len && (counter[k]>>16&0xff) < 0xff) counter[k] += 0x10000; k = pos + end; if (end != m1->size - 1 && k >= 0 && k < l->ori_len && (counter[k]>>8&0xff) < 0xff) counter[k] += 0x100; for (k = pos + begin + SEARCH_WIN - 1; k < pos + end - SEARCH_WIN + 1; ++k) if (k < l->ori_len && k >= 0 && (counter[k]&0xff) < 0xff) ++counter[k]; } } static void pickup_indel(bit32_t *counter, nst_bfa1_t *l) { int i, j, k, n; long double mean = 0.0; indel_candidate_t best, curr; memset(&best, 0, sizeof(indel_candidate_t)); memset(&curr, 0, sizeof(indel_candidate_t)); for (i = n = 0; i != l->len; ++i) { bit64_t mask = l->mask[i]; for (j = 31; j >= 0; --j) { int coor = (i<<5) | (31-j); if (coor >= l->ori_len) break; if (mask>>(j<<1)&3) { ++n; mean += counter[coor]&0xff; } } } mean /= n; // mean of covered depth int depth_thres = int(mean * 0.5 + 0.5); best.score = -100.0; best.i3 = best.i5 = 0x7fffffff; // for (i = 0; i != l->ori_len; ++i) // fprintf(stderr, "%d\t%d\t%d\t%d\n", i+1, counter[i]&0xff, counter[i]>>8&0xff, counter[i]>>16&0xff); for (i = 0; i != l->ori_len; ++i) { bit32_t c = counter[i]; if ((c>>8&0xff) || (c>>16&0xff)) { // initiate the search int c3 = -1, c5 = -1; int i3 = -1, i5 = -1; for (k = i; k != l->ori_len && k <= i + SEARCH_WIN; ++k) { if (int(counter[k]>>16&0xff) > c5) { c5 = counter[k]>>16&0xff; i5 = k; } if (int(counter[k]>>8&0xff) > c3) { c3 = counter[k]>>8&0xff; i3 = k; } } if (c3 <= 0 || c5 <= 0) continue; curr.i3 = i3; curr.i5 = i5; curr.c3 = c3; curr.c5 = c5; int begin = (i3 < i5)? i3 : i5; int end = (i5 > i3)? i5 : i3; int min = 0xffff; for (k = begin; k <= end; ++k) if (int(counter[k]&0xff) < min) min = counter[k]&0xff; curr.min = min; curr.score = 2.0 * (curr.c3 + curr.c5 - min) / mean; if (begin - best.i3 <= SKIP_WIN || begin - best.i5 <= SKIP_WIN) { if (curr.score > best.score) best = curr; } else { if (best.score >= -0.5 && best.min < depth_thres) printf("%s\t%d\t%d\t%d\t%d\t%d\t%d\n", l->name, best.i3+1, best.i5-best.i3, best.min, best.c3, best.c5, best.c3+best.c5-best.min); best = curr; } } } } static void indel_soa_core(FILE *fp_bfa, gzFile fp_map) { nst_bfa1_t *l; int seqid = 0, k; hash_map_char *hash_map = new hash_map_char; maqmap_t *mm = maqmap_read_header(fp_map); // skip the sequence names for (k = 0; k != mm->n_ref; ++k) hash_map->insert(mm->ref_name[k], k); k = mm->n_mapped_reads; while ((l = nst_load_bfa1(fp_bfa)) != 0) { if (!hash_map->find(l->name, &seqid)) { nst_delete_bfa1(l); continue; } bit32_t *counter = (bit32_t*)calloc(l->ori_len, 4); fill_counter(counter, seqid, l, fp_map); pickup_indel(counter, l); free(counter); nst_delete_bfa1(l); } maq_delete_maqmap(mm); delete hash_map; } static int usage() { fprintf(stderr, "Usage: maq indelsoa \n"); return 1; } int ma_indelsoa(int argc, char *argv[]) { int c; while ((c = getopt(argc, argv, "")) >= 0) { } if (argc - optind < 2) return usage(); FILE *fp_bfa = fopen(argv[optind], "r"); gzFile fp_map = gzopen(argv[optind+1], "r"); assert(fp_bfa); assert(fp_map); indel_soa_core(fp_bfa, fp_map); fclose(fp_bfa); gzclose(fp_map); return 0; } maq-0.7.1/install-sh0000755000076600000240000003160010756564017012666 0ustar lh3staff#!/bin/sh # install - install a program, script, or datafile scriptversion=2006-10-14.15 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" posix_glob= posix_mkdir= # Desired mode of installed file. mode=0755 chmodcmd=$chmodprog chowncmd= chgrpcmd= stripcmd= rmcmd="$rmprog -f" mvcmd="$mvprog" src= dst= dir_arg= dstarg= no_target_directory= usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: -c (ignored) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. --help display this help and exit. --version display version info and exit. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) shift continue;; -d) dir_arg=true shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; --help) echo "$usage"; exit $?;; -m) mode=$2 shift shift case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t) dstarg=$2 shift shift continue;; -T) no_target_directory=true shift continue;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac done if test $# -ne 0 && test -z "$dir_arg$dstarg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dstarg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dstarg" shift # fnord fi shift # arg dstarg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dstarg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dstarg # Protect names starting with `-'. case $dst in -*) dst=./$dst ;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dstarg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix=/ ;; -*) prefix=./ ;; *) prefix= ;; esac case $posix_glob in '') if (set -f) 2>/dev/null; then posix_glob=true else posix_glob=false fi ;; esac oIFS=$IFS IFS=/ $posix_glob && set -f set fnord $dstdir shift $posix_glob && set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # Now rename the file to the real destination. { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \ || { # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { if test -f "$dst"; then $doit $rmcmd -f "$dst" 2>/dev/null \ || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \ && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\ || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } } || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: maq-0.7.1/main.c0000644000076600000240000001724311065656462011761 0ustar lh3staff#include #include #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifndef PACKAGE_VERSION #define PACKAGE_VERSION "dummy" #endif #include "main.h" static int usage() { fprintf(stderr, "\n"); fprintf(stderr, "Program: maq (Mapping and Assembly with Qualities)\n"); fprintf(stderr, "Version: %s\n", PACKAGE_VERSION); fprintf(stderr, "Contact: Heng Li \n\n"); fprintf(stderr, "Usage: maq [options]\n\n"); fprintf(stderr, "Key commands:\n"); fprintf(stderr, " fasta2bfa convert FASTA to BFA format\n"); fprintf(stderr, " fastq2bfq convert FASTQ to BFQ format\n"); fprintf(stderr, " map map reads to the reference\n"); // valgrind on 10AUG2007 fprintf(stderr, " mapmerge merge several alignments\n"); // valgrind on 11JUL2007 fprintf(stderr, " rmdup remove pairs with identical outer coordinates (PE)\n"); fprintf(stderr, " indelpe indel calling (PAIRED READS ONLY)\n"); fprintf(stderr, " indelsoa state-of-art homozygous indel detection\n"); // valgrind on 11JUL2007 fprintf(stderr, " assemble call the consensus\n"); // valgrind on 11JUL2007 fprintf(stderr, " glfgen generate .glz consensus\n\n"); fprintf(stderr, "Format converting:\n"); fprintf(stderr, " sol2sanger convert Solexa FASTQ to standard/Sanger FASTQ\n"); fprintf(stderr, " mapass2maq convert mapass2's map format to maq's map format\n"); fprintf(stderr, " bfq2fastq convert BFQ to FASTQ format\n\n"); fprintf(stderr, "Information extracting:\n"); fprintf(stderr, " mapview view the mapping alignment\n"); // valgrind on 11JUL2007 fprintf(stderr, " mapstat statistics about a .map file\n"); fprintf(stderr, " mapcheck a QC command\n"); // 11JUL2007: valgrind failed on "-g -O2 -m64"; passed on "-g" fprintf(stderr, " pileup view the alignment in a 'pileup' like format\n"); // valgrind on 11JUL2007 fprintf(stderr, " cns2fq extract the consensus sequences from a CNS file\n"); fprintf(stderr, " cns2snp extract details from a CNS file at the SNP sites\n"); fprintf(stderr, " snpreg calculate the length of regions where SNPs can be called\n"); fprintf(stderr, " cns2view extract details from a CNS file at all sites\n"); fprintf(stderr, " cns2ref extract the reference sequences from a CNS file\n"); fprintf(stderr, " cns2win extract details in a window\n\n"); fprintf(stderr, "SOLiD related commands:\n"); fprintf(stderr, " fasta2csfa convert FASTA to colour-space FASTA\n"); fprintf(stderr, " csmap2nt convert colour-space .map to nucleotide .map\n\n"); // fprintf(stderr, " cns2cssnp SNP calling for AB SOLiD\n\n"); fprintf(stderr, "Simulation related commands:\n"); fprintf(stderr, " fakemut simulate references: randomly generate mutations\n"); fprintf(stderr, " simutrain train parameters for simulation\n"); fprintf(stderr, " simulate simulate reads: randomly generate sequencing errors\n"); fprintf(stderr, " simucns evaluate consensus based on simulation\n"); fprintf(stderr, " simustat evaluate alignment based on simulation\n\n"); fprintf(stderr, "Miscellaneous/advanced utilities:\n"); fprintf(stderr, " submap extract a region from a map file\n"); fprintf(stderr, " mapvalidate validate a .map file\n"); // fprintf(stderr, " rbcc reference based consensus calling\n"); fprintf(stderr, " subpos extract a subset of positions\n"); fprintf(stderr, " eland2maq convert eland alignment to maq\n"); fprintf(stderr, " export2maq convert Solexa's export alignment to maq\n"); fprintf(stderr, " novo2maq convert novoalign/novopaired alignment to maq\n"); #ifdef MAQ_SHOW_EXPERIMENTAL fprintf(stderr, " abpair show the abnormal pairs (EXPERIMENTAL)\n"); fprintf(stderr, " paircov paired coverage (EXPERIMENTAL)\n"); fprintf(stderr, " altchr change reference according to SNPs (EXPERIMENTAL)\n"); #endif fprintf(stderr, "\n"); return 1; } int main(int argc, char *argv[]) { if (argc < 2) return usage(); if (strcmp(argv[1], "fasta2bfa") == 0) return ma_fasta2bfa(argc-1, argv+1); else if (strcmp(argv[1], "fastq2bfq") == 0) return ma_fastq2bfq(argc-1, argv+1); else if (strcmp(argv[1], "map") == 0) return ma_match(argc-1, argv+1); else if (strcmp(argv[1], "mapmerge") == 0) return ma_mapmerge(argc-1, argv+1); else if (strcmp(argv[1], "indelpe") == 0) return maq_indelpe(argc-1, argv+1); else if (strcmp(argv[1], "indelsoa") == 0) return ma_indelsoa(argc-1, argv+1); else if (strcmp(argv[1], "assemble") == 0) return ma_assemble(argc-1, argv+1); else if (strcmp(argv[1], "glfgen") == 0) return maq_glfgen(argc-1, argv+1); else if (strcmp(argv[1], "sol2sanger") == 0) return ma_sol2sanger(argc-1, argv+1); else if (strcmp(argv[1], "mapass2maq") == 0) return ma_mapass2maq(argc-1, argv+1); else if (strcmp(argv[1], "bfq2fastq") == 0) return ma_bfq2fastq(argc-1, argv+1); else if (strcmp(argv[1], "mapview") == 0) return ma_mapview(argc-1, argv+1); else if (strcmp(argv[1], "mapcheck") == 0) return ma_mapcheck(argc-1, argv+1); else if (strcmp(argv[1], "pileup") == 0) return ma_pileup(argc-1, argv+1); else if (strcmp(argv[1], "cns2ref") == 0) return ma_cns2ref(argc-1, argv+1); else if (strcmp(argv[1], "cns2fq") == 0) return ma_cns2fq(argc-1, argv+1); else if (strcmp(argv[1], "cns2snp") == 0) return ma_cns2snp(argc-1, argv+1); else if (strcmp(argv[1], "snpreg") == 0) return ma_snpreg(argc-1, argv+1); else if (strcmp(argv[1], "cns2view") == 0) return ma_cns2view(argc-1, argv+1); else if (strcmp(argv[1], "cns2win") == 0) return ma_cns2win(argc-1, argv+1); else if (strcmp(argv[1], "fasta2csfa") == 0) return ma_fasta2csfa(argc-1, argv+1); else if (strcmp(argv[1], "csmap2nt") == 0) return maq_csmap2nt(argc-1, argv+1); else if (strcmp(argv[1], "cns2cssnp") == 0) return ma_cns2cssnp(argc-1, argv+1); else if (strcmp(argv[1], "fakemut") == 0) return ma_fakemut(argc-1, argv+1); else if (strcmp(argv[1], "simutrain") == 0) return maq_simutrain(argc-1, argv+1); else if (strcmp(argv[1], "simulate") == 0) return maq_simulate(argc-1, argv+1); else if (strcmp(argv[1], "simucns") == 0) return maq_simucns(argc-1, argv+1); else if (strcmp(argv[1], "simustat") == 0) return maq_simustat(argc-1, argv+1); else if (strcmp(argv[1], "match") == 0) return ma_match(argc-1, argv+1); else if (strcmp(argv[1], "rmdup") == 0) return maq_rmdup(argc-1, argv+1); else if (strcmp(argv[1], "submap") == 0) return maq_submap(argc-1, argv+1); else if (strcmp(argv[1], "mapvalidate") == 0) return ma_mapvalidate(argc-1, argv+1); else if (strcmp(argv[1], "rbcc") == 0) return ma_rbcc(argc-1, argv+1); else if (strcmp(argv[1], "mapstat") == 0) return ma_mapstat(argc-1, argv+1); else if (strcmp(argv[1], "subpos") == 0) return ma_subpos(argc-1, argv+1); else if (strcmp(argv[1], "eland2maq") == 0) return maq_eland2maq(argc-1, argv+1); else if (strcmp(argv[1], "export2maq") == 0) return maq_export2maq(argc-1, argv+1); else if (strcmp(argv[1], "novo2maq") == 0) return maq_novo2maq(argc-1, argv+1); else if (strcmp(argv[1], "abpair") == 0) return ma_abpair(argc-1, argv+1); else if (strcmp(argv[1], "paircov") == 0) return ma_paircov(argc-1, argv+1); else if (strcmp(argv[1], "altchr") == 0) return ma_altchr(argc-1, argv+1); else if (strcmp(argv[1], "catfilter") == 0) return maq_catfilter(argc-1, argv+1); else if (strcmp(argv[1], "breakpair") == 0) return maq_breakpair(argc-1, argv+1); else { fprintf(stderr, "ERROR: unrecognized command '%s'\n", argv[1]); return 2; } return 0; } maq-0.7.1/main.h0000644000076600000240000000465511065656462011771 0ustar lh3staff#ifndef LH3_MAIN_H #define LH3_MAIN_H #ifdef __cplusplus extern "C" { #endif int ma_fasta2bfa(int argc, char *argv[]); /* in fasta2bfa.c */ int ma_fastq2bfq(int argc, char *argv[]); int ma_fasta2csfa(int argc, char *argv[]); /* in fasta2bfa.c */ int ma_match(int argc, char *argv[]); int ma_mapview(int argc, char *argv[]); /* in maqmap.c */ int ma_mapstat(int argc, char *argv[]); int ma_mapmerge(int argc, char *argv[]); int ma_pileup(int argc, char *argv[]); int ma_assemble(int argc, char *argv[]); int maq_glfgen(int argc, char *argv[]); /* in glfgen.cc */ int ma_cns2ref(int argc, char *argv[]); int ma_snpreg(int argc, char *argv[]); /* in subsnp.cc */ int ma_cns2fq(int argc, char *argv[]); /* in aux_utils.c */ int ma_cns2snp(int argc, char *argv[]); int ma_cns2cssnp(int argc, char *argv[]); int ma_cns2view(int argc, char *argv[]); int ma_cns2win(int argc, char *argv[]); int ma_mapcheck(int argc, char *argv[]); int ma_rbcc(int argc, char *argv[]); int ma_subpos(int argc, char *argv[]); int ma_sol2sanger(int argc, char *argv[]); int ma_bfq2fastq(int argc, char *argv[]); int ma_fakemut(int argc, char *argv[]); /* in fasta2bfa.c */ int ma_abpair(int argc, char *argv[]); /* in pair_stat.cc */ int ma_paircov(int argc, char *argv[]); /* in pair_stat.cc */ int ma_indelsoa(int argc, char *argv[]); /* in indel_soa.cc */ int ma_mapass2maq(int argc, char *argv[]); /* in maqmap_conv.c */ int ma_altchr(int argc, char *argv[]); /* in altchr.cc */ int maq_submap(int argc, char *argv[]); /* in submap.c */ int ma_mapvalidate(int argc, char *argv[]); /* in maqmap.c */ int maq_rmdup(int argc, char *argv[]); /* in rmdup.cc */ int maq_simulate(int argc, char *argv[]); /* in simulate.c */ int maq_simutrain(int argc, char *argv[]); /* in simulate.c */ int maq_simustat(int argc, char *argv[]); /* in simulate.c */ int maq_indelpe(int argc, char *argv[]); /* in indel_call.cc */ int maq_eland2maq(int argc, char *argv[]); /* in eland2maq.cc */ int maq_export2maq(int argc, char *argv[]); /* in eland2maq.cc */ int maq_novo2maq(int argc, char *argv[]); /* in eland2maq.cc */ int maq_simucns(int argc, char *argv[]); /* in subsnp.cc */ int maq_catfilter(int argc, char *argv[]); /* in read.cc */ int maq_csmap2nt(int argc, char *argv[]); /* in csmap2ntmap.cc */ int maq_breakpair(int argc, char *argv[]); /* in break_pair.c */ #ifdef __cplusplus } #endif #endif maq-0.7.1/mapcheck.cc0000644000076600000240000001763011043135375012742 0ustar lh3staff#include #include #include #include #include #include #include "bfa.h" #include "assemble.h" #include "match.hh" #include "main.h" #include "stdhash.hh" #define MIN_BASEQ 25 #define MAX_BASEQ 33 #define MAX_MM 3 static hash_set_misc *load_snp(FILE *fp, hash_map_char *names) { char name[256]; int pos, c, seqid; hash_set_misc *hash = new hash_set_misc; while (fscanf(fp, "%s%d", name, &pos) == 2) { if (names->find(name, &seqid)) hash->insert((bit64_t)seqid<<32 | (pos-1)); while ((c = fgetc(fp)) != EOF && c != '\n'); } fprintf(stderr, "[load_snp] %u SNPs are loaded.\n", hash->size()); return hash; } static int usage() { fprintf(stderr, "Usage: maq mapcheck [options] \n"); fprintf(stderr, "Options: -s use single-end mapping qualities\n"); fprintf(stderr, " -Q INT maximum sum of errors [60]\n"); fprintf(stderr, " -m INT maximum number of mismatches [7]\n"); fprintf(stderr, " -q INT minimum mapping quality [41]\n"); fprintf(stderr, " -S INT quality scale [10]\n"); fprintf(stderr, " -P FILE polymorphic sites [null]\n"); fprintf(stderr, " -c print count instead of fraction\n"); return 1; } int ma_mapcheck(int argc, char *argv[]) { int c, is_single = 0, max_err = -1, min_mapQ = 41, max_mm = 7, qscale = 10, is_count = 0; char *poly_file = 0; while ((c = getopt(argc, argv, "sQ:q:m:S:cP:")) >= 0) { switch (c) { case 's': is_single = 1; break; case 'Q': max_err = atoi(optarg); break; case 'm': max_mm = atoi(optarg); break; case 'q': min_mapQ = atoi(optarg); break; case 'S': qscale = atoi(optarg); break; case 'c': is_count = 1; break; case 'P': poly_file = strdup(optarg); break; } } if (argc - optind < 2) return usage(); FILE *fp_bfa, *fpout; gzFile fp_map; nst_bfa1_t *l; int seqid; bit64_t n_ref, n_bases, n_cov, tot_len, n_ref_nuc[4], n_rea_nuc[4]; bit64_t n_01bases, n_01ref; n_ref = n_bases = tot_len = n_01bases = n_01ref = n_cov = 0; n_ref_nuc[0] = n_ref_nuc[1] = n_ref_nuc[2] = n_ref_nuc[3] = 0; n_rea_nuc[0] = n_rea_nuc[1] = n_rea_nuc[2] = n_rea_nuc[3] = 0; fpout = stdout; fp_bfa = fopen(argv[optind], "r"); fp_map = gzopen(argv[optind+1], "r"); int k, max_q; bit64_t trans[MAX_READLEN][16], qmm[MAX_READLEN][64], qmm2[MAX_READLEN][64], n_nuc[MAX_READLEN][4]; rolling_buf_t *buf = (rolling_buf_t*)calloc(1, sizeof(rolling_buf_t)); buf->buf = (maqmap1_t*)calloc(ROLLING_BUF_SIZE, sizeof(maqmap1_t)); assemble_pos_t *pos = (assemble_pos_t*)calloc(1, sizeof(assemble_pos_t)); maqmap_t *mm = maqmap_read_header(fp_map); // skip the sequence names hash_map_char *hash = new hash_map_char; for (k = 0; k != mm->n_ref; ++k) hash->insert(mm->ref_name[k], k); hash_set_misc *snp = 0; if (poly_file) { FILE *f; assert(f = fopen(poly_file, "r")); snp = load_snp(f, hash); fclose(f); free(poly_file); } k = mm->n_mapped_reads; max_q = 0; // maximum base quality memset(trans, 0, MAX_READLEN * 16 * sizeof(bit64_t)); // ref->read transition memset(qmm, 0, MAX_READLEN * 64 * sizeof(bit64_t)); // base-qual count for mismatches memset(qmm2, 0, MAX_READLEN * 64 * sizeof(bit64_t)); // base-qual count for all bases memset(n_nuc, 0, MAX_READLEN * 4 * sizeof(bit64_t)); while ((l = nst_load_bfa1(fp_bfa)) != 0) { // the main loop for counting if (!hash->find(l->name, &seqid)) { nst_delete_bfa1(l); continue; } fprintf(stderr, "[ma_mapcheck] processing %s...\n", l->name); ++n_ref; tot_len += l->ori_len; for (int i = 0; i != l->len; ++i) { bit64_t word = l->seq[i]; bit64_t mask = l->mask[i]; for (int j = 31; j >= 0; --j) { int coor = (i<<5) | (31 - j); int depth01 = 0, c01 = 0; if (coor >= l->ori_len) break; if ((mask>>(j<<1)&3) == 0) continue; // the reference base is N, a gap assemble_get_pos(seqid, coor, fp_map, buf, pos, max_mm, max_err, 0, is_single, 0); n_bases += pos->n_bases; ++n_ref_nuc[word>>(j<<1)&3]; if (pos->n_bases) ++n_cov; if (pos->n_bases == 0) continue; // no need to proceed if (snp && snp->find((bit64_t)seqid<<32 | coor)) continue; // known SNP site for (k = 0; k != pos->n_bases; ++k) { assemble_posinfo_t *p = pos->bases + k; int bread = p->info >> 16 & 3; // read base int bref = word >> (j<<1) & 3; // ref base if (p->info>>22&1) ++n_rea_nuc[bread]; // read base is not N, count if ((mask>>(j<<1)&3) && (p->info>>22&1) && (p->info&0xff) >= (bit32_t)min_mapQ) { // not N, high mapQ if (p->info>>18&1) { // on the reverse strand bref = 3 - bref; bread = 3 - bread; } ++n_nuc[p->pos][bread]; if ((p->info>>24&0x3f)/qscale > (bit8_t)max_q) max_q = (p->info>>24&0x3f)/qscale; ++trans[p->pos][bref<<2 | bread]; if (bref != bread) ++qmm[p->pos][(p->info>>24&0x3f)/qscale]; ++qmm2[p->pos][(p->info>>24&0x3f)/qscale]; } if ((p->info>>19&0x3) <= 1) { ++depth01; c01 += p->c[p->info>>19&0x3]; } } if (pos->n_bases > 0 && depth01 == c01) { // all the reads can be mapped "uniquely" at first 24bp ++n_01ref; n_01bases += pos->n_bases; } } } nst_delete_bfa1(l); } gzclose(fp_map); fclose(fp_bfa); maq_delete_maqmap(mm); delete snp; delete hash; free(buf->buf); free(buf); free(pos->bases); free(pos); // now print out the results bit64_t sum, tot_non; printf("Number of reference sequences: %llu\n", n_ref); for (k = sum = 0; k != 4; ++k) sum += n_ref_nuc[k]; tot_non = sum; printf("Length of reference sequences exlcuding gaps: %llu\n", tot_non); printf("Length of gaps in the reference sequences: %llu\n", tot_len - tot_non); printf("Length of non-gap regions covered by reads: %llu\n", n_cov); printf("Length of 24bp unique regions of the reference: %llu\n", n_01ref); printf("Reference nucleotide composition: A: %.2f%%, C: %.2f%%, G: %.2f%%, T: %.2f%%\n", 100.0*n_ref_nuc[0]/sum, 100.0*n_ref_nuc[1]/sum, 100.0*n_ref_nuc[2]/sum, 100.0*n_ref_nuc[3]/sum); for (k = sum = 0; k != 4; ++k) sum += n_rea_nuc[k]; printf("Reads nucleotide composition: A: %.2f%%, C: %.2f%%, G: %.2f%%, T: %.2f%%\n", 100.0*n_rea_nuc[0]/sum, 100.0*n_rea_nuc[1]/sum, 100.0*n_rea_nuc[2]/sum, 100.0*n_rea_nuc[3]/sum); printf("Average depth across all non-gap regions: %.3lf\n", (double)n_bases / tot_non); printf("Average depth across 24bp unique regions: %.3lf\n\n", n_01bases / (tot_non * ((double)n_01ref/n_cov))); printf(" A C G T : AC AG AT CA CG CT GA GC GT TA TC TG :"); for (k = 0; k <= max_q; ++k) printf("%3d?", k); printf(" :"); for (k = 0; k <= max_q; ++k) printf("%3d?", k); putchar('\n'); for (k = 0; k != MAX_READLEN; ++k) { int i, j; bit64_t sum, sum2, *q, *p = trans[k]; // scale to 999 sum2 = 0; for (i = 0; i != 4; ++i) { sum = 0; q = p + (i<<2); for (j = 0; j != 4; ++j) sum += q[j]; sum2 += sum; for (j = 0; j != 4; ++j) q[j] = sum? int(999.0 * q[j] / sum + 0.5) : 0; } if (sum2 == 0) break; printf("%2d", k+1); // composition for (i = sum = 0; i != 4; ++i) sum += n_nuc[k][i]; for (i = 0; i != 4; ++i) printf("%5.1f", sum ? 100.0 * n_nuc[k][i] / sum : -1); printf(" :"); // print trans[][] for (i = 0; i != 4; ++i) for (j = 0; j != 4; ++j) if (i != j) printf("%4llu", p[i<<2 | j]); printf(" :"); p = qmm[k]; q = qmm2[k]; if (!is_count) { // scale to 999 and print for (i = 0; i <= max_q; ++i) p[i] = int(999.0 * (p[i] + 0.1/max_q) / (q[i] + 0.1) + 0.5); for (i = 0, sum = 0; i <= max_q; ++i) sum += q[i]; for (i = 0; i <= max_q; ++i) q[i] = int(999.0 * (q[i] + 0.1/max_q) / (sum + 0.1) + 0.5); for (i = 0; i <= max_q; ++i) printf("%4llu", q[i]); printf(" :"); for (i = 0; i <= max_q; ++i) printf("%4llu", p[i]); } else { // print count for (i = 0; i <= max_q; ++i) printf("\t%llu", q[i]); printf(" :"); for (i = 0; i <= max_q; ++i) printf("\t%llu", p[i]); } putchar('\n'); } return 0; } maq-0.7.1/maq.10000644000076600000240000011777111067172750011533 0ustar lh3staff.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 .\" .\" Standard preamble: .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .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. | will give a .\" real vertical bar. \*(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-|\(bv\*(Tr .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" '' 'br\} .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .\" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" 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 "MAQ 1" .TH MAQ 1 "2008-09-22" "maq-0.7.1" "Bioinformatics Tools" .SH "NAME" Maq \- Mapping and Assembly with Qualities .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBmaq\fR \fIcommand\fR [\fIoptions\fR] \fIarguments\fR .PP \&\fBmaq.pl\fR \fIcommand\fR [\fIoptions\fR] \fIarguments\fR .SH "DESCRIPTION" .IX Header "DESCRIPTION" Maq is a software that builds mapping assemblies from short reads generated by the next-generation sequencing machines. It is particularly designed for Illumina-Solexa 1G Genetic Analyzer, and has a preliminary functionality to handle \s-1AB\s0 SOLiD data. .PP With Maq you can: .IP "\(bu" 2 Fast align Illumina/SOLiD reads to the reference genome. With the default options, one million pairs of reads can be mapped to the human genome in about 10 \s-1CPU\s0 hours with less than 1G memory. .IP "\(bu" 2 Accurately measure the error probability of the alignment of each individual read. .IP "\(bu" 2 Call the consensus genotypes, including homozygous and heterozygous polymorphisms, with a Phred probabilistic quality assigned to each base. .IP "\(bu" 2 Find short indels with paired end reads. .IP "\(bu" 2 Accurately find large scale genomic deletions and translocations with paired end reads. .IP "\(bu" 2 Discover potential CNVs by checking read depth. .IP "\(bu" 2 Evaluate the accuracy of raw base qualities from sequencers and help to check the systematic errors. .PP However, Maq can \fB\s-1NOT\s0\fR: .IP "\(bu" 2 Do \fIde novo\fR assembly. (Maq can only call the consensus by mapping reads to a known reference.) .IP "\(bu" 2 Map shorts reads against themselves. (Maq can only find complete overlap between reads.) .IP "\(bu" 2 Align capillary reads or 454 reads to the reference. (Maq cannot align reads longer than 63bp.) .SH "MAQ COMMANDS" .IX Header "MAQ COMMANDS" .Sh "Key Commands" .IX Subsection "Key Commands" .IP "\fBfasta2bfa\fR" 11 .IX Item "fasta2bfa" \&\fBmaq\fR \fBfasta2bfa\fR \fIin.ref.fasta\fR \fIout.ref.bfa\fR .Sp Convert sequences in \s-1FASTA\s0 format to Maq's \s-1BFA\s0 (binary \s-1FASTA\s0) format. .IP "\fBfastq2bfq\fR" 11 .IX Item "fastq2bfq" \&\fBmaq\fR \fBfastq2bfq\fR [\fB\-n\fR \fInreads\fR] \fIin.read.fastq\fR \&\fIout.read.bfq\fR|\fIout.prefix\fR .Sp Convert reads in \s-1FASTQ\s0 format to Maq's \s-1BFQ\s0 (binary \s-1FASTQ\s0) format. .Sp \&\fB\s-1OPTIONS:\s0\fR .RS 11 .IP "\fB\-n\fR \fI\s-1INT\s0\fR" 9 .IX Item "-n INT" number of reads per file [not specified] .RE .RS 11 .RE .IP "\fBmap\fR" 11 .IX Item "map" \&\fBmaq\fR \fBmap\fR [\fB\-n\fR \fInmis\fR] [\fB\-a\fR \fImaxins\fR] [\fB\-c\fR] [\fB\-1\fR \fIlen1\fR] [\fB\-2\fR \fIlen2\fR] [\fB\-d\fR \fIadap3\fR] [\fB\-m\fR \fImutrate\fR] [\fB\-u\fR \fIunmapped\fR] [\-e \fImaxerr\fR] [\fB\-M\fR c|g] [\fB\-N\fR] [\fB\-H\fR \fIallhits\fR] [\fB\-C\fR \fImaxhits\fR] \&\fIout.aln.map\fR \fIin.ref.bfa\fR \fIin.read1.bfq\fR [\fIin.read2.bfq\fR] 2> \&\fIout.map.log\fR .Sp Map reads to the reference sequences. .Sp \&\fB\s-1OPTIONS:\s0\fR .RS 11 .IP "\fB\-n\fR \fI\s-1INT\s0\fR" 9 .IX Item "-n INT" Number of maximum mismatches that can always be found [2] .IP "\fB\-a\fR \fI\s-1INT\s0\fR" 9 .IX Item "-a INT" Maximum outer distance for a correct read pair [250] .IP "\fB\-A\fR \fI\s-1INT\s0\fR" 9 .IX Item "-A INT" Maximum outer distance of two \s-1RF\s0 paied read (0 for disable) [0] .IP "\fB\-c\fR" 9 .IX Item "-c" Map reads in the colour space (for SOLiD only) .IP "\fB\-1\fR \fI\s-1INT\s0\fR" 9 .IX Item "-1 INT" Read length for the first read, 0 for auto [0] .IP "\fB\-2\fR \fI\s-1INT\s0\fR" 9 .IX Item "-2 INT" Read length for the second read, 0 for auto [0] .IP "\fB\-m\fR \fI\s-1FLOAT\s0\fR" 9 .IX Item "-m FLOAT" Mutation rate between the reference sequences and the reads [0.001] .IP "\fB\-d\fR \fI\s-1FILE\s0\fR" 9 .IX Item "-d FILE" Specify a file containing a single line of the 3'\-adapter sequence [null] .IP "\fB\-u\fR \fI\s-1FILE\s0\fR" 9 .IX Item "-u FILE" Dump unmapped reads and reads containing more than \fInmis\fR mismatches to a separate file [null] .IP "\fB\-e\fR \fI\s-1INT\s0\fR" 9 .IX Item "-e INT" Threshold on the sum of mismatching base qualities [70] .IP "\fB\-H\fR \fI\s-1FILE\s0\fR" 9 .IX Item "-H FILE" Dump multiple/all 01\-mismatch hits to \fI\s-1FILE\s0\fR [null] .IP "\fB\-C\fR \fI\s-1INT\s0\fR" 9 .IX Item "-C INT" Maximum number of hits to output. Unlimited if larger than 512. [250] .IP "\fB\-M\fR c|g" 9 .IX Item "-M c|g" methylation alignment mode. All C (or G) on the forward strand will be changed to T (or A). This option is for testing only. .IP "\fB\-N\fR" 9 .IX Item "-N" store the mismatch position in the output file \fIout.aln.map\fR. When this option is in use, the maximum allowed read length is 55bp. .RE .RS 11 .Sp \&\fB\s-1NOTE:\s0\fR .IP "*" 2 Paired end reads should be prepared in two files, one for each end, with reads are sorted in the same order. This means the k\-th read in the first file is mated with the k\-th read in the second file. The corresponding read names must be identical up to the tailing `/1' or `/2'. For example, such a pair of read names are allowed: `\s-1EAS1_1_5_100_200/1\s0' and `\s-1EAS1_1_5_100_200/2\s0'. The tailing `/[12]' is usually generated by the GAPipeline to distinguish the two ends in a pair. .IP "*" 2 The output is a compressed binary file. It is affected by the endianness. .IP "*" 2 The best way to run this command is to provide about 1 to 3 million reads as input. More reads consume more memory. .IP "*" 2 Option \fB\-n\fR controls the sensitivity of the alignment. By default, a hit with up to 2 mismatches can be always found. Higher \fB\-n\fR finds more hits and also improves the accuracy of mapping qualities. However, this is done at the cost of speed. .IP "*" 2 Alignments with many high-quality mismatches should be discarded as false alignments or possible contaminations. This behaviour is controlled by option \fB\-e\fR. The \fB\-e\fR threshold is only calculated approximately because base qualities are divided by 10 at a certain stage of the alignment. The \fB\-Q\fR option in the \fBassemble\fR command precisely set the threshold. .IP "*" 2 A pair of reads are said to be correctly paired if and only if the orientation is \fI\s-1FR\s0\fR and the outer distance of the pair is no larger than \fImaxins\fR. There is no limit on the minimum insert size. This setting is determined by the paired end alignment algorithm used in Maq. Requiring a minimum insert size will lead to some wrong alignments with highly overestimated mapping qualities. .IP "*" 2 Currently, read pairs from Illumina/Solexa long-insert library have \s-1RF\s0 read orientation. The maximum insert size is set by option \&\fB\-A\fR. However, long-insert library is also mixed with a small fraction of short-insert read pairs. \fB\-a\fR should also be set correctly. .IP "*" 2 Sometimes 5'\-end or even the entire 3'\-adapter sequence may be sequenced. Providing \fB\-d\fR renders Maq to eliminate the adapter contaminations. .IP "*" 2 Given 2 million reads as input, \fBmaq\fR usually takes 800MB memory. .RE .RS 11 .RE .IP "\fBmapmerge\fR" 11 .IX Item "mapmerge" \&\fBmaq\fR \fBmapmerge\fR \fIout.aln.map\fR \fIin.aln1.map\fR \fIin.aln2.map\fR [...] .Sp Merge a batch of read alignments together. .Sp \&\fB\s-1NOTE:\s0\fR .RS 11 .IP "*" 2 In theory, this command can merge unlimited number of alignments. However, as mapmerge will be reading all the inputs at the same time, it may hit the limit of the maximum number of opening files set by the \s-1OS\s0. At present, this has to be manually solved by endusers. .IP "*" 2 Command \fBmapmerge\fR can be used to merge alignment files with different read lengths. All the subsequent analyses do not assume fixed length any more. .RE .RS 11 .RE .IP "\fBrmdup\fR" 11 .IX Item "rmdup" \&\fBmaq\fR \fBrmdup\fR \fIout.rmdup.map\fR \fIin.ori.map\fR .Sp Remove pairs with identical outer coordinates. In principle, pairs with identical outer coordinates should happen rarely. However, due to the amplification in sample preparation, this occurs much more frequently than by chance. Practical analyses show that removing duplicates helps to improve the overall accuracy of \s-1SNP\s0 calling. .IP "\fBassemble\fR" 11 .IX Item "assemble" \&\fBmaq\fR \fBassemble\fR [\fB\-sp\fR] [\fB\-m\fR \fImaxmis\fR] [\fB\-Q\fR \fImaxerr\fR] [\fB\-r\fR \&\fIhetrate\fR] [\fB\-t\fR \fIcoef\fR] [\fB\-q\fR \fIminQ\fR] [\fB\-N\fR \fInHap\fR] \fIout.cns\fR \&\fIin.ref.bfa\fR \fIin.aln.map\fR 2> \fIout.cns.log\fR .Sp Call the consensus sequences from read mapping. .Sp \&\fB\s-1OPTIONS:\s0\fR .RS 11 .IP "\fB\-t\fR \fI\s-1FLOAT\s0\fR" 9 .IX Item "-t FLOAT" Error dependency coefficient [0.93] .IP "\fB\-r\fR \fI\s-1FLOAT\s0\fR" 9 .IX Item "-r FLOAT" Fraction of heterozygotes among all sites [0.001] .IP "\fB\-s\fR" 9 .IX Item "-s" Take single end mapping quality as the final mapping quality; otherwise paired end mapping quality will be used .IP "\fB\-p\fR" 9 .IX Item "-p" Discard paired end reads that are not mapped in correct pairs .IP "\fB\-m\fR \fI\s-1INT\s0\fR" 9 .IX Item "-m INT" Maximum number of mismatches allowed for a read to be used in consensus calling [7] .IP "\fB\-Q\fR \fI\s-1INT\s0\fR" 9 .IX Item "-Q INT" Maximum allowed sum of quality values of mismatched bases [60] .IP "\fB\-q\fR \fI\s-1INT\s0\fR" 9 .IX Item "-q INT" Minimum mapping quality allowed for a read to be used in consensus calling [0] .IP "\fB\-N\fR \fI\s-1INT\s0\fR" 9 .IX Item "-N INT" Number of haplotypes in the pool (>=2) [2] .RE .RS 11 .Sp \&\fB\s-1NOTE:\s0\fR .IP "*" 2 Option \fB\-Q\fR sets a limit on the maximum sum of mismatching base qualities. Reads containing many high-quality mismatches should be discarded. .IP "*" 2 Option \fB\-N\fR sets the number of haplotypes in a pool. It is designed for resequencing of samples by pooling multiple strains/individuals together. For diploid genome resequencing, this option equals 2. .RE .RS 11 .RE .IP "\fBglfgen\fR" 11 .IX Item "glfgen" \&\fBmaq\fR \fBglfgen\fR [\fB\-sp\fR] [\fB\-m\fR \fImaxmis\fR] [\fB\-Q\fR \fImaxerr\fR] [\fB\-r\fR \&\fIhetrate\fR] [\fB\-t\fR \fIcoef\fR] [\fB\-q\fR \fIminQ\fR] [\fB\-N\fR \fInHap\fR] \fIout.cns\fR \&\fIin.ref.bfa\fR \fIin.aln.map\fR 2> \fIout.cns.log\fR .Sp Calculate log-likelihood for all genotypes and store the results in \s-1GLF\s0 format (Genotyping Likelihood Format). Please check \s-1MAQ\s0 website for detailed descriptions of the file format and the related utilities. .IP "\fBindelpe\fR" 11 .IX Item "indelpe" \&\fBmaq\fR \fBindelpe\fR \fIin.ref.bfa\fR \fIin.aln.map\fR > \fIout.indelpe\fR .Sp Call consistent indels from paired end reads. The output is \s-1TAB\s0 delimited with each line consisting of chromosome, start position, type of the indel, number of reads across the indel, size of the indel and inserted/deleted nucleotides (separated by colon), number of indels on the reverse strand, number of indels on the forward strand, 5' sequence ahead of the indel, 3' sequence following the indel, number of reads aligned without indels and three additional columns for filters. .Sp At the 3rd column, type of the indel, a star indicates the indel is confirmed by reads from both strands, a plus means the indel is hit by at least two reads but from the same strand, a minus shows the indel is only found on one read, and a dot means the indel is too close to another indel and is filtered out. .Sp Users are recommended to run through `maq.pl indelpe' to correct the number of reads mapped without indels. For more details, see the `maq.pl indelpe' section. .IP "\fBindelsoa\fR" 11 .IX Item "indelsoa" \&\fBmaq\fR \fBindelsoa\fR \fIin.ref.bfa\fR \fIin.aln.map\fR > \fIout.indelsoa\fR .Sp Call potential homozygous indels and break points by detecting the abnormal alignment pattern around indels and break points. The output is also \s-1TAB\s0 delimited with each line consisting of chromosome, approximate coordinate, length of the abnormal region, number of reads mapped across the position, number of reads on the left-hand side of the position and number of reads on the right-hand side. The last column can be ignored. .Sp The output contains many false positives. A recommended filter could be: .Sp .Vb 1 \& awk '$5+$6-$4 >= 3 && $4 <= 1' in.indelsoa .Ve .Sp Note that this command does not aim to be an accurate indel detector, but mainly helps to avoid some false positives in substitution calling. In addition, it only works well given deep depth (~40X for example); otherwise the false negative rate would be very high. .Sh "Format Converting" .IX Subsection "Format Converting" .IP "\fBsol2sanger\fR" 11 .IX Item "sol2sanger" \&\fBmaq\fR \fBsol2sanger\fR \fIin.sol.fastq\fR \fIout.sanger.fastq\fR .Sp Convert Solexa \s-1FASTQ\s0 to standard/Sanger \s-1FASTQ\s0 format. .IP "\fBbfq2fastq\fR" 11 .IX Item "bfq2fastq" \&\fBmaq\fR \fBbfq2fastq\fR \fIin.read.bfq\fR \fIout.read.fastq\fR .Sp Convert Maq's \s-1BFQ\s0 format to standard \s-1FASTQ\s0 format. .IP "\fBmapass2maq\fR" 11 .IX Item "mapass2maq" \&\fBmaq\fR \fBmapass2maq\fR \fIin.mapass2.map\fR \fIout.maq.map\fR .Sp Convert obsolete mapass2's map format to Maq's map format. The old format does not contain read names. .Sh "Information Extracting" .IX Subsection "Information Extracting" .IP "\fBmapview\fR" 11 .IX Item "mapview" \&\fBmaq\fR \fBmapview\fR [\fB\-bN\fR] \fIin.aln.map\fR > \fIout.aln.txt\fR .Sp Display the read alignment in plain text. For reads aligned before the Smith-Waterman alignment, each line consists of read name, chromosome, position, strand, insert size from the outer coorniates of a pair, paired flag, mapping quality, single-end mapping quality, alternative mapping quality, number of mismatches of the best hit, sum of qualities of mismatched bases of the best hit, number of 0\-mismatch hits of the first 24bp, number of 1\-mismatch hits of the first 24bp on the reference, length of the read, read sequence and its quality. Alternative mapping quality always equals to mapping quality if the reads are not paired. If reads are paired, it equals to the smaller mapping quality of the two ends. This alternative mapping quality is actually the mapping quality of an abnormal pair. .Sp The fifth column, paired flag, is a bitwise flag. Its lower 4 bits give the orientation: 1 stands for \s-1FF\s0, 2 for \s-1FR\s0, 4 for \s-1RF\s0, and 8 for \s-1RR\s0, where \s-1FR\s0 means that the read with smaller coordinate is on the forward strand, and its mate is on the reverse strand. Only \s-1FR\s0 is allowed for a correct pair. The higher bits of this flag give further information. If the pair meets the paired end requirement, 16 will be set. If the two reads are mapped to different chromosomes, 32 will be set. If one of the two reads cannot be mapped at all, 64 will be set. The flag for a correct pair always equals to 18. .Sp For reads aligned by the Smith-Waterman alignment afterwards, the flag is always 130. A line consists of read name, chromosome, position, strand, insert size, flag (always 130), position of the indel on the read (0 if no indel), length of the indels (positive for insertions and negative for deletions), mapping quality of its mate, number of mismatches of the best hit, sum of qualities of mismatched bases of the best hit, two zeros, length of the read, read sequence and its quality. The mate of a 130\-flagged read always gets a flag 18. .Sp Flag 192 indicates that the read is not mapped but its mate is mapped. For such a read pair, one read has flag 64 and the other has 192. .Sp \&\fB\s-1OPTIONS:\s0\fR .RS 11 .IP "\fB\-b\fR" 9 .IX Item "-b" do not display the read sequence and the quality .IP "\fB\-N\fR" 9 .IX Item "-N" display the positions where mismatches occur. This flag only works with a .map file generated by `maq map \-N'. .RE .RS 11 .RE .IP "\fBmapcheck\fR" 11 .IX Item "mapcheck" \&\fBmaq\fR \fBmapcheck\fR [\fB\-s\fR] [\fB\-m\fR \fImaxmis\fR] [\fB\-q\fR \fIminQ\fR] \&\fIin.ref.bfa\fR \fIin.aln.map\fR > \fIout.mapcheck\fR .Sp Read quality check. The mapcheck first reports the composition and the depth of the reference. After that there is a form. The first column indicates the position on a read. Following four columns which show the nucleotide composition, substitution rates between the reference and reads will be given. These rates and the numbers in the following columns are scaled to 999 and rounded to nearest integer. The next group of columns show the distribution of base qualities along the reads at a quality interval of 10. A decay in quality can usually be observed, which means bases at the end of read are less accurate. The last group of columns present the fraction of substitutions for read bases at a quality interval. This measures the accuracy of base quality estimation. Idealy, we expect to see 1 in the 3? column, 10 in the 2? column and 100 in the 1? column. .Sp \&\fB\s-1OPTIONS:\s0\fR .RS 11 .IP "\fB\-s\fR" 9 .IX Item "-s" Take single end mapping quality as the final mapping quality .IP "\fB\-m\fR \fI\s-1INT\s0\fR" 9 .IX Item "-m INT" Maximum number of mismatahces allowed for a read to be counted [4] .IP "\fB\-q\fR \fI\s-1INT\s0\fR" 9 .IX Item "-q INT" Minimum mapping quality allowed for a read to be counted [30] .RE .RS 11 .RE .IP "\fBpileup\fR" 11 .IX Item "pileup" \&\fBmaq\fR \fBpileup\fR [\fB\-spvP\fR] [\fB\-m\fR \fImaxmis\fR] [\fB\-Q\fR \fImaxerr\fR] [\fB\-q\fR \&\fIminQ\fR] [\fB\-l\fR \fIsitefile\fR] \fIin.ref.bfa\fR \fIin.aln.map\fR > \&\fIout.pileup\fR .Sp Display the alignment in a `pileup' text format. Each line consists of chromosome, position, reference base, depth and the bases on reads that cover this position. If \fB\-v\fR is added on the command line, base qualities and mapping qualities will be presented in the sixth and seventh columns in order. .Sp The fifth column always starts with `@'. In this column, read bases identical to the reference are showed in comma `,' or dot `.', and read bases different from the reference in letters. A comma or a upper case indicates that the base comes from a read aligned on the forward strand, while a dot or a lower case on the reverse strand. .Sp This command is for users who want to develop their own \s-1SNP\s0 callers. .Sp \&\fB\s-1OPTIONS:\s0\fR .RS 11 .IP "\fB\-s\fR" 9 .IX Item "-s" Take single end mapping quality as the final mapping quality .IP "\fB\-p\fR" 9 .IX Item "-p" Discard paired end reads that are not mapped as correct pairs .IP "\fB\-v\fR" 9 .IX Item "-v" Output verbose information including base qualities and mapping qualities .IP "\fB\-m\fR \fI\s-1INT\s0\fR" 9 .IX Item "-m INT" Maximum number of mismatches allowed for a read to be used [7] .IP "\fB\-Q\fR \fI\s-1INT\s0\fR" 9 .IX Item "-Q INT" Maximum allowed number of quality values of mismatches [60] .IP "\fB\-q\fR \fI\s-1INT\s0\fR" 9 .IX Item "-q INT" Minimum mapping quality allowed for a read to be used [0] .IP "\fB\-l\fR \fI\s-1FILE\s0\fR" 9 .IX Item "-l FILE" File containing the sites at which pileup will be printed out. In this file the first column gives the names of the reference and the second the coordinates. Additional columns will be ignored. [null] .IP "\fB\-P\fR" 9 .IX Item "-P" also output the base position on the read .RE .RS 11 .RE .IP "\fBcns2fq\fR" 11 .IX Item "cns2fq" \&\fBmaq\fR \fBcns2fq\fR [\fB\-Q\fR \fIminMapQ\fR] [\fB\-n\fR \fIminNeiQ\fR] [\fB\-d\fR \&\fIminDepth\fR] [\fB\-D\fR \fImaxDepth\fR] \fIin.cns\fR > \fIout.cns.fastq\fR .Sp Extract the consensus sequences in \s-1FASTQ\s0 format. In the sequence lines, bases in lower case are essentially repeats or do not have sufficient coverage; bases in upper case indicate regions where SNPs can be reliably called. In the quality lines, \s-1ASCII\s0 of a character minus 33 gives the \s-1PHRED\s0 quality. .Sp \&\fB\s-1OPTIONS:\s0\fR .RS 11 .IP "\fB\-Q\fR \fI\s-1INT\s0\fR" 9 .IX Item "-Q INT" Minimum mapping quality [40] .IP "\fB\-d\fR \fI\s-1INT\s0\fR" 9 .IX Item "-d INT" Minimum read depth [3] .IP "\fB\-n\fR \fI\s-1INT\s0\fR" 9 .IX Item "-n INT" Minimum neighbouring quality [20] .IP "\fB\-D\fR \fI\s-1INT\s0\fR" 9 .IX Item "-D INT" Maximum read dpeth. >=255 for unlimited. [255] .RE .RS 11 .RE .IP "\fBcns2snp\fR" 11 .IX Item "cns2snp" \&\fBmaq\fR \fBcns2snp\fR \fIin.cns\fR > \fIout.snp\fR .Sp Extract \s-1SNP\s0 sites. Each line consists of chromosome, position, reference base, consensus base, Phred-like consensus quality, read depth, the average number of hits of reads covering this position, the highest mapping quality of the reads covering the position, the minimum consensus quality in the 3bp flanking regions at each side of the site (6bp in total), the second best call, log likelihood ratio of the second best and the third best call, and the third best call. .Sp The 5th column is the key criterion when you judge the reliability of a \&\s-1SNP\s0. However, as this quality is only calculated assuming site independency, you should also consider other columns to get more accurate \s-1SNP\s0 calls. Script command `\fBmaq.pl\fR \fBSNPfilter\fR' is designed for this (see below). .Sp The 7th column implies whether the site falls in a repetitive region. If no read covering the site can be mapped with high mapping quality, the flanking region is possibly repetitive or in the lack of good reads. A \s-1SNP\s0 at such site is usually not reliable. .Sp The 8th column roughly gives the copy number of the flanking region in the reference genome. In most cases, this number approaches 1.00, which means the region is about unique. Sometimes you may see non-zero read depth but 0.00 at the 7th column. This indicates that all the reads covering the position have at least two mismatches. Maq only counts the number of 0\- and 1\-mismatch hits to the reference. This is due to a complex technical issue. .Sp The 9th column gives the neighbouring quality. Filtering on this column is also required to get reliable SNPs. This idea is inspired by \s-1NQS\s0, although \s-1NQS\s0 is initially designed for a single read instead of a consensus. .IP "\fBcns2view\fR" 11 .IX Item "cns2view" \&\fBmaq\fR \fBcns2view\fR \fIin.cns\fR > \fIout.view\fR .Sp Show detailed information at all sites. The output format is identical to \fBcns2snp\fR report. .IP "\fBcns2ref\fR" 11 .IX Item "cns2ref" \&\fBmaq\fR \fBcns2ref\fR \fIin.cns\fR > \fIout.ref.fasta\fR .Sp Extract the reference sequence. .IP "\fBcns2win\fR" 11 .IX Item "cns2win" \&\fBmaq\fR \fBcns2win\fR [\fB\-w\fR \fIwinsize\fR] [\fB\-c\fR \fIchr\fR] [\fB\-b\fR \fIbegin\fR] [\fB\-e\fR \fIend\fR] [\fB\-q\fR \fIminQ\fR] \fIin.cns\fR > \fIout.win\fR .Sp Extract information averaged in a tilling window. The output is \s-1TAB\s0 delimited, which consists of reference name, coordinate divided by 1,000,000, \s-1SNP\s0 rate, het rate, raw read depth, read depth in approximately unique regions, the average number of hits of reads in the window and percent \s-1GC\s0. .Sp \&\fB\s-1OPTIONS:\s0\fR .RS 11 .IP "\fB\-w\fR \fI\s-1INT\s0\fR" 9 .IX Item "-w INT" Size of a window [1000] .IP "\fB\-c\fR \fI\s-1STR\s0\fR" 9 .IX Item "-c STR" Destinated reference sequence; otherwise all references will be used [null] .IP "\fB\-b\fR \fI\s-1INT\s0\fR" 9 .IX Item "-b INT" Start position, 0 for no constraint [0] .IP "\fB\-e\fR \fI\s-1INT\s0\fR" 9 .IX Item "-e INT" End position, 0 for no constraint [0] .IP "\fB\-q\fR \fI\s-1INT\s0\fR" 9 .IX Item "-q INT" Minimum consensus quality of the sites to be used [0] .RE .RS 11 .RE .Sh "Simulation Related" .IX Subsection "Simulation Related" .IP "\fBfakemut\fR" 11 .IX Item "fakemut" \&\fBmaq\fR \fBfakemut\fR [\fB\-r\fR \fImutrate\fR] [\fB\-R\fR \fIindelfrac\fR] \&\fIin.ref.fasta\fR > \fIout.fakeref.fasta\fR 2> \fIout.fake.snp\fR .Sp Randomly introduce substitutions and indels to the reference. Substitutions and sinlge base-pair indels can be added. .Sp \&\fB\s-1OPTIONS:\s0\fR .RS 11 .IP "\fB\-r\fR \fI\s-1FLOAT\s0\fR" 10 .IX Item "-r FLOAT" Mutation rate [0.001] .IP "\fB\-R\fR \fI\s-1FLOAT\s0\fR" 10 .IX Item "-R FLOAT" Fraction of mutations to be indels [0.1] .RE .RS 11 .RE .IP "\fBsimutrain\fR" 11 .IX Item "simutrain" \&\fBmaq\fR \fBsimutrain\fR \fIout.simupars.dat\fR \fIin.read.fastq\fR .Sp Estimate/train parameters for read simulation. .IP "\fBsimulate\fR" 11 .IX Item "simulate" \&\fBmaq\fR \fBsimulate\fR [\fB\-d\fR \fIinsize\fR] [\fB\-s\fR \fIstdev\fR] [\fB\-N\fR \fInReads\fR] [\fB\-1\fR \fIreadLen1\fR] [\fB\-2\fR \fIreadLen2\fR] [\fB\-r\fR \fImutRate\fR] [\fB\-R\fR \&\fIindelFrac\fR] [\fB\-h\fR] \fIout.read1.fastq\fR \fIout.read2.fastq\fR \&\fIin.ref.fasta\fR \fIin.simupars.dat\fR .Sp Simulate paired end reads. File \fIin.simupars.dat\fR determines the read lengths and quality distribution. It is generated from \fBsimutrain\fR, or can be downloaded from Maq website. In the output read files, a read name consists of the reference sequence name and the outer coordinates of the pair of simulated reads. By default, \fBsimulate\fR assumes reads come from a diploid sequence which is generated by adding two different sets of mutations, including one base-pair indels, to \fIin.ref.fasta\fR. .Sp \&\fB\s-1OPTIONS:\s0\fR .RS 11 .IP "\fB\-d\fR \fI\s-1INT\s0\fR" 9 .IX Item "-d INT" mean of the outer distance of insert sizes [170] .IP "\fB\-s\fR \fI\s-1INT\s0\fR" 9 .IX Item "-s INT" standard deviation of insert sizes [20] .IP "\fB\-N\fR \fI\s-1INT\s0\fR" 9 .IX Item "-N INT" number of pairs of reads to be generated [1000000] .IP "\fB\-1\fR \fI\s-1INT\s0\fR" 9 .IX Item "-1 INT" length of the first read [set by \fIin.simupars.dat\fR] .IP "\fB\-2\fR \fI\s-1INT\s0\fR" 9 .IX Item "-2 INT" length of the second read [set by \fIin.simupars.dat\fR] .IP "\fB\-r\fR \fI\s-1FLOAT\s0\fR" 9 .IX Item "-r FLOAT" mutation rate [0.001] .IP "\fB\-R\fR \fI\s-1FLOAT\s0\fR" 9 .IX Item "-R FLOAT" fraction of 1bp indels [0.1] .IP "\fB\-h\fR" 9 .IX Item "-h" add all mutations to \fIin.ref.fasta\fR and generate reads from the single mutated sequence (haploid mode) .RE .RS 11 .Sp \&\fB\s-1NOTE:\s0\fR .IP "*" 2 Reads generated from this command are independent, which deviates from the truth. Whereas alignment evaluation is less affected by this, evaluation on \s-1SNP\s0 calling should be performed with caution. Error dependency may be one of the major causes of wrong \s-1SNP\s0 calls. .RE .RS 11 .RE .IP "\fBsimustat\fR" 11 .IX Item "simustat" \&\fBmaq\fR \fBsimustat\fR \fIin.simu\-aln.map\fR > \fIout.simustat\fR .Sp Evaluate mapping qualities from simulated reads. .Sh "SOLiD Related" .IX Subsection "SOLiD Related" .IP "\fBfasta2csfa\fR" 11 .IX Item "fasta2csfa" \&\fBmaq\fR \fBfasta2csfa\fR \fIin.nucl\-ref.fasta\fR > \fIout.colour\-ref.fasta\fR .Sp Convert nucleotide \s-1FASTA\s0 to colour-coded \s-1FASTA\s0. Flag \fB\-c\fR should be then applied to \fBmap\fR command. In the output, letter `A' stands for color 0, `C' for 1, `G' for 2 and `T' for 3. Each sequence in the output is 1bp shorter than the input. .IP "\fBcsmap2nt\fR" 11 .IX Item "csmap2nt" \&\fBmaq\fR \fBcsmap2nt\fR \fIout.nt.map\fR \fIin.ref.nt.bfa\fR \fIin.cs.map\fR .Sp Convert color alignment to nucleotide alignment. The input \&\fIin.ref.nt.bfa\fR is the nucleotide binary \s-1FASTA\s0 reference file. It must correspond to the original file from which the color reference is converted. Nucleotide consensus can be called from the resultant alignment. .Sh "Miscellaneous/Advanced Commands" .IX Subsection "Miscellaneous/Advanced Commands" .IP "\fBsubmap\fR" 11 .IX Item "submap" \&\fBmaq\fR \fBsubmap\fR [\fB\-q\fR \fIminMapQ\fR] [\fB\-Q\fR \fImaxSumErr\fR] [\fB\-m\fR \fImaxMM\fR] [\fB\-p\fR] \fIout.map\fR \fIin.map\fR .Sp Filter bad alignments in \fIin.map\fR. Command-line options are described in the `\fBassemble\fR' command. .IP "\fBeland2maq\fR" 11 .IX Item "eland2maq" \&\fBmaq\fR \fBeland2maq\fR [\fB\-q\fR \fIdefqual\fR] \fIout.map\fR \fIin.list\fR \fIin.eland\fR .Sp Convert eland alignment to maq's .map format. File \fIin.list\fR consists of the sequence names that appear at the seventh column of the eland alignment file \fIin.eland\fR and the name you expect to see in maq alignment. The following is an example: .Sp .Vb 3 \& cX.fa chrX \& c1.fa chr1 \& c2.fa chr2 .Ve .Sp If you are aligning reads in several batches using eland, it is important to use the same \fIin.list\fR for the conversion. In addition, maq will load all the alignments and sort them in the memory. If you have concatenate several eland outputs into one huge file, you should separate it into smaller files to prevent maq from eating all your machine memory. .Sp This command actually aims to show Eland alignment in Maqview. As no quality information is available, the resultant maq alignment file should not be used to call consensus genotypes. .IP "\fBexport2maq\fR" 11 .IX Item "export2maq" \&\fBmaq\fR \fBexport2maq\fR [\fB\-1\fR \fIread1len\fR] [\fB\-2\fR \fIread2len\fR] [\fB\-a\fR \&\fImaxdist\fR] [\fB\-n\fR] \fIout.map\fR \fIin.list\fR \fIin.export\fR .Sp Convert Illumina's Export format to Maq's \fI.map\fR format. Export format is a new alignment format since SolexaPipeline\-0.3.0 which also calculates mapping qualities like maq. The resultant file can be used to call consensus genotypes as most of necessary information is available for maq to do this accurately. .Sp \&\fB\s-1OPTIONS:\s0\fR .RS 11 .IP "\fB\-1\fR \fI\s-1INT\s0\fR" 9 .IX Item "-1 INT" Length of the first read [0] .IP "\fB\-2\fR \fI\s-1INT\s0\fR" 9 .IX Item "-2 INT" Length of the second read [0] .IP "\fB\-a\fR \fI\s-1INT\s0\fR" 9 .IX Item "-a INT" Maximum outer distance for a correct read pair [250] .IP "\fB\-n\fR" 9 .IX Item "-n" Retain filtered reads .RE .RS 11 .RE .SH "MAQ-PERL COMMANDS" .IX Header "MAQ-PERL COMMANDS" .IP "\fBdemo\fR" 11 .IX Item "demo" \&\fBmaq.pl\fR \fBdemo\fR [\fB\-h\fR] [\fB\-s\fR] [\fB\-N\fR \fInPairs\fR] [\fB\-d\fR \fIoutDir\fR] \&\fIin.fasta\fR \fIin.simudat\fR .Sp Demonstrate the use of \fBmaq\fR and its companion scripts. This command will simulate reads from a \s-1FASTA\s0 file \fIin.fasta\fR. The sequence length and qualities are determined by \fIin.simudat\fR which is generated from \&\fBmaq simutrain\fR or can be downloaded from Maq website. The simulated reads will then be mapped with \fBmaq.pl easyrun\fR. The alignment accuracy is evaluated by \fBmaq simustat\fR, the consensus accuracy by \fBmaq simucns\fR, and the \s-1SNP\s0 accuracy by \fBmaq_eval.pl\fR. .Sp By default, paired end reads will be simulated and a diploid sequence will be generated from the input by adding mutations to either haploid type. The insert size and mutation rate are controlled by \fBmaq simulate\fR. .Sp \&\fB\s-1OPTIONS:\s0\fR .RS 11 .IP "\fB\-h\fR" 9 .IX Item "-h" simulate a haploid sequence instead of a diploid sequence .IP "\fB\-s\fR" 9 .IX Item "-s" use single-end mode to align reads instead of paired-end mode .IP "\fB\-N\fR \fI\s-1INT\s0\fR" 9 .IX Item "-N INT" number of pairs of reads to be simulated [1000000] .IP "\fB\-d\fR \fI\s-1DIR\s0\fR" 9 .IX Item "-d DIR" output directory [maqdemo] .RE .RS 11 .Sp \&\fB\s-1NOTE:\s0\fR .IP "*" 2 The output files from \fBmaq_eval.pl\fR have not been documented, but you may make a good guess at some of these files. .IP "*" 2 This command just demonstrates the use of the maq suite. The accuracy on real data is almost always lower than what you see from pure simulation. .RE .RS 11 .RE .IP "\fBeasyrun\fR" 11 .IX Item "easyrun" \&\fBmaq.pl\fR \fBeasyrun\fR [\fB\-1\fR \fIread1Len\fR] [\fB\-d\fR \fIout.dir\fR] [\fB\-n\fR \&\fInReads\fR] [\fB\-A\fR \fI3adapter\fR] [\fB\-e\fR \fIminDep\fR] [\fB\-q\fR \fIminCnsQ\fR] [\fB\-p\fR] [\fB\-2\fR \fIread2Len\fR] [\fB\-a\fR \fImaxIns\fR] [\fB\-S\fR] [\fB\-N\fR] \&\fIin.ref.fasta\fR \fIin1.fastq\fR [\fIin2.fastq\fR] .Sp Analyses pipeline for small genomes. Easyrun command will run most of analyses implemented in \fBmaq\fR. By default, \fBeasyrun\fR assumes all the input read sequences files are single-end and independent; when \fB\-p\fR is specified, two read sequence files are required, one for each end. .Sp Several files will be generated in \fIout.dir\fR, among which the following files are the key output: .RS 11 .IP "\fIcns.final.snp\fR" 16 .IX Item "cns.final.snp" final \s-1SNP\s0 calls with low quality ones filtered out .IP "\fIcns.fq\fR" 16 .IX Item "cns.fq" consensus sequences and qualities in the \s-1FASTQ\s0 format .RE .RS 11 .Sp \&\fB\s-1OPTIONS:\s0\fR .IP "\fB\-d\fR \fI\s-1DIR\s0\fR" 9 .IX Item "-d DIR" output directory [easyrun] .IP "\fB\-n\fR \fI\s-1INT\s0\fR" 9 .IX Item "-n INT" number of reads/pairs in one batch of alignment [2000000] .IP "\fB\-S\fR" 9 .IX Item "-S" apply split-read analysis of short indels (maybe very slow) .IP "\fB\-N\fR \fI\s-1INT\s0\fR" 9 .IX Item "-N INT" number of haplotypes/strains in the pool (>=2) [2] .IP "\fB\-A\fR \fI\s-1FILE\s0\fR" 9 .IX Item "-A FILE" file for 3'\-adapter. The file should contain a single line of sequence [null] .IP "\fB\-1\fR \fI\s-1INT\s0\fR" 9 .IX Item "-1 INT" length of the first read, 0 for auto [0] .IP "\fB\-e\fR \fI\s-1INT\s0\fR" 9 .IX Item "-e INT" minimum read depth required to call a \s-1SNP\s0 (for SNPfilter) [3] .IP "\fB\-q\fR \fI\s-1INT\s0\fR" 9 .IX Item "-q INT" minimum consensus quality for SNPs in \fIcns.final.snp\fR [30] .IP "\fB\-p\fR" 9 .IX Item "-p" switch to paired end alignment mode .IP "\fB\-2\fR \fI\s-1INT\s0\fR" 9 .IX Item "-2 INT" length of the second read when \fB\-p\fR is applied [0] .IP "\fB\-a\fR \fI\s-1INT\s0\fR" 9 .IX Item "-a INT" maximum insert size when \fB\-p\fR is applied [250] .RE .RS 11 .Sp \&\fB\s-1NOTES:\s0\fR .IP "*" 2 For \s-1SNP\s0 calling on pooled samples, users should set correct `\fB\-N\fR' as well as `\fB\-E\fR 0'. .IP "*" 2 The input file can be maq's binary format. \fBmaq.pl\fR will automatically detect the file format. .RE .RS 11 .RE .IP "\fBSNPfilter\fR" 11 .IX Item "SNPfilter" \&\fBmaq.pl\fR \fBSNPfilter\fR [\fB\-d\fR \fIminDep\fR] [\fB\-D\fR \fImaxDep\fR] [\fB\-Q\fR \&\fImaxMapQ\fR] [\fB\-q\fR \fIminCnsQ\fR] [\fB\-w\fR \fIindelWinSize\fR] [\fB\-n\fR \&\fIminNeiQ\fR] [\fB\-F\fR \fIin.indelpe\fR] [\fB\-f\fR \fIin.indelsoa\fR] [\fB\-s\fR \&\fIminScore\fR] [\fB\-m\fR \fImaxAcross\fR] [\fB\-a\fR] [\fB\-N\fR \fImaxWinSNP\fR] [\fB\-W\fR \&\fIdensWinSize\fR] \fIin.cns2snp.snp\fR > \fIout.filtered.snp\fR .Sp Rule out SNPs that are covered by few reads (specified by \fB\-d\fR), by too many reads (specified by \fB\-D\fR), near (specified by \fB\-w\fR) to a potential indel, falling in a possible repetitve region (characterized by \fB\-Q\fR), or having low-quality neighbouring bases (specified by \&\fB\-n\fR). If \fImaxWinSNP\fR or more SNPs appear in any \fIdensWinSize\fR window, they will also be filtered out together. .Sp \&\fB\s-1OPTIONS:\s0\fR .RS 11 .IP "\fB\-d\fR \fI\s-1INT\s0\fR" 10 .IX Item "-d INT" Minimum read depth required to call a \s-1SNP\s0 [3] .IP "\fB\-D\fR \fI\s-1INT\s0\fR" 10 .IX Item "-D INT" Maximum read depth required to call a \s-1SNP\s0 (<255, otherwise ignored) [256] .IP "\fB\-Q\fR \fI\s-1INT\s0\fR" 10 .IX Item "-Q INT" Required maximum mapping quality of reads covering the \s-1SNP\s0 [40] .IP "\fB\-q\fR \fI\s-1INT\s0\fR" 10 .IX Item "-q INT" Minimum consensus quality [20] .IP "\fB\-n\fR \fI\s-1INT\s0\fR" 10 .IX Item "-n INT" Minimum adjacent consensus quality [20] .IP "\fB\-w\fR \fI\s-1INT\s0\fR" 10 .IX Item "-w INT" Size of the window around the potential indels. SNPs that are close to indels will be suppressed [3] .IP "\fB\-F\fR \fI\s-1FILE\s0\fR" 10 .IX Item "-F FILE" The \fBindelpe\fR output [null] .IP "\fB\-f\fR \fI\s-1FILE\s0\fR" 10 .IX Item "-f FILE" The \fBindelsoa\fR output [null] .IP "\fB\-s\fR \fI\s-1INT\s0\fR" 10 .IX Item "-s INT" Minimum score for a soa-indel to be considered [3] .IP "\fB\-m\fR \fI\s-1INT\s0\fR" 10 .IX Item "-m INT" Maximum number of reads that can be mapped across a soa-indel [1] .IP "\fB\-a\fR" 10 .IX Item "-a" Alternative filter for single end alignment .RE .RS 11 .RE .IP "\fBindelpe\fR" 11 .IX Item "indelpe" \&\fBmaq.pl\fR \fBindelpe\fR \fIin.indelpe\fR > \fIout.indelpe\fR .Sp Correct the number of reads mapped without indels for homopolymer tracts. This command modify the 4th, 10th and the last three columns of \&\fIin.indelpe\fR and output the result in \fIout.indelpe\fR. After the correction, the following \fBawk\fR command gives putative homozygous indels: .Sp .Vb 1 \& awk '($3=="*"||$3=="+") && $6+$7>=3 && ($6+$7)/$4>=0.75' .Ve .Sp and the following gives heterozygotes: .Sp .Vb 1 \& awk '($3=="*"||$3=="+") && $6+$7>=3 && ($6+$7)/$4<0.75' .Ve .Sp Please note that this \fBindelpe\fR command just implements several heuristic rules. It does not correct for impure homopolymer runs or di\-nucleotide/triplet repeats. Consequently, the two awk commands only give approximate hom/het indels. .SH "EXAMPLES" .IX Header "EXAMPLES" .IP "\(bu" 2 Easyrun script: maq.pl easyrun \-d easyrun ref.fasta part1.fastq part2.fastq .IP "\(bu" 2 Key commands behind easyrun: maq fasta2bfa ref.fasta ref.bfa; maq fastq2bfq part1.fastq part1.bfq; maq fastq2bfq part2.fastq part2.bfq; maq map part1.map ref.bfa part1.bfq; maq map part2.map ref.bfa part2.bfq; maq mapmerge aln.map part1.map part2.map; maq assemble cns.cns ref.bfa aln.map; .SH "LICENSE" .IX Header "LICENSE" \&\s-1GNU\s0 General Public License, version 3 (GPLv3) .SH "AVAILABILITY" .IX Header "AVAILABILITY" .SH "AUTHOR" .IX Header "AUTHOR" Heng Li maq-0.7.1/maq.pdf0000644000076600000240000044241711067172771012145 0ustar lh3staff%PDF-1.3 %Äåòåë§ó ÐÄÆ 4 0 obj << /Length 5 0 R /Filter /FlateDecode >> stream xZksã¶ý®_AÛ’ù2IA²´o6I“´©7Σ’n“¦ÉL;“æÿÏô\€x¢$§³Ö–|/îóÜðkò”üš0üët— R$ÿý9ù&ùOÒ|üOþõý/èÿÇç„ÓŸ1ú¯I¯ÛzÐÉó¿“æ#^󄯞ÿ™|—dW×yÒÉ$»YonÓ<©x'‘d‡ì‡¼¼+ªºa‡œ |':–dm^IVRø¿_MØäÉ÷Éó§ÉÛg+D A­ô‰Òõ^A¢$£(yÂõ*»¾YÏ8858’^vžØèAÄÙUÓA˜ç_ü¡žD õÐŽT+£}ëŽÌ®–IZYËþÄAéU£ìÒ§M9¤×Bèú^nÓ‡CÎvé;‘øák‘¯"aŽ-26:Ã[ ÛÜ^¥‡lsÈ7Ër‘ö¼¡Õ#åÝ2Ži5 n¨¬ïeÐþú†œ>‘Ô›­gußË e°ö«åÓzðfŽÆÊN»†j‡üzS,Ò ÖÖ]7•Ô·Ê^Ÿ vˆÕEíÙë2OZ•dwÕM½9d8øûU–^U2+cµ8òÌŠà_<›K´|$œëz5Zv1 ^+ŽˆŒŽtš&Ù«eo ²ÖrJóbËr‰˜JÎ;aYí„£™Å·ì*¶ìÙ„WC[Ë#ó²õ†‹C~ÈÚCž^-+ߨž{b/8—IùJ€×!7Xd~nÒ|e?Å{È€USiÂ*ó=Û5ÌÿrO“dûCÔóŸÖ.Ç§Ææ9%¶ÿ£»ª¨ý/bWTk¥›ˆ[¯K]5L^°û­'d» Y©! ´ù€=Ž4À`ñMã°U†ilôŦºÛë’˜‚ÚýduÃwø]‹7t4}ò¡‘—~­×«L5ý^6PmüËAÃM}I XR÷ã‡Rîk0nßÒÉo\@œ7¹¿ûF Îî÷벑Ûu……ý?ãV€€@uÛuññ¶/"Ê®ìךéjþª[]{EMüG^Ö;N<ƒo†É—»J§\Ãk:ÝgŽÏ"“ ƒ´íF·)ª×ˆßˆRcöûFèzVaR@‹=ú¿¥ÚAoÓ}|AÞKmé£5&«˜É4d…Æ÷&[Þä« á&Ä鎋î7…^GµÞ ·.´¼‹Å•®µèÙÌ´È)è’`D0õ:¼‘Ú¦9Õ4hNÅ e¦V5¥§¹‰>û¿mÂhÔ9ë‚ÏW-—«ì+‹ÛTSí¤¦ †\;äÈ©w_#R´|§ù·&ªÉ-\±ÝÅ\“M+ ã¤Â,>þ‚Ã)‡¹$Øl7øÀ­P@+¡.ý´Ê*tÖÔí C£ÿL®vIF¡™Ž¡kú-Óg°QÎí´T¹Fs𨠦í¤j!H\ 9Ù#%ÍûWX”´y@Cc)_‘ˆQ·BeÊ”ÔK*¿(“¬uÏ¢à eÆ£êúÁºXp!f˜ªD0´þk7¿£l¯2ÔûhÎŒzCJbuÝqCûí3šŠÐ»¯Ü°îY´¢îE;eág°¸­› Vá¿ {Œ%JÕÝ91ƶ:”$#ëÑ¢iQ¢¸ Õ¤qqn²oÑm1F,4é·ea+ÉC Ô[7·±tÑNdD:hØ€žYù5FK F~‹r‚YÚôè$JôG¨+!é2ÍõTv4Õý²-ær¥ÕôèK(Õ¶]-:ì2¬¼ÇɈ¼àE­E:5€’ê AB…{Í´&Ó`:‰Ì2•ÍšªÔý,™eì¯mWÈìC$Ðq;Zåÿ»Ãá»ñ·±1 þð&BÑMÇÎÒ:Qe¯+íÊ÷?Ü+È8­G{ „$d²RÆyuƒ ”ÈY逇§77×Wl3céã“f‹Ù2·Îâ€ê=·¡@§y¿=ÇÍÌ­K²=”Û]¹õPbúFkÁ°£  ¦Vj¿ý·>x¦»q™nr¾€ áÝJ¢ÃÝj1k(ÎBp·gX×/ë¿ò09Ó?‚n]ÝI‚î&<‹PΜêé®} Û³VÞ|tÌO„±ìœK±nÀš'ÐÄmü>¼h½ªû.&Aã‚UõóS¦ &ÌüÍy8)ê÷1‡îë{´HXŸØUøeQA 65®Ê¦|.µ˜B£µ`½#šGFÞWÔ´ ¥±[ÇFnmq;Ç{\7ÄÆÅGcù[¾pkÑôRLä Æ®aù–blàA¦.ÅÐÀeM• `Åm‡…ý%,KŸÇY‰OÖXLYIN”$.GžÈ¢Á, Ž`IÐ2µaÞ…ð=QP2178"ëŸS›ì"· Ïâs KžŠ•”ˆÁqñè5úèµÕÒͧB›Û¶£¨2&_TpÒ mu‡Ë²˜(¨ŠZ±NÃ9džsâÜ êͺC|²„få×ÞÙ9e[T)(ìD8V6ÜDeEJÏ-”}Œ”ÝAS‹¹ “Èô؃g%ÆÐ~d´Y$5(-î9†nAb´† UµE i5 „à]op³æÝzJS¬ëø€{Fï› ÖÕwÍXº9R› 5P)äÌ¡AÓý²¦X~õ®b!'šÆÍü MÑÖº'Tòæe>•¸è1ëMá’¦R`fkgî šßA’lñ2‚Í/hº¾]§ØÕ]rªìÐÇ͹¼PUÙµå÷©ŠHèpG<1mPÕ@ıª*Æ\H¯*JÇ ædÎëCÊ![ìãV;º6R/÷q”ò:¸~^ .ù¸£g*¢›+èýaä©€NÜ4Ãhc°tïO¼ÚYµ¹Y§i¿®J,”l%•ÁŒˆÑ¢“L/x‡Ì%3E¤—žäà1J–'š7&'ª%]žb‹59)h‹R—èïã€^Ô—ì¶À±¼/Th°üP^òª@ÛØáúÍžf ^]nä©×딚œ$ÄÞ¨8+Ê€™!Öêxø›`BcÝ‚µB,›?IÓ¿¦•¸àØØ ‡Xž:Qñ–br,Lr¾=„󵘚1˜$n)}´®& ­[9®|c]½Üç[sE‹QÁÄê « J#'â;ˆûvÑ-@³Ã²=¦ ‘ºÖ÷‡æÓb°FHBóy‡=fôBUµ¬i+÷{T•h®0ƇM—ãNR³<‹Õ )ròHÓ€^R¢ªá.%1Rnñ0%§ñç!f;b­7Ð×Ð –¢7Þ­¸ê¹%)m/UÓ8"æ¶¾½?³“x«Å @Ì ŽÙqjú@KŽg 1M¬àôô­9=Þió …»ªiéáÍ =h–2ê÷÷Ù=¼S(»#±,ÆØ04רèboãòÏ§ŠŸÈiæÇÚaaÅŸ-­ ¢ÚN딥뗡€[8ªÅo,Ž^@·2˜y fai0f·4p„³ ç}íuóDíëïcnLq‡jžˆ0ºÄÄ…ŒñÌøln‹KcÞ{Ü-½zÿz² ëÐu#òööªàxT mcLfv*l^íâÉ0¶×XZÙ³ìIG:î:ì‹*5!‹Cj´ ë`£‚w‚5ôN‰^º5¸V«*Í™‰ºÔ¼m€5‡'ÄGY¬—Ù8â,¼Óp›©Ku߯Kïˆæ¦@¾ø“‚)°ÁåXmÆç¼ÄôÂ|1™7BåÊÈÜôŒç!_!q§Ën'n¥°ì—g?b)êuÖjñZ=¡g¹xˆGöIº~2þ ï4÷Rߦ¯à%žc@‚'± ãK™—y÷«–hž°fr?W„æ$KäAVÉã%¶Äó,¬ÐDךÂk|DGwÝqç,dÑPã Lu®À¼LÜUY¢y<™©~\8÷qÀM-sŽ»¹|ID™sˆÝ a0ÃôÖDê²ÇyRÙ>ÇZX+Ìe’sN—÷–ȸ—,N€yU¸«§…é'© ¡f ÁSуÍЬëpóTÒ=·÷ê Eê¦{|zóÓ› 5¼\õ MÃû§§<>ýüøþ=ÕI†™ï_}¡LžþØòg endstream endobj 5 0 obj 3994 endobj 2 0 obj << /Type /Page /Parent 3 0 R /Resources 6 0 R /Contents 4 0 R /MediaBox [0 0 595 842] >> endobj 6 0 obj << /ProcSet [ /PDF /Text ] /ExtGState << /Gs1 23 0 R /Gs2 24 0 R >> /Font << /F1.1 8 0 R /F3.1 12 0 R /F5.1 16 0 R /F4.1 14 0 R /F6.1 18 0 R /F7.1 20 0 R /F8.1 22 0 R /F2.1 10 0 R >> >> endobj 23 0 obj << /Type /ExtGState /SM 0.02000000 >> endobj 24 0 obj << /Type /ExtGState /OPM 1 >> endobj 26 0 obj << /Length 27 0 R /Filter /FlateDecode >> stream x•[iÜÆýÎ_A­4&‡³<úàÑ»šY{Ç’• ÑØ2âØk!$€ãÿäUõÁ&‡ÔÊq€mö°ØÕu¾ªný–žÒßÒÿµ¦M-Óÿý’þ#ýoZõ»HßÿN%ý½“ z­¡?½L{£ªÁ¤oþ“Ö/E%R‘¼ù5ý!ÍŸ\mÓV§ùÓg›Ï²mZŠV2ÍÏùy[œ·»ë¢¬ê漿ɶIsµÅ·Ò¼(´ ï'“ÏlÓ¥oþœ¾x3eBt*íÛ>pÑ)¸ÈŸlÓ7ÿ¶ï'#Ó¢ªÎ h#MjxŸ&=¾iÀ¾]&áÍê@ÒõCD4.$›¾2Æt“•XFÌÝ;S™6»¾ÙgGÖìM&(vCVâ§WÙ‰§ëCSdw§Ï·‰ßK¤ÑI·„UãÔ°(€   _Ld·3J ˆ63JÀT­ èh ¨ûp÷9é;ɿئªKsHdQY²à¥ ¼ŽâxrhÈ Š]VÖÉnLóܘK¥4צ4;Aòi4Y 1‘ÄHTò9žN›5m!+ù‡Ä6™f.›EétUß’IEËéä‡î’¹åZ!©Ft£D^tFœ·×·Y ‡XP¾Ô°¯AyrËiÌ2²þHù²UU«[O9.¥6,°©á¢ø¥%ýÅ´Æ_“×,õß.š£2²êz1ý¸z„#e†J‰@d·1J¡ê®1eP}v·;h k[BAÕ4J;ÓVÚØO}š;@ –ÈJdt‡/#Õîà“\*ü"T…Çü…­Âþr¨:Š~JÀ¥vUÝ!PùgkéîG27tó M”ç^¨ŠÒø—›}½[qM­TÕ“eÄÌ›Ú<…s.J]·¶î=á̤°«ê¼•ˆöb¿ÝZ>ÓüNü@šn²5œ^½†çkŽ‹¼IÄ#5x‹(}$ÊRaCÒJLԔõA˜s×u³Ä'šÛ`·hƒmÕ©®wë4åàQaOKƒ„sSûÒÈ}¡‡ Á˜³Ò¡"ÇjäÈpSK“µ‡qaš½ûi5I±WbAm¥=§Ÿè—#™åsôÌ‘ÆGÏ*¤¶Î­5—É#¡¸õ‹ sH‚ý²:hì›x]k6nùd‰¤ÑHn$]Þ¬ýÐc!PSõ*ÍŸí!l™5±ú+À¥É¢…a ÎGüÎ/b’  ÀÓÆ>±ôéV]´%"ÇÀR–h®S±¢S-Œ™¬saç Ùu@Ð GŒØ #ˆZqÞV°íÝ¡ºA†‰{ùfÅ¡éÍ1{³ƒ}CþPi†\œéºÜ&¢OóL³óyópÌîÎg˜ÿrøÓ’è¦0„Àr S£Dí`*؈Fã j„œbh((x¢¹!ÅÒ‰Úªé)FF+õÓ¬}!]ašª”-"¢Xº=â»Eyešý­vàñ¿Ã…~W™]CáŸfªb0Gÿpsó_ûÁ3`d7÷’KŠnHrD(7GÊ ¦ŸoÞóºä,IŸ—Mér&==?oÇn@h¹PhoÖ±+áy jŒ·Œ¤¦2bóê³c¦`K2+:‹iiÌ ßHLX;}»M:THÇU«!låÚ¡IïÓ‚& ÀÍÝkr¡2[)Þ˜lB$eߦ¹4 ÇÀÉÓDW.Ú»l–Ô2#´î±/¦{Õ£@èãâ/&íÈ_Ô aúÒÍM_›E‡QŠ‚c¼Ô[®Ês.ž™xú Ì. NÎjè?":h·T¢ùëÕLÙŒŽÄâM$Œë_ú²[±$Ûž€.²LâÊoBñTIóŠswåƒrÒ†„Á=G,#Ðè‹OâåŒÿÝtγûÌBv‹[‡ÔÂEQlJÁ×Ô3”~‹êdzÀäÀPlY¿b×mƒòÿ›m*À ÒA^À8”‹áˆ~ñtrŽ”¨ç¾ÂÁ‹cöeƒ=‚•kë&×F2 ?DpÞÖ»8\Ü0…Õ¡•ì+xDï`/“½C³Ú JÒ2]™ÅZ§g«V•[™A WBŽ2«|!†×ˆ{÷ËHÛ•€ig¾¥°è¯o |²<úüÆÏŽT?ú)T%ÆæJCâ…ÏÜ2uX*ãß}ò jœõÙL1¡1‰É6‡àVvô^å Šû­•ÁŸG+’ æÚ–ùhÌq2â/Ði‰]Ÿº9á!À!¼”¸äjWäV4ÂÛTÙ®u£ƒ5ÔÊ…š&´ºœêšDàˆ†6ßÓ¨Ö̹÷¶I)’üº8ìÒôÖ÷h’ì ‰/ÙA‡Ðóaž×;NNu¨%©•Ó<¦w…šHYšO ^µ’G¼NlÚ¡RÚ¤?ž ±í¿9i¹0aÅ%YK4F?n 6NIßêñ£39¦âPÖhyQ$¹¥oÒ LfQš”gš·Ëí:D‹>îw³ïC=ílÚ1}Æ}E’œt¯„l¤x7P1X7£E` ó—Z=‰Ò©êm>C>!J\…žš5'Ûç²yÕÚ £0Ð=ƒ¸ûý½kâ³_ñ{`2¶aêž¹‚›jÁ`ÆQòè²Ùªƒ~³á•FÎ75Ž HøôÛ%ƒ-×ÕÑQs£Á•‚p»À%~ô™Mnl$èú|Ákw¶Ï(Ù‡ø—P¸â) îkHúA* Où5Ò ø C$ÓØð”E6áèŒLã<­C·mJ5†’†ˆ4==Õ¥f›pøä•Ŭpîpvªp¦½l'ÔeõÁ¥•8  m•Ê¢C ¡3LŽïÝQ£}æÃŸs‘#xÄÇ]nÊÕ+ô+œ!$7öKD–c#Ýæäy÷{z?¦äcwÿ,›º·ž3Z‹¥Fª`uc.DZއ£ÛQW:Êí‘:™q…êœ|Çg“5«•è€ÁÕÜj‘ä–pFq$Pͬ64DáÌ#Ë4%pb†³)¿£ùíno»â®^¶BÕ¡Ó²×Ϭ±ÄbT€{\ÀÀ‰Þ-nØx̱zakî>Nª$ÔK‘kŒÖ0Ey"TÉÔe³HˆF´Ò[Y‚8K}:€b2z°è—F®•€÷#Dc š~â¬ÕÓ#cÁ iè2, ½§„7Ü®á@o”8æÅÕÐÞ·¯"õFÜ׳}õV ½“„UñØW?,‹¯EÆ4jpT3½ œE “e¬¥W~SÕõBUƒ:§w䀨ן5].rVô“%Ñ<§ ¸4†; K0¢“Aܳ'ƒîS¹m¡´®Ú޶ÊLÚ­Žzú¬=o7 F¦Ð^L ¹Ï (ì€'x»í®íž#®íéfØ»…ª å½Û=RVÅk8(uÛ³D´ú¨ø쬡^z`/ˆ™û+Ô®6/ñì —LIËÁZ]ë—ŽÆ@†aOöØì« ±šÎfwÙ“º=fïpC ]'ÒbëžÖ†T³¾¸Ãøœí«Ñ‘{ 9 ˜pr ±Ð#ïË?„FúEÓi ¿…j˜-†ß/lÇÆÏË"ZqŠ“øw"@ ÛÈ¿áÅxôŲ‡Ÿ|ÄÈ­àÇ4$ÑuºÐpâÚ]´Dî jÙÒÍŽ êp 4D»¯h’î”¶¸gÀظ”Ú“¾(0fU[†§ë²`ƒ2É¿ÔúÀØîõ‹‚òl’$Šãý\Ct÷‘.è[àMi2üŽ}Iþ­ÒD2!há0O`·‹íYäïÐõî¥N´*+ü¾LåºÌ+øšQ‹Q±¿upæ >€8‘°³Ôp¾a(àÛH °/Ø$=pÜ¢×0|ÆÈŒhÒ[«'þ”Óp3jÊÊc•¡4gùŸ„«Q¢ñQ®Âíƒv¶RÀ4ŒjÇìv¡£v1¶&)µRéJ1žFûÒ`Hn±ÁÌdUk[|Ò4¬Çœd6¡Ò\è,ÐC=I‡códT$zHŠÌQpáBÂ5êU›^©$Üã€/Ø5;Šõ`zo†¡áúÞ€îÝ^ó <ªe*4»=Ñ\=¨—VBmoF¢ÈëMºj‘å\B¶@ɧÜy@Bß-uÚB@yà Qùƒ÷ù‰Œ¢—8üTzöÑËÓÇé­r‰KCfD—PÄM£¬u‡-|:BÖçc ¤‡^4^p8#>ã¡”ŒÈæ¸E»Ì±R@óŠt‰á1ŽqVJ·&<Ñ%Çþ&-ØÂâþ*5…Ú',ÚÒè-3nKk+–‹¹Ç;´]–|†44HRkÌÜÉNS·M(tÊìçÓéÉ9Ï\'›óöj‡ÊþSú§ã](/`¾bWÝKîy~Õážœ=Ndn­ &/¬íÍKÜ¥ñ«Ø½˜9¾¬ƒ"iCwnèæŽ¸åk<‹âA7Càš¹ãæ;ùÝñxÓ r‚.A/Åä wa'F7t šú}ÎG> endobj 28 0 obj << /ProcSet [ /PDF /Text ] /ExtGState << /Gs1 23 0 R /Gs2 24 0 R >> /Font << /F1.1 8 0 R /F3.1 12 0 R /F5.1 16 0 R /F6.1 18 0 R /F4.1 14 0 R /F7.1 20 0 R /F2.1 10 0 R >> >> endobj 30 0 obj << /Length 31 0 R /Filter /FlateDecode >> stream x[Y³Ü¶•~ï_AIWj6[±qÁ•ºåH²äx’ËÉ,GŽã¤&U“ª$ÿ¿j¾ƒ€ TߤT¥ ’Xξ¢ÿ^=T¯$þõ®¯&««ü\ý®ú[Õ}ü§ªþòOú«éïÛO•¢i’þŒº“«>ý_Õ}PBUj÷éÏÕÿTõ“§‡ª·Uýìîù‹ý¡jUo']Õ—úrh.‡ã˦¼”Æ7Ý˪6ìUÕMcuš¿[ls¨~_}ú¶úúÓ5˜jìÇ%CñgìÞKìþþxصVªª–'×´¯Õà¾ÁçðòrÇbŠj„莃AÏÝ1…k;5VõèÒ»óÑ^ârn^s<‹{צ)ÍË4ì0y< w”úÝP©Güws¨4 zíøï÷‡Já‡UT ôÇïá0½#²yÈE7¼eÂì®3‚0¶/†Ð¨f4ˆS¯/ké„Þîê{½n]7a#ÁÑq’'e|‹ÃYzÒ¢NÆ 7!I/u'Ò®`½pßÄI ]ŠîUž²×~-Ð:ÎbÊÒþiNU‹î8à,¶D†(cHpw³à‘™§%–·çáàŽEAÔ¡;÷¤´sýäP}úë•ðêÁ­\X“©Q€Æ:Ðt×úóµóTòã{O%?Ú 4×NWÝ‹ÑôW{ïž_~]ȘQh+§MˆÞ‘äõ ÌSI*E£¡uâìÙ@ êäŸN— þÒßüEÌ¡mgÈpЍ66j€W)^­-^Z8ç³V¹´LÝq:k×j@^à€âbÙ ™[²¥ ÙÕ¿a³°„V£°rÙ>:²±9Šføp¨Ü®þ8lm2ô¢Ÿúå&Þ¬`‚)"SAô¹0vL%R&0F+§‰³éФ4n¦:`ÁêqKˆaˆÄ¤V¨çPG)°2òäe0,/ÙÞ½t-$(¾'›ÇÖGy"S ¹Áš§ÖvEØ“ ðIWœôæAŸïµëÏtTwìì+ õššý±Á³Ög²O»‚Œ#Åh§©Êw¾Eca4‰][š_?íG€Äo çìEÓ:Hm[9²Ð#X Y.ošû÷â+ÚÊȞĤæmý—mµÔvÔÙ¶6Šqý´½ÔêøìE»WÏîöÝåð\=…Q¤‡/k×ÐO Ê\4þè\ùº¨ðü„íÊh» h+66Të Ž…—NâF—ÃÎÚÎû9zÕœ%{i;îà÷›–|]'ËÍxï}?†ßÔå0Xö\þ]é4˜Å›§Q”áO ÞûÊ3$»4Ø™¿9å<˜¤Š+}jΖÃzíòd`R²/bÚ¡$,$3Ç”';=sË"œ ‡‹E³8ü'ˆ³E°ÓÊ& ¯tÑíûl᪓f@9)פG¢Š`vüæKo¡ÚK+찢όj¹ÎÐ+,2 È5ªÏ¿Þˆß{$1ˆ´—f[L—8t3z$bÑ…% ‚êø,âÉóÆçÐ!ƒRµ£4@}çßß¹çœVó=NBjP!?cìóEȴâ]¾ª™r¨_"qÁ•{cA—~œ½ô|üo(Ô D5G”FôYï9ïT•^¶ØûÅ»#ÙÅØƒÊš=*JÖ¡jé«T3÷—Ú\û'Ï‘BäÚ/µR !+¼–¨eT€Ôs'ÔkiÍú°h%òÀHVôz„Ù’œŽç7O¨(‰»Sd±¥æhg\l”èQù¯¶mÚýäÍ y[Çmªq/7ªðä\·ÜùfÎÝÒ¨äpÖ!’?*¼yx÷óÀ¯Lzʰžëâ °{eå ô_.š¹û§$»qf8g¥Ï ÛNfÀ¤f€qǯ8é@b…BèÉ!Yn>¾Šø;Ñ *L‚®©ô­‰,Ï3ºd|9ŽÃcmæ‘r1’3]Ï8 % ƒ„Îä'åå »ºûO¯à¨ÆÂú€>P9Ž!W¤®¤Î'j4ŽÚš^ô(Zu_¶T4ƒ ~ÈépÑtTVÆÞ,!Œ’‰–G-3iT“Ð*ØB 嬨 )µX„ôÓ”¶¨ŽhÎMi’¯œ¸…¦.…èªTeÕIתA„JÇÆãöÜS@¥’J”E¼X0h[ôXÆzœ` ‹ÖËçW&›#Ä‹’`ÔÿZ¨®ö {ˆ¬4²ZÊ¡QAñuBBåVÈ Œ{Û:%yÜWAgô•™òÇ#–­e?Ï(f›àØ(ÛÅYÉ,×ÃèyP Œ/%ŽÕra¢ ÌÉ“ÐP!ù±h@Å. JIxâ& ÐÓhì©ìA˜ h©²ôšËÔ4ý¿ô;ßiŠ/¹ŒM3¹M@£Xæ¦1‘?ì?»Øø'¾Ýò ÑßXë2~$Tiãqÿæ§ÌŠe:jr ”Ñð”ÍNê{>Ž›ã¼l-°>Û l™¹‰Bç8 á,^rÅËëˆGTq¥¦9'—|Añ›L|Ò\Tc¹cp'ñafì´¿ï¨nþæ÷_mP9Ð @ k‰ÝáGR).ZK|ÂÏ4"KŠÈ%?çŠFy¦,/‰ÑRàû‡“æÉ¶‹âLrÜq0‘ †.‡ùÅz$Īè’{¤:g4®#\7/Z •÷#¡²Ê¡9èω‘åÉ båIfÒ•`Õ¿å~7E Ý`ùj€ˆ–’#ÐÕßßýø×Ï/öo>窕‰`×LHV“N%7O쀪SEÚÜ!šÜ¢ÂLªÍ.Í:ÕËÒ€_¾D¼±…–Fà|—œ%ã®%˜…VD¾&Á]—K(hö j¯ðš-ê†ÞrÂOÕ™8 Ê ëñ1”¹ñ£ ?'¶¼}AŸH¡Ãr6Ï´QÒboæÂgRç85è?âÜp9‹þè`˜ k+‘žÅâÜDr/¶2ý¢VÌñ/ðó£ß»*À¢×?žÞ&ë“à„…Ît ½ï¢Ý„ƆøfneL!+Û”…‚0¢W`R¶M. å¸ÕC5„5këUêHlu~Nn‡X¸ÉXM†':_nˆ2wé}¦yà½! C/LW;HS7õ}깂¶qêäǹ©¼5íH­~j "¢;! Û îxÜ” dF±(#‹ ص(hs„Zn€•ªè½8[¨pèåàYË–dQÿÿA8Øe}6ó¸—lFG±.§£t{÷4ªúW,€†àËa¶°”ˆ€çѾ®‚‡Òhy %dv³aµ@QÔ·´I—ØíAH‚ó3¤¹:r¨R¡Èq•C–?v¯?Ö´Å%XGî˜Aã~ÿ´eèàô4ªùù¾‰[-5‰[^ÃÂ}S!4ì1ìz~Îl¹4õëA¸¢3B¥òfH—5Äe9P£üèp‘-_y^D„hÕ/pœáÍ¨i¸,—Ÿ3;ÓXüŸ¹»…¨ÃA¨JåÛ½²TFj¸“4 Ú-D 2d5ª DËnËÀRõ¸á‘C¸@” ÿ7ñ4è§¡¢žoRDáÇ’ŸåÝÎ=_yMĨeo ™Uf~è­EU/?'¡ ãš¿¯SjþE!Fë“êP‹-HÕŠM,‹¾Ž3ÇñÖ¢­ƒ&uÓ1‰Ð:(ü$Üï>0½-À˜wDÒ[i¤ Q^òݾ-’- ÛpÖ ¾SÕßYS\â:9ŠgéADœZì¸7úCWÒu^~¥¼vR£'¼¹Ákwïkáž 3‡]:Jš,EÔà2=k…Ûd2Ëb _™«3Í,%ɰ= ÂÅÚ10(³n‚SÀ…ŒM¸©àíáʘ¡<¢\X„"”+°aÖþIìóðã¾TaÚŸ°Còñ?2ÊÌ´Î(áŠ$ì±YÖ2IØò»p£ÌGºÊLé"ñ šuø¶§FØŠk[Ë­så§û‹ˆ[Bÿñ¦5Êò\ƒ;¯Î#2¨A‚Ðè)#º©!©ß›/Jð°‘H/xˆ2­ø"6ð7 ®EØ7a7Œ¡ †GH#Št±vç_Qžäø4Ãw"i6îïŲwXôÅÁ½®Ñ“á ý4ÄåI\ú'a§§u6Õ6 7M‚ä"Ì;úå‡Ãú§—zƒw¼$:§;:AĨB F¨¥‹Ÿšëø>1óèMt ÑfºÊ¤Ö•ò¿p¹6xž¶dÞˆG†,˜(B‹·ÑH ùN<^iÙµœkJÁÉLÐ}Åô,þõF1éÇ̺4?Ö ‹£¹c êTÛho^hÒöf€æ£Û,©ø» LO¬å&]‡z†ê"íx‚Ò¸LËðzKHŸâïihŒO¸fýŒC\Ã>‘¾Ï«P2,ÝÕwšïkfóÂ5IZ¢Û_xºàܼ8â3è"ì SG3C† ͆ìSôW@Ÿº¡ìÀü΀ ëDõ‰ãİQŠ™F÷ð9ÀF_rØü'¾½JŸÛ(Ô%'ûÚ7,©Q&û—ëS.—?„o;”}±†A¢ºS¸[ï—fäÇ043Ü?üá¦plü+?1ʈšA\=Ç!ü£¢„"&d'ãi¦V ’ˆcÌ¿h`µÇ£×z˜%‰ªþ)ˆ ÞËSë> endobj 32 0 obj << /ProcSet [ /PDF /Text ] /ExtGState << /Gs1 23 0 R /Gs2 24 0 R >> /Font << /F1.1 8 0 R /F4.1 14 0 R /F6.1 18 0 R /F2.1 10 0 R /F5.1 16 0 R >> >> endobj 34 0 obj << /Length 35 0 R /Filter /FlateDecode >> stream x•[Ysä¶~Ÿ_AkG;R<‚$Íx-y_µ‘KI\µc{½YÇå#N9~È/õÿÉ×ÝÎ’£}}_àþ–Ü%¿%5þµ¶M£“ÿ|Ÿü=ù5©^þ®’~§_M¿7÷‰¢e5ýô:émS6¹ÿWR½P¥JÔêþŸÉ›$ýàl›´&IŸ¬ÏŸn¶I¡Z3è$=¤‡mvØæYQVõa«4Þé¶NÒf XIšeF‡õ« ˜mòurÿiòü~Š„êš¤oû)‰`¡wÙ6Ñ@ã@WEsê%ø4ƒ5ãL/²Ü\ùé‹lŸü è…ŒV L¶^ùåÕ¸¸òsCVûai«\ŽÁFFXa8 ­É2¿W™LÜë0]åàÎj‰;¦=åŽ?’>l §ûŸNx«•*»Ú$=CX±”[’2ñ7ý`aO_ª®s{"Íà=¦¶…6Ù¾¾Ý®fN„4˺VP­y‰Þk[0µn“´*˜!Zw+ˆAeei!Ræˆ{Ä<{–LïŠlßï»ʪ½íX”H£³ß† •8Š%ê€y’4ß——¶»² Ò:Æ””º¾¤ÁB³š‘l©¬ºD]¶õŒƒ¸Hoõíæõv¥ ÜY±)3pb°uuØýj£­ÝvyÂF‚4P‡ æ·K¸ÔãÒY[ÖV$®½ÄË+{ÙUWCþŒlº7d±ù…·aÿr¶Öª´µNbØ&‚}Øž«|›4\ ^iªÑkÐt®Öö\=Yƒ³³ljp CfoÄ:÷ݬž6ª)mç÷ˆžlÒ³â*ü´´ÙÙúAUíV):XõeeX¥Z0©Ëj›ƒñfVÍì²2{yÕg{Öfšqb%í¡GçIhx íùÊÏwä?k·k•^²§¢U? 7ïýRçëÚeN.7 T™Ã¶Ïa.¬È´¢«ê›íj–½Þ(¡†³”¦ٸZ8¬ ¦E>T¿&ÈÒKñŽôf¤ ަ[FÏ8iZ…ï óÞËh8÷_ËaÉ&ÍЗ=þ’%t›íÊ"ÒÉþ1®™º/m[/C€ù¶%ì‘|PÊÖéñ·•bïB`¥Ä zPY®ámÁéóñdÕéÒZ‹“ѼýM†R‹× ` ÜKR *8´2ÓYi9Ñ|F‘},«šý“±+œž `*¬36ïkF–9€tºÃ "Ý¡çŠßéÉ‘@£ï›âö°çóä"ÀÌ‘ë\;ФŠL³ówÒ°ËÀUökŒŽnW±+Æa-etˆoô ñü˜±õÍΩ*ìA|üÒìùrØîƒ>Ÿ=¾c/Bx ÂÀ”Î+`µ;‡£u»![1•®7*3û2ߨ*ß\Z‰o‡¥0ëEÌ99zFPéAg)® o)«\$ÅüC¦×Oºf˜xHÂõWñßQê $Ä¡y4ÙÕ¨ø âMoÉä"„K5 Ü~Ój¿I¢U°–”r peo0ä‹Ù €&öÖZ²7qâpr+Ép¾ûïÏÉë6_wÅÚ$û]Ò$OŸ&^ïõGòã¯å¿¾ÿþ—ßÿ=b‚5·ýM~àòßHc”ë]ÅÎØ=HR&¯ˆ}N£øíY˜ÁJ^"ÿ 0 §2f¦Ñ¨àA½«Yñùxö}å@+¯Ù6²â+æÏXÉh ç9µ˜– 4XÛ=ÚvÞlÛÁ™¯~s÷Ë5ÖÆyꪲ3öé.ª`¯äN"ÎåV,¶§²lŠ™¼`}#J ãhÓÚxc/®6;rPËÉ%â*E·¶Ñ¥žÉ.?‘ƒ‡Y¾{¦ DŠ÷)3²{±{e_.1†"6CVuÙÍ@¾ªýUn_v/(sí©âŒ×ñí|Ý(”P ˜GðC¶Èqù\egVéuvHMÅéc¶>—P7µOÝëøÈs0Vƒˆ™Œ2£ôØtÈõæyfœä>‚µŒ¾~™ªt› H)ûIõÔר¼¤CÏ›' ˆiJF(ÙŸAU–®ážªbøËó*ï© ¥GÖVêµ®À8òÕààQ»¡éLÙ)ÏÎYKOºÎŽ< —5¨dM?ÖXq]óáõÅþ:¿Ú]<· îFúÞÆ Š0Ó¨VMg¦à¡‚™S_Ú¬Ÿ¢ªq*͉æ, 8áÏŽSî}9£Tí·Ò…™Vž^$ZƒŸÝÐÎE¯æ5b†™Ú`_ßydŽô49l"­ˆÊ'v£ëÒ Pr!èƲ:DæÒ´5Š>t•fA84Tl5T»•¹|™_]íYfèwÂÀn=ÖC^™¨5tñìÚèÒ´„z!¸Ä'.v×YvEE¯x“'kÃðr×¥µAÃÆ§1q S(:d˜f—.DòzFÊ]iývÔœ¢¡JÓäh…°{¢,C MômaGTâJ<Æ Úh(iŽê²Z„t¹~¢öAù$3båú’Ü à<–3êM^•HNgõ[‰³¾C˜Ý„|#k¶€ÔWäHõj°ÏÖŸí^ä7F(j¬f-¬çXå ðP™O_uŸscÅ ÒÄþǽ[ph0•ÐAú釳Dj=”m6 ‘ïÆHoouÜkÕäÄÛ@DàŒk~¸Ð4M³„(ž12ÝêrèÂ&9jj"¾'4gÚ¥2ÊŸ)ÛGžÌçëM ya“¸…ñLêtè!m©w0ƒup ¸qªór¯ÎTÜ´1h¸"’†Tè‘ÐxÚž¡¤£òr•bxþk¶-Z‹Pêú‚\(zGØÒ¹ çK ƒædšž"„žS‡cwó¹tæ‘ö¡äðŽv¸šÜ Œ| 3“ÊPç‰kuE wß/á×0AIB¯|ÇDÊ îÎs‚_z–ñYôrÒq°|YຼK×R—q8‹³”6tªì—R<ÑÓú,œÓXµ`‘#ùj>“Ci-}b«¥-“£7XSQ—Ô›’~……<ø¦:=®ÄpG#sÜï¦ÄïÄ\›º.Û†ô9Bc,ªqE3£Âdµ%ÃãM§©FÕ3·'jÏPäÑn÷¤¸5Úä§¹`$4ÁÃéã šóļ?»“¨§>¯F5;¹ûqN”z§¬Nu±–›ábcüð_üÁˆ¨—D‹D64‚}hô×ÔN7}é iPèÑZ´g YZ€IŸôž«õéF‡Äa{ u9<¦{zfMï²ÒÒ=-D <¶ä²1®$é q¢yÚveƒz&‰‘h¦Ñåä¶©©q?ІM§šøÍÌü¤¸ŽPJ¢Bh¬š®Å­¥`%Œö0½«Ê^AgcRb+ˆ_è$éÛ7—ÛÆc;4fóù‚ÐL?”F#°Æ˜=Æ/3˜²î¦£íøÅø‘îMK‘7â²T“h$=s[Ô¾ÃMÛFÍŽ¨m¦Pã°²-ˆÇ5®}*wæ0Ò@\ ‹Iú4–î-œöÒ°°¸aÌ…d‘˜;ܼ‰£ÇÉ&w…+$ÓXÛvOÀ<,ׄ£WÄKIðì÷U--9û3ÞKƒn*l]JkÖÞË þÄÞ‹zØ B–ž+ÃéÕTWŒ-̓&tl wî|Ë)æƒwØ2ïxšGnÈ-øHw! h.a§Y]hEË–Uúq€s¼yÁÁªŠëv>ý‡®èã ‹}la$=XÉŸpâ[²@$vŽ1cа¢ÖEX„‹:‰$Gëâ-o3-¾7a‹Z`–aç|qÍEÒ£ó³è9'ôp_‰%¸“2ÍÕ+¨SÎß?œs׀Ыô9=`Ò&ôTF¹!Yuýeîô,_Òˆ%Ÿ„ábÿw„à? ä™ ôêBÄ=VhoŠ.ÍòÆ4¸¶Wäט ô^t¨ŸgS%cšÒôä×Hw~ ¸` øžÃ4þÍø/ŒÏØcÀ-èE×ÃWL8W˜‘<ƒ™EkÄC„©iäS‡v5=ŒöÏæASGÍêa@…o¬ˆZÕ´;Õ´}Õ¸-í‰ÕŒöqïkÕ(> #¿é4#V ‘ë5†âZ`ðÓ¢Ðì55té“~úøü´ÀÃÇÚ7w·ÿ¸å"Bá"{{w÷þæîû›·œž×m‡æ.eω»ÿ‚«ré endstream endobj 35 0 obj 4225 endobj 33 0 obj << /Type /Page /Parent 3 0 R /Resources 36 0 R /Contents 34 0 R /MediaBox [0 0 595 842] >> endobj 36 0 obj << /ProcSet [ /PDF /Text ] /ExtGState << /Gs1 23 0 R /Gs2 24 0 R >> /Font << /F9.0 37 0 R /F1.1 8 0 R /F3.1 12 0 R /F5.1 16 0 R /F4.1 14 0 R /F6.1 18 0 R /F2.1 10 0 R >> >> endobj 39 0 obj << /Length 40 0 R /Filter /FlateDecode >> stream xµ[ùÅþ}þŠÆö23=ÛGUWµöŽOÀ!JÐ* !bÀ&àXB2áÿ—ò½÷êêžjï‚,±ÕÝu¼»Þûªæ·â¦ø­hñ¯·}1]ü÷]ñÏâ×¢ùâwU¼ÿþjúûâ¶PÔ­¥?£.FÛÕ“-n?ÍçªV…ÚÜþ§ø®Ø}ò`_ô¦Ø=|tñév_Tª7“.v§Ýi_žö‡Ë²ª›ö´Wßtß»n¹Š]YúofÓì‹ï‹Û/‹ÏnçD¨¡+Æ~œSQå%Í5ŽöÚn÷nbùÉÿ¡<øw‘Þ•m&ÿúÑoöaºC9ŸíÓ×¾“±‡±½öO dv!€Ù$Ò ¥>í!ŒýFãñë}¡ðÇÊšÈB.˜Ÿõ­Ð¿<„9šC ÷À#7»ñÅÇfú¬ÀH'ûbFƆ¨¡µ5ôçÈ‹Dh…á¯êf@ÜHñؾ»GŦ`û–éæ­eÉ¡}8ÖW–™D‘õ8í5,E][?Æ}ÚˆJy¥+«[·Ê5f÷3êcÖþ˜,:2áM4ag<ŽþÓ^–VdlÔŠt±àéÕU£}ÏMÒÓ™÷ptR;Jí“}?%Iy@ã [•šÙPv³‹&E}# ÉÌd°®±óÖK½µíö `üðAÌCù˜(´Êš«Ìës_ °ˆ—P¦8.< ²[Öl/~¸Y™_¶ž´BЈkt1 n8ú¾¸ýåÌ·õÔ×f˜éݘb‡“cUÝjÄ^ç\­Í8ÚiË2j ‹]„ß<ÖÛÑÂ4È*i:«ë^Î|5j /O¹æ8IF¶kÆíÅÏd† „µºmÁz»°Î:¿2 ¥NˆïÞú&Å„Uèþ‚x‡¯íuÃÞ!m¶jz+¡6œÌOp(CgògˆŠÙì®`PÇðÙû1MÀà¨I&“^ú¹¿¢˜ßP†aú¨$T¢MbgzS†洯öE‡…_¯hÅ j€ÞÏÜxW¬èúº!3‚Ö 66Ž…Œ—ŒµJ;ÙšÁ¶Z•Ž™iõûï¶’ÉCKü¯ÚÒòPSªkËÛ¨-hƨe |{Úu§ýö“‹çYÊy v¾Ö¯! Ì{“¦ -#œÆÅžº56³-^·óþ‘˩ܒ­ÀÚô`šÇÌ+«.„/8Vìñ¤­µK"îÍ÷ŽLäg&’5HTýðóÛ ·ýÎìvZ~÷ê”pJ½ã>ÀÄ=J¥ŽÕ~CéÏKØt×£_‡xO=²Åè®î:¡1 ,9¹=Õ†“ IÙ’à ä ïÁBý~C{Hõm$÷ ™½;°rë%¼w…`”ƒÓ"´³¾HðŠTW÷dê<&É9‹à{°×´½z¼}_7=¶•A,ã³²µm‡Ù\~/Aî™õ–N÷uO›IJtÙî›7ÐUf)ŬêbPª6ÎFƒ½Á~ÊCýâoË¿?ƒýX…Œ¥<\Bé¼5úokRì`öȵҩ™ Ž<ÞçÙ®F²ÒòÒ1w¹Œîl­{ÏÂÒe'lƒž¾¥ÿŠÛŸ’<_×̡ں‹Ý3¡”Ç,“s,[wí|d–ÜM¬*tOÆåÉ]†)äH-i„¶©óc„EÂáÃGýC¤ËÉÈ5F­­;ìÖAºWÕÜÉh3é"Z0ºY §S¦Ö(µÂj¨¡‚ií`EF; ôŒÑÓþâU~œ1u¯á1‰Gã‡ñæÖêÛºëçc‚PaúXL°9#_¯QÇQ :ý[ö…zd/ÔÃGðÞ|ÀëÀ9ʽ<5?f90F׈ŒYpjT§- ï'J®kj Ö}¾â}’7h¼[æ Á|ÿv5 j1‰ßÂ(Gá(HÔ·œØðcGå¥û„¨Å_טï eýÂIÂÁF¶¼ÔP½Q«ÔVR)¸2»¡¬¤Æbâ|@Œ¨²Ž›“¬Z® ùiïÉnk y]åAÓøN²Ü¥EŽF²~±¢o‘uò§ESaS‰ÂÒ¤êçÁeK… ŠE^I²Wi»­—\šIMÞ³¨A°B˜FtBö—õ¼VÙ9=wm`´éô6}aâÜbœˆUšcÍÈ‚š$å…c‹ †¾¦úž“ o3ʬgœGCÆ ¦Q±Ž-ü0~ÜÎAö`³†~Y9!W90.É=?AÞ"9:Ö×~EJl&$óÞ¨óᨌ- Lâ 2abpR¢Òk}¼ÒèØC`ãë0íÿqñ+Û>±–ÅÈ«§kU6±º|Zå<œ#á͹x(Œ!hP©‘¤…–«a¤﯄§b7.‘šƒÄJò¬ö½"'éäžw`!¤dÌÂeô,2æ¹~YHs aj—‹B¢ª1vú¨¢úîüø4&uÀ€âa<ïÞ½síè}Uœ ÜAÏɃ.Ñ'°Ó:k¤ØÐCµœ 1$)…µ¬*vϹªäåG¬ƒ´ÏãbML£ç¹-ÒÌ^ºô•òú¶:íCÙJxY2­xËYdˆ6ƒD+'(ByxF~[ˆˆê¼kL)?y’èK´,î',ss9!òu7K²&HnÞˆ-ҋѼ¸û£×ÂL“U(ÊxOš6Á¾¨Ï|/à Ո`èãQµóõž¯ Æì…Z8ç\åPJf 8Õ#¢Å€BOµmĤ m*z¨O-'BjZñRjЍÅE'¥¶sj«Ù»ø5Ud-,(zálû5b¸Ô¶GqgywúVKvQÙ “àö êÆwaú¥öeÕ¨éÓ,5çAR‚…'îÝl‚¤n"Bî%U½œiŸ^,, "r“ù’U…¦ôŒ°IÑ8¨å.Ó06wV‡’D õG¥-§¾å}ÌàmJ¯Aª‚0sÚóÙA)q—:½šlc0“À‰d¾' OZ.=\ÃZ !½6µ´e‡¦æqG ¹£„+jþðÁ‹àíŒÇáŒ@&Ë|ûáNQÒmÇ•V² CI77[šœ¼áâÃV¾¤%k '™Tåö*˜XSÜP2Hú‘y0~Wã¥tL\,-,“êQFúŸ'Pî ¨ù–aYh f&! Zó#P +Òã6Ð5ùr£Úƒ[÷ž÷¨êqZ¡uw@(>£"[¶HœT…áSQÈB®g°·ÈÕÆ1³Â0©cåÐQ0D€ë½žºÙP«í†¨¦ÂÓíX[kG7ì\#Ÿ4Ïám8Gq§3Nñj®QÃl±Wø„™5·Â½0)¤ è<ýîÙjðÔŽE@fÖîVäÌÖð !;^Z9GQðS†°k@ªg":KÔòZ~`š;}[)™„ˆÏõž|T@?Ü<[  @a]ÓJÚâ„•[»Ø`ê×ÍðªÆ€è”U ¨NQaΟV¦Ö ',§¼íV0(ÔO'òZ;—$PNKE—gD†Fvë/O»ÄN>¨Ð¨Í2µ™Î–T2¤{"Dšwy¤Z`R‰–´³Sž³Œ bR˰hu9d*Ë4h®[ƒ ÚÓ-3ÝiB¦è|?¦;X|?$²Z2ã³Û_Θîðöí™~fL×G! ­(ºCÙÖM–glºýã<ˆG©},yæàrÎ3pA'«)zÌ­°lè´@j¯©?¢f„}Æ8ø~j¨†ÓRÌ׌~ÙdÕl€§Ú]‹jÆ=Ó®NÔ“D‘ ŽJ§€ØæQ0s6l)e[gLÓà Û).w&Õ<•°¿É&K¨ "ò®A Å_uˆHèZÅûŸ*º‰ŽR|t~ýc–4…À¢:æ‡-%Áh(F[’<-ª@ ~áQ¶•…LÀÜ_ýѸ åõ†›t³c<Ô®ª¡”›º~\lл÷ÈÒŒ=oü H¹?ê #vMËuøW#`µ±oÝœ GpTÑsýA_¥L¢–º®ÊºÔeMWI„¼©­Ÿ{öqÚ@r?gŸ&ˆP©N T°è)Gñä$úâ*Ö0FŠ&úB„›,¢2ÄUkô °›†í«g (U‡£3LìPOž:r)E }…ø”­×TjK÷/ºÃÙ/9Œ¡Jb Ðs>,‡/³öiÆÁìÓ­&®Ìš]'Š¥™<°ä…øGIJ^dz$÷玃€u×^-¨$ØžD}xò5&ÁÖ®Œˆ7}"ð…¯!©ƒ²½Sœf|-Wøf¥ã…sjzA†ýÜÁìxJ(Ö`>½‹uh¯¡ÝMöœ—¬dÍÙ\D–Õ”ÀrY{‰ñG™„’‹,Œñ“ɸ‘¢û»àu5¡èÉ@ó B¡—$%ÔÙp WC%ôtv‘ǽ×mãB¨W8覇÷¿¾a¯¡ö+]Ô F²[ =zœ‰Úh¡»@%Àzò¥NÏ2 k (+.*¥" ®%ž;÷,&Žð'Ùn 2%Ì 5Ùøýû÷¯÷:Nxƒ~‘RrH¡Ö$÷}hÈ{À Ü‹Y¦7Ω鹷€r÷ô@+b™)sÇ ½¿DTöë;!ÈýÀjþTÀe¸ ×ÛÜi ýž‚ŠÃ–NôQøYÖº¿-ñ=K\’geØÌ’àQz3Z‡ùþ9Ì^éA„î8´„A³ÈÉ@la¶]âæ³˜_C¢‡§øKðΈ_ˆµ’¥ö³ûŠÓ -®£ADˆ;”ÌÐmèØ¢åXƒC(¶¨ pÓ¥Û€;|fQK 2p%ACá*·[°{ׯècì’p$e’õexî[TÕ%R*Þt½‘=À_ÛEMÚÑ¥%:kB&û#ZqR0d.ɹKN8xâk1³j•~ÚÕu1‹¥N‡Æ¥ÇSç#C¯…㊚ ꂟà…«AÝ´…nå· ˜)¯J·P!]$âB‚>˜ðŠw"ª“L1Úp_â¿î Mn¡lr¸üâæåO/ùˆX ãäéíÍÍÏ/nÞ½xû¬ê¶pý÷tŠ Üü­—Í endstream endobj 40 0 obj 4427 endobj 38 0 obj << /Type /Page /Parent 3 0 R /Resources 41 0 R /Contents 39 0 R /MediaBox [0 0 595 842] >> endobj 41 0 obj << /ProcSet [ /PDF /Text ] /ExtGState << /Gs1 23 0 R /Gs2 24 0 R >> /Font << /F1.1 8 0 R /F3.1 12 0 R /F5.1 16 0 R /F6.1 18 0 R /F4.1 14 0 R /F8.1 22 0 R /F2.1 10 0 R >> >> endobj 43 0 obj << /Length 44 0 R /Filter /FlateDecode >> stream x[k“Û¶ý®_A;Þˆ¢,’ÁÖ–’xíÄM;ÓÙÆMóPR§IšigÚNÛÿ?Ós.)È7M*¾Ü÷=÷ûïâ¾øwÑâ½í‹Éèâ??*þY4ŸýW¿ü—¿š¿/ÞŠŸµüu1Ú®žlñæEó©ªU¡6oþZ|[”ïŠÞåOn>Üêͤ‹ò\žwÕy·Zê¦=ï”Æ;Ý·EÙí0WQV•ÑñûÍbš]ñ]ñæóâÕ›%ºŠ±—T ¢T•9Õ{½}~Þ³½µÛónÜW;Ým?ÚŸŒùx·yó÷‹ùÔУQuë¹È•Ì÷hWd¿ŸêÁ‚³Iè8æ\fév¬­ ‰ød¡Æèj[ÚáÔnÛ£ÝÞ6Ún‡JŸwYµßâ_>>Øfʳ ³[èÇÔÚ³I‚r^Øg§çO?¦è tXVû§¸´ÚøW×D­5IJœw¦ú£<§º¯ ˆp´8ñ<$RÝaV=æé/_g³°EmúZ)H4áÙD5|pÞÝ|ödû2!±­Áp‹Š7?nf›ÖS_Ô™Ì3óø±c’c. GÛ©î»÷ã´k¡¡î§6Ëi§†ºU —ŒŽõy÷+8ízØ„ú8íS[xýûè´!ðé§·yN']›w©ôu½=—LJ•j´B|øX5©ÇáýX5¦Ù×Xm³¬š¾«Ã*.š&:}Ò_0:¬±PFtJç`‰Á&™Çô0;DçÔÆçåà*êÑM•,=ÄÑõ×ùCv15hˆ1J#9çÕÎ%—SúIu޾½ ña†¬†x7–Ͼþ¤=4ªeÞèÎý¥ªöÚîõIr ßiÛŸì^ÙøÉÑn‹•äf‹®ê¶WªX-êrý=VW”_u¤á2 %]7ÕV)su —ï±/÷áJ8Ø3àðÊ€`«_‡[¦†”—ðÜT»B#ÿ>·‡íÎͤðiJi’È‘ójDBP K$™m"R=nJ«!Q䡯˜g\ qº<ØÁ6­ÐÁÛ kºS%WCQî+Ñ_›]¡ì¦ü#~@"ˆâ?4 :!e3}§dZØmJ%¢¾³ƒ2Ÿž»õãrPôèQwàÇ‘¹fpÔÚÍhÿxˆÂÖ`zÏOÃ@1ƒe<§˜)rÿÍÓ´Nzx{ðÜŽLä?YFgu h—Ii~~´N!#ÄùêË/Dò¼VÅKàPÄ«ƒ…Ñ4·T×F(èŽ(È¿wvÇ/½çð²?5ÕŠŠyïí.RÌì}ÅÒj|¡7Aƒg¿úÃË4ÍqÈ([·ƒîýÀUð‚rª§È&\¨cCgw'eÈv{çà¼ûþ{÷ᦄˆ]> nPÑO—ÖO¡$±0ð¬Æ±€B~Ðßüåëßfánm=j5ú—<ÉïŠnq%ΘWHf‚¯ º#ô.‘»ónûèæ“ìêD·ƒîjc!«fÁXÅÀ£àÛå¨'!;’7"ò Â/µŽúÃ8eÉs¸…@¸¶¥GPöyWŸêmÝ nÆm×ö£oï¯Azf äÈ¡ey'狨HÎIŒ渘Y¨e¡™q¨Çé. ZgsÏú&SÇ 3á,ˆŒn_άøo';´ÇíGß_cY"º*úÉú¼ËÓ à]XR›ðH¯ÏBÈÃIÝ÷fɰulDYÝ d«u1 , p6‹#,º X2ƒšêna 2t™†“A‰ŒÔXw#é•aŽÚ°[%,ë­–l¬Q–_7êÈ&7’vãáìy§=ÒjÛOò©:ªºÒUmʳ¹i Ïh«€O€9­‘'Œð.€\  ," $h ÓîOõ­Ç øxÂÍu„Ôlò\.>¾ƒŒ?©Ti2–Z)B·XQfVPîZ1z/ž!yÇ£Õ‚KåALwTgò-òÃJx·œ)r$£²,Å)R Â4¸Dúž°KbT*Eö i5E¬Ú ` Žp„2\†…qùý퀧ÄÍ—)t´²ŒuÉ’(|ÿ-ÉLD`í0èÒ?›ýW’w(x¬¿DðÀÆi ï­w_V8pÖÉ»YÔÏ’qþ0É“ï„7Y&e¾jó¡wÐ…,º«=Ô»ªˆ®Ö»ðÓ Ï-틵Àë­©Æí죸:VÕ´=°E‹NäSi7ºÅÐGŨf?É3õarÏÜL×ÞÜí6P9.Ì$úMçªy4ÖÊ󈇢uÍ]wGS×âGÞTxCëËgs™ÉÆ´˜@!ýT„~ŽªJ Ž×ϪS˜û_§É…“Õ쾬Bs3IÄ\„á‚RÂqÈ"¦WÀ èY£óz¡)æ²VŠ~Rm5Сvi¥¨=¹ò›XùÇê‡p£I•=ì þ"ÀòGÂ!~iÄs¼Ä©és.ó¡T —&U|»Yº0ZwA1Š×ÕÞu äÖ¢N•ñD9Ë£Fë£Ê(©ˆ#fïpsí‘,þo¯œ2¡SÖHà…?œˆ" Ê“Iõ±:¬Æ9¤µd¢‡Jí.¯+XÏ|{ñ $ qÄ¥>dç ±!%]^!: »¸¬±®¥Np6$ÇL'JªZ4NŒ,õ«q¼~DÐv£. ¤»:ÔAÂ^цHœªêšžìø%•B’ôº ­h´SÊRd ‰}–XãæwCŸ˜ Ët#¤&òĶ1rç[; ¿ž†üâes>¥']$ ý"Ó/†¥èåÏ´¢ä"¦„ËÉÂNÆ=mv„w„àA¹ÌëWØrþt9¤´)Ÿh‹Ý›u.«ýY>q"•éP ”KÜ, ?ºÉË9FòÉz@¨ríB>@¼ æÎ[8yéýÎMˆv¤M–ÝL'y)m^°ˆlcØY4÷ 7 n‘=órðKióðj/®â&D‘ë\ ´ ]!è_‚î‡ÄŠ:T#›† ÁµÎxéZg¼"êrŠwØHtÂå 4¾ ‘‹÷ÊÄøtЈ³àöG¬ZçÞfºtè5h,—ŽIM9A.Æl–²”ûÌI¢ø é:®®êt¶=,£BFqìA×5t“Æ"Ó¨¯ˆ2FDàwÛÇ™ž›n4Ú…ù©®V`@xm‡ê†­Ba è¦O(¹œ5P'æ'r{Ö¡yjášôè¶&`¯¢‹LððE³µý“³íõÄ7åÕ¡:GßPç§l^n˜·“æåÁX ôn*£T5ˆs"º—sµ#ï]I€õBI5=ƒÝ kБt<¸ól†©û[—×OŒO^x>­Ožz˜+ב3‹Ô«%-=,½ÈœovJ  X¸@,IŽàÖ P5(¡T½#à:"Ü0*@z†M™êæîþ>ŒzŽQ¾XÇÔ¶Áaƒ0ävLvɶE2Yƒ®V ç„r ›S×S@àû¶ Žý‘‹Wàá0‘DLè$xË˺„ÊKæÿÁ¾Ú¿øÌ$æòU(¶yíú‹þCt:Yû8ZùöR³¸Ú‡O½y)ih#d¸4$Ážoº jÞ@ÿ~‡$RÝ4Û²–:{›ô¾WžŒ<· ˆF D¾¨×¸Yäâá·ù2˜ .çú7Ìèö­f—œ ¸ÂUÏãÆ642(˜3>(w/p5Ž¾Ð \ËßÄ!wáÜĞbÌýB…„‡l–£¾w÷®ŽÁʘh}Ëc8ÑCy&‘F,çc>%E@ü²}éàfŽ |ÃÒ,âKO ‘!VcëÇÓÅ'·H€IÀµv‡³GNùŽ˜‡Óâ95Ù™üòƒWYãìL‡C®Š.Dš×ðïÎÐïM‹sÄ)”Š K ¬&*=—U v Ñp¹6,"È[@ è¢H’’Åv_²ð]* Ï~„駤'{…ÛäkÉI¦ "ZîE!¨ÐüY‹+H ==XÙyt³¥•"÷>=üNjEb(-nBðå:k€¹œýr"‡ß4Ú1Øô„­ÕóC6TêlŒ«Aq=èF¶ ˜‹]Šø#üBɨê 0oƦ±ìÕ1trè»ÜŒÁ>^߆?Bòîðˆô¯€™øÀ"«0àøÓƒî#F0ü‡¾ hbDkqº'±ÖYå,ä{:Ì‚ª¨¨y;(… rÊc/Mf¨í5ãàyH‹•I6húlVÒ@PÐÓ2†çrtQ¡ñ°¶’øÅ5SÁfÌDCôë8£êàTîìSÖTxÈ!Œ]Úʦ¼¶]…3“ýzT\1 §í©…R͆zr… d¡&œ÷³£ñ„M¬eîÛ†£DhÅfÔ§Ü¡Q4ËmºctÀ*êàw¯­Û(l{'}ä’°QˆwW(Ö8€Çh¹œ{&XŽU^ø‡ÆÌÙ~9*{`!ÙxÐ]‹ ·>ŽZ›a$þ¢l—kE=•¿iàäòçu"<äûž'Hå8èìD &=:LË©ff“C¤—,…írìƒ,†aß#ŒZ³Œ.fŽeK¥¬Y†Â9Pt\–õWØæYVÆŽ@ÄÒ?ŠlÓî²gg;ÕátèzìClw8>Ôá|FXqÍvþD2:µy'Û”ÌæøSè|aÐ×87HÖˆFŽ%çrNùç9Ç™#ƒS¸Ë±rŽª—°"ŒZs޶@Fá:É-6?Â(GgTxYß|ø°uw覰±œä×Y70 êrìCÌš=»ÄšWô'3¼ÔÇåR3¯<þ2ávv_ƒø1tk)% æ×C‹×`"¬ç¨œ×{Wf18!Û£r c×ö“Ï,‡íp¦v5j^Q@ÃÖLoÒºw9ñnâÑèp,$r çONÕrSe 9€2ù0³ñî6 Üb|ù,\ô ]aÂ7h©î' 9«êº¥@a7gDJôå?ö ÆO P³p΀úáMu?õ0aÍ)"e jÂFÚãwìFL0¸8CTG,é&ž¨D­‰Ý+i '±Ä;·µ„“ g#ó;i ÉbÊô ]ëŽ'ŒcñJ!òÁ¾ñGž¼E®‹×¾/'ŸGŸ;À+dãß7•xÄ|¶9EÁ›¹­ˆ§^\¸>—OÆ3 )P—.â½ÆðÆXÍmì×-Ô™36ü‘Ì…±•8¼¬P$J – ø·ºCv’+•–Ÿþ!@yˆÓhÔ6ùQiâ×È˸ˆ::ÏÊ?A[ý+{h¸nú÷w?Þá bÕ0rKïíýýO/î~ñö-…XŽjâ»Yh÷ÿ‡ÜÊ endstream endobj 44 0 obj 4566 endobj 42 0 obj << /Type /Page /Parent 3 0 R /Resources 45 0 R /Contents 43 0 R /MediaBox [0 0 595 842] >> endobj 45 0 obj << /ProcSet [ /PDF /Text ] /ExtGState << /Gs1 23 0 R /Gs2 24 0 R >> /Font << /F1.1 8 0 R /F10.1 47 0 R /F3.1 12 0 R /F5.1 16 0 R /F6.1 18 0 R /F4.1 14 0 R /F2.1 10 0 R >> >> endobj 49 0 obj << /Length 50 0 R /Filter /FlateDecode >> stream x­Z{oݶÿÿ~ ¥±#])¢HŠzЉ¯³+E+5Ë¢:Wçc}>6Ïë–uü|ßäÀ‹ª?b¯¢ªk%ÃúÃb›cñçâý×Å»÷K$ÄØÓ0,F¢Õ“cñþvý!"-Æ™z^ÀÈóm„)´¡Sbš™Z;ƒ!Vqš xä3ã\,±3<"ìÀ£wçãWº¬Ÿ—]ù<™ëãA‚e/=Kn.ïîî^í“Ý9vW‚q'”öƒ§=˜£} ‰Ð‰ØØ“;gMü7ó›(%~bZã½@|õ–~Óq=—­~®[Ý]J=œèáïeͯu ¦H]vJÅ%’8…WºoÀR^|eÀÙP&Xû,¤Ô00=lv÷ü9TóX)(¢ëš˜}¬¬®ŠúéWVRH´lLåœ8 e4éÅ0õ¢„Á#+„4¼­çb;ܽ‘§+Šüüd¢šIõè5àü ÀÌÚ&ôÎmFnÏíR†7þÍ»÷…ÇlÔ„-,jWÔÈw T¤®.PZˆ¾mé1]C^¸›gl(†ã! CE‚’h\å¹êÏÇòÉåo²šE©-DΑWSŠ5çÄ…øäÖCY«ˆwæ\{@or1| ”jÊéVHé<ð${BÂëwXRPÎ¥[n÷äÄ)í¯›²Eî‡ôåÍÝÝ¥·ðå^A݆Q!ŽûxóH¶öè©C‹,p¾ÚúǀÖËbD ²äüéF‘üïÚNXòÆ™ç…ã^ŸÀð$êQŒ;.c{ ž ]à Äòë/›[mÂ/ŸûEø _ƒøVØÃ°‡‘°O¶OõÀø1ÔoOÛò^ æY‹go0òµF7ØÅ3ëfÕÎ)N°8…\¿KÐÀ£ƒ­Ú>@q¨o“ÜrìÚŽi®[i2àVw3¥?줬*å È*‰^ice;†ScO´ QA5:Ζôq‡){Ö(¾†dó(æ´LˆÂ“r$=ö@VÉVê¼Éºdth†íIk{6©Ú¦$– ™oOrLÐ r¤È ~œ$Vd$ãœËHz¦¸öáôƒ+óMž~>"QÝCmN¿%%1j—Ú Æ _çq^žZH!ÿˆ¥€/ºCuÏÔû «:Qº÷QÝ EÅ Çe+ãÕ½äL Ó(XuÚÆH<}ßs¨àÕÕåØaðkÖA³I§?ZÂ=2 ¡¤uRlîÓóÕ"­y[îgɆû$]Ï »„M$Q}‡nE<ŸòŸ#cdÙl–ýR\©çd¬¯&$¬íø”H*j¶R=“<œd‘ v Í^Ð ëxÝH'à€=òŸE7êéôqòVT$aMw¾¼‚Û`}äðŠnSZ½±EUp`‘iC7»ö!ÞzQCe9-FJ\Èyì¦y ¢Ê;t1Ž@3Y4SEˆþ5¢'& oE\LNŠ`²“MÚ¤ÂI–‹©"Øb ZDIZZrBdž-:­!È>‘òÄÙm°’0„Ñ8€„”‡è—0„¾×þ<Ë´Hÿo³â¡€† ÐYú$ h‹ª8”öK ”i&›‰&tåҖν·•ãųþ}šä, J“ÿ„¼ˆŠ<›‹\§¶NÛ ¦¡wÈ]£3lÒSðHtÇMÁ~'å'üPi[.ÑJ‡¤)ƒè×wèŽêpê*»£~XßË"=ü°yN%úî#b¹]ÂTÃr;¶C¯I· I-úTo„_[Ây¼ýk¥›‰_‡U®$BCÛËm0£%ÌÛóq¿róœvBp-? Û†©¨ÞrB…ž°¿œt£©J1\§oÏÛš‰V-§‰õäæTrnÔê$ñÎx¬^Ì ¾Ç¯|2s äzŽ´´nýÕœe”žî „ÂLUw(F©Öõˆû5OºÁ?¾ÔW¦hÙ€í߆= :óĉÛÑ‘Dªƒ×TÈ"ü "Õãñd«œžâ`âÞÆRŠã !µH÷€åIÞ'p…F¡ò@[®)-o‰T:½ó¦zp/”þ=5ÕI· ýƒ@æ–9^X"ü¨Â}ó ¿6ÝÒ¨±Ý,ÙìÔ­_.꺅JÓ%«Y‘ǨÉ|“òØ"*9Êò`^x¶-  i¾$‹|édÕÃ|M}@Ï8pÖ¨‰`0ÝIq¨aÅ^¡·A£(• ¸T~[KåtžÙŠøÝðvø n“53¶c¢Ýn8`~XYšÇØB0šnÞá¡Nî ‡aÝE7ßïo|÷ V À]³â°l{Ýbø7Ld ½Ø$»6Ž~FcVRçQb(C«¨özn u£¨èº¡äF»î‘([˜u†ë+tÊb»ÉŽRÀ¡ê²(Rì‚+¨˜FL€r°^J yG“U¼†^H™"ìÿ+ØÓÍå'š-“\g'à6Í{IJϞZ uZ—Vî‘ ¢”;Ç7ø6|Ø„ 7:•+ÀÀ x "{îÚ¹œ‘ ‘A}>ºÆc†it–um®W…£†ÿ¡ ÁÖüHCZä‡kBÚ³VI¾×Š=nôÅ¥E1pbW8 ÚDIOÖ‡ÚÙatX溹q+`C×®ïcëñ¡d?Ü7°@k.¤Õ~ä6Õ¸+’žó ‰2¦ý)XЈÊf˜Þ:ònkDƨ„ßÁâú`‚}@´f>‚¯avy^^½È6u{§¨y¹G øž¼<¯²=Òü~Úå„·ùe2oc IÊ›-ñ“..KX µç3= §®[éšsvm~ÛÒÄý+_hQÜ“0¡5j$“íyÞçªñ…%&lž?fy ÷ó¹âhU͸÷byâ7Œx>Ädµq¸¾’ÀÆö­}‘`1Ô¥ý•(7ïñ@–•)Íûóž¥ÚH#Ì{–[EjC‚’›÷,÷rFr¦++žs+lù˜¶Vô£Yà\­=Ë‚<ŽËX‰PTHÌÏ|˜Œ”?OG=—Wc˜ÚéN®ar Ûi¡G’î`¬£èw:)„prF@˜RíÙ6ô|¨èÖÕÏU¢ÍÂé¥~ـ٣4à^@8íä”±û=”½ •ÙýVFO8»N!åC™E‰u¬pyÏ”ïá“)•p+…> #j&e{-ôÛЫãŒs©§Fäh-y)Ò­Ç*Ô ×­8JVÏúYn‚’¨á÷ý&Al?àÎ#¤qTik–ÉFQ„H‡göÊ#ò3¤†>fñÔ¢EÂÞX Ó›P-ÑŽŠÆJ—~¡ªbž±ô»k-sÆñ@#ýYh@醛¢Ãlï+"h ,².W¼ÑûäÌC¨VéoOüé@ž\4>qý2Kî·¸'¨;C'ZQPÛóqjp#IÓŸÿÙ4°S'—ºÏŽlZ‰~aÁ ¡þ¡¾„¶”£µ†_†üÏ8`®¸ Ìë.91>H™§­z÷Ç?$Š›.jB~FŸ×²dk¶Kí9 ¯ë“²M,¢a¯=(&“öc_øßÙ¥©{uK×vm?lÂÅ.\Å䨂‹–~ˆ.é©Ñ‹m‹ûŠæ+*[§2ÂŽáP´½Ä"Ö™ê˜ÖÛ6=¹jÕ<š. =¹ÞÆ4ôo¿³9WZ [®ÙÖÍ”åû€ÚVÑ$Kè.ßÁܶZÒ•’&—Ýh¸[‘4Ç¢Ûó‹ëÆÞ”KÐtš:†ôq§.¡4_íÜlläfHÀbòx9ý ‚Þ7’ÿÕr\¼Ð—âéœM¦ÃCWÅÖñ´³(öÈ¢8ü‚eE1žo!Ðe®s•Ý‚|$¦“Ë.†»œþáûÄè’uãh Æu›ÏG(”qUI¯ÌÄ’è¡–iÍtð×áW·áÝMoÖ ¯ïÞ|zCw«Z1N# ñãÝÝ__ßýôúãGòÑ|ÀëêSTØ»ÿn‘Ó endstream endobj 50 0 obj 3640 endobj 48 0 obj << /Type /Page /Parent 3 0 R /Resources 51 0 R /Contents 49 0 R /MediaBox [0 0 595 842] >> endobj 51 0 obj << /ProcSet [ /PDF /Text ] /ExtGState << /Gs1 23 0 R /Gs2 24 0 R >> /Font << /F1.1 8 0 R /F5.1 16 0 R /F6.1 18 0 R /F4.1 14 0 R /F2.1 10 0 R /F11.1 53 0 R >> >> endobj 55 0 obj << /Length 56 0 R /Filter /FlateDecode >> stream x¥[yoÜÆÿŸŸ‚º¼\ÒKÎ ‡ÇHÖÚ–ÇHZ¸JÝ4AÔÖ©sZ É÷ú{oNî¥8qˆ×›y÷5o.ïÊŸKÿ3”³Vå/ß—/ÿWvŸþ*Ë¥¿ŠþÞ¼+%}&èϤÊÉôílÊwÿ-»×²•¥,ÞýP~SV'§ÛrÐeuv~ñd³-wrг*«ûê~[ßo›§õ®íÄýV*¼Sƒ(«~‹µÊª®µ ß‹e¶å?ÊwŸ•Ÿ¼["!Å\NðP„E ,ª‹ÍÛ7â…»æz¼Üï~ÊÃöc«{dZnÛ/C:ænŠê.¬þãÿò_$_Ä÷¯sïß{l0ës_þ3Ðúu'¯WT)ðm4ú˜o•2ÃÞ4Òlˆ6Ä(Ë!ܪÍÅ司wÄ"qÝÙ÷ø„¿û©8?ð\$£qšZðˆ=oÐ@øÍÄ»7×E$¹‘$Šø—+„(5·BLËŃWÅâìW/à[ÏÎ7ŸׅŸ§w½:çw'5}¶²UäÙ`púÖüÖ½ pZAø®ƒULMkv“üˆœS±ãËÄc’Ô X¼ü¬·Ì×Vób‘…h „I Á»F¶{íïœÎªÁvd_XÆ»ÀÔý ßE¦' ¯ @GÂι©DæR,3ƒhñeLZèeµÇÇðvu²Ó1q'4Áî½F›hׯV˜Š\Üá&‘ZÜRwxöæêfìºÆŒóíÕ_N/?Ûp‰¹/_ȹ®syµF¹_}€)ˆÌêEuuûÞ–]íLá+¸ÚÒ½ZYš-B å]ú ÖVÏó† àgúÌj4ÔÜ• lû3íÜ÷q·ƒ¨Q¡ÊÈåø=U9ÉnÉàêª3xºOÏ7· ´hQ]Ñ¿ò݇¤rSÓÜj í_£÷…%˜ÁCžš§v ð’jTm Ñó)”Š}ÊãCªu¬GŠ7Ì ³Ž¨>>ßÝ4HÒÓVÈî ¿ô{Èîáõ¸ïüÛÈîáõ”„³ô{’]'xGnõH'„NÀ2dúiºB²–ec²¶Oë›ê!IShÈÑ/qOõ;WVk5´ ÿÀ‚¨òé®îE;QïÁïvh„°ë áÈ)šqE"F}^ÍFIÄÍK[Ñ8"ìw…/(èé+„i”¨¦'¿° ,н¹ºëçݘÀ ©”;‚N)CuB”QÌlQÚQ\?ò­QŽ`sFŽLYE’‚Sy௩l@>w”Ì£—d.÷ˆ*b5-"Lx¹ÂÕCÆŠ<Ùbý@áZÛ×C¶ô;èµ5GŒ ÎƒD™v;ô;+A.R¡d`‡~çI«ôîÝŽ¬vX Ñç)´{z ‹*oÁPD¶bÁ†ZˆW4­A{1«M.Í&ŠJg)GÙr¶­ƒªù“æ:5ujÚd ƒÏ7qÑv’šœ¶‰‰G¯ÚntŸÙ'g³ø‚\DzAý,¦FŠ+ T#õä,ÑYR©q2s\ZÀ{¦S‹’<”,‚­xÖO)Ë^.%|Ql©l:´­ˆþ¨+*Ù,S“I÷F—ÄtÖi"Ñë8“§”ÔmM— ¬QØÈ÷×D¹ØÑ+dÇû–»tGxÃm-¡ƒ´èyôÄøÒ%þËr‘+—‹ƒCÙjÆc‰?Ô³5™SžR¤ýY“è‘õˆ %¼‡³Û-¥»®Ç=&Ûë±ÓÕWP‰B€žYWõÞ_Iêÿ¾DÏ,JH¶FŠÒ*qˆ©t•±mCZl¨zZk¥I²Ï‚&n° È`Šêe׎Úüymo &>AÏV³,á¦ÅÉ÷Á?|Õþðmùá?¿|•µ àa^Ñ$ðÒÁˬÜ"<Ò¾ xåàaýWx‡.ÙŸyçÎHnY›5ìÑ ˆ.;ù’û(Ì92D¼Ü™Î5ãpƒlŸ<4 Õ½ä²òÚ™2¾ÜÃ@î%›ŽíÍ d• \Ã^¶#úaT:([qÓ»½b£KïIp© z+â a|ÞxÉ•¥58_¸ZD_¹Š\1J5ÕH×v”sÀ‰.©F¿>fFÔ ·›è½íœÒU7Ï`½dÆÐ#RnÐN—Pdͼ•sQéšR@ûU³¿t¬àÅB+Œ)?r­ ,¦ÀW Äù•íà9KÖ.›¬Õš¶Fgš5«áŽ1Y Ÿø&åÕ:œîx­£ËëÎ6¼¶^‚qCéHÜ“0 þ'•#ˆ•£WÁ!Óí­2õt Ò¬úð;JKír×û‰T)ë†4š 8ùˆD­y쥣×Ð5´ŠÁR^hÃ2&\œ Ò¥oÿ{BÇnÇ„—L¸³’@Ì ÒVS‘ÎjîÝI¢R-5Z(0æ¼צ‡Û÷ÐK’WKl!P y[‚-IVH`Ü…˜[P@ f-©9·} ÍÂKNƒ/;¼‘h_AZ¥ƒýLçiG”#鱚5›ÌSNÎʆÛNŠ=6¾â{ô–‘èµö[Üî =ˆÏ $Z`€$åêkŸµmË<€¼QáåI7ü 7Û‚CS°(2,ÚuBZÊ9-Û`»Á¼ }‹PÀŠ6Ë#g±âð‚Ãê§µ<”XÍPɺ»$å$ó ¸e'²æÒ# ÄÉ”*—[>šàôˆSÄHvX}£¯é,£©u áýgÒ%ê&}ÄÉàýÕh˜Ø3÷Ô…s•Õs»Þgæ±J?oç××TdåMû8:3Fÿó°J£žß‹GÖPýܶök„¬Ê•à+í>-Ûy>KÛ!9cV@t˜ˆâŒF¥=ºa@昀Y$C¬„ùÓžó'—¦½Xx¢•vìAøRË!嵃ìµè›Ó¿tÄhúµ’JÊåžQâû¬ áþÐ×IÀ*Q¦ßžêœ?¹úô •ƒ—C-ˆ~´ÑüO€-ó<ýk^¹‡ÆŽ4þâ÷´`‘þ´ss‡P2; ³5î…ö­ˆ] æÔøô(| ÙÔBÔpdø·‘ ˆüSûC²ó“ÆYù8%»¡š¹¥ŒL$`v·ÔZ}À´‹°-hRbØœ6÷Õˆâò!œ÷ë!¯c—O#«ë'$)¦Mî(é»Õ(c/º¤cÐxñõKJ®mìí'îI¡é ³"lÞïÓ¨‰&ë\ È Šƒ‰³¼ëÇ ÃCÄ»dJ\Ò΄ÎCx‡ò¿ìqK9ž! ‚ø" Òrê†,×=Çèt§iTÞàdŸB6Ý~RSYÎo÷×û-æðO² Tª;šBêÝnVóÐFKOsކÈ Ô‰r5v¬w¯þùêŽ2F*òm§‹™oKå^#Ý䔇¡§4k.ÚøËCÁà#·&èú DHä@:º…\´¸ÃtÜ _!:*6¼t §Aö¨9ýù_Vw< lÔ;xK=g¬u+‡AÈŠ Î`a[8wwŽJÃt4Iy]»iºäôòsg+ösWŒñM8àô_†%¬ÙÙ“>okwØL7¶ßÄË7F¥p4ÏêL/!“˜þ…¥Í=Èi„:Ë+sH93õi )”‚”kÍ5rBÎ¥ÜSY¢³aÀX›šH°V—cÌÙÜWýývsrñ2+Vš‡SÃŒC\+Oã¨Ûœ?>¡oçLÜ,MpjHˆ%5xì6¿à®+ ¦eS¶I?.v jS}fš ÝCŽ+çªjÔm?Éå eÇ2CA†ÑšÛ¸- y:ºÏïò-nð'ãð”C¦L}ÀHäÈL]E®¦iÓ1WyŸçj‚^$oÉUeИ#½9&[·b€:ÎEJïC¬–Þɪlš&ÓËûøiˆ#=:> z´Œ4Ÿt/Qyî[šC™Ž¦ÍÂ!¶5v¨w0ˆ‚*K}„©î6ÏßßßCü³3 ÈÁÝðNjU¹Ê!2IJ^=Ó=ˆ6²Ø-Òöo#€1ùÔ4§ Rõô£‚>§‡fq›ÒÙ) Fîa.ÐFNí&Êé ¡„Füh«»k˜žaLQ£>Öw˜]Vo_ÈÍÙÙé‰X>IΆÉp‰˜ž[êr¬g:Ã.ÛC<Ì£Ó-9vz·âà r"Q²ËR¸R5bH¤G¤KQ9ü²dRhoÂjRh÷h™±­äû ³AÔ1ËãùP£p69#™I·N±ÍjÌ@“ ˆ-âÓ£Øb›šÂ¿[¸U*k> [¸r5.@"¶+Ù Æe(T¥ƒTåâOvŒöFÅYØòDeEH½@âø»„Ô㬜Õ!»Ç,Ǹ&¤ËDHÑ€zÔTt"Ÿ%›gOß0ÁA¾ (DŠùò†Ñä$ ØÈ°Í;—‘n]¸_-Àu]HüŠäl÷ä[N#m¸µð涇À>G/½QÂ÷u%fUì ’Lºv|]£•¯P×Ï(âÒM¢&Qÿ*‡šš‘ŽÍ8­KÁRÜ|/”ð@»Ñõ>1\Š©ŒP³‘sPzÏ£PöƒžÄÖ*ݹñð½;¾pT¢Xj¹Ø°ïQ'8çœ%×ò"ÕÑ¥ï0 ¦<*œi²HˆÖhk Þ,aË«oŠßþc¸ÔÁàwéBi€Ê2>Uf ¿v~«4>!/·•uù9­ÌZBgœPŽ¥ˆú= ("2ã]?€anÜ3(jrÏ´Íj©€aæºn9]ƒö½=CäëÙ ìRëÁNõð³Õ K ~¶B¢p¶èæˆvÝz4{gwX€†V\Ú—*I¬}©åB… …Ke†Ì1¨‘:-”(îB?vBQæw±hËWÝ€5*®ÞԷׯ›7kõ/µ<0±²\ËKˆf'ì¯h)®B-¶®Þ³?†hè4p‰>…ø½&k<3—°:AcÎX ¼Üñ›£›k:ê2DÎ"_õå\Š'5 ˜yÐÕxPL7áÌ’nP±û kKÅŒ¹cê1DhˆµßVô8XԬь‡õÒ‘÷ñ¹åV´ÅØ\M¯oW™O¾Ò,e²˜'*˜Gu›hÉňoÒq-Œs|jô ߨõ•¸½tG=8Ýäã½'^­(Wd4‚l¢Â®ÛÉ9‰ qP’@E¶•Tøë$~\x½r€C§½©éZž+¤’o@â ±;Æ¢ü 7Þò6Gla˜UãÇ”h; í·]µª@¯/ T+Ìò 2Pæ†]*K v¼&¨Y¬ç£†F{rèDdW«>ùò¯Yß«iTr¤¬-IŠ„ç€’Ú<ÌÌ‘ ‚§ŸüäÕýúš›»W^]°Ùs »zw÷ÝÍÝ÷7ïß“PÄ0Âc‰¼û?î±Áp endstream endobj 56 0 obj 4751 endobj 54 0 obj << /Type /Page /Parent 3 0 R /Resources 57 0 R /Contents 55 0 R /MediaBox [0 0 595 842] >> endobj 57 0 obj << /ProcSet [ /PDF /Text ] /ExtGState << /Gs1 23 0 R /Gs2 24 0 R >> /Font << /F9.0 37 0 R /F1.1 8 0 R /F3.1 12 0 R /F5.1 16 0 R /F4.1 14 0 R /F6.1 18 0 R /F2.1 10 0 R /F11.1 53 0 R >> >> endobj 60 0 obj << /Length 61 0 R /Filter /FlateDecode >> stream x•\[sÜÈu~Ÿ_iIƒÑè .MŠC­´e7N¬DNœÊxW޳vÅU±Ëñÿ¯ÊwºÑ}ºg¸û 9§ûÜïàߊOÅߊÿ÷¦/&-‹ÿû¥ø÷â/EûýßEñ§¿Ó¿’þ}ÿ¹ôµŽþe1ÕL¦øü¿EûhD!vŸÿXügQ½z½/z]T_ÝÜÞ•ûâ(z=É¢:Wç}}ÞÞÔǦíÎ{!ñ;ÙwE¥ö8«¨êZËðý]r̾ø]ñù‡âÛÏ)bPÅØ IX‹úðæ_†}!ô®úa_àøC‹{7’B7ƒ™’Ã,ItXõa_|þ3.ß%°—+.ß ÎÕQ¢AÜdÞØëÛ“î>úíy4S¹ßÙï˜Ýצ,öíy¯µÿͽñOò¼oNºíèÕÒî¬Öÿl:ï †‡/IÓŸÌA„c6NÍÁÝáîÄ7ǺÙà›ådÄ<èíMBNàÇþ0œ:BÑ~¼·Ü±í<#!m?7§Ž”£>8U ி5ç=Ž=ΟwÕcË$Zðîa0Â×UŠ‚4Gà0_&~ÏÎ LQß%v„íÑ<Ç ÑC#vlVƒD}èŽµÖØýìM©*K15=lo´ðΨ¬:“QUPæwëoÚÃ#tÚ*c>M—a$ l¬›‚D7]°ªhH¬VœYH ™a†‰Ò‹9°kƒÐ°;ŽcQ=™ä 9ªä”˜/Jœ³TÛ(="¯fWý†ò¢B| (b$>‡ÚFâÖ½1ú1=Oµ85æ€(nÓûk:¦¨\¤¤<Ô'ÿõ¦µA“~Ú´¿µ)î9* >àz÷0Ö5Œn]°£"³+ú‰²¶<@'#eÙv¥¬C‡0 Ç)z$ ø1#û䤋B»FOã “ µ‚H×®HË¢FÄ› ,ÕÈóÞe Z•¨›ÆGtúüדtŸ>å JPLgŸ¬ÐÈ#ƒ¡‚žÁ ÷¸«â¯ÀÃWä IÉœtˆO:è¹âtl…ÓD†£2b‡h nÍæwö®©ílòf?€œg žô}ˆÁÁ[€'­njÛj«#o]òù K]ï µ| ßÚ=¶‡òí#äM&)É”Êátd÷JI؇ýn]™¬ †1Ë%¶®áð0~÷yG¼›âãá eß;01ÿzƒ@©t£aÞñáÀêi=aPÈdºæ’Ÿ—Z5}=¶DäNÞ'ýYžÕËFƒâ·àãÁ|HV »ª¹¹»jn»´#uÅç?D…”4øʨøD¦öÝ“l&¤ªëC..Â%šU74Ã/°JsØØÞ•À©}ÊÛ@sõúx®Ä”(oªÀpžYsR)³%RARõª2&]$µ7`¬G;/|çJ*¨†©™2–2©· ×ú :ÍÔ(á™ü:5ìjBþ‘jÔ®½ñjÓ‰Z|…N-ûfD"ßÃt¾½¹»AÐ\!R=ˆfÒžÉ/"u„%)8õ‡K2ÕH:Q£y œØõÚHOòàì&¦ö«óþöcƒ”"ðiC}{d¢ÏÎILuS{9ßHÆ_BlO~Pg“‹¶BÀ˜U é$qi”wÍ)±¿º­¿I¨EfÅ/Á»ŒÒ‘ø ë¨E ÖÔ è%ÑJ¾ƒBìîË©E"PÛ5ëKÑÈ.»ïlK(ö/‹F’D † t‰qV¤*ÔÜ}ÀØ)ˆ‚Õ)˜åcƒ92ƒ||AŽws÷°Œ ët£°î©‹9·*©%Ý>Ã@ 1Ýl fhÔˆŽ]¬L7B`©i'et£WØ·HP䆌•’TfEwïææ£í&D1dA«Ò¢1̦ëhU¨Q±I+"ü*Æ»ˆp„.aìÛ¥—1†-«Ü$béðåÑ}aÚÄØÖ\Ëø:ö°©m$#2£›¨¡3 L¤Pe8Va"¨3²Yª‰„¼©ÏÕ ÚŸ·÷îiêjŠ©‘ú*˜¤;µÚ§iz¦‡¡1¹ë"„ü­kšÝwiFæ<ùN¤³AÚ̆ÙãNEà-óÊ lx}hõƒôÅê»YƒöÎa®3ð#4Å]AgÙ´®ë+4jJ´cQ’I×ÔD©þ£•Ç“-#ñ…¨Ø¡’ŸC[×~âo"+¥ºÀ–3øš¯lðØæ¢¿< µ!™@°†#X#ØUµt“T¶÷»qìàòÇa*ÜA°H3;Ô « — ÄÄ`±EáHݨýwÔ†wY~ ŸqD~*Òƒ->¶ ª–%PB5£ŒIÉpj¥Dµo;Ä”YÂô8ו3«l›Ü1Žz^ž‰¾I+›KäfÈ\ Zn S.Uåz0M/Ñ´Ú’¤íµ8lÐöÈp»2Æ&*j\ÝŽTIOÔWÍŒ"²ÕyqD3gMf@ç­ÿ¡ð³·~ƒéŒN–=ÚŽªOO¾ä%:žtF'Ô6·XøD‰UöÄQKƒ ÎÀº7Û?¾r0â¼§i‚ê$2©FtÎ%ɨnDRO:¾ÁÀ¹k„Ë;Wâ#xbš†Ï^m/žø03#¥Q(TzÔ/BMw`f‡ÁÌj³ÒàþYg,R=Ú$yÙ^~P;燧ÙõáÉ´â‘Z{ôx˜`ÅŒt¤N·ÈJáì}†Ëå[ÔvÔèøÍ~g»qGÛcY? }Én ÑY«²‰¸†"î‘d¨™U:Œ^5Ó¨Bvá#UÈ%èˆOãÅåõZìQR¢ü";³¨,íì£Õ ´l[4½F´|0w}¤æ^ùã(ß"{NKÄn­‘kDùøŠU%@=r-À"Ø1‰´ƒ0ùí~‡ 47Má°}ïTôPÛ^Æh]|¶=Hª  •x4ƒ@a­Ñ|[ñ×…ä„¶n Ï Ý,ká5O—`|áíõ-x¹r'¥þèÀòN\—x)5ŒtP –y" ¶uTÎùA€k€O*£0¡úößþuÍ ~oš†¸Ô*ðe•¼{ä¶¢×´þD£«î¡„‰§á*RôA›QÃ]yÉ]Ç …%\#ƒå¼€-Ð\j±$ÎÕHàQGðDˆåG #‘’®ŠÏVÖ ›ñ]çƒ4y’h¨ºI;t½™!ç=ØK#.ðòÒðøºC7ß¡–“ùglI ]xý­újÃ4š £Öó 5sýëö.Vn¦ù'5‘àí3°Å$8u]HAÂl/…aÒ„¶,Œ£/‹›ž)cm;U‹¯ai]œ©Å`¬ù+5ã’êwZC’‡ TÑû:bQ‡9 œÚ5`jí=~^Éô^©Šù.ÈóHÕR=VI)ß·¢*7t¦ü½|úrÅh7Ú¡¶¿ñ:¦L –³%.¨ÙlÝÈ—¤·ú(¡Ätý¡D¢×óÞ¦@®ª¡±“5v?@ïdà¹n0LCp C,¼Û0®9¥ÉØÚSŒ}¥È´õYçs0VûŒÕ~ž­»»“j°èp„ɺ `i¬vq‚Veä¯i¶ÏTXÃ*o~ÿç/wP-{°^Æoçê/2~” >îS/ÙÝÃl8 O(QW7 h¤>õ ~Ã,*¸~ÀtÂå𠆄ӱüéçU)K~ú0z`Çô},ç·TCö? 7’NOí€xæ¶élQÛw»y¾¸šQ“MÉ®ìÌá9Âa<'=•´ÄDº‚Íšya¥tM ²/_i<NZûFÉ"\Pþ&Õ/‹‰8 \mÀ•ªYm`”+‡ñ=¬6ÛNÔ.b Xà0"Ý­®`ײ­K C:-ü ׋z‡Ì}@}¸qí-rgËOVÛ–`ž>=k˜C!•Q¼$*{ œÃñL…9L½úaœïñÞÿZÃÿ;= s¹~Ñvcc‰.ÑÏP.·/ Ú)÷,1Iü÷H)h0ëͳ·^…„wÄM0·ý²ü-h©Ð 5C;®{±o¿F £ñŒ9A™,\ðOÞ–ÐèŒjÐ9|B§ü¥«M –K;î¸yƆ´$½ëiÛM/H;A’idisîʇ™é62EâfsS#fFåÇ3^›ÕÆÂèÖEŽ Yõ·ˆ¯˜ß§`NÔ|¡¯þX9[¸ZbËÌxú VÍÞŒ!CæA%U¹[Ÿy`«kÌfÛ`Ï æ°åÌc£íeW;`™)ã)ÑÜ t¶èטio1Ji…qUbL‰†Ó{©Ö¥,×ÚxÔk­(ÕÅ(ƒ1ñi(öAºM7mÏrMðJÁŒ¨Yã/ O¡ë2¨PNp< eEQè•ÝĸS*Li2 QlN^ !’WÛ/a;'¹ÀÖåØúÆÍj–â‰îaKº,žŒIlÚ¯]ô ”–¶½‘¨`Ë{[61ß²9:îµJb25"b¯S»!…†‡"F71â©l¾œÏ‰xÓPpKA^/³e$‹¼ÚI{Û«é!Ìû…´5æ}H@„íN4¨W#ñŒŽ 8`NR’³qÒv_‰ÆcØ¡€Ž†€BE‘rQ’Ú*Z*[DÉ%vòŽè«¸DñÉè‘ÖaË?­:à×Lbq×%Éj´S±àÁ(æš¼îi±Ù.n ”¹?£­mßuiÃ[/o %2ÄlfkÖ4iÌåíøæ†Î2Z¯Æ )»ý›Õh¡¡‚¦Ì‘h¨>ýçÚŒ¦›ÏÐRåL$ZÍÚ%{ÃØ o„¬ÓNïãô3†ôP ø,í´nLoe`1.¨ã¨QI£h¬@’Tðè^­¡',v¢Â£·—¬œFú%t²ÅÖõ æÚhàEdÌ E… Ž0È5h^„\‹óŠˆµýœ ³]•J÷& 'à7aÓ v1cëj•UTIâè—ðuUŸ¸n¥Øj&št¦¢Éyìû<³Zžh«á(NsûMxVÕÛWçjÕ¾–›&C—@ ˆ?îß/28¶¯ÆV€ËÄ·ÃwÈÃŽ«’p‚noC{«ŸuÁ[µ‚Ÿ1šíçFVe;bgB ó€ðYåÄ g'H~ dDØ”MW$à»1ωÀ¢—\£D× /å·1ž¶}»˜H,)÷CÔIô~ûŽ ‚ê»'»K÷d‘³‹iq“ûÜîĦÂ8bÐéѸŽhÝjë‚3ÑùÒÑŠÞ¿XJ&"ú¦§Ã‹4“71ÈêÚyÈ|ŽfE¬?¼$h¬ÁÁ =£v:²¤Å ’os¨&4S~s™hEÀøò“®´Fn6Ƭ¿NÐÁ5½üçyå°gAÛºxA4 \&ƒã,"GvÝò¢¨56°ðÆ[~Ô•T#æË+Ú+©ÆöŸƒåTÿãªzÓ–”èL¨†Ùwù'Iñ)%Å çU"Å\D€pTõãyÿCœPÃ9`ÞÿRç€; „†TzÎu܃֢GRœ‘¸Ž{  _ÞÉ:cG< ’%|ʈÈn[ ø5¢3’™ÊÙ&8Åì¬ëȦ¹²’"ב-{°³¸“Éþ‡U¥‘´—<,ÀXÒ ;4¤6å'Ï<Ð ^fŽ‹×QNþYLµzàë(W(§åL9qÖ¢?b`¸-8S^¿Ž“ó ]§w$ ÙyW’Ž·Ñæ˜/Òu…½„/»“I·o½.t]ÁÁ[ò­›7<Åÿ_½ök¢!­¦ÑA`@úÆŒÆ ç=–-3d¶!ÈewK”.EEì; ¯§T5á3 Þ]ær¹&–þj´žpÓý oZ`n_½®qL”¬o1€¶ ðJA@&Uþݳ«î=Þšl œÈd•Qù‡ÍôK¾1â&ÏÞ= (9ÃÙÝ–àÒ¼´fFï­>{oÆ`¼×«h˜z°úÂ=×Lpà~+SÉ­¾T.[×&Ç^ljbŸØ/q@Òßg°æ’€16Ö€hï+sŠ9p×ÜÖ \¨Ž˜Àv`_r£wúRvFtGya âÆlÍu¢Ëÿ€•+»vµÚÅéñ—ÂÝ©µÕïWïV*y›å$¢ ô»ßÖAѹAV˜ßV¥ÎÍ,Ügaì[YXƒ@§âÎ-šýn·ú‡QHÏ(!a1.[Hþ¯“k…ÐÊ8b¨a@ëæsÙ­Vú1ÞŽ²Ø­ÿº…s× ôo;Û?dBÐè•Ø6=½Á€šˆ‰¨ñ»xân)ª›lc65u…Í[ìa3öNõ.u&ðNJ3Øtv“h´Ñòq˜&öÊ:§1CÇ[ |yjeI[$òôæÞh…—\ÎV¯7E·¡ØÁv%ß–¹DÈüÎýÕ˜„»]mÿ& ‚8ìª{ÄiGçóœî‘›˜‘¼c‚uÆéE\ï±Çšƒ±9û§íª±¤Ž¿rB ]7-©Eîý§ø@;”G·ÐvÁ&Ò¿ÿôËû/_H™:¼ ^T¿°ø>ý?˜&¤» endstream endobj 61 0 obj 5276 endobj 58 0 obj << /Type /Page /Parent 59 0 R /Resources 62 0 R /Contents 60 0 R /MediaBox [0 0 595 842] >> endobj 62 0 obj << /ProcSet [ /PDF /Text ] /ExtGState << /Gs1 23 0 R /Gs2 24 0 R >> /Font << /F1.1 8 0 R /F10.1 47 0 R /F3.1 12 0 R /F5.1 16 0 R /F6.1 18 0 R /F4.1 14 0 R /F8.1 22 0 R /F2.1 10 0 R >> >> endobj 64 0 obj << /Length 65 0 R /Filter /FlateDecode >> stream xZëväÄþ?O!›±u³¤îV«¥¶wÆ`³—l¸¬Y/0ì1IHävÃ<)ú¢ni4¶8`I£êªúêÚÕzŸÜ$ï†;Ý%ƒÉL¾I~Išç¿ñä_¿Ñ_A¯nN¯1úÓ‹¤×m=èäö?IóŒ×<á«Û&ß%ÙÑqžt2É>ZŸœ¦yRñN"ÉvÙ./vyyVTuÃv9øMt,ÉÚk%YQH1¾¿š,“'ß'·/“§·S!¸j“¾ë§R$";¿È“ÛŸ-Á*HÍû®î† "É ÍQ ‰å¯EïiVF[1Ò°4CÝM¸|ˆ ð9}AZ«¬ÔMe.“l-”æ»ü€žB²ºëådÅn”á(_yU#¹…„f­šÐÄRèÁ±&¨ºX¢gußN¹>„–èU-[ø†±Ê­ÏÑC[+8Ì¢% /ã'À‹ö*É¡ ¦K8S#6p°AK‹p’å «‘ûðFš¯ªÏÝU±ËÏ¥v÷•Vk²7yÂáÇÚ3«pEz8réÞ]óMSå+6W1Ž‘%Œ—ÊnßK¡[Ù®vùsk ÑÏ]sDË.ë®ÕI-õ 9«EÛ;š¹9ä²9ÄP3÷øÄŽCHÔÂx/]m`‚àÇ™J˜K®'WݶØaF¿”z—÷›ób ÕÉ.v¹óFh“è•ûB¶ÐKÃe"M@P Ê–Y¶0A‡€ˆhb½&&H¾_-䩳%2TˆònÃvnxÔBìÊ^À‡E=½ö˜} _ô9èZ+¤­H[éSï£u÷…MÓ»üäÏýgù²ÓßmgyÞå1˜¿.*>ýúµH¥(›ÁžiS"`÷I^‰¹GÆÐ.Z7í´>)"ÙvùËú€t-Ü …·Ä+Å&}qï…y¢ Ô‹|EÈU—dlãbÂÚb)ÓFŠ"=§„°Œn+ëbĨ`'äE£"‰·=b1R;V"À‹-KYÑkH†¼Buôz"„6X'Æ2ä17`8^\à'D!a$»T¥m[Dw¼Ûº´“Eº/ÍÌZÍá«v1"Ï ;ñ¦%»ÊVÕšôQ(;•cá]™òzùÎD·µ•A,Æ8šÐŒ1˜ô÷Ø¢³ç›¬Æ£ÿÃ1{ª$ï‘…Î(øqÇ戜•fâÆfá…•}ù¬ã(˜G¬L4l16‘-†ÕV‹žÏ8,ù 3Á±ª„`jCí¡b²X禣ì˜ÞO)CÑ’™4k¦Ö{i¶âtŠE1òü¢/¶ "¿ß+XÁ&Ø?z›Œòø&ÿóE]èx 3 èbæÛÖ¨?®êüð¿'¿ï²u»Ù8d[@Ct¨æœ@4+X{ŸZ²£åѸô˜§M©_ð<ÞåÉéi²VåºßnZº†,t‡ã—µÜnh6þûbšµ˜À$ŠÝ&p3 ò©¹«¤‹Æ2…a£áÆL À¹œ„  `ÜjÊ´PÄ´]áƒE]Š©>Ð'ተm1i]ÂóµÔ8L!—ÇŒ»Ä™¹Ä šÛFšÉ7RùØ $ü4^߇b¨É‹-Š#ëï- GHñëÖ¦ín…ȨfRh$LªÆøã©ì)~Ùh::H:Ü)Ym¥¶[g,õ©Ižxo(ì‰.‚{ ËžVÝs`‡0$°‹ó^3†0ÜÕg> _qÔ\“[Úž#OÒo³ŠŠg«¬ÚÚZd^°Å×\¢0G‹4°^ëƒmêÅLж˜ïµ3¢X‰rË¥.á _1  ðr6 NG )üN“¯hÔÓma‰mŽ=IAÚ¤†Í¢cØcÒQ>4Y:@³‰€Å¶fÉqé]í“o  sç."-Jy±ŸìëoØ}~UÐøºÇûWHt$eÆ*3pk|ì`¿e +|ÎÐb_âçÄÁ××·Çí²/×'‹ s6$8€7è1¾_KE-ì_q£§‚Êì`®ÂAVËùþZèçºk%S„´Yg9ÅbòÒáD4^.rÿ~EÃ8à·4ûÅYVúì]¥ Ö¤ª©ØIxЙwуçu€‹NxÝ¡­O!£S9@öÞ¾9›[ÑA¢Ûêà[êçLß)°µC;ŠÊ္XËçj>áB4Þ4(wwÎt§[ÿÊO‡ô„K=ñÅ’žŽ8Z Ò•ÅØ?ÀO?Í×Ã=“ކéû`Z&~½‘Il&g·Ç0Á×$‡°ÃvÃy]Åøx­¿LØÐyahâF]p®zHÏæîzÛ+›;çaÈyÂ2dXû¡ Íí5¶·¥ágU˜Èð a¸³þÊ}åÎÍÉ0 æ©5}qÂKqÿas¼'|Ðýïe.}ˆ2×—(Žë£“u”¸ÆY Ò}×4Ì£!{öõmô~l Tf=(G¶Ý3]jªÏ¯·çðô%þ‡³ý"£05Àg3oÓõ³×/ß¼ÅW=“–m_+ #J,/¯× ‹Ö—ãàÊNBð³`†õËã¯ñ¿]ÞΗ£†T§&y<‚‰л cêóW¯`¢kÏS¸Fu7ã ×¥f˜< 5ö€b\ÛKMŸ}AjÌq³oڧ顾‹Ê Ôsxµ!Ü8ø«ÆqpMßÉÍÛ_DSöðSó¥Ýuï·ßÎeó*Ó§zô‡ŸíÆ CÑ«›ë¿_Ÿ˜ªzœÃfw77ÿ¸ºùñêîŽâ€@û“› øÍÿ¶)¤ endstream endobj 65 0 obj 3310 endobj 63 0 obj << /Type /Page /Parent 59 0 R /Resources 66 0 R /Contents 64 0 R /MediaBox [0 0 595 842] >> endobj 66 0 obj << /ProcSet [ /PDF /Text ] /ExtGState << /Gs1 23 0 R /Gs2 24 0 R >> /Font << /F9.0 37 0 R /F1.1 8 0 R /F3.1 12 0 R /F5.1 16 0 R /F6.1 18 0 R /F4.1 14 0 R /F7.1 20 0 R /F2.1 10 0 R >> >> endobj 3 0 obj << /Type /Pages /Parent 67 0 R /Count 8 /Kids [ 2 0 R 25 0 R 29 0 R 33 0 R 38 0 R 42 0 R 48 0 R 54 0 R ] >> endobj 59 0 obj << /Type /Pages /Parent 67 0 R /Count 2 /Kids [ 58 0 R 63 0 R ] >> endobj 67 0 obj << /Type /Pages /MediaBox [0 0 612 792] /Count 10 /Kids [ 3 0 R 59 0 R ] >> endobj 68 0 obj << /Type /Catalog /Pages 67 0 R >> endobj 69 0 obj << /Length 70 0 R /Length1 13864 /Filter /FlateDecode >> stream xÕzy|UÕÙîZ{í}æœyÈÉIÎ<&'ÉÉÉ!N0 " e SD™”´Q‘"M@dR©b*‘2i­Ö€õ U¯ ¥•JÛ´j›¦½Ö Ÿ†“ïYë$ˆ½ýîïwÿ¸|9Yk¿kØk¯õ¬wZïÞ„B äÂHfÎâYKŸ?ÿÜiÔ QëœU+ü—î_ºôEB¤‡›—Þ¶x–kéXBä¥èÓzÛ¢»›sÇšÏ QP ?<Þ¬¹ÝÚ :ñ0²šù¨Pý¥÷û(ÿ‚w˜¿xÅ]/× B¹ å]‹–Ì™µëسß%¤}ÈøÅ³îZª©3ü å_¡ì¿cÖâyuܶå˼¼tÉòô·²ƒ’|”—.½sÞÒ»Öœ*@÷ëž@Åÿ@ªõÍ(‘°p™(*µ†huzCžÑd¶Xmü&»Ãù_ÞëêoÉ'îO!)òŸŸ‚„„ÂhŠô7ÿ¹FÿGÝFŽ“éää ÙFÚˆNòH£H ù9‚ò.²Ÿœ”tt+9G‡Ò—Èfº‘¾NçÒ¢÷<ÉÎʉ™èë²FêÂP·‘l gèäóä7d4i%¿a;ÈÝl(Zî&èt6Œ‘e²]”÷ Ï9pL-«#[©Žž çéoè&ÒFߤx:›J>ÇxÙ.v ³Ü(»É笒IxÒV<ã91ÆEý6&ѧéÚMŽm¦¨<'mÃ3WÓ¯ÈJôßHKÉ#ä:”4‘ÙònÔ­#SÅïïxÊ6ÒJ߯º[‘^gcÑÿV{†z03ä]Fæ2 ]GzH–~ÅŒÌÅÇ"Ob­Èf²MºŽ HEäc@+r")?û¡ànÝxf+ ÈÝü§ÉJɃ™ j[UvÕdú¦TJ_¢oé¹’Kj¥‹É¸×Mçò»˜ý‘Ʊµ¤•½'¹É ”בu´E~ZÚ#5£dÀJ¢Û¤é¸k«TG&’•]Ö?ñCm+_©4J9£ Vаæ­l}ˆí"¯B"ܸ¶'ÙVÕz`¶šîzßãø“e@m®¼3]‚ß2¤Œ5•, 'óɦ!·`?0[ÌÚ¤t)Œ± HH‹²Œ¼J–Kï‘å"ß ´î&k•Àim/æ´ÜKRµJ‘±‘$é7”"×Ï=˜™0Õÿ‹iÒä¿ýfµÿ 0ïnÿK½½ã§ÊeÚA¥ð ‹hÊ‘Ðïþ«Æß•&ÇŒŸê‰^7¼±oØáM¨¼i*ž€^Ç o,Å¡š³[åfeš¸2Z™¨¨F‘dR~ú£ÓÄ|öôÙÓ)›%`‰,f™ô,gžž?f·ª—?¿S•cЩl1[©L'"C21¿×å0¦±’ 4‡Ã!¿§ÀaUy£VÃˆÊ ÉNÉ6Ÿíú¨ËUk±ºjñ žúδ«6EƒÑ«®ª©£igeF ü5ÌàvÊ>—s–Óå“îì·‹ùœ®&—Ó‹"[ìŽÒew~¾Û}(êþv ¦äÍ^»¬L"7‘Ù¦Á™úš‘•µ%eÅ7Œ …åŒÍi5™Ôt’¬5‘ÌÈö²Úâ¢vqR§L& FÇjêÇUøÃ£Õ7hå­Ø_RF÷«Kž¯Ü/ûÕõÔÏ“ýŸs0Zm)“Ì_ttuÌ<Û‘îê4wt›»ÿdîN›»­Xwß¿¸rÎvtÌìèBÞÕ‘käj-µˆèdzTD T‚ÑÁt@õ‘U5•i—Ó奕éšêªh9-£q(‚ à¨öRWiW…‚±h¬ C¨v§z©Ã®’Z R8ðccÆ +^VT V;'Þ²|bë óî:ü”Ì¢`X0y­Ao8˜.TÉöE×Ï[3vôkn|£ñÓÒD´Øú{uÀãrV—m —Ë×FO1äÆŠºÐSsÖ=i›HDB†ñ:·Ùj‰”¶DbCÌšxÙ䑵7ågÊ·/¿¯ üx¤÷3™ÈM$Ýú@fB†Œª«lˆ°ªa)m8á±z©ö„£Ããu2Á¼¦7ØÑªöºH¸:\›w«v‰VÑÔUW§õêak$C†5¨ó&ÃÀüÒáyÕóGbs·ÅÕlÅLRÞÝ™í6Ÿê6ŸÅõcß{*"@ž9Í Ü°9]¶š‚iQ‰ýQ»Ð d Øåœ5ö†™¹qÃO›§“;—EoªSt:(í±¶”¥‡^²Ù «†8C´`°Û–_èš”ïWØÊßÕ ºíúä„[꽸©éɉ#—T.x´ÀG©¯04hô2ÿè1Ùýåc—%ýQ¯&=Àä°/RRª†æ+O4 ·(J(Ý•]Â*ä“°MŒ…iMoz{ Äö°Šª,/dqfgš‹ag-„kPI˜1*·ÈXTª®²<Ä*®³4Ö¦*ÜSlfߨôÂS¦ š5ÛämŽM‰§²—xß?× ;ìpºFm§ãÛ÷ÒʇomrCî莫s¨ÌµÌó¦é°×­u3·ÍíJh,aK¸4O‰Ù “ªÿ¢k&¶§oVØ€+¸ÌÛ· N«Ã.åÄîh´^7¨"]0ÙnŒÁ¬¦M23j¶gŸ´oLì¦ÚÖ{.}wØa§ÝÝ0r[ö@ûÞìé‡gß ç‰ëƒ÷è.ötÿ²*3nø†úºêª²Òd4âó¹œf“Q£¦Ä! Ê ‡Gk¨'^e8o.Uó®rEBôS†óž²Mï°Ù‡W8öÁ#Íg;;?êììg¶ÏåÞétGš×sÀ#Ù>aT+9ÜMT0^9Í­ðªPG®n—òº”vSÚ(kôj7cfSöÓjuž~˜Á¨¨Œª-›Õ&µlÖeò0ÉÙ?›-jêV4ƒB5«g\¡…M_&É&ûXƒ‰i lè¯U&µbÒ–kÕÝåËz½FS®å5ª_eyZÉ¡Œµ›$i9õ,üç°œMšåòâ#™LÀ¤5¨}î·]ä´ám³ú-¿Ëb‡f•â²;óM~lq'4?´`û}qM1EB†B‹´j Lßø€E¡C:HK“¡ìcñ ·4ûx¨4å§·‚qéõ¤ßÏn 'Q³:î÷–ÑUád2Œ½ÞAË•R91A¬½Ìdõ{ä]³I£&²ž™¡„Åî|Ñ cdãZ–?ëPÌá¤Ýå²³Á®¯.v;ØœNÛkç!útï笄N&zbÏhÙYíû•‡ W|U]©HnÊb!ôéÅS¦-Z–Œ•cÂ=]ænXuhkeÒ+± d1sÚb–¤æå÷ܳ|Å=÷¬8qቿý­¼6û÷Ëÿ‘ýµüÇejþº‰Î¡Õ´ŠÎÉîÊžÁo§à1*¾R4$@2ဠ),ïUŸ¥#_çÏ·:ÌÄ­õÉ~•Ã\äW™ iaÐ|vfÇÙXÕ~KZAÊ»Ò=ØêTNƸrÏÉ Ã’ÓÜÜï@mµÐÕyyŠ/ôÓ„Þ¡·9wOKÅãWöÅã©imr…$…ŠòÃÚñŒ…¼_Ÿ*Їñ/bïq½ò4æùà]IÖgæ„UðGóÚ×Ú©½(é(z•xÝ-†5J‹æàFù)ÍNe‡¼Ã³Õ÷„{iuŸjŸzŸfŸ²O~Þýl¤]s4ò²úeÕËžò ¥°[¶§bÝm|6owø ñ09Rqˆ);þ™&à n¿ºÜª^Ê(kJ,MH ³Ûï–ÜZo¾ÙLøf3Á¬ð­8¿vtÁ]3Ø¥rÞQ#ðEλ‚ûÌpÐr8^m‡,2iåºË'·ýµÄg9wóêÇn›îINšèwŒkZ5cÒO…‘‹ßßõÎé ïš>^9Âkþþ¢i-…) u:&æ¾õ®ùaÏà»_yðvë%r<Ô­@ $Û3s¤Ç©DýE…»:’Ÿ4™Kd}$@:ÊõÚŽüWYÜ1Ð1Yj–VIH[¤6騤-‰L—å¤_²˜IUTè×2C€ šV'ã*ŸŽ™â4îKùך¨©Â­<jÙ|*=“3˜'':ý\ÕÝ>[Ÿ­?%ä B4“Z´´O^ªÁeК€Gè'WÎÅ„TqÇ q«VB}R&Ï®§¦T0[‘-u)Œ¶­&•I–›–JØ{¡Ä4jOѤPrGÏHmW¦g+}‰pà9¿wx<‰ÓÊi·Q¢Ô,yœW4!¯SkÒ$ÂÏù¢aŽ€î‡Þ“änRLVgnô%‚ĈznôÜêažüvØâCkûx,]›è~ =W²ÐµÈ¶PÓâú®m‹ûaË÷n‹6èM„ˆC5Á;!EK k ’¡ÉK½%\µ€ภï¼_羜™í˜) ƒ–é“)ù*«äX BÈk¸Aë7vtý°¥•/|–;õÜŠ õçf<ðã'ïšþ¼ÕëNTÒ¯R©tY¶Žó]ÿ8ò³Ë3 7ühíwŸžD?Åb‘DNϳ¡çÃdVf¸ß48´çMXᇬÝl÷¼ê8‘CöÐ$ç$i¡f¡øñÉ¿Ò[¨oÖUãÊŸXäIð–Dšéz¹™Í'yÄC™|ãiÇÇêÓä·…NGÎ-ÖXåˆ[_GŽO‹Ÿ ºzºR¶~n~»ÔÆÖyoÏZ_ ໆ–ܱP8 ¡Ò£ "‘°%R2 XMºŠ•._'9ú°rQõ×GÞ0¹•H#LóôW[L‘™Ÿ aø6VWÔé‚>wÒ«V-»)‹†¼¦H!óÈšéSu20«Ê÷†¢eÒÝt°* êó²›%9ž®HÈR¶Ur…½ De±§“[sDù<3E¸¾aD`ZÃäÀFËÓvËã¦}–6S»åEÓK ÆxCEÀ,ý–&ü‚â>ÞÛ„DÄ=)PAÞ¦¨Í]øïYŽÖä Ó*èL›–Çm äK$”|ŸEÈyñý\*œøU”}ËÑ@_/‰„‚=‘X:iÓý¡KçHÕ‡{‚¡Dyöuzs²8Ì~QNf½¤§tx*Z•ý2/.£e«ˆ„"¸9šým€3‹„¢Áìøl ú1<楳²Oycq, RúøzCï'òvÅjr_fÊe“Ìñ˜ú'ÊõžÈOâûGu/ûŽ[ò ŠÜÕyZb(v'ØÅ‹ˆõh¿2û/]Œ^2¿_üuE‰eõ¸•!‚TÆ~–ùÜ$–¯Š‡l5<ÚðEWº3gD¡dÊ»:{ G»³3»¹¦ÉExÔ™‰ˆ ôg.JPíêW8€Èõ¯>FŸƒÊá±Æ·Uî8´dòÚ󚉯7?öâ?>´jÈ+ƽæ+Š^ØðHÅHÍ' Ã*zÜj™?µqêúQïŒ×¶þÉ&³zù“Ê#u¿­óÆÂá <Ü\JK’´dn^_øi{è)ÓNãvëžä˦ã¡#IŽ—”0‹|£þVýýÜÂ…kõOé_Ðï)<èÕy]_…õ–‹rñ¥ðû¥ÖFç$ë$çÞèÞøñèñ¸Æh'õ${<6¹Š®–ðRqJ@ÌË s)Ü Ž?çõº°Ìk°_‘s$`JáÆôb›£ñ„/õÄ S§ízãåÍ×Ý]có7D|±ì¹çÎg?¦þ_ÝΚä€/5æx$⫘pÓK>öJ$bpWÇ|7>Kï¾K]<˜)‘©Xÿxêaðþ‡ “Éuàü›öã5Ï>¢!Ï€>ú8èà5¤äCÊ̤ :’¿N!$N.B[(AKè)øÔ‹kòS8G4Ç’„«@ ¾¥vÍá+qêóB]Í=w;B4øÙûÔY>ßtež´É´·eý1úôÃO|/ZX”rUTQõù ÔÚKŽ ŒÞ·ú‘`‚˜í Ø–:Ň³ÒC •Øý0æé!Nà ð‘ ØÄ‘;ÑÛI%Ôõ‚óøM…:3h„8€e¼„Ä2xœ¡&†Ãꓸ¦lèc$i(/œ‘aoxL”3·ïåÝi(¯zݳur"Ú“óuB®‹„B!'^~S¼ñ#ò6ðT=ù²av5I†# ¥ðDK [’Øß²í;H¸#ŽDZŽ|¬=µIhï¬UA-j2É£x—LâÈý@Êþ«ÃhzàU…V~Gî(E­ Î5Rçý Œ]#,A :Ë@sw"Ýy2É…ÌÓ•NÃÝν³j8qÐI’”ÏcâZ‡_=)á5Hõ¢¯ÿpuãWW~\—Zá×i)ør׫îÛ·˜1{0s×ÙHM”¿bâRžãÌ” ´Çâå7¤“Ó‰ØÏ<^ G?YLMÑø,›>1;ým™\IIJÿ;ŲÒµÙóñç6™p«á´]©ü¯¡¼Þ`°^'IJurmv®Nž7à‰àRhp"ó7¼2­Á$QýÖ{• s|§A‹Mœ'ñZ ÈšQÃÉÊ…Z—¨ÁÙ/ÞrÑAñŽ­éÀp×0•å['šÊ€Ú7«"££±¼AÐoåW 1`2‡Üš[7|9ÖÂSs<µ~Uy§a4¸ÄÞÐ`^%°ßŒO寰ËBSG,ÐSIH£OGU kÉùÂʉ}³C3•B_çaD@1r5® |£C]NSùÁ©ah*7t”}§ày\GrMe‡¦ˆö*<{©ço`ÿ²âbØŸþ¾ºF[IÜaû–¶ú†‡¾¥­úÖ•ŸC[——7}£®Êë/dÂŃ ­šwA[…G«I$ ­¤uþx$à´5ö+«XÀ[ ·þª²*ö†"PV™ßb9;„]v‘á™*rѤºè¸dz?¿Qݨ£Œ¡“Ô“ô3”tŸeŸíY׳yÇ-ÇmG]GóÌ,n˜«['çs›Mð:"^©æœsj'Wm¼Ô¼ãä©íÛOvH?Î~ôÙ§ÙhøÓOidù?~òäãÛ~N§ý;5ð5eÿ.x`1xv x „Ü×PεæX(8| p _î"ìË%|ã!ƒG¸uR“-°ò{Ž 1ÔºÀð®Ç$ø[Æhûj‡UÓ£.ÉõiGO}‡xm,Âxwõ ,bÁ\F¾ÅÑtãöoc¿íVK2Ë5é•;cñDÉÆY©X¼ÓSxë/WO»c@Àµ¸dÜó··öó»´Î—…ö}«WŒªÔ^røûÞ뺰ö Ñð ë:«˜‚ëd\[Á½÷BFïÅ:î&›`76»<þú<öÍhߌöÍh߉öíhß‚ö­hß ®Þ+ü<ú=ƒ~Ï ß3è·uÏ¢mx|ñ—Ñ~í‡Ñ~íÇÑÞ):]v ìÜyÑ@:ôÛŠùq©ÊÇ*dÔ\½=[°‰Ð ú_Äùص!h{Ÿ,E?ôEKôwž_–ûZzŒ«Á˜ø¾BŒëÀnÎ#Oá©/ ýLìor\ŽZÙoàÿ,ÜMnsQ*þ¢Ç¥®™ØIfÎÙ Ï~€pº®ù O¡¢sXñëÚ¾yÅËÝ×è¡@$‘oÎ+Þ3gÁ=·}oÀéÞ{å†Ý²~ˆ7ð‡¼IŸ½ú® ·,_õÆ»¯=Rûƒ¡´%u(´Ô4L1²þ‡î´$–N¯¬.¯ Y+JnÊ ­‘• ­žv¸].nÛhoWïù=|‹3ˆœm ]¦Æ.pDÈíH2p a/ ±܆ÖAоÜ{õ!UB£¹¥“DœB&Pû>ú©m—àŽ*ŒBïJào@ùvx½·a(((©ãïgñÏ­©¸"\”6Ÿ¦}±+<›áb6a\+ñ«"PüäP€«†?“ÇE4]¹œGBÄg+üp~ùǃ|m%ô£ëjt$gIUjþ¥ n‘šÖéâñpÜüGmq$¥úš¨Ób)õÚ¿N…æï=›_2<®¢Ÿ/œþ]^,.6Òžl$ꦥóX0ì‹å‡dE¾ò=õÆ*²MÒT8vø`#ê—®Øxö€“6±˜ü4¼®¡9çr=,b¤ÅÀ·Xº¡kú[øù“À¨ÉcàÌÄ!sñ>þ¦Ëê‹üô­$÷²z@UµQ;܇ðF™ý^±êÕ*¹ÖˆØþÊB‹^£Ò+ÙÒ<#¥.Ù¤Söÿ<µ|vvü­¦úR‹éµÝÝííÊ.‘ßSö ÌϹ?\Uš,:«¶~õÆW?Wy¯¶ôu 1ù ÞLŸ{¡Sq}éè]H;@¿‡4 4}×O΀–qååcH‡ö#¡ž¼ƒÔˆÄdž4iRŸ×Ÿ@š‹Ô†4éxßu:®‹‘0^ožÁOÅAüÖÐQô ©Fº—ÅÙ]lë`_ÊÓåÊå]Õª?«'«OhÌš‰š6íwuÝ÷õƒôg MyÖ¼7˜æ›Ž™«,ƒ,=ÖQbõ1úôÓH¯‡G‰úSݰ‹9”­}a¿ =õÆñ£K®[²òÎÛç݉;Ä_v3ÎåÿFVƒô#îϘñ+äÊîp‚oðu(8ÈGüÐju8•€ÖE®'cÈX2ŽÜH&À÷ø´ÿtòbC¯tmÀ½ :Ó€|É",òAЪŒÖBw3:PÔ t ™‰šjè~F«D}¥¨OãLÈhJÔ”Šj‚,D‡–e4&è¨xfD´òžŒ†Ä¨~êî(Ô/ê8ͨWô-¢…ð Z$úqšQÖÅh ÝâŽ|êÂU9£Nòº(ÙE›M<ß L^1›áû)Ô"Z8ͨIБëE®£Zœ ‘3ª!ÿ€´âÓ àΨšü/Œ¤àÚˆ’JôWD.÷õ“E‰‰\ˆRØC.sÀ~s;¨ˆ+ïsûÊï7¢Ó ß…¢7¼ ƒùý¾›Tpå%N3r{Ï`¿„MVpå-—ÈkÐÌ_’’Y¨ã- ù=¨û'ùã)¢…‘6ô‚?eÔ‰5‰6&h†ï/¹ü71^7ù+¸M!Ý¢ÄiFºÈŸÀk ®ü‰!=þ"Jœfä3ØfF>Å)–‘Opžg¸ãÐÜŠ¸“ šk»8ž¸òqþ òßs#¿ôE´3|ÑÉ[+ò߈ü×àwFΓ_ D΋:N3ò¡hù@Ôœƒ‡Ñ€ÑωÒY‘¿ŸÛ3X.¾|ÿyO´¼+òw =ŒüRŒrFЧEýÛäò½&o‹§y _8ÛQ÷–¨ã4#o’S¢ŽçŒœäœN:¸„à›ÛŸ‹–7àÅ ÔËwéç}ëç-Lp*Ã7­¯`ÔWŨ¯ŠÝ|‘¨i¨ã- 9ßÍ5Š:ÞÂó½ä5 þUnÝÇáóàM‡Àå%1Ú‹"?&ÖuûŸëwTÔí}#ð/í˜ÃaÑrXÌáù©˜oahçsø)9(æÀ[J|ûÖÄ[˜ lv\ßÈsr@ìéóbäý"ÿ‰Èyœ—‘çýc‘·‰||JȩȾ’AŸ1²>ô®_N3|;Íyå |eÎe…ç ñ‚í¨UDÎðM0ïñ˜hÙk6-[Äx›¹–!ŠöGȧyÎõ‚ü‡ð˜èýC!•œfÀ‚¶IäŠ|#ù>z+ð¤ù³9Íð57ïõ€àìõ‚'î'÷¡N9ƒ÷ÍÛ×a. ¸BãÁ×ýÐÝ ®ûPâ4ÃwÓ\2îã®w¬Â·ß|þ«D‰Ó ßQó±îùb²ç…,†ÅÍðtÞ¾€d±ÿ >Ù|è2W.iœfðÑ o†à²Ù̵™'ž:qÞ{®Ø…9d6SÈ1"§tNì’‚k)Jœfˆ>ÍœÏs†óonÜâ.N3pŸÓԾѧ d§ÀŠq}8E´MÏÿN_ïˆ:>†]ç÷N„ÏϵÔDQš F/èq‚Ûo÷ùœ¾tå÷]Ïí,$§G 0Bè¬á¢æ:¡Å†õ= Ø3Èß÷ ö•£“÷í+ #ðF‹¼^ŒS'òA"¯ù@`œû $ô=×ñ¨'ç¹*1V¥èy…ÈSâŽrxáxë%j„½E™¯¡DäÅ¢OžƒÌåx<.ֲ彶Bq-È£Ú\…¯†ÄA‘D.,±Ø ¯æ'`WÎE@‘Á+ÏÕŠÞàG(qšÁ'É=Á-ê8Í#à|¾N‘ ë OÄ*,Ïü3VDÎÀÅFXzW.ÿœfà­ÜÊòÄ Æ%Šç Øk1¶"rœZDº¯¿Z`ÀïåÞTnîŠÐœføñ¨à",,¥ùë[iÉã?òßkîüóÎÿmï` endstream endobj 70 0 obj 9420 endobj 71 0 obj << /Type /FontDescriptor /Ascent 754 /CapHeight 587 /Descent -246 /Flags 33 /FontBBox [-655 -409 764 1089] /FontName /JXOPHD+Courier /ItalicAngle 0 /StemV 76 /MaxWidth 823 /StemH 67 /XHeight 457 /FontFile2 69 0 R >> endobj 72 0 obj [ 600 0 600 0 600 0 600 0 600 600 600 600 0 600 600 600 600 600 600 600 600 600 600 600 0 0 0 0 600 600 600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 600 0 0 0 0 0 0 0 0 600 0 600 600 600 600 0 600 600 0 600 600 0 600 600 0 0 600 600 0 0 0 600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 600 ] endobj 37 0 obj << /Type /Font /Subtype /TrueType /BaseFont /JXOPHD+Courier /FontDescriptor 71 0 R /Widths 72 0 R /FirstChar 32 /LastChar 213 /Encoding /MacRomanEncoding >> endobj 73 0 obj << /Length 74 0 R /Length1 27608 /Filter /FlateDecode >> stream x¼¼wœTÕý?|Î-sïôÞë;s§·Ý-ìl_:(‹®‚€RDЏ€ ¢A4jTì ’¨±†EŠKŒJÄBŒ&j –˜X¾FÝo’o$ÂÞ}>ç΂˜ožçùýñ¼žÛ¦ó©ïO9a„mD4ÊÏ_6o…ê\î ¸ò xÍXºoqk!¼!&pÑŠ‹—Ý¿úû*„Ø;à¹åâKÖ]´å¹W<ð>„f-Z´pÞ‚¿IÛv"táuðùzrAЄsò}‘EËV¯z™% çÁwö^²|þ¼™ÿ¨ÜŠÐ‚8¼þð²ykWðwqÀ9CèÒyËvÞ²å-8ÿ+ùüŠU Wü÷+~‡ÐBBªá†ùÓ!zöšŽ¢ÈƒˆB˜F^ÔŒÚQ*£.TAµ¨Õ£n”F­¨u FTB ¨MBPêETƒ&Âwq(ŒR(„&#ÅPùQYÑDÆãà|zýæ0„y<Ž{ÐVk-Ã-(‚3îB?BÏÁ'Ö¡åðÞnôóôóÑàZ=z ¡ã0/?Œo6|ËMèžÑƒèô9úztÇè0‡MðŽ·GÿTدR@á(|ç´g¨Õ£› S`d?GbÇè8˜c-P½]Œ¡eèRt¼ö,zýƒœåòð;ÝhºÝŽîBƒè%ÄWâ2êÑE£KÐ90‚%ð¹Û`6o ÿBÃfü<><êÝ3: ¿-ÇÚ•×ïG?D;ÐÉLÐax|‚†ñÙx-Òµ£úÑšÑð~#P­<=>± ]3¹B¯Áãð«q\gâx#ÞŠSí´•áØ)£×Â(y w <¦Âø/ƒ‘ÞŠ¶ AOÂãEô[ ¼‹Tµ‘:F›é 3½ztçès£¿ް eøÕ‰À•Õh-Ú‚n€ù܆ö¡лÀ«¿¢ÌavÂöàð—¢ÌT¾íUz9½•ÞÉ æ~æv»Y~XþdôâÑm£¯þfOlFó%ErË ÇÓÑÙ¨-Z/Uäã´íBûvo££è4‚d€y–p;žƒ¯À?ÁñüŠ¢LT~3Am¦¶Ããu„z›öÐ~:Nèóé;éíô#Ìíìv%{»Kõ%·Ež//ä«ä_ŒN½kô‰Ñ0AцÁ_ÁãKq”‹)‰ªPá1 ó¨ùÔ"j1µŒú><¦vR{¨!Ñãènz<éôÛôïè?Ðÿb<ÌjæJæ—Ìæ(ó ó?ÌqÖÄæÙ™ì9*—ª¬P=¨ÚÍ-åžäŽ¢§€Æ?ƒ9ù7­£î¤¾A¨г—¢^¥zëñnü HÿCè~ÐZô><*ð(ÀCkA/’ð@•˜ˆa! ø}^ÛåtØmV‹Ùd4èuZšçT,CS¥»ÄAiî #‰½½r.΃ óθ0w0—º¿ûžÁùÜ '‰4\H p”L‡ºaÔÝ„o¡­¡­ãl u‡Ù¨²‡níËÁtΞ½¶3f ƒ•>ïéÃ…}}ð=)ò=ðxûÖ>ø†%cß{åRnÞ”NOIÓfOŸ=¸±Ó;Xéì’€ˆ˜6{ðHW_¼ æ86Rد_ìsÆœIÂë¹ê·œ ß_Ñ·u+ùγg‹Âà­[½[‰NTχ0ú÷ •± Cˆ¼…ˆÊÞ8 > ;Qð’ ¢ 0¬¾Nø©<ˆ×)ö¡Âÿ3…kN>Y„ÑÖ(®ýÿˆÂuÿ'®ÿ?¢péôH¿Cás‰P¸üÿ…Ï 0øZÐØ]€Çhðs{(<žU ás*>Äpãi¤a™ñ4MyÔ*n*¿{»Ðôöã¥0O=Œ§ÆcC*!5…&Nÿ´ÖÈU&³Êê€1Ùzµ?3ºíeL“ÏQ&?ùØÈwÇä,#“2$Ô(†ÄÅêKõfSŒŠ•N‹™ê™2qêu³š¬÷ölhœþ–çG[ÞÄóåã–õú…˯xÏÇÁ}ß.Ì~Jþoù Ûf*@Zõ 5`Z*MÅ6Ú£wÅhÚÖ˜ëü°ÑÒ|hC­mãÓ•X;Ý^ìnëötë»…F›ÍiN‹‡œ¥6sË!®§wíÍ®TîÃæÉ'Žiêµäz¾Rþ\Ó‡¦ƒ¨õd³éý“Õ—š=ïà °q–R}IŠIuµõŇ³®vìÈnS9ÇáÒ8 Wí6˜©ÓA¼·J K9l·§rØ€ábÝæ…L™úã “¾Äµ+êR1Ú@q÷ŠÁ@bÎsÍSï™]ëNÞ:ÉPÎD©SKϼ#éÙ±˜Kº[ÂÒ]mž³ÇYÑùøšf¿oš7lµ†Z5¹ ¥+*>)q†Z„b>¬þs!÷HÒExû;ù}|P˜x+½Ì`šâiŠVé)š7ÝÉiíÀÙí*¬JYêÝ6ûAaígG®^åcîäár±§p·Çý ðuRˆLL!Œ¿m†uîx‹¦#ÙÝØÞº`ÚϤxý†¤çJµñIógÃX¦á›©Ê:ªhP =,r3ìÞ R®üî'¦ÏPnòp!oìÂ4üYM6*2úþèçøyÀòZ$U¬lR«ÕÃÈù$åÖé_sA'Ÿ’Fò Ì©Kp ½#—ko˻Ȯ=—ëP¾“ýÊlÑh\Å…hzª…¢0E3iÒ”vlt?ÇI$àGvý~Â=è5omÆ }›'gSëM‡€"E,â×ÈM±‹¾€ï¦et˜ÞÅÎ…è €n«„ŸÀ_ê>µÑ‡Ð;èSDP[ÖÓ“xÕÖð€COm± Qüîf‹gˆâv…‚¹#džMLJQëp+Ì¥c]¥ùu’+j“ø¨O2EIïÔÔ!d§ê0ç‡#ÖGZ·¡a+lÔ^U¦Í°IÁŸ²!ðw ^Ùú#smŒôÊns:Š"º%„c’ÙTª/Rë/Æ=öX«® ~|õÂq—˺z˹WŽF²þþl¿¸ã>Þ"³M{qäð ¼w÷ó¸S?!2÷1Ð/ÊžÑðòŠ{Àv½’lõ6J7r!ÿQ˜þ×…ÜG¢í#ý¾ô)ë…¶!¼¡bÖëhŠáí,Ïé\ÀWŠÂù½:Þítý¯ú?„ûј½C;&—Í­ ’“¿>‰¿N¥ ysØÍ6‡Ó.ÔxšA>Ã*®.Z¤.Äg­9²n‚+î9;‚—ëØ>V}bÒä$ã ¨êçÐ?Ê×øM>÷â@D¿Æ.€lÂPeRÔ‚/A—âÅVzu§ñ¸ñ¸a*›Ýµ1)Þ>»Ü-Öjhyh—Ûìvi5˜UÙTK ¬Ýö §‚¯ŽÞbþ…ûЇ°¬â.¿/wäÓñcÀ]OË—üEë0Ñ®ªQ'GĈr¬É²¼÷1&>ÊéËjNËé:¬Ökla¯©ÙÔ|е+K¼¢šab}ÇÌ……ð´Ð‚/Ū–ß03—JÕüå†Gßü“|=~mgùÉ?:ñUxÁ£wÜ· ´JýÙî·ï}P~C¾2Û§“ÿ " ´éý=À.ÜÀ¶Jóx÷¹ÅE‘Wæ&rK¸%ü:îJþQ÷K­Sp¹œˆNã°IïrRVõu¢Ö ÔX­ÎYÁ¯]V1zÙÜ–„Þ´4À.}@ÂÒ³‚ðHëQšRï*äA€HýŸ¾UU°Ø¹þÏë`¦‘SÔ*Zy\àA>úëÅšúºÚ˜Âö1u&€ ŠFBÕj½³·õ¦-¥þô.õÀÐú/‘­ ÆÞrÏO»bgÍm\&¿-uå|!ú³UÏ._:ýLyï¼rÙªééó¸»÷=ré¼éÙr¢´xÇsò‡ã“ž<¡YDÙ§ S´©\KcV¯bÔ­G_fÑëi¬G:šÑ VøÈ·qH‡ïÚ«¡YN3„5zPg>b(f×?RUT¨hÕ3”†ä€4Fƒ">ýÇú›G>4€ãëfs•Ê›³)¬‚c#¡‹ Ö¢¹hÍ¢Y¨£fÊvüeûo¾¹}äsëÈúº“Wm’Ç37)H¾͇„ üø"‰÷±`í"°Q ê:ìó2"ÆÔB1}Ék®ÁcÂaŠ‚pH %«¢øfH…3N‰`‰?ûÍþšËž¿ºç:‡–§hê(~2$úLS˜ˆ]^?óÁIëgôNýíÂæ©ÌÓ×¼v¦WµÒj^ËâÃ~5»ÓçNžÕ³kþò»Öà´@¦*Ý@ÛçØµ #QtkE<×ÔUkœQ“×6u¹{»½TE#¨Ùð”>º9±œÂž˜)¸…%^!&NŒ¬?èµPˆçiù•Çe)ä\ýÃfÅz”{!…"vbܒǭìC"†#—Ã[‡CL¸òœ°ËQõ ×\s Ákb™MÑzÁiÀ@€6}DP"»ÍB”‹~îË_ ÊÀ®op»~oÏø®q™iÓ·¿ût²û‘ûŠï\s 6ÉGñlÁóFÞœS{z?\&YBïi¸ø‰óê7üD~ùµ-„ÅÁGÌ­C«*¾+5›ùŸpôbn5¿•»NÍðj^‡Ô¼ à 2'qÎ ¡ÕØ€0Ã>ˆtp¦CD² H ŠaÐÉ€ îPyÕœ:‰>aI"öL+xŠ~Üíà³ðDè»ä)×ámò¤y3ÛĶ ›(|ó"s¸r‘é‰í0V-Þmaçþp¡"NUÛÊÝëߨ&Ü•º3sOv[ñ¡À£©‡3ÿžÑ³G†J1-L£ª±ÐXÓ¡êqvǺ =5sè~æf1{%s™n@¹ã2çå®ÕÑ›˜ÙMλ¢{é½Ì>öiá÷ñãL0ÎD\u4­a41·Þif¥æØö\÷¹žs‹K˜%ì÷Ï’¢©“/J.–1Ú•Öò@Õ>Ö—†Ÿ¦–¢Äõ!ªhëìK}ûø¥ÏçpŽÈR]-ÈRÿ0d«à ³âœUªIfý‚ɦ;¥ÉðDX_Xö:dÁÿdµ€4’°±ù-uØ$À†ÈÓi"*ÀFL²3L\,MPcÄÉádNj>ýSœ\ x›XÿÂ9S¾¿lidÜåkÎ[ûýËä?å'¼·sÇsóÖ?vûï÷ýäÏÓë¾Þ8wÙæꟘvÃéq™ÉË.Ø´úìówôhZ箾nèg—]Þ_׵ᙫo=¸÷Ž«çµÎ®ê`ËèôNࣲþû+Ó>s}æþÚõµ›éöã_ã]ãÛìÝì»×t§w›ï1Óϯ&ŽšŽ& YÞír¹ã!Ó¬Öu‘>:õ6Œ7¸øR¬KÏnAfl&(.£Ý'4Τ«(Ž(kë0ÑÓ~×08,BÅÎ0B´¤hlXJªLz È©&4åŒ`Êt1ÀqšFÍ›1ÚUÊÖCàQW *K(Yôí¾ ·à¥¸º*1-EªãFuÓæ ×­¼ãÀ_W-»úÅeku]5qÉÕ&q‚ÚÔc‡‡÷S-“<škâo`æ©]·ý“–äïÞ-¿tåÍ]1{Üå-ô,ü× Oƒ]÷·Ÿ¾¡"Þí¡Ñ¿àè'•*H]ÅG%yΜtjÝ$RL´I–5¸]î…“ËOÁ¶aÓ·ðœ€ZT bd¨3Áúu]éü¸J6Ýõ£¶J.×Ý^¢õ­él[kîä`{.ÓÑ–Mw+cx b›W` V¨ÖÌ©ä_:Ý8ªÑM0éæ8­/éê…3ãœpP¸d‘2®É߯9“MDZ‡MßvÐŒv¾3àWn=çÌÈç½6a´ç§ìŒ}'¢ö@ôÑAžgŽþ…éa|PZX©gUª‚…¦(¸‘#0t*–VQ,Lˆ§­b ìVÕVTÀZäá)7Ç!tÏ"ãsçF­.È !NƒxXñcö. òQ;®“Çôœ8ÎhF¨Íwã%|ânù{ÀËô7¦‡ö€•ãPv¯ª`ä07„u3] XI 27 “Ç2í@¹áÉ#ýÀD P›<«ß{â8^ÓMø‡7ÝüÁý…Y¦Ìñ¢JIŪ[°0 ­B*,SÝÆ ‚9Ò,¥Â“d Œ–òðè?O´¨êè`ž L’Ë{—rQ#™b¶0çžxˆžJ_w·Ì–dön¼†óÜ þf:{1ÈlÝ[)I¼ÛHYÃb gPŒ£¬ÝPj]«·bqYº"ÈIo“Á“‹<"Ô&ÝÙÜ6ìÖŽ%e†‡!ù3Ð{9G6-9ëeÏËâhPëˆçu9ñ*ŠîI¥}!>˜üÐy£8” ø±OˆV| |qä ŰTs b-xcE奪ʟ²•ªÕžÉUÚSÙŽÚ×îù©?â0™Ú„Ì¥Ó—ŸUã•§žÊTZ³ÙÖJ†Õ?qϵ¿üͳÑÍÅâïj]úȬ˜£?.Ôtu\üs…>C£«¶A<¬…jÖs•ËËb§úŽÐŽüŽÂŽšÅפWrj—ÁQŠ:¢¥²¦®ÔÝÓÙ»Us}é^6¤x>œÞÃSc¸5†cua*ì1 XèbM•¦°u„Cµ½é6™¢…@  -¤µ=‘t¤¡µ!L°ÎäÖZãäI¹ƒï ›>\©-7ð+WîˆBVAüpDB¦?»Z[þì+eŤþj}®¿¿ßu‚2Y1 XWCÙ©jP+„H &3F¼‘âiÉ蔊ÄX*a0ùHD )™4‡P$wªJw4¬ùAcíÂÁË>úÓ?t0>û’üã¥Å0v^?iå}˜»¿gQx°ö$ ®šy¯Ë÷üNþû;Ÿ¿0„¬|ò*éNùøýxÏ$|M_m³|䆑ÿ~î—Ø†Ë¼×ÿzYlO×¶\tï5bïøº…-žs[ÔæNbí/¿Ùÿ²üùïÝïKž_ž{ðˆ†lbÿEAÍZÀÍ•Çh#mrÓnÆb´˜¼Ao(E§˜„ªL—™²ª9Øš©™é¼‰¾‰ÙÂ_¯þžþ{†ï¿gº)xSè^ú^ævýí†Û·›î ÞŠtê; Çó*ät80årÁÓíÆŒ—þ©Êä5꽆¸F€0†nÊE#€‰k1¯ñ*UÚoTk4 |Rå¦PºXv;4*ÆÂ<¢ÒNמYÑ©+‚š§CFÍ‹mjj øDF½0šR£pî˜Ç=2â"(®p\³‡$V!BæÁàñ©ö.%THÎÿ"9(çHÑ“#r°ÙÄ®?ؼÙÔÌ™šag€Ä¬Åò%ÈÞðXΠ’wÁ*Ø1}Ûðòü©SçâÇãX.¶ôŽücN­Í2säóiÁ¤§Ç(U;rdä¢ê‹þDŸX³º¤‰FygÆ8)yè•>O­M§Š³€o"ôU<«`Ý(t¼Q™v½wS€j {és½ÓûðKøünêSüyJ“åM‚ÞÍD̂מý±„Ú¤ãýÖËÔL,,ù‹Íb–Ú3Y‡Òe#‘(ŸÂÅŠÅ=›šQ m =¢CµyuÂl¢è]µE"$5ýVë5›†[››Õ¿rä«ÔSà1I¤@ˆJ¦ÑéB8%…¥´31#‘š‰“®ÌLŒÝL%ëÌ•H'&q Ò/E¶š|‰Õ 5ÌilxD@þ)á¹Ý\¢ä·þy çö4/yáªñ㯢ÆÇÂÂòªï¿üáå, žï¼öγ­^œpÅ“OlÀ2UŒr­—Ñ·¬lSI?úå&¦|áí·üuNŽúK°ù¾§+¢£ ×ÐÄÎG?„:î| y=QñüÞ÷™ócÝçZì¢â¼ÃÉzU*¼WàÀɵUÂpBíœÔ@K‘¶d½êH$ÈÍÛî|Þùk' Q˜j·dœ¢Ø]RTurÿ'`ò lBV# äiùÜã:çivyLŒ;Ÿ/¬7û£‚döKH†)`)!CHWX§$çÆ`I`”ŠVQ º ¥! ^hÌŠ…é…_üµš”5—hßðöïä¿ààûÛ¯Ÿ|žÔ¹ð‰Wä}/ì~ö0nåØùí¡°\{ÃŒÉOÈï@2}ÿ¤Ô,霶Kû"ŽàÔko Å®™4î©ÔöâGø!~ȳ×û/ž­ç-‚щG¬‚×-VJ“…¬EeE1«f<ïÃ> Ì^IoHX!{IWICÄL&ˆW2!ΘHÅÝaZðý!¿àgTLÔå%:¬*aµ6¬Ÿ*!Ϋ9M’„íÄ”G€(J A‚hÍnþV¸BNÆ\…½"$ “ÿzß|Dþ²« _µ¢³}ÇÎ_âóÖo˜vÎ?9|Iè‚Û hÙ´}K xâ/ëtåÕô-+*¼tÞCò¬{ä¯.h6Ùü sh‡Î¢W+KÆb›b´áe­×¨Áš« þ»=^£»3~Z@Þx<Â^>.Úîvz‘ »26¿Í@»ƒµ+ÓÐ)ÌX ¼QÚÎÆYÞfMûx‚AL$h·kµz¢f5’¦I”4Diö¦,ÁCb¦’c:{¼ÿرcÍŠ°µ’!0`T¢¾†ÀæáªûˆL_÷ãá¯R©ê~ì”$v€|(¨¤UÌBʃP’$@Šfå”h-9£ì\ÙÑ¾Š©pµžE{ä/2vÜô½^G>ïì½V>4ùÀ/M-÷Ÿx’:/ªpY/ÉG·LóÇåÒ”5²´f²Ì¶8ÎÝ)? $„?¬ÐsœDУ•9ÿ‘Œ‘²'cPðŠq±JL:ˆOÓO䩈!Ù7ê‰yÍ4ÍZCˆ'&ž¢¤„PÇû'ñHFàå?V‰ä#Óÿ"×ÿ;±À[8×5:¸²}õãòç 'ŽŸ¦Ó»]«G^ˆê[7ÑkªúþD_â4*+[Õ¤H¡ÂèÇì°S9èy¾âýŒÂq^¼ÂøiØ-xýqñLCÅU UC•‹ŠnÚRÓeó90V157Ot»‘|>Ù.þZ¤râTñy‘‡(fwqFŠØ­šÂX0ÚO„|ª r‡ÄzÂ-L-ž¯ˆÑÂp0LÌØ˜ÖúâY½9ÍHæ81^Yb¼’Äx¥¿k¼Ð0] b­J@,³9mÆDzÙgætTŸ1åZ;Ö½pH~'ß‹.ÈŒt¬¤4“ÜIyûOä·^ÿxïa<^cÉÓ·ß)ÙGåOå F—Æ=œ$±¶ÐyYdíÎ_â.8òGEîˆm#¹¥X¶¾nowŒÒ ^uœPÖ‹¼Áx˜ÑK=“àµÅEà ÄEIð&a+zh&šr›ô à éH4°ÛÔ<•J¼IL¸¡XÃìÍè¥1U~"v±œ0ŠÎB: ²+DEIŽ„ü‘rÅ·rfÈÅbEA•ão‹Bµ !¬m”WvRËÀ´•Wvt¬9¼®iäöNØWeíÒv^’øöK啸–SÇ'W®hH¢«lÂ7ËsVT@ò»O] ´±BÅwv%N“ sfÍ(z˜ ‚×[(M3V2c«…·9`²µÌX|†ÞOÑÈž#°ôÉôøB×`†“«Óû·É)ÂÂú ÖSç“íÈq.ª.¯©úsIÕ¶òäÊ5euT12¤ˆ} Ž Ø^ùçåü6ïBÏrq©tcô†Ø¾'¤÷,¿·êÞÆYþs×¶J÷zï <ØxÅ÷²ÿåÀQßÑÀWÞ?ûþø4ñiòkéXÂQ«mö•“µY†OXýÖDÔ_ëŸèíðsª„*i‡ ö$;XÄÉD"añ§¼~ŸÉ`H[RI•òÁ9\I%Цe‚’&ÒØ]4çuð”˜CtÈ›x¯? ¯1§ÓŸRΞæ ´@,S1eH'³^¬5in=p¢Š–\ŽTGœ@BØŒ]ʹ8ÞälfL)ÓA8‚l6î_I€®gtE^ <$ÑNgœúL<Ã\U‚¢ë›;¨ÞµÝÏ®ýÝøÊuáÊò•øƒMsûGnžÙKÊWuÝz6ªéº–^³¼ dIÕy©|ÞŽ•¿jLx$AÓx¡ü½‘‘[z´b”¶ÍÝYüX“|óª °ªjç_~yÐÊJËB÷åîëÝÛܹ÷ºUߊ—ç”®¹Ú@;lŒžwí´e= aò»B®i.ÚEæSDŒøAŸ÷´„ä ´Y€çÀJÜž¢Lßun§t'€‹!Å)ÞŒêX9Ùs»±ùÀœÚ'žúÖyIªqŒ‡c,MÍÙ/ÿð´ÏR}s‰‚U^ü™UkU>·ÖéKhËZÈú.ö½ª†þZ4’¤›³ãÄ«Ìü“R(€˜¯üû•J>Å ½ÉUj_²¼j{ÕC¿c9j;ê¡_32r¼æbÞ3¼mzÛñž‹éàù¬ÏHSY§Úçó²3æZ±0öÓwiª¥´3¼Ä‘üÄ‘÷CÚ4øâaÜ@½HôKñ?ÌL ‘:îUz_ò¼ê£ö¹_ñS–Š&â-ŒÞØ©¸#,x¥Œh bVš²¬f"×ÃINZ Fbo˜aòæ½Ó¼4PG³7¡ E#‰øiÃA¢€$@­ì˜‚‰dÀ¬ÒÜ~­Qº(–´~ÃLL¹a£÷if"(êÏü6D»Ÿ±®¢V¹ Ï…¬”݉ž¡± ìÄ*uÐÙ<†¶C3k«6˜øñ¬M­þRØôýé·Ÿ|üòƶK)f°M~ý3ábwÏ•#/2·wKîÔÈ,ÿòÉ)Úž«é5K;ÕÒ«½ù Z¾iu3³•og«¹º8úC%u=¬}Õð‚éÇ«‘_Eß3¼ezËñ^佨.ö{Û1f:_ñzŸ“Ï‚€ý‡Qû+pZqŠå)Vë›ÇÎZ·[Ÿ·þÚ:je‰äíNjg@-ƒÝ•L©#‘Ý'„r$ѹþ”âQëqèP1½!¯Ç¥³9C)EbÐ\R•ÇÈÇØ)yt8¿•HH+F†SB9þßÈ$Kʶv1MÎa™Íÿ[>MϽ¹éVùŸW ÎdÆÃòèâÅ»5žÇúŸüO’ºû¼Wþfï‹ÅÝ“¶(8Ô¬nêÂg ‰¤Ø5À#M ³ZèÛþkem¯ç/óí…ß þ§ïX˜cÂö°]Lú¢aÖÇ?æÿ¹Ÿ2NÐŒT¡¥1Iš8­¾ðƒWû|èÉŠÓ"s##ƒ&ÑY­^.k£Bº¸7æ}þ°èì¥g¸—U ŸJd<­‰&LFâÓ©Ó2~ ¤› G@æLò\ÿAR/®Z@Ønß°ÞÔLZ¡‚€ú¦Y.F匲’Êϸ8z¨â‘n¡3ó6ßÊvÒïÆUÁÆ)”A­¾à'·M¹fVLÞ8ÐØ¶œ*íøèðãøáØ”yŸìZã0uHêØÿT›èÎÊÜÈ"m÷FzÍ%j)3ó“{ôŒü+ŸVE©V^VÅš9ú)= v´•p®"™Åuš+µ[µ[uÿù4ÊMäû43£”VÃEoÐÜ ß}OóV”«Â\E_·¡ÒWX\  ;ÒY/¹ôl¨œã¸ÈA9vHÖxT¯a˜`¶d¥™lV]©õÖ áÅ#òÖëMšh8îåJn¯®íõyÞÙ/*VŒ%¯)ŸúKj­åúÙá!|ÕÓÈ”7Q¦rCîÈ[ýë‡?qA¢ è;yý°ë˜ËåUy$;i.›àtFÉ‘Ε–¯úI¬uú`å*…µ¡ k‰Â3‘:¬`3° YàT4Fg¢HԠ瓚™8WkTif&ÌAHÐÝí©%ŤCþz7IdFÒnŠŽT»õÆÒL D§#ˆ•ÆRx€+œHãëj»¯Ø{á-½¹»vNÍÍzý±îCÉÏ'3…š.™±>Ÿ_¸çѮο?{Á¯7“iÁŸâû·žuËUËLÈ¿¬¦8ïòû^ïŠò¤C÷ÏŸ=µ¡a š/0o7ï43f¸ôšèÜÉeWR)Ð5Ó|ìØé.I*ê€ÞoVr'àûûMÃ_‘&D’,IL;Sm)S¨g6i ‘åO­‚(æñk+«»2XÃN”|pþ‰ÏIÕ´obÐ…»á ð˜cVý rÞLÏ o¿¿/p·öîÀCÞgüßÕQ.ª­çêµ]\—öÏbïbÿâÀ£þG:H‰ xØy„eaÃE$ o4.BƒÃHQ«Qê¬O-I!—AŸvAš’Ù‡~œX zWiz8ú°´íÁÏŸ1=}Zz)ú’V¸ëÎÍy(.óùBF“Jg2IFƒ³lV[¬­««Á^4À[¼ægÝ’7úÓ¤ÑkŠkEodÀ[ò6Äë*é¨'j†F×ìV×B°¯Ìðd3¡|!P ŒÔ$3™´Åãñj³ÙìÝu55„±|]MgòÙŒ[«Q©½É¨§.Ÿn“µRšš†h+USÈfÔPðáî=!äÁžg À´©ñ M5ll ÜåÆ!ü§ÝŠó”>àôäk„püTÛsµÛ3¸Açÿbüi PH³øUÂ|E&ªE(¥õoŠR|³¡™‡=œl®†n+ ?-'Ø 1Š¥4š"8JÀúGs´£±¨Å¼¶x²Z-Žç­µQ‘É~(*ÁHä€Ä~ ßYò×zŽÎ¼2xö1ùPðöÁe3ç€XQjsÆ&NÊTû?:¡¼'IXc®³x“#ˆzº)ë1•¡SRLfÏÈö/囆©“?Äá?àøf–¨8ÈpÒ»èx¨i¨¡®7^oݽQº1wcþƬhS(+Wã í*»ÕéwÜ’»à(Æ" )Q(K 5fšñÛüv;eóD=’deðÓkU"Üs¼>Ì¿1¬9Þ€‘É`1ƒ¢qüCF#r›Ì¿.Ùÿ»S›T.HbPiìWÚ Iê¡ :Göàûší:½£m§¿m@•ðéß֓߯z¶˜à§ ôϹ¦ßÃJª»wê6"‹r¾]-£ü2êNy¹†Àÿ˜<íé&‡6Ö<ˆågA‚DöÂB™ü.EôèèBˆà}¬¬¦`ÃÞ$ì!kà‹ÇÖ(˜!kïC É;'Boô ôˆ*¨ dÿ¢/¤ÅźU”N¼WsoùQÍ£ÚGô¿P¿ª~-÷Zþ}õûù£…¯ÔÃyã,>]H:}A[Fl_“­/ÒF RÙx[1ÊeÇÕkùq-Ú6®­3ismÉJa]"—Ü™¤’Cªh:\1og¸é¬ QxWG; ÕŽîéæÏÀ4Br"§UÛÌï­h¤³B1R æl×*ÆuNÌQQ½¤’,60âÆ1d8Èá´J¦ŽÅi’0F#ÛÊ9f œ†ž+ñŸ§JìdC#¥úhµ¬2RV:1ê‹$š BA )Q¸«îê05ñ²‰·6Çòíëdôƒó°Õ^ZÌf5Q»?“ò§/tEy}ˆ†¢ -ô¤úsÏ:g^O%¥lßÊsS¾ å¥óš/žyQ¼ÃãÍéÊ|ƒCßé¾gC×uòòFGÌà­¹¥Ù-í¡úuý,Î'¸ƒ^¡gaý¾ Û÷+ɯuX¥Ã÷ê±Èã£öiȇoUQVî©ìZ ã´œw¾Yè4 QÐÄ á¯*g;`ÇvX´TmÜÜ Tá ƈ”õ \Ðd éö™`]kö½`Y•X)‡®ì·BÏBhÆCYz©‰à4Q)ÁŒµWš¹Uû8ÊS{ÞÚÛßÿçýåzkíM›7|¿g óϰ§¢Rlϧ&þó¥·äßÌN3BcáļÌo¶m™Õ!SUä€ép‡ªwãot>È4¿c~Çõ'óg®N xU»D½D³Ø¾Øq…zæ ûmœwº8É颜.+§Ñ³ú"(üí¸Ú|Z‘jƒá¥vGMPOÇ»¢"­¦ã–2Òá~H€9•àU‚¦±"º×/h,°Ëo’A€Æ°JÈÒKJç”I8%3¶ôJ w”øFA·Ê 9EÖPQ¤®Ø›Í‹u°Â$$Ô¯úá“·/šžmô•[×m¿ÿ¯XõršÞyÍd¡œÏæëöÃÝõ×ÎØLóÚîëÿö×°H‘Ðf˜€N²Fô^eÙÝñGã¯Å_Iœ>–V¡eÙ«²7fïË>žz"ûóÔ3Ù_¥Žd_jx?õ^öíš” D^{”™¦ñio5BÎi~_à6¡=0N&«ÉA昭md,3®-f¸Æq±˜  39K¬¢t…£}Í¥Î%1è?ÞÕÜ$ì'¼PY  ÝcFš…(…a²J ÂdW¶ºr<]—.I¨‡M}ªV ‰Æ3„MéÞ…f '.²†81h‰‚æp;]-ÛUFÀ«ŠšRuµ–¢E "ƈNe[âQoQg ž•™6EU°¸Š uiZÕ?äãç>öÛ‘§/›{cû†›¶ÝAï Ù£x\K–¢»Î£c Ôâòº¦“¿n«Å”@å›ÔW¶x2˜{ò÷¸tò‘óøÉk—þá';N‚í~w1x êY>XbóûJÿb~‰n¹åû•Ü:þ ÝzóÕ–õ¶õö“†ãFýLþ"~®ù sØòó™úOF¾…´à» O©5´ ‚rèíí¡U>ß|¿•»Mõc¥jÓký.E~Ó¯¡€Ho~:kð®` *½ý–2DùUù­¦û]J7Á€ð?&ÄIƒ±v56‹bQ¡e €Ý.Ö@KÈaöÁ1† cT)\€ Ì){zª=Ä. #ð€4°)Ús€C±D]øÖÈ&Ís×.¾µELüñ'¿øÕ?ÿDsÈ€Öz —eèÇ^Üýù[—.Ô]ý.öíGÆ/¬?kAaöxðwpOÚ²,¡5•RIM]nMˆ!Ñ­È'}Z}ÑEZ`%«ÃeÞæ*jq- r¦’¢:ŠcH’â _Èq9 à~<ŠbAAèyäëþ²i,|" ”ò Ø>0i.ÓAÈž®SˆuEèýVl±þ9ˆ…Tðc²vE ÁãK:¶k9umÇ–½ÙÝ$ÔŠiÝ?1Þ6Ü1²êíän$ ¬sm§_{fE½pçŠYÐ…5o|{oÇí7t<æeÙ8[Rwx:ÊKèK¶=ìR·YMÙÞtÊÃ8¤°—’&™ÚjÔpN'ÎQO‡ˆ„:§ØLLM<Ÿ =S‹³¶ðçœnŸiÕ=iјŸ}ÀÝæ¿ ;Û€ñywÉÛ÷}{.ÕZ˜}Ñ›B…IòÔY5ms¦ÜV;Sîñi›.¥4ÔÑTDåÜȽ½áæ-½—Ë‹–T4>Ÿ®ñR¼ îºd–­+tDã€ÞS £0NEuÆV/‚Ø+dšæô¹nó…‚°ÆËå·A*‹‹F41q†´ÛØX0ôÉH4]RÚ@n•¬Zëd%]u5¦¯Á†Á õoÕºŽVŠ#JÁ\ A1§m>ÒœNµ´¤ÒÍ—6¨y­½&µ³ËÇS¥y²‡­×¢¼z¬©»ÐæN0† ¡ì×qüHͪF¾:§Ñ­rïRæ”E×W¤4ï Ù§y}¾Û^›³‹BVŽ“Éœa~ܲ‘‰äaN{ÄHÎf'M 9e6Ÿ5$`,K’þªÓþ3Ma¹”‹qPüEƘ%€ÍI@â(lN5HËÏœÛ"löBÞž· y¸U v)PE.FªP}‚–| ¥˜Æ^€×i¿˜§b5þ¹±±1:ÖX"º¨µr !íÑàˆB5– fùäˆM YUN÷A(umðdžO’ ;ú# “ò@}[é„8Ãmœ'cxØ%95H‚’®ú>’»%OU¼™¹-ùŒÕgžsqont€í{¦ïX±å—Mûo¾uºÜ!š¡¨/¿Z Œ—Ws6ýEDQ>—×edÕ'Ÿ>æ éœ:Úçã&îªÿëÐ:Î㣰ΠµêðÝòÍ]àž@{R¨3°WA~î«`Gtò9CGÈ¢;Ê4j}º[-fh°7;È`£=fKŽfˆFA¦ ¢N@€êç1UªÚŽ1õ©/Á ½ª‰Hö·km-Á½ù9Žn>_öùÔå³é7ÛÝI•Jˆ4ël'¦Ï*r %‡…e&µô#p'¯o*¾zwmˆ2‡~j ¦&¦6S¦&Óäີ”éð%žÃ'üW Úó¡fàâ¤0Óˆ|SB‘H£/K­¾¦8¾Ñ79$êBì4˜ÒmÆŽñÞRe|oG¥TŸ‰xm,£ëšb5ÖtsÖŒ FnÊ俦D\3-h]ö–̪73„{*úîJ})×vKå Õ[+Ow3ÖØø«Pe*¡Ê'¦cý. ÏéB'ò[èQê¼Dnö‚U%¶9•2g!3Ö@œÜÈp‡Ò±$u*¢ôoÖ˜P°Öµ€j'óØaŠ'ËØí†ÞØS,KÍ¿uÒÅ-!û„ÒówÔ[Ï’[f•ìÑKÚ*Ñúòyrݵ6aiË@¦®O.{8«ÅNÈ2¬èÒwj ›çtuKm#ã¾7áy^O‘÷øøú³ñÎyÙ³Rî’Œ¦Ï =]ç&캷ñÂŽú‘&5b¸5ŸRW§?¦wq«EOWúÜžÉêNÃÃpŒAÁT,æ„V¶ú„P˜c1ñ5úB!bŸªT³™¨ÏÊÐ\ÑbLŒsÆŒ\±Fij¹Z諬e¼Ðö‹ž®·Ä²9X²D”¹¾”RaßBžg¤™d; &Y†„é· `û™ªsŒÅ]ž¸KÀ뉹ß:Çþ1×xJ¼[1áÊbÇ™ÜÀÑž²ÎÚ¤¶÷œÏÑçÕN™ÑÙpIc§MËEøñsVÆu#oô(P’Fµ£ÌøøHrW¿Û*é—ÔŸª©;M÷80=îøZÃ:q:gjf˜ØFÞUtSœ¥ÈkÝöN·VíRû¼ÆN#TyI´àõŒj–²,@÷¥BŽ4rê£:l”“¶Kج†#+Gä’°ƒIc‘M"ÆÕú¸‚%ú= ²HY×w $Ie., ,ÕŽ~ 3'_> Ç} vܲbݽ·E©»°U>ùîaX£ëyÿ¨öÜ?<%yý§Oâšf"Cj#ï‚5¹Et°ÒW¯®îtß},úPì“Ø×1^ec¢ôÃÜÁaÞÔ¡÷F²¾šEWȬ€h‚åìYS6QÌÍ: K¼ü8ºø¨ù m±ÆÀvB·3¤Iê Dæ&l"bT]“z*MB䫈'ŒkÛpEâö޳æ"°ab”„TÐS^mب–®aùi“Ön+^W£Yb<Ç„ëô ªzãyw_rÏöÅ®_8¿-j­– ؃,Û^3ç‚­‡ÿ²·!Q©o_.›WwüîÀоsÓ²zäqUçxúÀ¤D¯AÜ©Vmn5|yäeùç{ƒ¼a–‡ „¾ ï烘½¾Y™©IyR¥½-ýhvöHö÷ÔçÙãinr7ðÑŸðaØ«((¬6…)Øh¯Ê™÷F“‚dãiÆäviŠyZ›Æ%µBÈ ŠEsž ¬#ýÜW£ïÜžÁ"v xUò@[‰}‡°°¼^ "”LÇx*ÇY-@HcJ/!m6j³*i7C/º¬(nÕ€Ö‚$¨%cÀ62Öò«è¯²à¬)`7.Àë»…ÿúèuÒ°õ/ ö. sm©L:À¥0&0±z p_Ä}iCL+d`n3…ƒ:‰„Á'l~kh£‡üy?åßæ7Åœ8«PCJYc‘j8°g'h ôç÷+îè RœüÉ‘á•PnT Pô´ãÁ§<Ž|‰ rdÙQUüˆÇKX)js”ì‚ú¼æhA#XÊk5u]YS)V Qi²C¼hZ¿ + Óð‹óg²Œ`Kª­.éÁ¾-ÙDC÷Êf¹åœ <‘µE£ÃÔ+ô.¸­F ¦+‚Y±ƒJèËúEºÅúuÚuº-:X_œ÷ÞóŸÂ?Ø Çà‰…Š1œtùÜoV¼>Á„Ù“×àò™B%%XôHÇ%ú'Ø ¬´ãØbR[côà¿xF=”§›o«AyXX í¯˜Pl…ñã#mìFµÑÒ ¼åêÿd°ØÂƒý+]J¤ ‹i¾õÛÕŽôOû•–ôꂸýŸ*KlHã„"¯¾8”¼á6UÐÈËpÈ .ÎÂÍZMA%5 rZ]¦d-žj†P’ ßi… )C'Dum%a“ˆ—ÎX÷扳jZW\¹úuuWó“ÊÅmáq—wOÛzÝÛ»ni¾Û ³°ÅM«ZVœÝžœ­´_îŠ[ã­üçyõ Îi<¯·gõ½wÆÍ:z?ȦøÒÄìh5«’T›±7LÙ¨r ¬ªhM7Ψ­hm¤P˜ÊÙ¼®Š9mƒ°ôÈûÐøù~ Übäà84½Xf:ðYuÚzDiÅdL*‡"=–K'é:å¶d¥ îAôˆÝ£ÔG(½«;Rö8jW×$ËXVíêjY©gé{{GLŠu…£Ž@wãâòBê|ZÅj´¶rÏÝŒþ8‘-r£·Á/¦àN!T¦Lä&çps‚˸eÁuÜ}Ü}AuP4P~^Óè3„D©Ñ— ‰6ˆ*­>Û­nŸ[ò›4j6e@*ð“ãmšóÅ49c:5!µ†öfô‡KÄ/;†8 è‚$@g(Õ €àN£ E,áÅÐü-F(¤ j¢”Ûô+ðŸJÕV°ö%ˆÖ…¥R¦¨J©ÈGq‹5:¿³-*5ÏÁ…©¥ÚÏl–êl˜yÁ¬ÉSÂŽ^üúG#;“2î4TXó¬0Ré,Ò>£Ñ¦«U;¦ÇšÇµÜJqÓ¼fΧ#6) 4{ƒÞDè=?¦ÙKÚ’}6?Ë4Ë<ËÙ]!‹ø‹M›/v.ò¯Q¯q¬ lVovl ܃îÁNžƒ^ˆ²˜w:8îl¥Ý˜SC=×›¬4öASŒ[å¡YÙAY†ðÉ}=Î'R~8ÜÛs«ˆj¿Ô?pÒå4—?q)nõ%‚ÔÆ:ÎLJÏèVºC ñæ=£M¨U½ŸYŒtÜA©y¨6¥Ö¾±GïŒ: nQH%ä?ðÐmàå×£IwžÞTÙÂ&¿oä~UèµÆÌj:dÊä­§™z¿/dQ‰½Â(9ú{3Чºx®—8)_¶—½e¡1¬RCµ‘7ò6uÞN„ר6ÛÔpK9:Æ”¨]bT5už|¾lÉä½>¯¯Îc³KyâXr¤:ÛRã­ƒwd2g[Âa!œÉ×Õxá 6Ág×»ÌÑx2°f_c̤ º´Í6ž²CCT7 .©è{ì*øSöäCH®„ʸ,ùÂJ î8²·'·0jʽ´LÜé&’¯[Y=8 ö\}§š=“àP=>x4ø“®mÒæ.95&w@kRï¯rÈ]$âJ Aµ_Ù)#Jû2(<¼±a®Rg¦‡šõÚ}Oé|Ù´ìùåŒJ¥£þ$ÿ‹âX%¿]åðªl!ኮÚC¥l¶bï ¯å<1{& GñS¾sQÊïg¥ž“_ªyCåF~Ër°ÿãºLt'ü+ÛúåOðµ:Û²TFdÆøPlÃ]¨ ›*ûÿ‹Ãp‹cÒàÀ *Gåýõ³…ÙáÙâ€c3³™ÝçÛç?¤ú,féæz½¦'S_Wë4¼JS§rò T`ì LMåLØã‰’[xÖ—ê4%Ñ^¶heK¼íNÕCª}ªwTŒ3gUð,‰¥R]BtÚ5*¾¦-t£Ïdn¢‘ÊŸ«¡=>_¾@ÃrC•ÆÎ4™Íã›È{›Ì*o@¨–Bsî¥÷_‚6>g9½ŠrY¬m¡’wnøD& ±ê8ŸO÷Õg… Q ¿ÿ«³knâ8ã»§Ç$Ÿ$˲- )'[ÈÖ ŸlcClË \#.‰yÞŒãàÄ á•Ä-aÓ2©¡ƒ,c ”@š)¡ÍtÚ]P³N¯:W­¤_hÞP¨$—šÝî;_ &©ÆètÀ=QÑ•nŸùì|M?аÁiN$±’U¡<ëÇâÇž,>Ó,Å:Ø,›Ñh²gc²‚^fª(P+€ã¨)×T›«7b-J¨5m"¼Z£ӻХ²˜xLÄ©öœ†˜ÅpQëS3¦çðö£=]­ÎAÇyï¯ÖÎO0ºBÜá¼À|Oqë6°Å¸ßåHá4 •†õù¸œ¸Ž i*ÈQl4Χ©»ó[:j÷ã¥^×í¯ïÐàŠ‰²WKŸÐ¼á¸}nÚ.qè/…šIÉå·o\ºYج¹Äž—O̘d©ö 9êoî|ÜL¬H°qÖž#]]ïô¥Ý]†½üQ¥PC[½!{´¸ g‚®¤¾38uŒš²E±ZêÏ?VÜXfÑþ:W.uø«Ç/q:$¹$¯lùâ¼¼¡sü7žµ ríã=â|Ë£p”xú¢p¨‹Eg3øð\Ü€¤ßGö®'CˆË‡ ß»'Q ͺŸ“bæ· ôVP5&¾_AúSÄ›À¿j‰y6З :P ¨Ôš òƒV‚ê û6¨Gû"ô²dÓl'¯ˆ­¤vÑÍÁÞsH”ÙÔ~‰2:H!âüzH1¸å‹nžÏduÐaùu8Žéφ܅4£bq;1€çã\O€â8{ÓÀEp¼Ü;GV7ÎÏ/ÔoC\‹¸O_‹s!œªÀ   賯x äEH³ºû`'î¹Pf•põí!ý ³BÏð%˜®Æßzò]A3ÀÛÿ·ài´š]ÚÑÚ—t•º~½U?(î¯H5Òz©GºeØlL™"¦ë9ke­|Ô<Þ|ÓÒiùÐz WŸ{д̛k·Ú™ß_.È.q,z­èN½Ó3JµÍåp]u¯wß‚÷ïZeÀ³¢8XÜY²È›ã}itÕ蛾e¥Õ¥{Ë*ËÎû¶ƒÁƒÁBÚÐÄÛ+ƒÝͤ+{p§˜Q±bg"ÞÔ¿<&e+…Ù;HÏÖ §OOŒ'C©¥+Û:Æ4¯^¹pµCÀ/Å,†_¥¨%E>Ð¥h¬QÆÌ7%zxhå!ak^´è„vêéßg ÌÖß°nDÉ9"LÓa’Fì,€é4äbÇœÚA,¶÷ã¤6 µñˆoÒÒ¤E²9«‘³9«‘£%ð„Ç=¬g%ÎDŠYÉS¤Šð” k*R*O)‚”ÁPºÎù3hó»å|»Y9÷³fEðs®ÈtÏTÎÐCÄØÍ<Ü3{ä«ùŠGÞá‘7xä3ôUlu"•…4fn’?k’'5É Mòø&àWNÀ*¢ŒÙ»_þ©_îóˇýò:¿Üé—Çøqt/IB|˜‡ßy’ò¿’ò‡IyoR~9)¯MÊßKÊÅIy‘ ¿¿ò(0aן´ì²ì´¸e¯?±SÞµy_¯P•FÌ$¼UBáj,înͤÂ`/fRG”Æ|º‰0ÂTèF L2¾ŽÄ9ï¢Ο§..£pXG¦þ‡`í™ú\Žå¤œ —e¢ȭɤZ•FŽ”YIâ+sL¦~7ÄÁLø²Ò˜KËH9õ!{4‰r±—Dy)%#\ŸI•B]w': pšQ†¶`6î¤òµYùgyŸ9_•÷I`Dß‘Œò{ ó‰*¿S[•Ïë“Ê”ð~j@9«®PúÃü€ÇO3+äì ñf̤¼­îVª[•·ê¹ø@”—·'ÅÙÈ<©lE1å3Ï(ÏD™“²%. OS#û͘E)Sf©ï)ßQŸQff-Mó§¨ý¼ZÿˆÉn¥Qu+uõ—• qÔ$£Ô²Ã3JUÖxe9¯^Eýt%„êiO*ÁT…R“46F™ý´8_œ-ŽÇбTô‰ˆnÑ.Ù$+žìr$£à!I+ᾕì}È…Xóµë­ŒéÑWa%“Ç­hxç#ÛþŠ·l“˜·~9M·t68lõ¹µ“ã ðÌq>]ù`àNïÞ~ºÇÝ’®d‘awË´ôX¶ÁÃ)zƒþ)?E¯3Ö‚t1½‘hæùÅñ–Ç´ôô¦¹}ôzbiK¦cLxØ' ÓÒsx9$€¬ø)’b åÕ$ÀÊÁ-[ÍÕ¶fÕT”µ8cLm€¨\M¸Úe¦Ö»%ˆ÷@EWN¶p•-ºr¦‚ ž=ó÷ª eLÓ?ïˆ1Í ró‚¢Q¨Ô#h™Û[…Bo´’‹ÕûâpVÜœ7sñ¼ûâò¬ø@V|â/ïÿ›n›ø¿y|Þ¾MûØqc7ÑZ~µs‰#½q‘ÇÓ»i°,Z¼„ñ…mé}Þ¶xz“7îéÇ{@¼Ÿ‰çyã½d"5·w¬-ž™›Ç7ê8Þ½½=ñ-[[ïÙjßþ[ÛYaíÌV7?î[ &îf¶ÌV‚ÙêŽus[¬ö‰¥³&v<äóìš5­­ä¿y}¹ endstream endobj 74 0 obj 20911 endobj 75 0 obj << /Type /FontDescriptor /Ascent 750 /CapHeight 669 /Descent -250 /Flags 4 /FontBBox [-203 -428 1700 1272] /FontName /LIDBDJ+Times-Roman /ItalicAngle 0 /StemV 0 /MaxWidth 1721 /XHeight 454 /FontFile2 73 0 R >> endobj 76 0 obj [ 889 722 722 333 500 333 250 667 278 500 500 333 333 778 444 278 444 389 611 278 500 500 500 500 444 500 500 722 500 500 333 333 500 333 250 333 556 722 444 250 722 611 722 944 278 350 556 278 500 667 556 722 500 722 722 500 611 722 500 500 500 500 333 500 564 667 500 500 500 500 333 500 278 564 333 722 444 921 278 564 722 ] endobj 77 0 obj << /Length 78 0 R /Filter /FlateDecode >> stream x]”Án›@†ï<ÅÓCä5 8‘R”(’i«º} ‹…TÂøà·ï÷iZåðYú=»Ãü³³»yÞ¿ì‡~q›ïóØââº~hçx¯sÝ1žú!Ù¦®í›å]Ù͹ž’ ›·ËÏû¡]Y&Îm~°å²Ì7w÷ÔŽÇøEÿ}›Û8÷ÃÉÝýz>Ø?‡ë4ýŽç8,Î'UåÚØ‘î­ž¾Öçè6¶õ~ßï—Û=»þ­øy›¢£"vl×’š±—©nâ\§˜”ÞWåëk•Ä¡ýÊýºãؽ/M·U)¼ÏÚ*)Ó È­d@‚÷¹É Þ§ŠæHð>X´@ÑGEwH@zÉ$9•|D‚÷…-®‘€ì="%$ É Þï,UDQ³Ð!©ª½,Î$ñ*ˆI¼ ¢&ñV¿¶¯ÁüãU°Ø2ã5˜ß ¼ 2ï$ñVƒ– sa5¨šæ©d?`N m/æ‚,Ôç€9A4—ÄœàPŽÈ s)ûœ›Ábí¥ÙefŽè7‚SÐw3ÜöÊ~†ATeðcª–Ä‘à@Õ ,Ö‘e˜H‹b.3ƒ|Ž(æ²Ì˜cÞô„(æDê™=$æ©tÜ9æ?$ÇŠÄ‘ ªš)Ü ³N!Çœ@ªWüX ÷áïà§áÓEÈñ-H«‘£Lƒmu|Ì»Á^K…n¢[*Êçž"É”Œ¿AT{¹ÍáCÿõ\Ï‘žÍg®¹Î3/œ½­öøéQë‡øñüNã¤Æ¤Neé endstream endobj 78 0 obj 673 endobj 8 0 obj << /Type /Font /Subtype /TrueType /BaseFont /LIDBDJ+Times-Roman /FontDescriptor 75 0 R /Widths 76 0 R /FirstChar 33 /LastChar 113 /ToUnicode 77 0 R >> endobj 79 0 obj << /Length 80 0 R /Length1 6428 /Filter /FlateDecode >> stream xÍX tTÕ¹þ÷>óÊ! d’œ™ “„I†$HNÂL` ÁLÌ•„„Hx4WA™h„b ¥©R¯½H99¤xRµb‹‹«b}P«‹[¯,­xE­ ß’¹ß>y¸¼]Þµººîìµÿoÿ{ÿûî³gÎ#¢´•$*jéhî$U`æ tgK×zׯžýÉëÿ‘Èœ½¬syGpÊ’·0þœÈòÞòU—=têñ<¢øA"¦¶µ6/ýhÞî¼{ÊÚ0Ÿk¿üIðãÚ:Öo°?JÕà?o[µº¥™^§ðÐG–Žæ ¶9vÈ&€%×Í­]ÛZÀ»À{:×¶væ|üè*ð¢¸W1ÇÐÄ'ž,èDn1cn£±è2ºS:LéDÑ×Ðß}¨!zÁÜAî¡ç£§¥b(ðÇ:ö–ÐJºƒŠé%äâ$™é¤Q bþ8%37Vn Å¬’‚¬žÐÚB±ëh¢©‡Û©ƒHûitŽ¥…tÞ¬ˆQˆº(B½ôÖæQoô¥èX+†µÕ´îeY¢zƒ­Šž ™jèF:H¯±iÑG ç„¥é¦|xQAºšfCs-¦¥Ðø =D/³ÑmшР{ET ¿¦£ˆà+6‰m”j¤½X©A{…^e#YMtAôHôYØÉ£)Ц»ÑvÐ:@Ñ9b…l;m®>F^Øj£[é.ÚM÷Óïé –Ïü|"_Í÷±Tˆ&t/‚7?ƒ?Çé4³³x¶ˆÝÈ6²~öKG£Ñ}Ä¡k",¤'éwô,½Lg!igcY ë`'ø!)YÚ%í3w™õDß…Ói>­C†¶ÓaÈ¿NoÐÛô}Žœ,ɬˆ•°RVÇÐf‡¹Ä»ùÃü?'Ù¤û¥gLñCoGÿ+ú)²’CùÈq)4(H³³ÈàZ´ÝÈÕ“ô4jõ,2ö*ýíú€™X2K°ãfãØx6­qÕ³µìA´7ÙYŽ 8çýRHÚi"S·¹Ä¼1š-‰–£ý1HÈ|*²TJWÑ4£rÈfµÃòíÔMw"¯½ôªØOÏÀƒéoô1§¯èk&13³ÂƒDdÈÃòP•"V†V΂'ulê´]Øb¶”me;ÙÙch¿e¿c'Ø[ì,û˜}exiæ#PµŸÇðÍ|7šÆOI¹ÒǦ,S¾I16 šÓÍåæóÌ-qÖ__xèÐPÔíî‹žŠ¾GvE“hž‚%ˆa5bX{ã^Ú…¶íäòßp’âCO =v’þY}ÕDûoœ±sˆñsÄgGŽcMT4ݨè6Ý´z¶ g£“ÝÄ6£õ²½ìdþ{'«1^Þ^dgÐþÂÞEÔçÙWˆ;…¢Í2b¾žß·¢uóã„âÏ }&–&J ¥ë¥Òéé—ÒóÒ{¨ã2SÄ´Ïô[ÓËf2Ëæ™æóFóæŸš›OšO™ÏZÆYYïµî²žEU¡6Sð$\þIÆ Û´wñ~ÜYd³~˜­§/¹ QÝÄ’QëÈ^!žúa[(‘ñûXjô¹NÚ3ñ#ÜåxbßÀ³¢xr^£Zvœ/¢w)7Yrô9£ï™×›×7×Q&º;“‡ï¹sÀ÷†jpScmèÉ蟤,¸xîŸÑHÉÍñŽód»]rVæØŒô4gê˜Ñ)É£’F:âGØãlV‹Ù$qFAOm“KÍiRM9ž™3ý‚÷4c¢ù²‰&Õ…©Ú+eT—Ø×Œ¥+$H.û–¤“T.J²DW%Uú \AK}!àqé¬a^=Æ÷{œÇ—–U‘®óf%¾:9{¼¯´¼¢°br‰Î›úª•“ç+߯¼0˜ø)hå`âùsI£¦$¦?—+/¤ÂGx[õ‡*L§N R\ÄH|Ç[-žìœÒ’ò’O¶Õ’É&McU,)eLêhwé4VšT’“Ï’R³˜àËÊËJ“<¥“JÊËʧ±Iü¹Ö=5noùìÑÕ…]Þ1/W¶.ì(,’'çf”°JÅã†FVÎîêJO¯S4˜»³|säÄÊ¢Ô«œîÓ~Þ$Yãâ¿~§6×Z\<"g:o÷ŽºÐ¬dŒ±[ÓëøÞ†ŸÌ¸^)Ÿˆ2Ô éç3O/N¨ü„%Ù þþðF10™FE»ÁÆ}#/ÐBC˜¹jhÂÐë§WÄ6ñá–)ä5­u•x³¶8Þ8~Û@Ñ‚DÖwñ~i2V~÷Æ<²PÑÌÓò¯]ÑѺÎ_³zÕRÒ©"7%znþ¯wXvXùh÷h3äGÉ:ߥó»I:¿¨óm€wFêü€Cç·âu~`„ÎoØu¾€ƒy À¦ó-«Î7,:¿`Öù¿L:ßt¾Àu¾ÀbSFÏß ±CÌåc®r¶#ÌvŒc÷Vò&D˜šÈ— ððQ¾ôCƒ¾dH¼È[1óo=lИ但üj¾ ó×`| _-²!-óå³)Õ#x ;IkÈÁŽô A­JÊÇÉ5Žß¬q<¼Æ±u£b£l£ÚÎ^Æï_ë3h«As”åŽGÊ]åO¹ù+^äìjƒŽ5hª’v †O‡„MaÇ¢°c\ØQ=†Eðºë`·ô6ƒn2h›AçÔgÐ$%)Ïñzžc_žã§yŽ%yŽÉyŽÇY^ÑÌ®Œìw¼ÝïÈíwdõ;ú3¿aÏQ©%PÜ{Ža5+ãFYg_hNÀù|¬5f‚ûPkô>Ðsäê4öj´1’Ù;ÔÈߢý&Á¿ÁÚq9ÉìϬÝàO“yÁ¿®ùÇö×bð§üQó5`ò%Í—xAóežÁh¾,pÏh!ài-”8¦…&žÒB…€ÇµÐ€®…Åàˆæ_NÓü·ÊO0•üü ÌoÕÓ0{‹Ö8°Yk,ܬ5N–«ýì&Úoø¸~8†uà÷bÓ ˆ­“zõÕÔkÄt#k7ø X_ÉÚ\¬À(bßrÄ,°Eó] 37h¾@X êµÐ|¹ÚÁRÈPv-… PÈØ4Wó„Ø5šþÏö–æA®ŽcuTÈDzCä5¤gjÞ}.®Jáp5üÃäÃsáÉxRŒªä’Ï0ê…‡ÂsO¬Ùšo´¸5ß €KódÆ àŒe~Œ±$‹ì>ÁÉo졤Àþ—²üEã8ùóýƒògèçÄ!Ðä¿ùtæURå|ƒò¾‰ò9_±ü¾Ï.¿ã÷ȯõ>.<¡Sp–Où’äWB£ä¼ƒòqœ·ß7î“ù–ÈOá€VtSäC¾ùÑP¼|0´JþeHÌ%Ë?Þ½¡]ò}Øwo•ñÆæoSÒå[qHn‚žµþ±r§_g{Ê«ý¥rG!†šÜî…sGå•Þ]r›W·ÁÝ–^3e„|=|iÈ C‚·ËV‹O–¸OÜSëp%áb[ À¶€‹­€[k5wØ \Wp¿-à*»áÈ yF!Ô•§‡²å«`é &W g5yJÈ0?ÉuM.Ú/’V*øód9d—öY¯³Nµ–ZK¬¬9V·5Ó:ÖšbeK´´ÅÛì6›Íb3Ù¸l)zôŒ2N|+¤XXL‚š¸   Ä™ÓÕÕN!¿ }úè·¡oEß‚~3ú&ô è]è‘è™#b÷ð›û Õüf¾ixrß6<ÚÆ7 6ð.c¤…M`ßÕ$ÞrTvsLW•³jÔ´¤)µï MÆdS ÿÒÇù¿mø.Ù˶±LõÇx#Pÿ=3¬Nƒhf¸N/^Ax/ x©€pý[ËË‚óÅ<[Cl–!Fûy)ĨQĤlÚ/Äh¿”mˆmb}½ûƒ¾ý 1ï¡^C¤×¼Ç9ÓäƒhR@Ìb'Ÿ!æ³Ø……!ÇÚI2Ri ¬]H±ö´CÙÃž× ‘H¸¾/ß >o¾±œ{iÙï6–ÛcËí1ìÒzal»;¶îÆú¥Ôý?µÖü_8Òsfû þBhò[ћԞ.üK²u‰ËÕ·ýŒX¯šMKZÚ6·ªg<­u»'àêë1ö}kù€Xîñúè@ðÚú¾Jk@ëQzŒŽÌypÖÎ+lm¿hkÖƒßaëA¡l–°5ÇØ÷-[;Åòak§°µSØš£Ì1lW,¨YwÙçë×ǸïNÐ:<ëÿ…§¤á endstream endobj 80 0 obj 4025 endobj 81 0 obj << /Type /FontDescriptor /Ascent 750 /CapHeight 667 /Descent -250 /Flags 4 /FontBBox [-228 -407 1778 1295] /FontName /HGDGCZ+Times-Bold /ItalicAngle 0 /StemV 0 /MaxWidth 1803 /XHeight 500 /FontFile2 79 0 R >> endobj 82 0 obj [ 556 ] endobj 83 0 obj << /Length 84 0 R /Filter /FlateDecode >> stream x]½nÄ „{žbËKq¾!Eä"?Š“Àìb!ЏðÛˆs‘RlÁÌ|0¬¼Oû ò-;Rç­aK–`¢Ù³è/€ÞæãÔ4»˜(dÇ}Í´ ì(%ä{AÖœv8=b˜è¡j¯ )yžáôy›2n1~ÑBœ¡Z’+×=›øbÙÐó€Å÷y?ê/ñ±G‚Ò¨ýO%Öh,%Ã3 ÕuZÝnZã?ë&w$/½Vu\‡Ôò¿NEëï•ì–RiÓöЊÖžé¾ªb}°Í7¤p¯ endstream endobj 84 0 obj 222 endobj 47 0 obj << /Type /Font /Subtype /TrueType /BaseFont /HGDGCZ+Times-Bold /FontDescriptor 81 0 R /Widths 82 0 R /FirstChar 33 /LastChar 33 /ToUnicode 83 0 R >> endobj 85 0 obj << /Length 86 0 R /Length1 4752 /Filter /FlateDecode >> stream x½V tÕþïÙGC6Šaf‚ ÙÍ‚<$$˜$ aÑ]é]B ‰F@bŒZ(ÔØ­Z[k™,‘³T±¶O=Vjk‹6jO­ÕVÀVJ¦ßÄ(N§§§óŸ{ÿ÷ãþ÷ÎÌ%FDC¨ƒ$*ihM¬$/M‡ä)Œœ†ö6í¾æŠi _#’Ç,[¹¼µ³m»ô "׿å×®]öÒÖ_'Ê\›½M‰¥½µþCFƒŸÜÁÐ1™mà#àÇ6µ¶­É¬¡Eà×€÷^»¢!Au4|xwkbÍJoØsüfðÚu‰ÖFó¡-¯‚ üØ•×7®üëÏ7 ߣ02ÏPrcù…ÄÕFÜUKy9Òn:ŸÈþ#Ƈʡë{Úþµ4Ýbð¾Š2G£i=Ý‹N¬§7éAôGV¾›^¡·èrºšŽP =Î.£$]AÓ¨•Í ±ìU¬ LÐ3ðXK+`[EßF%ÝtÐ~²Éô8¥éePÍ (¢l£ïØGh/ý‰NÚÚ¦RÚ‹cö(„ØFœr)1[h% ò6û*G¾{é ½É.´ËéšDedÒrj¢VºŽ¾ ÝÓtŒ^g¢ïA*Až*ºŠ¶Ò]´›,ú)SÙÍì~9Ãn²[èJTп;±šWè}úËfϲíÑv·m#·NSi¦£ï¤ûéAzH¬„^ôÒ‡l>»JÒ¥I¶bO´OÃ> ]3¨–¾VZ‡•ÜK/ÐK€·µ€Mf ØJÖÁ’ìE>S:_ö¸®°oC•^ô{`.ê_JwÒ=èácôàyú:ŸÁt^É;ø )[2äy®vû{ŸýŒýK숋†¡ÿµ€Ë©ÖÐfÚ‚õÜIè9ú öêc:Ã<ÌÇF †nvœ}À‰góBDû…´BJJûd’;åã®r×}öõÚËí{ì—ì`õœ<è}MLEŽ šGó)FKÑëkœóñÚG]ÔƒÞ£7è8¡>6ëœÂf²«ÙMì{ì;Ê>åœû¸Šœ…ü¾p˜åǤ\)O*&H‹¤]Òé1ù.×R×*×Ý®.÷žÍ} }KûÚûÖõ=e×Ú»íÙ‡QÕˆ=MÕXí<Š`—ÑMN¯“â,¡žýô$àª:„w÷(j{‡NàÌý }ÈpúƒN”°i¬Œ•£ÎYÌdÕ¬–ÍeìÏU,ʬ…­gØ7Y'à~ö ÖÑ èa‡ØKìö: —ýð)wqÏá:Ç ^ ¸ à ¼‰7óV¾ð(ßÇ»yZ"©\ª’K:,“^—Þ’þ)çÊmòÍòOä£òr¯üwù”Ëç*q-p]éÎqOs·»vï÷\ãyÂó¥ÐãcM_~h-ßÅ?£ ü2¼g?#â¿à³±ëÙ~ö0:õuâý˜D¿€ €LÀmèáxË«_ä×Ô1y£GåŽÌqáÃÏ?/Û—5L:$3Ãëq»d‰3 „õª¸f‹[ò8}öì àõ‰/ â–QÕÙ6–&üPeiÀrÙW,~KcÐ’ù´2* ´°®Y/›º–fWÏ‹‚Þnê1ÍúСç8ôN‡V@ûýpÐÂ9M¦f±¸¶ªÚ›’Ḡ°ÝË p8Ð!"°E³ë›r€„EØÊÕͰ5R ”N,µêæEÃæ(¿? XlVƒ¾Ä"}¦•U4à.ü4˜ÖG‘;h¶P?mºT_º5mÐ’¸ ߈ZR"fñ¸È‘]dÐMkÄMïæ|Á~N…·}IiñüªDc²Ê2â[ÑtÁÆ—Ø®v¾†°|c,j±(NáÔÞ¿ŠF=,$ñÍÊÐgêMÉ–8zNõÑT®‘ÖfÌ¢ºhj¤1Òa‚žœ ÓýhJO°2X)ðtΆ~üþíýòW œ³áÈÛÀµõƒ}a"“^2-­ÁI¢£Ö©bjœJɆ©hžÃ*›­ŒYñ¤ïRì‡åÊ÷éZò$a£ôÿr¶$1 qçûN’PŠí<^ÓþÓ‘¦‹µiʨ‹v1ö­XšÙÓdæõà/#-^LS8Í&¼Á ï5> U¡ê*±oZRKV/MjUZ6\Îw0ÉXË™mƉú-#6jlŒÅ.Eœ".0OÆ¡e °# Q P‹«‹Î‹Zæ(Ë0ch ŽØáº¨u§+ƒÖ8P)ðú朚‹Qsp<ô¡þ(ó!bɤˆ9?ªû­ÃÉ䨤x'úù4£¯ ŒAš„‰8*iÖQ_ Ý?Jt¿îGY1©Jp¼>ßÞ4MøÏž8X7§¨èŠesΔ]á;U6Çw¦Œ*ÊΔùN`šPRšíϾÃïjOŸþÌUûÙ“iéwÿÊÇÑ ö¬|¹r¡`ñ…ç.’\rèµ_—ù^+£Bœï¿À?CÎ<}Š×n¸[ÒžmO,^œUv’e{ˆèþèÚAüù o^ÿ]TäÂu´&Ê }ñ¾y j„›x¸ëEòË·ãþƒ{2îÀŽú± c"qòp“öüÉý<ÉŽ?£óâ¸A‘Ym.˜3»(ÒÜÚ¸:X¿¢5qNl¾ EFVÆ/#,+Â*^)d{"̨TØi¸–8³æÌ>g&vÚÂHc;=l§›}\9—‹\q óaü>R6Y žå^tn¨} 8íábêN{iè ;ÐÙà=´’¬€d$2-W‡ ‹ÁI4œÈ:×áJÀU€+q¸²…À…NåÞóÙ»l«2K}nÕ0õ)\bæÐRÙ„Ô¦¹ê3ìQÒHa;œù6c˜¦¼©)ohÊM¹ESža[Ñl…]ëÌÌV§ü¦N™U§TÔ)—Ö)‡Øtܵ&à ”§ ”tòýe]Ò^  àÝ…ë¿Â¾ïÌwZòiò³åÞecrS²¬Fñ×(KF+cG+£F+i¶á@ÖY;³(d÷NåÎÜ?!¤V¦Ù'O–ªEÉjšmIE@·§"«•°[©PfXQ¢*[G¦ƒ×²¯a%ŽþÆT¨n«Så­J•÷¢×P±£lI•öB:5Y¤Vf°Ò˜ÉôŠ˜ÁTù]PO^V+³ÙÅTÌò!K¥ŽZ§R'ÊEØŠŒƒ¹«…Ú…iÆRjßæ4gÔÓ¡zõTqZ†ädqÚ ôNaš?žR‡€ŒêïB‹ÔߖרGáùH¯úlèZõ`Àqøù”ÈBáfú]cˆúHè.õáÐõ¡rG½·Ô‰·+â { !< nA˜ÕÅøH¤ÔëKE†!ê5ˆØ¨U þ®‘¥¦¨óC‡Ôy¡ëÕ¹ý™ªM'âìÐAgYŸJežZÊSg”¿¬N7±’”:M¸§ÔIýÉ';Ë›P~¹Z„åÉÔñ‘ êEHÉŒ º`¹g±ggŠçO‰gœ'ß3Æ“çî=Ïëóóõfz½^·WöâÜz‡§í·"ñ‚wûrËb–Ú‡·ƒá3qæå8Zâ_n±í¶WäTœWž=­Ê<Çw„q³è\Ožµ ÿ1ë‡y1k¢ ì¼X­u‰¸8õ°÷Ù»a³‡½'P ¼Ÿ½®wä~3Ë©µ.¯‹¦Ù{áæ4Í ËÊ÷ Àý µÖ•N*„È졈@ˆÃ'S¡ˆƒ#;Ù1ÛÒoB˜™ ³^ 9f!Þ똽,̺6†Í®BL0qÓfÇd³«X˜ áý•—ÀÕì a‚U¦ÅJœºK2-'Pž¨´&å˜bÑ®‰¥0è*è¨C_¨ýêú~u½£^ø…º¸_½·_½êsµø¿‘5Îüz^ûÞwkg7Ù¸nĈ[[ÛqYïX¢i]·Þ'âÆ_ÒÐ$p¢ÑºOo4­[uSëZèø}EÝ)Ô u³‹:ÑhW§Ñh¦ ðþMÛW…Ïʵe0תíçȵ][%rmrü¾’+,Ô›D®°È¹6›œ\bõáæù3WŸãi»á†E«W/¢Ôaé endstream endobj 86 0 obj 3110 endobj 87 0 obj << /Type /FontDescriptor /Ascent 750 /CapHeight 667 /Descent -250 /Flags 4 /FontBBox [-203 -428 1700 1272] /FontName /DIDUMH+Times-Roman /ItalicAngle 0 /StemV 0 /MaxWidth 1721 /XHeight 500 /FontFile2 85 0 R >> endobj 88 0 obj [ 564 ] endobj 89 0 obj << /Length 90 0 R /Filter /FlateDecode >> stream x]ÁjÃ0DïúŠ=¦‡ §gc()’–:ýEA¼kù࿯¤”zÐA³z3³ÒÇþ½gŸHJ°ž` «XÐ “gux%çmú½UÍÎ&*áa[æžÇ@m«ˆôWF–$íÞ\¸á¥hâ ž'Ú}‡ª kŒwÌàDê:r³ÝÙÄ‹™Aº¢ûÞå¹OÛ>S/®[åF™8<*Ùà°Dc!†'¨¶iºötêØý¥4&ÙU$‡Ôõj~ñõŒçÄ‹O=?ÿºcÇ endstream endobj 90 0 obj 207 endobj 12 0 obj << /Type /Font /Subtype /TrueType /BaseFont /DIDUMH+Times-Roman /FontDescriptor 87 0 R /Widths 88 0 R /FirstChar 33 /LastChar 33 /ToUnicode 89 0 R >> endobj 91 0 obj << /Length 92 0 R /Length1 5512 /Filter /FlateDecode >> stream x½X TTçÿ÷Þy¡D`àÎpy0ÀÈKÆa€EÄÈh«3" D‚FãªÓjcµ1Ñ´1‰iÓ4­Íz‰gÐ<ÜÄ4Ù&9õ´ëÚÚ›-‰Ý¦nÛ&ÝX˜ýÝ 1šæìÉÙ³gç;ß÷?¾ÿÿ»¯!FDSh€x*îì ­>œ0S:7m´=ÖSSü—DBúêukúŽlܧþW"Ýî5k·¬~bŹÅ ñº»B«þtùð ¢X3lÊ»Á˜šsè¹ 3»û6nŽ}޾ z-è©kû;CŒØ8èÍ }¡ÍëŒ †K @Ûî õu5¼ï7 ‚Î\ww׺ÿøçí@Ÿ%Ò¿ ̱Âé)ÐN8²ÛHœ®™Ò0-üašFýæUÌ?Œ×AÙø‹ÑåÓa5¬Nn¼ÆMÙd¥mô(ª±Þ¡2J¢\úó€¦st™æÑR:KMtŒÍ¡AšOUÔÇfS&û9•“Ÿž —`±…ú¡Û@ßB6Ãt*ú xåtŒ"ô™( õ퀗éÛѳt”~O×£OEÿ@.Ú óÑ#'ºñ öBYðÙKëX!·1úyïQ:Eï°QM§™ä&­¡nꣻè½Hçé³b7…TŒ8 ´„öÒA:L ý„IìkìqÁíŽöÒÈ va7çè ý…ų—ÙëQkt8El™*©N“¡Çé)ô ;¡×1Fé*[Ä–ð2?3*FK£7 ‡ªy©™¾‹>º;y”^£71.#j.+g‹Ù:6ÀÙë\?M0èæGïG–FÔ{6Æä¿™ GPÃgé9ŒW騼‰É\-7À]ããy¯°P·)z_ôxô¥èÏÐ:^…¨ÍèÊFÚL»iöó¤Wp^/ÓŸiŒ˜™%!‡av‰}ÀÏåÁÛOù~~?.pD¸¤óèf|4º&úHôÍè_±{Ž ¨}.U`T"F -¤E U¨õÚùø6§!AíÎÓEºDc4ÎÒ±Ï VÇ–²­ì{ì,{‹}Ìqœ™“3{€{ã ÷wžOáÓø\¾„_ÎâŸäŸêVéÖëÖ é?0ìï_5¾iüÞñ¢ÍÑÃÑGÏ ;²Q{:—±Û…ÔŽ®¦­Z­Õ³„|NÐó'‘Õi\¿o!·wéÎÜßP“V *Q̪˜›yg=ó±FÖ̰vôg ë`!Ö˶±íììÆãì)ìcc„fo²sìÆ(û#ÆÇœŽ3pNæ²9/׌±#ÄurÝ\×ÇíÃx†;Î sžxßÀ‡0þ ž¿À_æÿKH6 _þIxK¸(Œ ÿ)|¤3ëŠu‹uwè-ú*ý&ýÓú†; Ï.R5þGìéÖ_'máqŸÐvn®³7ˆ¸Ÿrsщmì{•ú>Áõ1“~ƒáÅ(ÁˆÁ¸5ÌÇ oNvV¦œa·IéiÖÔ”dKÒŒé‰ÓâÍq±âÔ)1&£A¯xŽQ_nÚ”ì "dËs窴#t #¨ØÀj¸]G±©v!ˆnÓôBsõç4½šÞ›šÌls“»°Àæ—mÊÛ>ÙaKvßç“6媆·hø Ûí0°ù-Ý>›Â‚6¿Ò°©{Ðô°/ªSX€ÃjLQ+TÚÖmP5üJŠìó+É2pÈø,h•Òº°ÃïKµÛ… «ï”W*$×)qŽIsÕÎÕ¶Ä.,èQ?íºJ^µ7⥕A }¥CáC… ª1âJ’ìS’¶¾gùŒüó?x‹Pá²B]ƒ Š7¸EWÉ J…ռȷÜÎ@‡Âv"95 -÷‰]tÉ~•ìµ)&¹Nîì ¢æÔÖNñ¦øå/ PkG8Ù›¬…#–íÕve¤°¶°V…ÕvËö xåëüŸŸQ¡eûÙß6·Ý¬ S#ÉHS±ujAdäZ©.]•4ØY‰òá`Øebªšg¡Š.Ë,Û¯%_ýãíœÐ$GŸe¾NªPmçÍ¡à28Ê)hŽ©µcˆ±o",º3B¾´äÎ /‹à.ƒƒªÏE²]938˜:¨^t„ÑçÞIF„Tõ¨DØ@+ld{ªÊí²i|UŒãõi{#Tò?W¸ôfÞ°t!ÛR­Â3ÿ*\öe*\þ¥*\q3ÓÛ*\‰œ+Ô WýÿUxÖ-Ƴ֎·±Ãxãñœ«æX£Nawx­$yŠÑ <Ï¥˜ô†FFÉFÓö†6‹Ã1ÿš»eÌ=ßü‘»Å<æ¦÷˜Û| KI±+ÞŸƒi×mŠÜøD×üÉóþ×Ë áINB¾î.¼Ûü‹wdtÕX3øz²Ö]Ì̯±]”ÝõÖÚ‹²OHvÇϴ狾,·+Ÿ*êªñ@0TeجæG¦¹bÈn3XsR«r*:SS“ úºZgQŒ˜“ïšéÌÊÉOñU» üA]r½/ÂÚNØ×ŸÐrnQSDÒ-×î(²v»1Íc£æÑwÍÕ«ñ Uñ IÚd^F~%Åõ[¼3-FS’e†eº…×'š’³Ébœ–ÍÌ‘¿cG…‡•ÅËe®òW)žgz9#[ÎÐbÙt{i9„7ŽŽOœ‘4Ý^¦êÏÌÎÁã“TVÝ|ÏþýÜ¥wƒGö¢­sÛ3§²Ì¬¯ÚL-&]ŒÀ«^8î å5”Xæìr¤¶Œ{¬|y/whö¯ßá– •Ô—ö=,Ìlœb*ÉŸ‘?cìß{*c¬é&hYçdñp1¶b™}ºA}QEÿë´žôãÉì¦ Þîlcn½UFWjÈZ|13}–5Ã&;f¡Qry™«4Þ¬¯N.I±¦;rÓyAW V‰P¡OIM0ç$'ü¥Â—“Lyº*wµA¯/vÊ1¹%NkNzЧ:Ç¡ÿI~¾ÃiÈá“g{"¬å„ý•ɶŒ¢WÍ£“ù´/èU͵±÷Ì£ U·µ=Iú¬#ÖÊYÆØª,“1Æ8Å8Õ(uúÊØêtše¬H×ú⸥1åê@\¥å5x ƒJ›le8·ZgÐ#­y=Z,úæÝÔi3eׂ•µ˜õSõÆ):“Àø’öñ9ó,ÙãÛÜKÆ+¸C\œ{YE05 XÍe›¸í³7Ïújcq†k&ÇeóÓLjKoŸ_j²Z§LK_Ì=;6¯v¶Á* éõßÚØxEíÇÄ÷}ð‹w¬ˆs_gñF•K¯qÏl¹ '®Ø~ЦOõU¨'|Ê‘øÚxpüdžÓ7%ª™úãu¯“]Ø@5˜è9•ããí M‹§õ8‡à#3F5‘á÷úWIФŒ&}鑯¶¡¡~©£½§¯kCa[_è.Ü¥x:¼q¦Ÿµ³¸vVs.=Ùμµ"»Óbmµi«Y[‰ÝðNadc 쀞ý¹v§ÆúÇc=ƒ·>†s”`/sFÜ™Ž;Œ£'9uªØ}aªÐHûï>À鸓õƒÓN?8ýà´T+"¬ÅÓPjÔU ªT±F9Í Ê©Qg 3£÷{µ°¶çã¤WÖÇJ/àŽ…V’ÄJ»H/±gÈF"Û¯­÷{cmâ;6ñ¢MÜoﳉ/±½Ô ñZmeÞØVñ—­b}«XÓ*ÎjO³j|_ˆŒ÷&æŠ/抑\ñ¹â½¹â¦\±0ÖCøäÙ´õa¯­Iü¸I|£I|´IÜÙ$nmW7‰ö&q¥UÌ´Š©V1¶ŸŒ{(î@™€:Þõ%N©6Â>|Þ%9 Ê¥Ûn/øz¸ý˜T;í KÉgT}†=!μ-ÕÆ³*bY`g’KËäÒ¼dLB}¸=êºa$Í‹0–ÆwG8vRºál“>*Šà\/ŠÞÍ‹pÇÂÒ%'€7Iúµs¹ô+O“t^m•^v®•Nh?ô½ F¡gñ5öïéû΃ÒÓÎ=Òw=šø¨Ków¨]äyRÚ7Šð` Kw»ÔS¤;á±· Yêû;Þ8©¨ BZä<--tÞ--˜ˆÔèÓ<ÎužÒ¶õ¡W¬M“jiÒlÏÛRµ; KUªyXš9¼´HÛ^‰gžäÀö„“R~{‰”Ì[(-^cXaXl¨0”Š Ù†,Cº!ÍhL0š±¸÷ÅF½Q0âÜ#Ñßzê %Q¿ƒéu4ÜŒ«CûŸ+qÌÈáh©ï¯ Û7cS¥&Á_Õàû‚%¨1ƒ>õyøw¿4åÞÝ”¥”R‰¦š•2õca„]aïù}#ì}@ÛٛƷûK³2¯µ#ÂÞ÷÷D è )^Uø>øæ€B³r‡æ‡òÀòP» à‡+§<ÕŽl¹¦¶gBÍ /Pó©@U%§¦æäF5µ·Uµ¡Ýy~ßP¨èŠh·¦²[W¤ª à™ÃÔ7äÄ­…kyÇ(š£4͑˖@ÇP© C®RMìüL\0!n›·iâeŸ‰‹&ÄG'ÄG!þ»úþ/]u_ÎðIJÇvñãë-(û»0ƒÊÞMø@Xi³ íxL¨oùÁ•Ý* u)É]>e‡ì³ -Óì>'>¢Š—ɾ!:âoï:âíò…—y—i}'ví[ï¿-Öž›±Öïû‚XûTgëÕX»4»ÏÅò«â]j,¿˯ÆÚåÝ¥ÅRwïïYT·á ~ï¹gù† Ëé¿„‹‡° endstream endobj 92 0 obj 3753 endobj 93 0 obj << /Type /FontDescriptor /Ascent 750 /CapHeight 667 /Descent -250 /Flags 4 /FontBBox [-203 -428 1700 1272] /FontName /DAFFCZ+Times-Roman /ItalicAngle 0 /StemV 0 /MaxWidth 1721 /XHeight 500 /FontFile2 91 0 R >> endobj 94 0 obj [ 556 556 ] endobj 95 0 obj << /Length 96 0 R /Filter /FlateDecode >> stream x]Ánà Dï|Å“C„í3BªREò¡mT'€a±êa|ð߈“J=p`f;,?÷ï=¹ü½0ud".~aÄÉk;0N§ýV5=«Àx†‡mI8÷d=ÁøwF–78¼?â±h_Ñ`t4Áá~ª2¬!üàŒ” aR‚A›ŸûPáSͼ¢§Þdߥ픩¿Äm ¹Q&ÚG%í .AiŒŠ&d¢i¤¸\$C2ÿ¬ížìZ)ºN Û¬ù§SÐòÅW%½Æ˜ÛÔ=Ô¢¥€#|­*øPÖó öp° endstream endobj 96 0 obj 224 endobj 16 0 obj << /Type /Font /Subtype /TrueType /BaseFont /DAFFCZ+Times-Roman /FontDescriptor 93 0 R /Widths 94 0 R /FirstChar 33 /LastChar 34 /ToUnicode 95 0 R >> endobj 97 0 obj << /Length 98 0 R /Length1 21864 /Filter /FlateDecode >> stream x½¼ |ÕÙ0~Î,wî~çîû2wî–Ü-ËMnöLvBH£ìYÔ°(”Vh© *Öjkáu7RµA´R‹«­H[_´ý*XµMÛ·EúVÈÍÿ9s@ÿïÿý½ßïÿý¾ÜÌœ93gΜóìÏsž„B´ѨhñÊ…«©©ŸÂ™—a»iñàM“Š B!Ä6/[½|åÎi ×#¤¸ !îÔòë7,;ûò’o ¤Ÿ†Pퟖ.\ò·ì½GšV÷—À ÝþGP_ õÐÀʛֿþËCý¨¹~Õâ… {fÎE¨³ê‹V.\¿Z¹CÏêzà†…+—>ó­ýïCý7P¯^»tõÅÄw 4ªÜ2Øaø‘?-R (”F.F"r r£*DT€bȇâÈ­0S/r¢(J!â‘ ƒX¸ßpÐ##âYú©Pú´"R";¢X˜9[\l2Ó+áYhüØ>…í?róÆsl%sOŒÿ/Ú£ydbƒþôº½†Ö£Mpü-4£*D­0žÇP'êCg°„Š…DÛ¡Ýy˜Aºÿžñ$ÌíÐ.ŒZÐ}0â6´ ÂýÔm_@§QÍGÐsè t úN Y¨¥žÿ*F÷£wñz|ô”Båh%ÚŠî æU =mA·cß8>Šúá·ÆõôtrüW0/ 2Æh9žôVa–ð6€–`†ñvÁ“záŽç±’j_ w™QI¨MAsaÜ· ÝhŒìgè|5uýôxóø+ãïå¥ ¨eÔ*ê(õW†fv1gÆ?—GB&8€dŒ¼Mƒ_Àm‚íAwîöÂÈCGÐ[€™ß¡Qô/t³˜ÃJÃiè½Æ÷ü¥§l”H5R¿£ãt½Šù%s†mÉÝ™ûûøÜñ¾ñ5ã‡aöÁ³ÈÌ œæ£«aÄK`íÍ€;ò» ~;ÐÃèz(ìYôxòqxö/ЯЇðü?¡?ÃFÑ9ôŸè"ƒQh1?+öÀ/Œ“µ:Àjž‰ñf¼߆·â;aŒáçñaü&@²šKõS›¨ÔËÔ/©÷¨ÓÔ§ÔŸ©Ò*ÚK ã7˜6fó«g¯aoa·°Ï*ÊÇÎå²¹9¹«sƒ¹·Ç¹qýxáøàø¦ñïVÿ&CR üe^-Þì8N‡_PZ?Z„£eè:ÀÍz€æ}Ïa†£§O?Zzf÷KÀú‡è˜Ù?Ñ4†r €³è¹—ÀŒÚ`FݸÏÅWá«ñ5xÀkðF| ÌqüîÄßY~?‹ŸÃ?ßãsø<,Ni)# €™6ª~ VR·PÛ©»¨{©}ÔÃÔêߨaêyê-€Æ_¨­¡õt˜Î¯…žFO§Òkè;éGéô“ô ú]z”¾HÑcL†©df0·0÷0¯1Àïo¬‘M³l»„½Ž½bïeŸf²²åŠaNäfqßâvp÷qO£ï¡Ÿ£€Ó®ü{$ÓÿôïAô õ6Õ‚~þ¸ªÞ)ÆÏ .f: ÒÇC}IíÅoeu ÅøYdYG±È ›ƒ¾ø Û(lŸçAµÜ+ã§h áÚñSìÀáp¼ 8âmô)£ÂÓA~\Cg€~—€d)’¹¯P*).J§’‰xaA, ‡Ä ðû¼·Ëé°Û¬³ÉÈô:­F­Rr –¡)Û-bë‚ÀpdÁ0§LI’º¸N,¼âÄ‚áœjýj›á¹o!\úJK Z.ûZK)ßRºÔóT“LZÄÀðÛÍb`Ï›9Žïhûãòq§|ÌDäŠ*‚wZÍa¼ Ð2Ü:80Ô² 9™À‡jŸþËŸÔÉ:d´Õ>­!=£¦…›P-Ã.±¹eØ)Â1\£Ã- — wÍœÛÒ섾db7- #±qØŸ¸]îy˜kV4A×Ã0´+ð\âÈÐî-Z×.—,¼jî0½ºh6Ƈíbó°}ãÇåêäQËgáâ0n]¸t¨uXZ° €Nª Hmán¨uÌ@ŸÔ¶¾¹Ãxt Ã%CÏOb©ØBÎ,¸60¬Å¡kÌ]CÃhÖá Ë%åÖêž+ Ãõn±oa³ç9 šµáGN)àüê•dâcsµ ;”lH6²ZplΗ¼-þWGHéØ|ô÷Pv̺5L"¶Ã,†‹0€¹"L¥‚ì–V ¡Å\øëÄê¦C|`k˜ ób`è hGÿüÕ3 'Î(Âüˆ\$ȾD0Ãxáäñp<>\X8ü,4ÁÐêäeÉÄà°[\͆Ý*Ôp\ØW•¸ AÙ® -‚Êð–™sóõZä>ˆ¤t¼o˜Z@®™¼bí!W¶L^¹tû¨ñyÙL²+#—þ ¼ÍÜ2P5ŒmÿÍå¥òõT’èAª®¹Ïa|gßß6‚š½‡À6¢¯¹:9‚J ¹¯h†ùC%“€…•%­÷V€v_`(0Ô¾d(ЂfÂr –õ¥aê³ç®€}÷\aXês_:\Ú×Wý”“~àh>Ô=\;Ñ”ò©ô4Ê&:É‘®¹3çoivKÍ}€T`¡#Ö#À=}}ЪâÒHaÄ›V8&Æ\ c®(„ëUù^fCÐEßÐés6¡Ï#CCî!ÂôùúF_?!MœA¤ á…¼¥ î…BÜä„(ˆ «¯U ü3I #¨æ¿‡pí¥qÃu0ÚZÂõÿ‡ ,ýO Üð?‚p㥑~ÂM0æFáæÿ{nù „[ÿ{·]7 r Œ¶M†pûÿ!OýŸ@¸ãái—Fúw˜§Oÿ¿áW@lŠØ ü#b!7J*†kA¬¢…Â#T¡d¦i¤Vp-9•ÝÂ2}ªÜ!|=rÄùs5c5Óaß9Vƒêkø1¨Â®¸H4 Æ(lfEùÈ…*¶âËã#ôñ‹ð(h‹ñN°Ð@!—¤#6Ã2H «ûq”ÃF“½²¸È,pÂüš7WG©¶äï;=þ)&¶¹9!–ºþ F£‚ÒiÓ'N¡ú±â"&R–)/-cD!b_cS:ÝÔX䀢±'žÝÆ€ù])ÈØ«À™ò± kw0fM€Aü߇~I7Á¯ü(¦ýP7‚Ÿ‘f‡es fw8v™†5³¿–b,o`"L9Óʬ„éŒÒ'(¾ó§ûã5qþÀ§~»>ßÄ“):ÿÅhü"vw!~Cy¯4š(2Ü_Æ}¶²LDäʲu¸ž²[Öc«Åf· ‹››º ØÅq©’E.Ï”úÍZLå†)zÊò±×ƒX/£ÿæõ¢ƒõ3l‘†£9…Vq!«ä•6°ü0Xðˆþ{-Àa½¤Q˜~»Ùîg$ǵV c¬t*×Y¯Ïá\+!¯Ðb6 i½‚Aõ˜Ä ’×+øØµ×X¶P˜ñéSý£']µc.¾æ´|`4U¢zWí¨Ã5vôô‘úQ¨ó,çú—‹Ì1‹Ë³åd‚ANÁEá8:[…’ò¬ìxxUãÍ;×­îN¦âû{>ô®¹A¼­gvHX6ñ›7÷ÿpíµ÷ttÞí*8uÛÚ7Ẫ|ª>÷w˜£o|”>Ä.Ÿï’Žñ¯s­ó¿èbÂvcÙ¶ý8%¹½‚k‘ñ0®S‡±æù”ý5˽–ÒI.¯ð77v»-F£±D­^[XhY+dK²å@nü©±ÊôL&M¶~˜ªÃ…êGëG¡vŽL¼6?}žL¸¸õ—ÛüØf·•–äç Ó ]:ªÃò¼Vhbµp 1•)ù;)GQÄ^YúÈÁ(5f ë~×µ¢v0¬~rám?\$}·£°ó{ûÿ:'{MabÄÈ .ùð==ƒ±~}IóºÆFÍÊ%w¬Y×YZʼnEsöœxàû&—'Œ@¿ó";|ô zHš§V°ú¹Š¾À€â~ûágGØ¿€É‰•¶€I¥T9(pÑœ¸ÛÄ9»M gwt#ªR¨hšSrtÀ ¥i¯>¨T9‰ó *¥RÔ…‚!1}â$Š€©ò2EÔŒÙkêk# ¦Aj°çã(•âØšž‹óÊÉ !L«df(5û0P~Yžh¢´Sä¹Ï˽“K7Ϥz“¯›3=9n¾;NQ¹ºu:µ±¬9·…²Sæ±ÑœÚxÕ º°auV)*¥ÊÔbí'vWÊ PB^F ŒÀ.egdî’æÎeæ²sËôý‡çpêcúrãý]pÔû៵]pH¬WRüTRzî=Åa‰úƒdwhÍvÇkcAÚ|Ö­â» ¾w|”O|˜{•{øq+žèœþ¤Ÿ¾‘©¤_e%";WíŸ]ŽscXÇåø›kÔÅ»jß „„û¡¢l)D#b€V-p" ü¢`Ä*ãÍ&Q¾k ûÔ…!M|Æ‹¹O_øÞ‘û¾û­Î[…Õ¹³OŒ£Ü_Î^ÀËÙYE[n€Ý0ugîÓäμ÷›i©uÞ;ÅÍ¿ÁåX²n`¿ º/ðiáíÝ‘Ã:ˆˆmº¶À\Ç\ç <àpފ׳·ë´…­…V£·Ðkóx½6«ZÅ(ø˜J­˜¬V›"æóy)>VPP¨¤»V‡¦Â k6 [.üMÈc%Ym-ŠPBî8ãËrKë-Áœ¨*Ù­ÊET5.¾!šËZCæï|ܘ{à‹ µ¾JÑy)aDÙÀÙðaVƆHÂ~áU8ð—ŠJu¬Ö«óoE>ì#àîvK¾ý‚¿½¤°Ø[”².;‹¹ ü.½»ÀUX(£‹¯5¼coÓ´@Ÿ´»KtTi‰Râ÷ †6¿~•þÛzZ_ÆddÄdÔe™¯"ædÿ èTÄ„¸?(9z” "3À®¨¬$Ø„5A.л`hôŸ»ÂÄàO‚º¡‚借5ýDžfÍBµL £åe“ªé E/cd°Œ«ž’ÇÞsf¡ÈáVµŠûD¢:¼ææM6é=vq/‚#n+ ɈŒ])”•E·«s‚º:fjµèr•ev¾Ü¬e‰Æ—lÒZ¼UúçþÂGã'È3Ÿ˜?±œφÎFÏÆÎÿ¡Ò¬´(ƒSØ)¦)Ö)Áí²øíºø^æ»Ú½º{õ{Å»â{‹÷fî­9À<¡}T÷¸÷€è°”[Í¥“Τ÷ê|A¿×—(NzRm+`»VfH¯DY\,ôÆk2ÕÞšL±È0¥µA«‰e´æ˜¹ÔÄB//ŠÇD*(ŠÓ3Ç2ôjÊddä[ÌÝ%¥­¥qŸW§¥jkqe1S³ò¨˜/–лЇ‹+Š[ë‹ëÔÄŠ”˜.æuêúº+e!Ø’ƒ§ÁH&Ö$1'k@ÖÔ‚p€ (ýÄÈìÇÄ [›çey%£ÊÇ_³Có×¹ššI.þ[Aór´ VÐCe‚UA¥M§y’.Ÿ0Ë£W·Ì£Ò³CuΕTÛµ¢X¨ÃfÖº.˜Á±˜7öîÌpkÇØÈ TëgåØ ÊÉ&e9+p–à¼Ü|]4e,¶ê(AP§¯¾88]cQW ´ƒóñ™Ü‘ˆµ`Äd±ÈsôÔúÚB0Qä )™°ìÎøŠaÂêHøJ"Â#šxlR!€~–…ÌQ&àúÔß "ö¿6K™^&è#oû~r¾“dqÁŒq è)ö6ÿòƒù±Á º$WiõœY/Y·]“‰†¶§|7–7¸MÛ6þê DÀfŽJ¿ÁÞ±€XÝ µ¥{ÓËÓë#7¥w††Â;"û‹òi¸HY¤-B§­!õj4‚ÍRYL%ª; ÖP¼Ä‚ ÎXJ«Õo … Ó/ÞääJ¢M¬Ê*1 MùP¨T)½$êú!"…'¼ƒÉEί$åÅÎ/3y€HŒaB¿àÇæÀ8ˆ|b%Œ,€e™ ƒ˜–µ ž§`uNÈ:$î:;«¢ŽÍ«¿áæ¶ýö½?,ïíåð±}»fÕ=üÍ%å̳6Q«srE‹¬R°5¦ÝRµô;×ýë·ï¥’î¶OÞyjzîÌ?¦‰~¨¸-£·ÜVJ’]|_¤$Ö‚³ AÄÖ«Ö³¬>â,^±êÕÀ;@zmaÉ!ø!¼®Ô”"J¢P[¨=„ñ² zâäð%‰:=ñt5;³çOÈÑÜýpZ aR^©– I¶†¨¼Úúº’¦¾¼¾". ’ß]° ó;µœ·µáÆÝ·8ôã÷éí7dÒ™TÐU£29sw½±fK_‹ÒÖW4ûÉ{>~õ'2MøÆ?eÊÙAàÙ&Xá|®CÓ’hM iN$>H~Fsj­‘Òdt`ª³ª Me8O¦âeñòx¶K‚ZäƒQš“,‚µorj tUž¶BRõ—"E@!)(ÞQüU¡PÄ 'WðIdð”cŒ„ûa%û¸Ã%/݃Õ‡@¹k`Ò4Á­ŒáJMî¥Õm¨sÒñŸ¿7ýªÜ³/UêÔ7Îèè.šïJvß»÷ÚGð= ‰ ›JÊüF3þã»ïNiÛó¶+(Ï]Tâí°WÖ\·w÷+﯈$WµÎꈕ 0,óöЋٕà9Ý)•//ÂN¾5Ñ“L0ÉB“Álö3‚¢ Å­L-ƦÂeÉXÒ Gm¶4Sî,…e³ÉZPKò VÜS@´\vƒˆI¯L kçÇø“\†@œp´&/úòcAóÍG€¸&´@&*«®”iõ„šÈ'6ÈÜMœ1[:!ëèʼnh0aÖ鬋éßéwwõ±ÛæG£Á´Õnê©ö»^8¤¥vÚšÓ–2oWĽ–bZõýþÓMcërr?™^äË$S˜Sioo½…ž×ôÙꧦ—@jâssécôNð1½üSiÓ²äºäV×öämÍ÷ÄHìmVjš"ª‚iÆ4«¯Iή¼6±1qcÅÌ^µ®ÙÛØ mÑ:ºÊh£umq&Ûb³y«è¨TUåUeî ”üDMqÞèƒ3;uš¶ju|xÓ Ußhy¸…jiQT•>¹:»'Ke;§¥OŸì?9ý£àtLÆ’ÆÎ»œ£ÄÕH»d°Ê¾$Tóž9–6Êé0^XœÌž°š`… ¬¡€”\AåÄ«ÏpaU<ïnØK­â¤ƒ•u; ¼ÈH‹ÍÙóZ½sßC¶â‚Ÿ\{o¬™›ºq“3P˜"¥*þüÌüÍšíËŠ ß1¸Ì—ûô¿ŸþhßóøµpíÙ¡ÆŽ¿ÜpqëÚ56§¥c×Üm%.LmoâEoA™¯Ø‘¨¾ú¾ã•æ.[HøÁK4ãõÚƒ³f?²þ…­×>†˜Ãøçô¯Ø5¨”Ös>»¯Ü×ê›ã[îÛæã¸²íªíå´äümõhuå@¬^D°¶h13Å.e%«‹ùU”Ù%ù®†…G¿¥¡° Ào²˜-*%1 ***\œÕq±¬ÚÕ$j, 13¯²8-Í–›,ZX‹¥A]ÉW4Héi躴ÖNˆ–fxM¬öO›»vß\Ô§æ¶+”¼Á_èjsµÏ™ Q#fExgÓ‰Ö¢âÖ±DS3ØZ•†µ3 ÕÅÛ^ê½§v†¹Æž,aƒÑwÏw õ”¤uv=5UiT9õú_¯ž±û"óŠÎ¤Œ"[ŽNyX òËŠÑ^)¼Ïñ¸cÄA«<‡T"±: ÆÀ ííú°ÞI[â¡0Û¥Á½R²8.&:Š9K“OCÀÒÐë‰åÅJÂ<2…¨»B?ý=D‡Bù#ø/ñ¸°àÀGÒ²‰ðÅ(~”’#ΰØwœ8Ö`Dðø‹ô¤z9½Í6©LùrêÇ%t¤1oWáoWUTWøð›zk VE.uGqg{¼R©ÙM3eÓg·‡‹z™¥R2%Ià}}ÄŽ•Wj mµØ`Ó¯HM™Rìƒ@ÕZÔ!£ Ö(”–< {ÀfzÞ5Hã6é—–Pˆy2|ÆÃš=ö~ûÆàÆÐÎàÎÐCÞ}¾à¾ÐSÞ§„§‚O…{ ‡ƒ‡C¿°½aÃñ–÷-á­à[¡7Âï¾?[x6þ/1 ±ÇãM&ã)ÇD™ró¼1•r§õeÚ †n§è0ØývÊn´‰våj<ãDe‡tŽ˜ò'S#ïIb1Tl0òü,SŠ7¤Ü!¿)†#X±ëîHÇÚŸjäSÅEÀ-3È#˳EMý„øw/œ CäRf póŒ‘wùúó‰U‚ϧg‘ìxyOv€Ý5`›”Nÿ„Il§'#Æà²&ÙpÉæb8s´K]Ú]y­Wµ^A]øÃ#ñ6¼nêæÜÅÍ¢O°ø¥Å …Í•öZ¡ÿ*æ•Q•0Qg`)—úbïÁ;C- 2s—ûÙ7 ÝmÖ›¯oX—Ú=§9w·,£z€ª¿a´Cš¢pà°("n5ˆ)D®C+ôˆ‰9œZ+˜Ábbˆ"Qô› ½Y›¼C$È2àFÃÃjÃc0DÔ šXú—“"¯°â.;mDðÇ/§H~±ÃMù¯ ŽÀ§<[bŸ4;HêqÁˆà'á“›*;+y³©¢‹ãr¯k½9tSÌÝ[4»;ä‰+Y%p½K4`AÁÓj‹úÂô¸Ievo©1£x¶ÉÝà,tº*²Î~ôç,\,½T=cjÍÔÚ3nNÞ\³=ɱu\S':³œ/›VÖY>óõ©¿žzvªfúôõ SW7 ÄÚũӚ2l$ÌÊ*K§:›îrlUãôΛ1òNÉ)¸Ú]|·çý¦p8’)-õ›JJئÆF¿©¡¡3‘UWegÍš¦æJc%j"c³c~Kóáæpwø®ðÁ0φÜî’%%ß*y²äÅ’/9S•tò u{qòÙT‚gðqˆk Öô¤À‡r"œ‘_ª”=eY´Ëù=€ø¿¤w\¢tIʉÐÕ i¹Kþ­ ºü<0°‰·¨/[ÞDö_®“q¢*Û䲡ƒþ"!¾ªë;«ÒÓÍwNMn«ÅYíWO¹«-` ²ìšvš›6Ö7<øж:êUW•ÊöýŒfÊ;—þAyóªÅ;è6aZpÃíOô}_j³õŒýNç6Y-¾)ý² bgZ©"-¯t¸Þ¸öÛ§Ž×8Ü¿šßwϼǩc‹&ÊÓA¾„Ë-þá w]ÖåïHØ(=ÆF}õ±h¸ªÒR^pmíÑÇ£‡¢oD^ýÛè{•§ª L-Sõ”×”Õ¶Õ÷izk×ù¶›î¶j4媬Ûj)ˆµÅ¼ ®LšUjQÓa(-ñy±IQ2VbRTˆµÇ}æ7ù¼>ÈØ’$¿ lŠÊ¬ÍÀI ÉBM M³w‰w«—ö†|;E¾­>Æ×Öèõñ>_£ó¨qJCzð„ƒhêSR¹òìàñþãý÷šw—ˆâè×ÌÙ¯%bîþñFáOŸÂ(*ÎK´ËH¦­‡ ؼE'I“`’åxÊä@@á§mœP¤µë²)¨mgíY›Ôª•·1j=ïjîôÎ*šÕ¬g™ÍjÎîíXÛÔRVÛH];]0{š ªÕ\”as³Ïÿ¾Qèud|9ÁWµK\«’3’ÕÆˆ+Õ8Ä3WÏÙÿ[°ÊÁ6{b\zð²HSZ™)Úv]Ÿ¥×=ÈÜ¢Û­{@û–éuç¦÷g ŸÙ>sž7|i3©4*-Åi Ý;FõpTÔªÑW}‚^E•q*†OƒC†ïD¦§¬Ð×\rGó.ƒ•Ä.“>žÝõèæëLbÿ·o¦º†ÿô߇¼ô“·®<ÿÞs©9gO½C=ÿ£'Oœ|ä;ÿ~üm°aÆçæÑGè!x“¸K««|­Õ-5G‹Î6–˽e¾v´¡úçú÷õëÏšÏ'´f‹ÅKËC!c‚FbBŠ/ŠqýjæXL'ê;x:äO0•FGQ,è·”U™¥ÄXÎÐ41rŒEM|‘ƒ«Œú5‰¸"°ß”ÄÚª€[r/p¯voq?âV¸ÛêCu.± ´:´E6‚ä´¦I™;9Br†,µŽÖŸ¹¼ÌšwMAL–›,|. Y§^J[’ń֕°îš7–h8“Äñôp¹]a aÔK¦H”XM$Þj…7ŒeT‘À@Ü顚Z}NͧÕ&5…ë4M•7W._µæ›Ç^?YXU¨w¨]™N÷~ÞßÓþTI¬µ>1|ûúÜ-ÉrúP@%0Lc¥žûÙ¼tï¶zÿ=Þ\½«‹%«¼MÁ}ðÎotÝMÍËÌrù -(ùñO…ñ©QÐiôä]þ¶úÍíáÓ Öc´Ä“ÆP¼ÆX_a<WBøxÙ2ãI7”RÌ5nŽ…uj&ÀêD^•±B¥d‹¢fŽJE‘¤æå•¼¶Óÿã¶Å'EJ„c)hÛ y7’œ¢à: yཻr©T2$ÈÂBO’dåMçóKfòž?uE…ˆˆôš1X‰tŒA³ BT$±ÎÉUØd«…?7Š`Ë si> "¯i|)j@ì”RZ$¹õÿÕ"e»`óeWÖζò³;ÌÞM7o¶;jo sANJ‹?Û–M|£à~­Å¬pᆊå½m‰ û-«#••s¶…-ÆÜ™…Åó³eu3–ÍXRuý=AhoóN°·¯f®†oü›4Ÿõ²>Ößë_æôoóß Žfö3뿬Œäv‡ƒ¢Ý¤?©Í+д¢áe»Ýo¢~Ľí÷ê- Ò¶ÕÝÒP±ÍS­TL]Ë›à«IœøÈúȉ1LbZ År5”’¯A Õ±‹?ÁWRвO ¯!ä—*Q?á_–@ˆfB´Ù}°ÀF¢^ÄÚC*[d1›ˆéR9¹Š c  Æo^ ^ ¡¤‰8‘ù£²È©uèEN§tº+·¥Ìf_¾ÀåS­Š·» ­›u^I²+´F">ðŒ] ›|$l³èí^wE…'žš3£ÄkäëÞ®i(’ìºëNi†ÌÞŽâŸpo´¶%Õ ¥?b09cƒk‡*JKÔ¦’`„+ŽûÌdØÕ¡¼fºqzv È#ý3÷Ö¢˜Õ›ÇÇŽ÷Á÷kV‚ ÷¬´Ä†çFVDÖGî°¡p<=΋ǩ׫E*&j¥~ǰ<ŽÀ ­³Hˆ%,øqÔ¬Š:™7 •þÈpôHôÝ(õ·& ¤ðkB̧øR]ÖVA?ËîôùãçFÉÉJ¬¯ëwÔ€ÿpþ‰<ßÉm²Ï¿‹C0Nþñ' K‘°ƒŠ¼šÇ’Læ—ƒ¹ Ž&M¼(ÀЋfZ5ö¬–ŠkmUA'Ï{â®phÍÌTÂÚPÝu½6jsî}ÐI‚_Lê“t&¿Ôå©Õz®ÚåRbù^mi¼ðÉêBQ»’ä@ø“ün¾»ïCÍب”ë¯S6R’6ȺªªÉö¤T œÒþ¯±Œý@éR"*Lî¸ôWÄ|<>JA•z-†ò4DÕÃf‡Í×Þ`{Ñ{l|Ž/0IŽ©' _±R@ÉöŽ¿ÏCƒùk¤ÿî™Ñ*Åhûa‹Ñw jÒ'”U™{ŽyØÂT%Zç#ïyï“ìSuç§êÞŸªûåTÝÓSu‹§ê2Suá©ðÅ€_KÆmº·éߦ‹lÓ‰ÛtÞmä;Ï:àu‡áNÐÙ»»þ—ñÏPféÇ?=8ìop§ªRÿÉDyˆŸÔ_DM8 峨[.ŸDQ%9¿à`W,l_}°«Š«v̓bÞÁ®«¡è;ص1uÉ·t œñ7ñ,ÐeäÖéèD»(RŸå“PN9è_w7lZäoPáÔ$7¯ƒ'÷Âexƒ['º1NŒP×ÈuÝóþ·ý£U°FvÐÿ9ô>è?Û=ÂàƒþßEG¨'%ÿ£èÿ‰®»ýouPpúµn8}ÐÿjnyÑÿŒÿ{þÇHÃþýäÌAÿCùfß Œ(¡õÞ|ë{cr—÷ÄFð¾ýwEßöo&„Þ7Acoûoh’Ÿ½2_,ÁÝpuY쌑ÿ›þYQùþðIà´nùÙíUoûÛbò³[aøEKàm#¹õ _ƒAÕçkÙ|·åùä ï’{Kçg’„)&`´p!à KÈ¿Ö/4-÷÷øU~ÕžÃø6øðƼYªäö<ÌíÙÂí¹‘Ûs·çZnO/·g ·§‚Û“âö¹=>΢4ÁGôJ­R­T*Jj¤´ŒŒÿ^*$ÒâàI¡ßÖyÇ„ Ù# ¾ø‡¦68¨!¤¤vÀv;l[aûl[`Û Û­°m„m=lƒ° ÿþGäîCÔuëór§‡¨[©'7R·OÝN­Ÿ8ZO ÊGÀÄ?"Ï„òàT\ð¢a|ǰb|6ißé†Ï4ÝÙç°Ùëõ¦:cekó±[ Ÿ\пüçøß¾áò½p„;º6¼ dú½¿*ïŸ{‘óÿ‚ó?ÅÉ-;fCƒ=rƒ=rƒ=ìù·g¢Ã;¼¾4ü„·o¸„Œ{û:†SäûZ‡¨zª¶¥ùUGо¹‡ÐGT}Ë,r}ÔÜÍæÉÍ@j×C3TE h†Ÿ@~Ò †ô„Ülq¾Y€ª#ͺHͨu( 7 PëäfgH³çÖVµ4?W;h¼‚ÖÊMÖ2¯\Ñd×W›ì’›ìšhâ–{‰F¡—&ØõÍ}.…ÏEƒr¡Ë—»ó—SùË)ùröòåXþr[þr\þ ìÿV–6þïtвbv£ L7X倨3§VÀWØ8ñÿ«'þàý?³2t endstream endobj 98 0 obj 16125 endobj 99 0 obj << /Type /FontDescriptor /Ascent 750 /CapHeight 659 /Descent -250 /Flags 68 /FontBBox [-296 -413 1661 1205] /FontName /VPFALQ+Times-Italic /ItalicAngle -15 /StemV 0 /MaxWidth 1610 /XHeight 444 /FontFile2 97 0 R >> endobj 100 0 obj [ 444 500 722 500 500 500 500 278 278 389 389 500 500 444 250 444 250 278 500 500 444 333 667 556 278 500 500 500 500 611 556 722 611 611 611 722 722 444 833 722 667 389 500 611 667 833 333 ] endobj 101 0 obj << /Length 102 0 R /Filter /FlateDecode >> stream x]“ËnÛ0E÷ú .ÓE`Z¤ì)xÑêöô  µ$ÈòÂßsÇi tqG3|\Rܼ>Æau›ïËÔÓêúaì–t™®K›\“NØms× íúnö­=×s¶aðñvYÓù0ö“+Ë̹͆\Öåæ^º©IŸôíÛÒ¥eOîá×ëѾ¯óü;Ó¸:ŸU•ëRÏt_êùk}NncCõa½=2ê_ÇÏÛœ;bÄö¾¥vêÒe®Û´Ôã)e¥÷UùöVeiìþ+Åâ>¢éß[ómU ïw¡ÊÊ> endobj 103 0 obj << /Length 104 0 R /Length1 6156 /Filter /FlateDecode >> stream xÍX tSÇ™þg®®$„mÌC~q%„Œ‘-ÌÃÆ"É p qÁ c°%ÀqH AN ,m¡´—R–.u¹¾¸äºIÒ¡iÈæASrh³á$N lHRyR¬ýæÊ1“íÉžÓÓ³úÏüßü3ÿü¯™;¾×Ĉ¨5‘D£ªë+ÈJ1ò,š½zíÇ/^üÁ›èÿHº¸aI}`BÕ;èNd¾²dùúÅŸÔ]øQß.è´ÖÖT.úxþž‘íQÈãj1ÐwxüS…½aµõkÖÅÿŽæA¾Ùº|eu%Í¢<È— ›ë+×5XgÆŸ…ü1dÇŠÊúÿŸ(#ê—ÙÕ°ª¦!óÚÏ—CÆš¸70Æ@â×—ÌhDN1"×R:š‚f—ŽQ*Qô<Ú»¢uÏÞ”ëÉÙýRô‚4¼±†µy´Œ¥Ñô*jq–dú)iTÌ?EÉ̉™´R€…È«Õô1»ŸS}DÍ<žêÉm/…ÍtšKgÍÒh7i-E¨…Ž`n6µD_^„·Ñð¶’¶Ñ6ý6ꤷØòèR¨˜VÐQ:Ï&E@ÏO“MÙˆb"ùiÍ€åù´ÁâAú ½ÆÖG·EÏ C ü¢|Äu˜N ƒl,[/Kû0S zÞ`ýXq´,z<ú"üdÑØ Ó ´—ÑÓt•ºY.›ÍÚ¢uÑUÑ§É _µô0=N{è)ú-}Á²™—á+ù1Ä–N¹ a{¢ùâ9EX<ëËæ±l=ë`Ÿñ°t"ÚÝO¶ÆÀãQzŽ~C/Òktšñ,³zv†·IÉÒni¿¼VþEÔ½„ø&ÓZ m§cГޢwé3ú9ØY*SØ(–ÇòY)›:ÌŽq‰oå‡y¿*Y¥§¤Ó¦¾ÝïFÿ+ú)ª’IÙ¨q>,ú)@Ó‘³¨à*ÐÔê9z{õ"*öýô}ÈL,™ ‚§4øq²al›*E^!¶Š½Í.s$Å9ï‚Ò.™¶ÊyòúèÐh^´ôŸÈABå£Jùt7M2v®Õ¬¥:x~„¶Òc¨k À.vÐiDðý•®ÑuºAc“™$¢B.–…]ÅÆ ˜I)›Ž}šËîGDóÙB¶ˆ5±]ìߨӠ_³ß°3ìv™]c7Œ(eÞ»ä³yßÄ÷€4~N.]3 1e›|¦ ¦.9U.çËß“šã,¿¼ùAw[wGÔm‰îž‹^¡xêOci&ž‚*ä°9¬Á½±ƒvƒö€ –ÿŽ“|çè$öø è%ÐYúªú6v¯ ôß8cW‘ãçÈ/5Ž‘ØÑTcG'°IÌìÊ@!¶g£=È6ZØ>v•?ÄŽàdu ÇÛévô>»„¬¯³È{ÏM7r~€?Ä›@[ù÷qBÚøiÐgÒ@iŒ4Wz@Z/핎H?“^’®`›"¦ý¦_›^“IVä©rµ¼^~Lþ¡|L>+Ÿ“/›‡™Û,;,»-—±+ó°7ð$ÜþKÆ kÅ ZË×òÜCÈ„gý[C_r+²z%c¯×£z¹xê¿Ã6S"Å¿Ër°G?‘K¥=8ßÃ]Q€'ö-<[AÚ…'ç<•°S|]¢ ÜdÉÑ«d^‘×ÈkˆË¥”fÇÊäž{î*ðJw1njÌu?ý£4!nÁýà1ˆ|Ã3ÝÃ\CeHFzZjŠ}ð ’û'%&ô³õígµ˜e“Äå\%5³B5eº¦Nõ ÙU‰ÊÛ*T†JîÔQb]%¦îÐôAsñ×4}1M_¯&KtR¡7Çp9Ô—ý.‡ÎæÏ¡ÿ¤ßv¨Wþ £¿ÓèÛÐw:±À°×ú*«pÔ’µµ‘@…ß›Ã:}H?Þ›ƒ‚“úÃ*M®ÜTk€šêòÔú˜“ÜÊEê¬Ù¡€?Íé {sT6¹ÚU¥’«XMÈîY.Ö9 :'ßÞœ¥*â§æ¾‹\‹šuUUˆ^eyH•*Ã*¯>’²ÕÁ.¿:xÃ{ö[âW½À·MªÜ]RY)Q}Í(º+„Tù¤Ò2Ìò­áʶ"8„{,‹W@ŒT,s¨q®bWmdYjNsBZª/5àªô‡UšÒR|)†àÍé´ožèDQ:½EÞ"öÍ1üË#±ñ×O ´o>uX:§·.Lxr¦ê¨6œ¸ëxÁjÆS¤z<ʇ_˜!Ë¥jÜäŠHâ]ØUv'º‘OåºúÁ#•=#fwâ'$&Åvöž•UöôužSªSܬP;c-aE·êäÏè¤8’.ðê”%ŽÃR?VC‘ƒ=OŽ£Q—ˆ}sD‘࢈£ÄQ‹ 7¹ ÄDM$œ‹tÊBKÁï 9U_8­·[ß;Ù–@=†…e=€ÆPîM(å䔢D™³B³Cj“?MõùÃ( ŽØÉY!õ$NW8 -äØ)pÓR{OÌ#³×ƒùܘ•2Ø€‰p$"l–…\Nõd$’ÏDLÖ}}À×3 “PGEgM³°àr¦‰—ÓåDXa?\Âñúj{uý÷+<¦7n¬‹hÇÎûU8ÿÛTxÜ·ªpAo¤wTxí1Öƒqór›vàíW|ß̾8Þ~9Þ?­à‰ ‘å¾§LÆ,Ã{^,"3%ùƒþ¹3¦fß·´¾fµ·xåòE¤ÓÄlÜ hó¹Ó¼ÓÂê¼Y›¢ Ðy¬óí€þ:¤ólj:ßHÐùV@?? °éü@_oôÑùÀx7°¬:ß °è|À¬óYçÿ 0é|@Òùz×ù:‹IÉ7pŠòv½ds°a¶sÛQ”Ë+a"x"¯B ðjÈQ¾ü#ƒ¿jh¼Âk0ò<¯?fð˜æC%_Œñ{Ñ¿—/ÅÐVøY}E}x;Kdc§ ~Ôà߀FÛÙFÛ¯m‡mM¶‰¶q¶¢xöÞ÷l¬Ýà5Ïôõ)°)°­-°¹ „Ê_ðábcÓ žnðÁ¾a[WØöBØv l«Ûæ…mö¢A,‚Ï;{Äà[ ¾ÁൟcpÁ“|IY¶7³lû³l?̲UeÙÆgÙža ø$±±x_¿Û»¶á¶!¶Ž4Û¯Øï)õÓ(®“ýžavHÚ Eg_håvÀõ\ÓÊ3 }¤•»jå™JQ {ŸÊ­Œö•³yÀw¨Õ$ä·XF…ý™Õòò07ä75Ï3X~>ŒÁ4Ï| ¾ªy²/kž¡€—bð;Í3Òi-è¼ 3'µàHÀóZ0ðŒ¬èZ° ðt ŽkÞå4Íû°ò,SÉËÂ}“Vž‚ч´òtÀ&­|`£V>^)ò²©ÕˆqMO«!ïâF È­ZŒù•Ôbä´‚Õr=PÌ/cuF-–âbÝä,°ZóLƒ›š'Ö‚£!-8G)²±¹4ŒÝGA#Â2 ‹fiÞ£P»Wóv!þ=ñO×¼/+Eq¬”r™(o܆öTͽÚ£{v%·g7¼=d#rÉò»2œ<†S7"‘»bû0Tó솧æ™phž€ŒØØc•¤E.É¢ºÏ²DòëûøÀÿ—åŠòEù0åóÖ.å3´ëâhÊ_=:sû+{º”=c”«žÑÊžxå=¯K9ßòŒˆ„ÎAÃ1P9çIR^öW^vw)§pÞ~[¾_9é©RžÇ9æÓMÌ— ´yò”Ÿû*GƒË•ŸÅX²ò#¬ÙÜ­|ëžô,W"îØø_ªò0Ƀ°³Ê›®4xu¶ï„²Ò›¯Ô碫)unwBYæÞ­Ôºu+­nÑ9óõQ@,óƒ9ÊÜ ã‹Ù£HÜ#î©Õ¸’p±­àkàbkàÖZ À¶€ëJî·…\e ŽOQ¦äÂÜ erp¨r7<Õ”B¬¦LîÇz1¯)£ZEÑò•o–¢㕹í–û-wYò-y–‘–L‹Ó’aI· °ö·&ZûYûZã­V«Ùj²r+YèÑ‹¾aâ¯Â3þÇÆÈlÜÄ'άœ¦Ùy„¬üq´mh¢mAkBÛŒ¶mÚ:´µh‘èÅãbu'ð†éN¾‘oèÜÀ·õô¶ñu=½u|­ÑÓÂ'°}‰·z•=i´öû=ý'%M(ñ«0+üÙ·~öÿmÁ7éÞ¶Œe¨ßǰúauŒèD3Â¥êñÉÕÉÇñ¼€¿“ç ‡:Ù*>.0GŒ³Uþ0Ô¦jÔÊó¡Få & ¥V¡F­ÒPCm»Pkoi øÛ[Á "ï¥C¥EÞk¨YòÀ,ù@ÍOCÍcŽj8†«#ŒùÀ •’Àê„«KI0Œ 2ü¹ÝP ‚…CíÙn(´»³éá·¦½Ncº.6]óÁnÍçÆ–;cóNÌß*Ýÿƒ^Mñÿ5ˆãÍ· à“¹Â¨A«P›×â¿MUGûö‹bB|ZUTU× ¬¬Q/ºjüêv—ßÑÞl¬ûÚô!1Ýìò·Ó¡À}¡öC¾¿Öìk6¾´Ï<8}×¾¶÷úš~ð|Ʀ _3u_óµKLϾv _»„¯™¾™†¯ÀÒ²âÕ·ýþeÍš˜ôÍZgýBg endstream endobj 104 0 obj 3767 endobj 105 0 obj << /Type /FontDescriptor /Ascent 750 /CapHeight 667 /Descent -250 /Flags 4 /FontBBox [-228 -407 1778 1295] /FontName /DIDUMH+Times-Bold /ItalicAngle 0 /StemV 0 /MaxWidth 1803 /XHeight 500 /FontFile2 103 0 R >> endobj 106 0 obj [ 570 ] endobj 107 0 obj << /Length 108 0 R /Filter /FlateDecode >> stream x]ÁjÃ0DïúŠ=¦‡ §gc()’–:ýEA¼kù࿯¤”zÐA³z3³ÒÇþ½gŸHJ°ž` «XÐ “gux%çmú½UÍÎ&*áa[æžÇ@m«ˆôWF–$íÞ\¸á¥hâ ž'Ú}‡ª kŒwÌàDê:r³ÝÙÄ‹™Aº¢ûÞå¹OÛ>S/®[åF™8<*Ùà°Dc!†'¨¶iºötêØý¥4&ÙU$‡Ôõj~ñõŒçÄ‹O=?ÿºcÇ endstream endobj 108 0 obj 207 endobj 18 0 obj << /Type /Font /Subtype /TrueType /BaseFont /DIDUMH+Times-Bold /FontDescriptor 105 0 R /Widths 106 0 R /FirstChar 33 /LastChar 33 /ToUnicode 107 0 R >> endobj 109 0 obj << /Length 110 0 R /Length1 3236 /Filter /FlateDecode >> stream x½•tÖUÇß÷Þï÷ypmà6a!±ÅÆ$DA6Ùh‰áJCi2~ßç¾¾Ÿ÷ÞϽŸ{ï÷¸›á½¸¢¼1\OËÓ,—/^¿6måÜš€òIÀŽˆW.«(Y™Dù‚u& U(³7Ú9ƒ,‚‹˜ÎÂf8&WaÏEËP`ºÙûrüg0ÙNÁ"ÔÙEé!ÓnZÌ)ó†-Á‹æ°é1'Â"=qÎu$:ÃV´Ø¬F õÌpÁ€ßç7ã9~_âfGxÜìâü‹9ûNä`'¢}gXÄQä¸d9ŽpŸñ®–ܰ†òa<€’°·›F¬‹ÜÍ\ÑçZL3r]CXcŽJçj`˜9©Aº)ÃV\vº=…»Pc/²æ~¼ÖÙ&æcXØhkÌ¢þœ`NX‚íaF03é|/àŠ¤†](1m’\“ÙûŸÜ„ÏÙsvpd–„¦ÓtG&F2LsØmÓ™Œé¦'’kE¦F†2›5Ì㡵›úp²ó¢‘0pÖ 3-)a3>³$‘÷¹Ò´cóÓ³2ÿKMKЦ%PœRv ¯¯¸4H ç'ÂQ —KcÎü/癬ÌÙÅ¥iL´°` ÛÂ…4Î-eþ½™á ²˜.XÄ{ëƒxøO^#óˆ˜XhLl;Ý–ƒ¤“m'Û²‡'§'g¤'§ÇôT¹”ž³½õÑ¡Ýo­‰Œ÷}ÓÒ ;3wžƒ àl»Ù„è…ã¤<î&­d#Â}b¯ø¾Ø#¾'¾+v‹ïˆÅ·Å.ñ_â[â?Å7ňâßÅñoœÃ_%_Ày,AÈ“ãÇâe‡s’ÿ"žÿ,¾!þI<#¾&þQ<-þ^üø[ñ7â)ñU| £íUŒaœWd{…r€—%¿4@oyQò b›xÇØêyÉωÇÄ£â¯5ög%‹­â¯ÄCâ/ŧÅ_ˆñsÜÂqì×ú^b|oqü¢>…¡ôÀeÒ6Óó¿VڼǑy´y‹ÃÏ0‰ÜÏóêòûð$¿®¹¬÷$¿ Žôõšá§kû1äÌç~÷ÕzjÞæ5鉼ÇQó=ü³)ïU›ÇÅ=âÔg÷®Ã%?&û£Šþˆ,»úÛÍ{Åa·úóctøÚíB>åïseÕú{жSòwÅ¿ñ\KÖËòmñ[êa‡¼ßRÌå}ï²þ7T§NÞûÅíZÓ¯«Î6ñ>\Íš÷õ½É¹n•å^±v`ïÔâúý>rüBÞ£ רFÖÍ[¶0§™Í-òlÁ3ìm36á~ڼǑ>ÛðUL£Í{é3ì-þ´úUùЏ‘ß_kc¿¦8ÞâP-Ëñ.q½f½ŽëïÛWa Ù²ª_SKoq¼ó*µú«å©Ä*­¾·9züØVa%>ζÞãH?6oqø’Ú,—‰KÅÅâb™øqxïzÖïæe‡ù’KÅÏ‹óÄÛÄ[ŹZ©ÉÅâ-âñ³âÍâl±¨ïuŽôÓê–,:ã3%ß(æ‹yšÍ É7ˆÓÅiâõâuâTÌäh¯•> endobj 112 0 obj [ 494 ] endobj 113 0 obj << /Length 114 0 R /Filter /FlateDecode >> stream x]ÁjÃ0DïúŠ=¦‡ §gc()’–:ýEA¼kù࿯¤”zÐA³z3³ÒÇþ½gŸHJ°ž` «XÐ “gux%çmú½UÍÎ&*áa[æžÇ@m«ˆôWF–$íÞ\¸á¥hâ ž'Ú}‡ª kŒwÌàDê:r³ÝÙÄ‹™Aº¢ûÞå¹OÛ>S/®[åF™8<*Ùà°Dc!†'¨¶iºötêØý¥4&ÙU$‡Ôõj~ñõŒçÄ‹O=?ÿºcÇ endstream endobj 114 0 obj 207 endobj 20 0 obj << /Type /Font /Subtype /TrueType /BaseFont /HYEDCJ+Symbol /FontDescriptor 111 0 R /Widths 112 0 R /FirstChar 33 /LastChar 33 /ToUnicode 113 0 R >> endobj 115 0 obj << /Length 116 0 R /Length1 6180 /Filter /FlateDecode >> stream x½X tTÕµÞçÜ™¹“Ÿ›L~áÞaÈO3 ’2IfH @2„@@£Y‘á¥b„N4kjû´èÓöùü‹ÞŒ<¼yþñ+U±j­¯åùCWÓ>—íëS[«™yß½tõ¹ìz]½'çì³÷þÎ>ûì}ÎÍ=CŒˆh€ZÐÕØIVª‚ä)T{Wÿ.åM˞ѓÈìÙºs[ïwVÔ]Ed±‰om»jÏÖ_†n$’~GÄí=Ý-Ÿäy‚ÈfŘ²¤qÛ x7øy=½»v[Ç#/‚ßÞzÕ5]–Heàa“,½Ý;­þ¸àwW®ôv?rxøçàoŸ³³¯{çWÿã: þ‰[!c(ú“HT"‡.1c´¹‚f™Û)Mè¥YDѳ¨ï£þwdC4b.¥¢ÈCÑ_ ³1⟦*=D·Ós´›ö£#i”OÔˆè<@­ä§qæ¦Äé.:Üçd§&º’ÃS½ \yéÊ„| õc|.5û¯ô6•Óe´‡Fé'ôlÒj§S|$ú-¤ïÓkì “ ÁÒ|D¤—n¢áè#TD5°4@73'».:AW ô¯ïÒ}ôfô ¬K¤xÃÇj Wc¦QÇæ07DD’È3­ÃˆãÌÊ›¢}•F¥ä¦:ZFð{ÝBw³çé,ÛÈw #QOôéèOyŸ /–P3­¢>Ú…î 4F_°u<):/zot,úbô`9™)›dŒ©¡ؽ‚¶Ñ0ìjXñ/è,Ê8ý–%²*VÇ|l}Ÿ½È~ƽB‘pH›lf9úGšÈä!âðº;±.§MÀÌ·Òh>~@Ÿ3;›ÇJ™‡Ý˳ù·øV~ ?Å?1 ¦!ÓxôÃŽLˆˆäbx¾”V ´#n×S…è{ÈÝQxö¤—‘™÷h‚¾ ¯˜™‰ÌÊòY1¬/‡¿`ïò$žÉ¼ž¿'¸„¥Â5¦×Mãfod8òûhGÔ½6ú$Vÿ.æÒW®Çé2Ú·`íýÈöäN/QÓ=t?=ˆö=ƒ™OcîWé zóHÁ‡ ú”þH_Ñ$¼Hd6” 6%‡!jK‘U[ÍúÙ6À²›Ø0|<ÆŽ³'ÙKˆdïàWðýü0Š¿ÎÆßæïóø„8![p Æ?15™6˜1'™7™÷™ÌYÊ&?”GÖG6Fú#g¢b4)ZíîÞÕUœiäÔJÉ4ƒœÈˆ Y]A+Q|ØiWÐfꢭt%r³Ѽñ¼ +|AžžÀ^z «{Y‡~‹•ý¾¤IŠàxšç™ØÏ¬+jŠÚX;ë`—³lÛÊzصl/Û‡5¡ ³ïb•÷²ÇØ({ž}À>eŸsâfžÈS¸Â ‘™&ÞŽÀ>èåûø!~?Âïä÷ðûù¿p•ç/#óˆ $ 9B9ŠWX!¬µ°ðCá~áaáá5aBøJ˜&M¥¦%¦U¦}¦ÛMϙ΢üΜb.6W˜ÛÍ[ÌWš¯6ÍGÌ#æ°ùó—–2‹*:Å5ââañq„î¦Ó?â¤]üÓ:…·Ïlþ'~”½„ÕB]ì1ÊĻޛ[(Õ.ÜsMÑ_£N ~©Ç{ºÈÓÑ·„9˜wGô-órĉOʼn8Cï›âØJ¼?6 ¥Ø¿[ðfY`œ¾wÉÂÅó‹ ]ßÊÏËÍ™çœëPä9Ù³³fÍ´ÏÈÌHOKM±%'I‰ ñqVÑb6 œQ¡×ÙØ©¨¹ª)×¹lY‘Î;.tª D—bTE€ê¤È­†tÇîi$³)ÕT]T¨xŠzÆãT4¶auú·zœ~E0ú­Fß”k0‡#¯½Ç£¨¬Sñªý=Ao§§¨ÕŒ|üa|Q!¥dÖŒ$è–Ujìﱃè¯:Ëéñª3èC'äx[Tßê¯'Ëá𪬡˹Y%g½šìšnXVÅÕÒÓÊv  !e´ðdðÍF›;]‰[œ[—w¨B&¼jŠKáô¨3öŽÛ/°ç{Þ[¦”¿Rå9î`£êîBÐu¶Sç·€kY«À&ôw¨l†Ý]ÝõØ"º^]Ò¹CQãœõΞàŽNÄ|VP¥5{áY³ÜcQüsó*Á¶§C­ÍrúžÙ£é\³çñ™ne楚¢Â1û*B6VTWT§Ó*‡ý@Œþ×Á˜ü“:µ8u´eÍtÔ˜îˆs9V¡*] èpb)zÓ]AÁ® Ÿ!ÛÕ¸†Î ­ÙRÍ96§üŒFçÄG—JSKŽí3Ò•z²§7ŒÊçûªË¥ çÈO7Ò×–‚ÅE…ýj–s§MQ³*ò!Že1âîpè)ÒÜ´Œ:°º#Æ+´9+Lîb—_åºæäyMF»®8¯™ÞéÄn­ž¬^‰¶u²šj«m“`Ñ,\àLq¤ä¡¦YÊ´/+Í:­ §¿ªÀTÄ"g#íÂYs¾5þÍ}EƒÃãY^e®LHHoÏXUån«¬Zµr¥œZUYÕVÒÞ.§¦§g8‹³­¸¥çeÓb±-skÉL‹»¡)ÁjËãÉ®%¹•ʹõéëªÖçWÚª«ÖÇgØÒ=éëâׯ+~Åe«fýÅvWõE“¶“Ìöùä8ÕN¼R;Y Ÿkk'RR—ëõPÒ|—y¿íÔ)tì.tìV9f;]|ÄôÌE%åeåiåÎòEeå1¡%¨å¥y¹Î¹ÁQR朑nK†/+Ÿ‘Äœsót#XšëtoÿøhcçÜÂy®T{j{µl¿Ó>’®m¾é¾Í‹r•‹5ž'%9ŽT³’å·ÄÇ3vZHLȬY9'ï¾ú¥3“æ¦í¤ŒÈ3Ã;#/xʳ+Šæ¤JÒPó.þYwÃö>·©8~^®”•$âí—‘É4QŒ7OÎ’ÌRÒâ iÞ# ²æ:nk`Çm‰æÉëõ\é #jiüâЦäêÏXŠ~…'zß¿ç<Õ³‰Ó>î<^§Š@”ø«Éû&ï³Î²ÏÑGL?Üôë脉"¸ƒSîû±¹8n’· ÀqKµáNAâûâ[d2,3|ŸÆ<²èß´Ëšz<¹%™âžÄݦÆ^ û å§Øó¤`•2û÷°ò¤\7“¤J“Î?3EÇH6øÔÀr ŒÚ ú0åYu\gØ·XÖØÆ°¯äò°oȆ°o#ˆ?ìÛŒ)Ö“ÏÒVÆåº¶†ÃäÊ©)ZiW™­}tYXކўpÃf¹.ŽÕQƒ_Š™×A=[w¼NbSfR¦%¬ï‡½ùg䫌¹{cd[>FC»5\Þ,[^“gŒ_…»\Ñf̽¼òŒÜ”oÌÝØ Ù«œ‘ëõ¡aÙ#§jc\yÌlYŒ[$ÖÖŠc+) á-ƺàfŽ;Yž'÷ÉŽ†mr»'Ç…ždñ)ĸ—ˆ¡{ÄЀºN ])†vˆ¡ubh™ªCóÅÐ\14GL·¦ZmÖ$k¢5ÞjµZ¬&+ǹH×¢çÜúû%ÝbӉŤ·&£oãz Zâø%ŒšëìÆ¯'Å€)üz6®ÃFû*½žÑJ4€˜ž¦>Ògzú"ÈÐ¥!24É2¬äåÁJÇèÜ<Fóææ]P·ÅÔócêù†ºü‚:?¦nŠ©› ¾$öÿO¦»þ¯1àݾ¶>“jkñ!WÍŠÅDÕ‚_'Dçÿe㺩Sý/Àra endstream endobj 116 0 obj 3936 endobj 117 0 obj << /Type /FontDescriptor /Ascent 750 /CapHeight 667 /Descent -250 /Flags 68 /FontBBox [-296 -413 1661 1205] /FontName /HGDGCZ+Times-Italic /ItalicAngle -15 /StemV 0 /MaxWidth 1610 /XHeight 500 /FontFile2 115 0 R >> endobj 118 0 obj [ 500 ] endobj 119 0 obj << /Length 120 0 R /Filter /FlateDecode >> stream x]½nÄ „{žbËKq¾!Eä"?Š“Àìb!ЏðÛˆs‘RlÁÌ|0¬¼Oû ò-;Rç­aK–`¢Ù³è/€ÞæãÔ4»˜(dÇ}Í´ ì(%ä{AÖœv8=b˜è¡j¯ )yžáôy›2n1~ÑBœ¡Z’+×=›øbÙÐó€Å÷y?ê/ñ±G‚Ò¨ýO%Öh,%Ã3 ÕuZÝnZã?ë&w$/½Vu\‡Ôò¿NEëï•ì–RiÓöЊÖžé¾ªb}°Í7¤p¯ endstream endobj 120 0 obj 222 endobj 22 0 obj << /Type /Font /Subtype /TrueType /BaseFont /HGDGCZ+Times-Italic /FontDescriptor 117 0 R /Widths 118 0 R /FirstChar 33 /LastChar 33 /ToUnicode 119 0 R >> endobj 121 0 obj << /Length 122 0 R /Length1 22004 /Filter /FlateDecode >> stream xͼ xUº0|NUWWï]½¯éîêê}I'ÎÒI‡TBÂ&È–ÂÛ°ŒFÁqDÔA…q¼ˆãÆ5„Åà,:‚(î¨3ŽÛ?¢£Ž™Å‹¸@:ß{ªâÜ™ï¿ÿó|Ï÷ü©T½uNª:ç=ïy÷.„Bj´ѨláÊù«é•ôUPó+ØoXØw™ï?ÿì÷a!Æ¿xõ’•-ÙBH¾öÏ–¬X·xðÁwžDH;¡Üï{{æ/úÇGw¼ÐøÜ_Õ š°êu(wC9лò²+Ñ•ÊÝP¾Ê¬Xµpþ6Çu!4ž‡Ö®œåjŪP†w"ßæ¯ì»ý'PþÊÂêµ=«C_<¶¡‰n„”ð„a#$GWäQ52!2ByYÅ‘¥`„¥(cU!r +âPZ'Q ¨QžÁÃóXäG ª@:T†B(‚´(ƒªP% £(2 ¢¹Q r!%r2½È »v;ý8r"4òì’½Ð52̬D|á…‘·érèl²¸C?3hºÞú ôê¼íA4€šp ÔA&ÌÕ¹hΡÜïw¢…èïxZŒö¢¿¡­” ­D"´N¢ x¦Í@Ç çKG ¨õ¡-hz®MEÛF^ùÞVo[…nD·`œïE‡Ñ»xÅÈ1Gúz½…ÇŒÀ,Æœh¬,½¨CÍh<šOîBóÐ"xâ}è~ô*^7rãÈ1! ï+œ,D{Ð!ÁY\×ÑMô]p¥ ¶×ÐX‡›F¦ì9,<«Ý Û­h'z=†P§ðT¼wdùÈÚ‘'`ºP/úº í@ÿ~‡¾Áqœ¤ÒÔ*êqè›f0%={&ôænèÏô6Va ž‰€×áø+ª“>4²zdÌ™Í,Œì×èt½Š>…–*ìÆMx%>Fí¥MôvzÓÇüçˆ0ò ôo,ºý0´=íÞE¢¯Ð×0;vb/.Ã\‰'à.ØöàÇ)šÚHí¡öRC´‚þúY™¦ðáÈ{#g+! ¶rÀÌXÀ` šc&\ ÛÀÕ¯Ñoa®ŽÆÞ@ïÀöú+–a¶Â›\ðp·Á6ÆÕ×âû`{JÁ (Š:@·Ó·Él#“aÖøG2#Õ°½c ó6ÀR%ªGc¤™›ØìEËáÍ?FÑ&Àë6tÌâô,ôàoèè tEç0ÌB8À€#0+e¸ ¶j,âvèÉ<æiž=êÂóð"¼߆ŠŸ€í7ø| ÿ Š¿Àg¥^2”f­šJM£®¡vÀ6@½N‡é/dY\&ÊÞ–bœL5ÓÅÜÁ<*W²‡?/ì-‘LÙ6²käõ‘Ï`aN†U°Æ° Æpð¨[ÐvØvÀvàò@ɇ€Žž†9>Û °@¬¾³w ¶¿ Á¿†ñ©ÇĄ̊SšÑ,ƒ›atÓ`ëÀ‹6Vã+ð5°mÃwá{óà‡€²À/Þ^ÆÀö1þF}Ÿ…q›©l¥1Ϧ®£6À¶‘º(d/õ,l_Ñ:MÏ gÓëèôCôÃô ôg0‹e[d»d¿‘½Ê ÆËŒc2ë˜MÌϙǙÌȩ̈ò€|/{ »ýfe&ÌMVÂÅ& °ÝÀ­{©>êpð§eèq|ú–RÀ¨®À&˜ëu€½¬ú<¾qTu;NÀÝÏL wMܼ¢Vì»°ºÚÑm°rÞB­ø5}‚J€“™F†}ä3æ2æ2D1P ìv¸Ó4Êç†~Vh × ¿y“ö@¯þ“6$†CÁ€àç}^O‰ÛåtØmV‹Ùd4pzV£V)¬œ‘ÑF‰¡µÛ×êî—…„qã’¤,̇ŠùUt÷û ªõûmú}ä¾ùpé{-Eh¹øŸZŠÅ–â…–˜óåP.™ðµ¾þ›ß îšÚç?i:}ýCÒù$éüVé\ ç<7øZì½Í¾~ÜíkéoíëÝÒÒÝœLàÃ" _•L‘ˆÔäÁýhìükzíH‹–~§ÐÜÒïà®ÑÁ–ù‹ú§Líhivñ|g2ÑÇ.ô#¡©_½Ü烦—vÀ»“‰¥ýдU³HX´uPD ºÉÙü9ýôüÎ~ª›¼Ãï· Íý¶õÙ¿+ž?k¹ù¢‹ýT°u~Ï–Ö~±{+ »IiþÍPš0Í¥6vvôãÐ9Ò ©ïÅQô-¤¦{™¯_)4 ½[–uÎÑ¥NÑÙ"ÌoîìGS:¢C*$‡í×Öñ€”ÃÉÆd#u¼ýÚ"üó‹õ¯=M ýÚ#œpé¼`ò&¡ºÙï[(½D€¾ÖCO Ú²°ÐF¹´_9¶{ W óÑÏ9Á·åK% }þýšù£5ò ÷%"Ét^ ˆ~<ô|…‘rJÇ>Œ·u⑃¨¹ä0èô¼¹ÉA!ä°´î†B41Îb _+ôº•Ì›o‹oKû¢-¾V_/L¸,(A¸Ð³¥3ÙֱŽÓ;ø~±Óuá´§³³ž'Ï[ ù–Nx²Ñ'”ªRÃÐ(‘˜( Mé˜ÚÑ¿¡ÙÕ/6wJ€ÄžžÒÑÿ4PWg'´‚1Žöà5Kí£}.…>'cp=U|Ê4x<¢sËòÌißÿô–-®-dM˃ýs…8Z1ˆHB*ƒxø€À»H…À ;¥ Ï¥&Pà=^¸v2È!cqÅ~þ‹È#Oq£Ô¤ËËL¼…ïÂÿ(è© ¬ÁA÷|ˆ‡q=XC!ÑD•)ÔZ›ÍÉ”©í×£wŸž4<¹¥§ùcÔ0i¨¼l ®HƒÔ– þPåý=ãÆõý÷Ò±gœôÌЀ©ÌfèO@ÔC˜¢áE˜‘Q<-KtÖŸ°s#JåR9œ‹AÀÏl/ðÛ™Íß΀¦`Ò›™ `³].jöhiŽjÞÐ|¥aèF#ÎC§UÈŒƒÍ¦‡{U`%»MG>„ÔXuðÍ=J3ˆŸõzM›uŒIó¨|:ý ^~ˆî—a™Õ’:q2x=‘G F[öËüÐ9üe<^^†òÕéªJC&$øY9[¬0˜­~óÝBÊ‘á³wû0*Ÿqm™(TÖÌûg׬žfÁ§} úîA+Eëf³l³ò@ ˜EîVä³aÛ ö‹Fþ®g(+è~ƒ8(êm¢«„wûD5¯A>/tï¤óE'÷ŽóÈ gßIûÁ˜Í¢†á# Ãù,”¡È2œó÷(Ô¹|5ª®ªí³p~ŽXláÓUÕ4/à¶…;/¿jÅøˆ·¦ùïwnûdå Ïaag>U>çÜÞ^°õµûº1!ÚòÆ‹Ï>µèµ« oÒ+ Sɘ¨"ÐÇ€Fl¨Rt+Ê(VWfV;€R _Û€XÔ6‡Ýñ5ù-£ôË qß‘L±ê;¢á.:¿q[‘€Î½ §X5ü›ó$E“uÄì`6z‚ó¿ˆK6š±\%WG•Yeµj>ibëðÒE œÊ)d’ZWÐZ˜K=?ÄoB…©Ì˜ðFÙü³'.¥2™³Ò^^½z}ð’@¬ÆÀ30دHö_À»\€ñr´Kœ*×Yt‹­›´×ëŽjårÝ Ç²ØzÇÇÖ3Ö¯c¬,‚\®@€‰¸TAV5šÊ>¸,U¾» sebÙê²WÊdee.ŸR«¨hÊét)<ƒxÕz}ÂfJ̱ RKVÊëÙ µh_E:uâ4Á×™á#‘C€Gn¨!GÖ@*Ÿ?5d ¸ƒY®M€ ²báp%Ÿ&6…œµX ”E1*. ¹Po­€• ÍX?-PŸõwRëžXwêðеÓ(-œ^I¾~Æ:1õ޶Û.ÿÑä_dh“¯‹~¿Ëkb2±K^½î³ÉšY|è‘ש³Wïº|w¼¦¾Ù‘ØõÓ·Ç%èY+FÞbz‡„R_ç®4^¥½ÊxCÉϵ;Jvzwòw ƒªžƒþã–—­ÏÛþhûÌvÎf´Z­¼Mhµ4Z[Óm3íKì}–u¶µ›,›¬›l{,{¬{lÇuÏžõ÷m6;ã’÷(\,;ˆÓòjEOÀÆêí6»I“ Цµn%¡TÖÇ6#{™²‚Ee¸Cß«§ôs|ƒÔâ}@D'Nå¹3ùS­À‡±Ù!OÄ}~zsC§‡¸ãEþ‚d€»ê ƒ c¤ f›‘OÞm@‡‚/2pÕU|˜Þ‰åúpJžÍŒŸtë¡—öVÌÃÔ®›&/«¿rö}G ¯¾øáNàÃ\?/Çø»»öþ£ðÆ;Û g:*V§oÌ-?p ¼ “_~†)òðí1ÍÀUo;û  Ïiž³¿©ûƒûSû§Žoíß:Ôr­Ü`ÑZŒ343=šÇMîíš;twp·w–ìq jÝBŸæN‰>;có¤€P¶”ÉdV8çè õýÂ(õç©ï<Ýq/ÿŠÖ|6«cåQÊ2$2ÃbpOòç²üTj-¾êØÁC/î^‡¿‰Ž=ôYÃâ/¦Ø¹ cð^Jq‰×Èfž,<_øì·¸¶c¼òwŸõ[ÎqÅñÃdx ¥0xÍž#½ú+õ7îì 0Õá¶ð¬ð’p_˜Q#Xv¨Ó/¸Ôr`Ç 5û %©' Œš-Vz<~ƒÖRSþT)"t$bD‹×jAÑewñGÐ+]|øžžZº%D‡%bfo=ëq ÖMõ°Ÿ#+2Ÿ?awÖÙ„hœõÃ9'Eä¬Xttâó†ÏOÊk†òÃCy ˜)EjEåE+Õ ”bÁè²J„"i%y…ùŽ`¶Îß)»;þåWs+¿šÏd¬›Û{äëîì´á¿fh‹¯ctaýi¸¶¢~üŸÃ¿¥À5¦v¾Z˜I–øØ#@CÚ.ªÖép§#;†õ0û 9©/bK4””ðœÒ¥áR*ŠG.¿Â?ˆmbÀ#:m.¾¸€ì­¨…‚FÔ<­¡5A“§^¦¿’(æ4aïÜ5oæ=Ã;W§òõN‚îÈíàdø"¤ŒJíÿ7tË'¨¨ñÏ‘mN‡|ÑU¾çrO&c¹îÁUk‡½£Xèôšä™Â§~­)„èŸîž¸ggA˜WAeaàDE=´m/å€N~OÄåøcW0à'«£âüê0E\ö€à;’WŽ1¯L–¨ð˜8F¦2$‰€Ã«§" (L±Ýï Õs°’Kî.2ïÊLêÄ9¼ÉA€D5L6€Ì¹ý+/»˜o[ˆ@õ¶ÈÅ‹¥¢|+Ò ,‡H»à¥þl…w6u°K¨ÅŸTûóÔá.¾º^¸t¸ U° Ìž‘™|ôû³¼Fe&ÃÀy¡?$¡)Ú¼çø.Ÿ‰ÎHèÿ/DfûŒ´„+ŠÐ 5¤c]çR1ZÄÁõ¼|3D\–€`lȬ€«Ea£m°èzr6 á0µÙS ¿²¹ [郞Dý¯F,)—˜ŸS˜Cè亻‡3xQ†2ùfÓïÏöšd ¥Þ9çø™µD:cðÊ#9‰5Tàrña+×[Ì­szžóü¹„•y¬%6OØSížåÞiØiÛiß)ì ü,ö³ø§ž?Çõ%%žxÂlj} ¡GÀ%Hp~|6—Ýÿ¸'_Lêaœª Ç%‰„{«ÿÑóÇå))Ùm„Ç”¸ñNDâ6ë°'â1pí82^¢ÞU‘ü 0ÄØ›…A\-ŸÞàÇœ_ôO÷ÓþJýŤ#Éý7ókœÃ§‡œù€àÏÑ/)NE Rl*ë@wʯ‘mµ‰œ"ÒÀi—á0ↀéÀqñMœ"·)§¸fT£úÉé°Åž_ЛAq°è°”, 1IÉ …Aw/’\fšPWÅwQ–LJK]m‹©©÷¼Zx—ZcG‡§æ›­îÂÍ™:ÿôáKFõ…"¥)Ç\^Sv‡­òLF{WáÍsgZ˜N¬sk£~5SXÕéƒù-®Qð…÷B”Ïuðz9¡ªç`’Üè<ŨSwZw:?£NÙÏàÓVVW£v à[¦NÁSãòÇ-èå*w¹k™b®m*¿Iž2›MÐ}=g•í)Ûû 8%Ý[éÙ­×¢ùN÷Î囘}€„¾TÞ>L¬ø'ÚèE6qx€Ö@xx‘6|2büéί/ê¥úùs7ÖWT=-­‹¨íXŽ Ë¯Ê?ù,´™Ôá1/ÞüXIløíá lÛJzóeõêÌ#/÷ì« q…ëÉ2+⣩pû(m¤Ð;âOå¹ ¦:¦L¬Š=%ÅÇLGÍÇ£Çc¿}Uªg±B¦z`ͬÍf [B¶eá‘å±+ÌW ë’›w™vXîŽÂOÊžT晟ôN>‹ÿŒ?•}¢ð8JܼèxsƒNžJÑ„À®JŒXñ+æÀ…ÕC¼NG«¾¢¿þ'2*%£8!£ò²ï‘Q}ÊyÂyuÊZ|>Ÿç®9yÄ^$,ÎyÎùâIð n$N¤M^¬\~£–ž?†µ6 dïý3¹íÞ›øÝe‘ê¸fÉÕ—4î- Çõ—½qìnùwÔw÷ËÓ«ðµ63j»ß¢P¤–¾Œkpîe’Õ!Ñ"s?Т¢é{Å|§i“q‡––koÔRt r«’Õ¸”ÁUãòÚåôÉÂq#D—™°ÉTo´Û—Ñî2Ùt&«ÓaŒ÷:[œÖp8¥6f·ºl aŽÎ–Œ¹vKlkÿ¸d[Œ¾¢òPáð*°Œ Ú‡²9bîHÑÝĤâ¥ù 6Güƒ@çéSb\ù$À™XT/Î'ñL‹‘¨½½“ž¥Ôö¯;sÕÜ¥ønCÈ]ÈfU[1<‘:¾—Ï"Ã4¯¥7_°+3ñYúE÷8óða»ž*§6V­˜ ËPÏ.抖ˣ©á¯om#ÊœÌ6È}¨EÿC¶à•šõÚu:Àžñ!Í[êÏt6ž1ª•ÆõFJ¬qe{°+†Ð E dÅÊA¬¹X©èp9{Ü®˜ €h%•bÚHœ ªül%‹ký8Èâ¸G‚Z•LæM™À»[ª¬¥kk9—kÞ,f?çâ©øª8w沨ü.?öžâVÏÌQ—ÄÔ~~óqÉc˜Ÿ4”?M|ÞääbwH WÂ%ì¢zççNû阫w‚oÂîDp5GÀW!Õ8íEùkªh¶è*j­ÌÁ9êÁ(Z Úy±ä$¢x?8Ô¤Zü¤ué÷o½¹oLôêG§N}ë½5¯ëýNE}6úòí½ë²5¿½kIýÚ/ _Œ¹nLDçTúìÊ:üüÞG¯ÜrÉœÚP}Ó‚îîŸÜ‰eÍa_¡é笙:¿¬|ÞÄŠ1—íùyaÈfע Ÿy ¨Ã3J kº_Lw0K™>ó³l³ePöœìm‹Œ²ÙNaбÆ^DéÔ.­FÑïÀ>ÇG·c7ˆlp@Š‘vñOQ8EÍ#©1”Œ¤VˆVóªb·öUÃSFœ2Î3®2>n” Yq€hŒ6⦴§Î¶ìÎsù|nhx(ØôN;X÷Àu¿É¹Zt°¥Fívo"ŽŸpÑ^Iüã`®±B•ìUª®dó¤Ÿ]rÍpèÊKÝTÇô¾;9.;ûüšñ™Ì„Õ²*Y|Ê‹úÉ[’~„ܘëÅÀR×s%êz»j¦ëÕ/K>󥆸2l @Œøu»\F¢u_ã v ¼M'“MFD)Á¿NŠ×i“ö—‰OtˆŒÙí㉉„¿Ó=ˆÏuTŒÂB.ZŸE"ÁE½ŒxA”\¤[€K‡ˆÔbUzãŠ)Á±¿ù|ZéÔ>üÌ‚†k¯-|Q¸çú–úåÔ·LoFÖÔ7<íî»ïÞK­ýÁ4P0LÕ ‡×ÎnÛöúê}ÔÞËršŒ—ÈðEHúY/h7ˆ•JdÖB!Ì(X¶Þèt:”*U’¸÷JÊQbw(±ÁL—¸LJe£â¦Ù&Ê4HåES«ÝÉRsà§8î˜íxÔA9ä÷·zHÔàÍ>˜Í¼Ý–}·ï40Ÿ’šhX Q­rÒ`@?¨¡ ¢7Äy#ˆõ”è[Ô+?hdX\¥Á%«iY†L˜ ’UÃÿðmƒËiÎÅ k¨6{Ø^[ÂfÒŠ¶NPI_ß(OK~‡‘÷Ø·Æ+Ñ1ñò¯•Xîp"'¶Æe!gLˆj¹ZƒJ´6‘*M¹Üà˜ÅcN‡£Þ¨Mh%´”—•+”N—LUš¤ËY­Ã“—á`âpÆ0TRe©D\)–W–•¥R•Ú„!ÁÇㆠÁ¬ VWV¥Žž| ¦¿>EhÀù"¬ƒè °ÈI~y[Ö–åXPôý£"ΜWFÏ£ÌTaª I(™@"ÔCRrAçÁ"Ù$Ln_-—þBÕklÕ㨠uZî ÝûrEÜÙŽ¯H9“ŽÂâªÂCºÂæláw ,¡ ëNkÓp†ê`3'Ê^ŸšP¤ I±’^àú¯‰7¼¡{KO±5l6jÌʲü­ê[5wê¶ë•)Ÿ7NMŒ¼T&3ûLf™¹›yÌ7ñz#v±Úˆ»òc–É¡Uº”—Í^R–85J—Ûfh \ƒ«6 *È5™[EšÉjƒîÕAp:á`®NU[—zówòÍ|þ$7êþ‘/aÌ9!´É–*ÀÚªvÏåòy(Ù¥º8WM$z•üüÕJ §’QEðþÖu¾V´ßGÉ™†i‚$¾ã'û«KñâÂòdsõìÂFNì¡ætI…nÚUÀ—µ·d‡ÛºJ’&ûK“ µm‘êÊèôŽ:ü,5­±|EŒ5jôÛ 'þ²"à”P¡ýÂχ³¦Jî…6¬¯ ች+;ƒUfMуì')n‡ÌÒ'ÄEÊNc§i Z‚{•KKMëŒëL*«V€Ãéè= :ƒŽPˆU9‚N…RáÁØh¡c.¢xË«HÐ GÈ¡r>n~Êü²ù}˜9s©“ 9ãmñ`²”XiûÎݹdÛL¦Þù|8+ùbûREšÊ¬O¥ìİ"Ë6 ýP•Q$ ‚O*¨"Ò “”˜„IÂêE~‘I‹‰p¨ R/,Ë©Íޱ؄xÉBüLyIÐQX7åÃÙµ [‚U uŠð³OÇÇ fÜË—µ UF ›É(5¦ðð ›.KjyÎö‘ùK³’7ìñ’ÅŠÅæÅ–+@Rpö ¡Np—h½z·’öš¤œnbé Â>â-`=HÔic\¡²¢2CXÃù”'²JŠ6{…å¼·¡º¯/9ã£õ·Õ•·&–tÕÀ@ýÒácåLi;uW×Ä[æ<¶jv¶ULú'(ºÚîÂW]Ã[—•±å£*Ì¢_‡yÕ@¦ÅtøeÄ7â½KçÖ”¨ãòj4Éëò¸Ý%®¸µš›´1£mÌŒÌßé‹Ü¿1qsõæšÛ#{â÷g©~¤æ@æpõ×ì`éúÊìúöq^¬Õ6¶a Ý Óµ÷Øpƒ §lXÖÒP«¿…Ö–)k§$•Á$«NÑÏ`g̨ {©˜ÜgºdbëĪYò§»!ýVãÞ6Ásýhz£æéݱ~j³f¦Ž¼™: Ò«oØ>™³ŸÌÛ'–ý]°×IvK‘ˆHÐÈhèš÷ì§À§Y4æÉuØI´Þ Þ'‰]Ì)‰¸ª¥D—PUu¥dÆ,5›Lˆ·DàI2M(ÊC˜ýyJµÀÔ0î2{fLª­?µêŠMÖŽßzIo¡ß§shïʹÊvŒëÝðÁSã®ä±nO$þD÷-^“ÉÃûýýׯ5“¶¿sYÿ­½áW(6Ûµéú-×núѹžqFÿìÊJ§‘zò:Í7s½]»{Õ͇Üú•áÞú§ÛBãr‡½~ü<„òæ~þÜ„°;µFv¨¨ŸK<0‚ž×[Ô¥¶ªm”Òª´ÉCò°Ãê°YCÖpÔµuY»lK­Km½¡ÞðϬ?³=l}ØvØzØfå^‹+L[ÃNÁd»°d‚GQ'ª=–*w‚Ñì4¨h¹7"Ó* Ÿ {Ûµl$lµ¨\Îg6x(¦ô 1âõêÞ‹J30X’‚Þ0”—ÄfÑ/NWpÈçNJ"TŠq¬¬› ^WC1áì"…ð¼c 4Gнk*øæ†­³úîJU¼Õ½­r èØ¦r6Õ*3Õ—+ÒÃOOœ¶ùÁ‚¹%®)/W‡Æâ¿· ŒÃïŒ ©¥ÜºblV >z5Dš–ˆ5œÅ뢴®ZãqW ¸Mð¸Ö6G[Ü œR`…Ha‹ÜíR1¢OÕ~Îc?`µÅ á%Räç(a’Æ-Q/ ˜;I8ÁÅ™k4Ñ€/â÷üUù¦Æ|¾±)ßUeöÄÆàÍ0$;Ë盚`?Û®4ºZ©®1IuúÜi’}&›2°=$^y“ý- +œ!kšŒz£¾p0 'Âɪ`U¨*Q•l ¶†Z­ÉÅÁÅ¡žDOr‹°9p{âöä1ÇŸî;Cw†©ˆ=Á/)Ô*…±2˜=FyÂWB#§TeW;hSÄMèÈ-ì)SE¢1iÊÁ^>Që‹{s f'Ér„‰'¾0 `ÑÚ²Šÿ̺(X ëM¿.¥Yb'ÀlW%cYø]Ìf®nÂO4›ÆÜƒoÖX"jàŸIú[ örm¼YfjŒhÓç¶aÆÕxÍàñVèœcî~ß ¦ËË)£I%¤°)ýIK©’€„;ŠøÌôhº‘³ˆð*¼:Š}U€Ð• ªöèàiŸzÒëT„Ò(U@çd¶9i¶!“5Gr>ILžÉ£zî$˜¨›ÿŽž/È ‰š‹»{¶¥9¦“èQêüzÈ‹‹ˆOæûŸL?Y!{”ÔÿhúÑ Ùz~½}z}ÅV~«kzkÅ]ü]þ»ÒwUh¢†(õGÓÑŠÖÆÖ¦eü2ÿ²ô² µ’Wú•ie…¬J[emÓ¶ZÇÖÍ2<«yÖò†æ Ëuê.¾Ëß•îªqJ¯âË‚ÉtSÕÜXQæ‡$R@ÂØº#x” 0 _•c2'«Æäª’A·š‘)Íc}µ¸¶]o^ì‹âh»Ý®g•ò±MérÞ§j4¿× CA_êâT°,(o î2ÁAãÉXõ8Tå«¢ú«pªª¬J¬º¥jwS—SùÇÄHöC7j&X>ÕÞÄ5}ÀO.œœ’8 x]HnsþcnHZkS!É|Àcl¹ú"“!Âx”þð"6F£Ô$¦j‘”uàóÒ‰dçœ®Ž giI–«äa/ÎhÅ_Úˆo¨(ë\yUsȯ«­œ¾pŃ¥µgM"ÕTy9¬_¾ª4ÑÒ°"TS°–³W;Õ%–*ÒÛÇÇÖòÚu[în ËËËáü÷)óMEUΆ[ñß'w-ÑŽ²¬b­d{~/ú+q½É‡µV­Ña‡ÚmuÛ“Ÿ¥ë´vÚëVXWØîÔ6ÿ˜õ1Û¯¬¿²··Ù5V"üž [çcöÏüÀée4åò ЀÏGÙhÔ‘QnÿŽÛÇcRŠÎ)®³ˆ&‚|,iÌ+ ¬ïÈ‘ œž˜ ß­ Ë¿áô*AÖ>VoÂ7”ï˜sÃmß±úN;áõ”p{à‡e€Ïñóoz´`h‰°ß1ûIá"æc4J‚ítÎÔáD}b[CF#Uʱ}&ûHþ‘êÙù æ¢un×gî³Êg©–é–rtêÍ’ÓPõA…ÚÉ:Œz&x´DHXxÈÝ y_¢š(¾n¾b¸u`}þp~z˜F’Mˆ*eß©'`z›’˜=ö¦GÐKϾÅI«Ð»pLã¼^Áv/õ(öÞyåŰ÷·fn<ññG/nì<‰Oƒßºdå0.-H€ßŠ×šBIœŸ­™Q2ÃsÔqÔõÿ†ï£’<ú>ãO—èå%˜- ;³ÎqÎg³¸d±çFænõ%wz4`g'¹RÚÖÒº€QðXë„hµ'¹Aˆ’ŸÒ1tØõ—†ìFµ‚Ñʧ»Y«\;ݯ.Mêfјo‘ìå…¢ªÌæÇŒ¢«ìÞGÄÂi0Ÿ‰-0$éÈC@’ë¬"€>FUdˆGƒ@¼°À*¾ ÃW(èÌì¿$ãJŽ9êhØ".hT ¿ÔT–ñ¦XdÜê{ßøèé"qŒÙ–©Ã¯ÌØ>ugÿ«—9 :ϼB›j”1Ä ÞÔÊ×~ñ÷÷ ,w–íÝb˜šc `E¡fÀgð`-¬²â<Á’Q‚¾44Í/ ­ ý:¬;®{>ô\ø¡?„? qŒN¦‡‚׏)_ŸÇ½ÁOô†:Ál±ùl¾ Û „l–ÑZyбÚéAµÛ¥£}1+„æï)Å!¢3õH…Dž@šIp[K—´xŠh3⪣–cÑ9j8B2íw\ Ä)dÕVRk'·Œ_5Å[_°ž{iÉ„hù½îÒ¦á÷æÖ'c;^ºt‘‰rŽYøÉž_t>@ucKÌ^qùÙºú ¶<ÃLš‰½IG[~#ùÞÁh\xñ¡›ÅiW«ÙÃâŽrorsg8£Á^/ç£|JZ@ßy¹áêóxŸV mpÑ.ŸCÍÐ6³ÈÅЮYáóª N¿Êï>´"*»ýü¯@ Ÿ:ñ; I²‘æ"znQÉNÒ€‹*Ô(+‘Vß±è`])E¶¸±qÃô†ž¶lã‡xçõ(¾!~+Ä;sb'‹=|Öü‚kæúÝ\?÷4÷ 'ãru¤¥uú„Ü8ºq¤ÔwºŠ$¤IègÍw¼HŠƒ'ð(4 ÿ]„“ØDÿ& ´uQ„3“õ<0ó’ñkùÎ+3•{îhü©Ñaa“™’:šÇzJ¦®î-›òàƒÑiõ‚IÉàÕìÄUÛ×µÕV‡-öñu--s¯Ø·˜ ¿ï½vb"†«Ò©)—¯}Ö`Ѱ”ËG,éj#Q»%ĺ‰^µ[Ú,µˆy5Z­PÊE7ohw¨}¢™·´A¦›CÔˆ,¯ÐÆJ\ò%›:ç|ÎyV—³þE»óTß;P<áx 'H-äžúR!&’$ […A2Ë%^=êÀ"<Þ©Lå'f~÷;­¹4Rå*¤;®WÕKÏÈ:üå™Å—öt $³iûôʼ+³™Ú ì芟ՠ+’ÏXlõ;ðDíD•Óæt”’U8¬ÃQW2¾¤“]ÊÞÅ>Ì>ɲµ¾iý~R¢ã”_P Ý“‚Oðªs'˜Ü>¦¤ÂkˆP-bö'•ÑàßÔà,½ö^Š!º<|ô¢8÷ÒoÁ70|èj1 Ñ€-d§À!Õ¿À°A”#ftÀï…X•(ÁŽ9íõ}r»M=Nªc|ÆF B¿_Š*›Ã¿_8`§íPÜßî#¬æÍ>ø Ô»Ãy[¶0^b³À*)79<8„ ¸·sëHHÒaÌX !('Ååøªj½ì.n‹J[[«¢GáP挳ÜåöÅèÇÓ”™WÄU…+ð\GF·átšNÕŸ{ƒš'®®¬rËÀÅKl’‘™»`¬@ÿÄFlbœ*¿N0&‹Ãéw ¶¨£4 §²Š*e³U?ñPä•]É%Žu¥796Ån*½Óõ°âaç!ã!“Ï- 9Š˜J&ñD"©—¥»Í‰FœŽq€Ú3¶ÄUª˜‚÷(0(Aà4EbHñ„ÃérG4¥€PI{ U!O‚µWª“©q¥m¥*CŒ¢"jŠŽ[mØ`xÝ@Ú ÊŠ DJ²}õjÕ—u>ï„xQ½ó]¸hì}©¾lý»NÈãÐFÐ Z‰úâù>NÎ?©Û¹œ§TŽ­ç À©8C‚)ÌÁü…è]1jzÑÔt1fŠ?råNõFŸš+Iâ÷•¬ªW³–U”ck0n-<“zYùMºðj(@抶 «­° Oe—[Ü:&¦ŒN}˜/܆7©Œg•¥Ól°öÜ jåðvª0¯‚¥ÒüÙ@N¾óWó÷„¤ö)ù¹Læ“ñ¸¶…oóÏÔÌÔv…»"‹4‹´ý;vžpœpr&ƒßln3úxŸÁOËM<ïóû rZžÎ¤a:x¿!“ö¥SÕj3Ò´œ‡šøïH=Ÿ†ˆýZ²w4P†˜‘M±>3k0ñt&å—§5*QnZåq95j9ÎF‚`ɇêjêâuy°®Ø\îR»Bõêºú,‰“Ü›’ ?jÆC\•XRvÉÁYŒðÁÌâyȅα¥Løô™SàÙ….à?Çá»!°»~Ȧl‰^È}"?£:d=dûÈú‘íKë—6 Ãh+ Ìê+ñxµÞù°¯ ÒÜ“Þ3ê ¹$¡ÕéJ| ¸žT˜)[(J›=a‹œRN/ÓeXr9“¹Ð bA©ª°T¦ŽæÞ9"·ÙT1´JÒíNy¬ž·JËFR¹ç‰ø'LÌJdº…%QežÊJÏ ü‘â9\Kµ ìÍОô#÷wñpMz@9‡Wd`»] ß-ú¾žó5—ú–Þ ìæ¦™y[ž`­ì•ŠÅ›Ê9ÊSªûÔc4:ÍMZ…vƒ®Vô{ôOs7á&cȸËd4«ÌYT–‡,·!Û.»Ê>àã8ä¼Öù'×Õ®/ܯ•üÊ_È’°\_’Á·°: ã ¾G„ØOà»Y2é*†oìgUßµBÍcǶMžŸ¾teÏ“M«V,Bƒ¨._e€=?x«üV–‚dï­m^ó µä%mYf7;rP]n¿®ÛÒ{o ¤~ @3H]LðP RÀ௠¤®ÀR×RW»ý*`v¬Ìu ßíJ¸X‚ìÅ+EK›÷ývür;öŰ¯ßÚ‰o à[ST7Œƒ#ùoº‡Zåjÿ&_‘Z¼Lõ@ÍSÔ|8>.‹-o‘Ú¯¢Cý%p~ µžâ•Z{©%àenTS|­AZ|D:>*YѼF{böÉ5Ú=k´ÖhëÖh«ÖhUøUøÖŽ=Ò1$ª«µUkûªµB5iògøh”—ŽnéhÍÚSÚßvjïéÔvCÄ´SèÔ6Zñ0€µøÇÒñzé¸^:öJÇK¥cL:DCDûûˆvWDûóˆvAD[ÑþëásPZ¬u´Іh=´\Ú'ñóð;{Ý€)ãç1\õ¸~i&ß Ì±8]_ Ì)Òßæüu`NÈÛèÀ£9 Œ¼ø#4Ïø'´[FÊïâåð!/~/—Êo£Bù÷±_ÂíoÁ›Epr Ö•¯ Ä"^ˆù¼PÏ ÄàçgøÙvÐñoÚCžh'y0O ´§ür }€ÁöSž(‚ýÉPHþÈû+Ü’Ô£ðú sP{ÝÀ7€kæT¸z`N·1‰¯@»¥>^6:†Bù.¸i @2¶Õh›t}Ú&éx¹T^ \_†—K¸X ßk#÷-1¸p 6^3w –Ð9Ð^ c ýRo£ò\Ú¥‡MGíR§¡vé¦)ÉG¡Ù%ÉSÐÿI£ýŸ8|ÑÛ¨ÄP ô¶CyŸà.h]>:+©ÑÙHŽŽ ='Í¢"%ÃÀû BIÏ…â<øbÛá)<ü€o PRœ{óÖv2Áî¯0‡’ÒýjÑ ïÿvŽ×ûÍœ€÷ëݧ¼_Á~ú0!‚ï?bäë6ïßc§¼¥½C±rïç1•÷£¤à}kÛ/IOÐëÐÂgñ¾3x_k7z_ žòzûÝœ]Þ§c ¼O<.ʰ¨÷îe¼µk¼¶¯ð>ÜNêL޻ុڷ{o‡û~[áÝ,Ö_/:½?"¹ž³6éö®Nâ»yW%+½+Sp:à]Žïà!ï²àvoopPÝ]¸m¢Ú;úÒÕžðÎh'ec^šŠ>õC`IÀØÖ¶0¶Õ€k­ÔÿHIgšœŒ”tNè’Ï]¦ª¨LKóaðÌèì8Œ×RU-—’z¼¶¹šM”š¡ÝT%4Cs€f´í&ÍÐnÚ/5ÛLšíÛ¶»¥yßn8@f'Ú&5ÙÆì”š> endobj 124 0 obj [ 722 722 944 667 556 722 778 611 389 833 500 556 250 556 278 722 722 722 667 778 778 444 500 500 556 556 389 333 333 500 556 250 333 444 500 556 778 444 500 278 611 500 500 722 556 556 667 278 333 500 1000 722 722 667 722 ] endobj 125 0 obj << /Length 126 0 R /Filter /FlateDecode >> stream x]”Ín›@…÷<Å,ÓEä18‘R”(’i«º}~ ©„ñÂoßï\§i•ÅA:ܹ?ß Ãæyÿ²‡Õm¾/S{ˆ«ë‡±[âyº,mtM<c²M]7´ë»³wí©ž“ ɇëy§ýØO®,ç6?H9¯ËÕÝ=uS¿èÝ·¥‹Ë0Ýݯ烽9\æùw<Åqu>©*×Åžroõüµ>E·±Ôû}G|X¯÷dý[ñó:GÇDdlo#µSÏsÝÆ¥1)½¯Ê××*‰c÷)”û[FÓ¿/M·U)yŸÅ*)Ó‹°[Ù€EØN6Ã"l.›c‘÷y-°û(»Ã>Øâ^ö‹ÈµhEÞV¹Á"¬õm±ÈûÙ‹¼OmȈED½*÷XDn‹ ÀK4Êd“°2'1d* œ„µÅÀÌÕ7'‘ÛÈ'ÑHø@‰1D`•ˆŠ7À*a5s€UÂZ#Xƒñîl*Xƒñ…Ã*QÙÃŒ—ɉÂ*QJ6ƒUbs´œ›É{Úaa•X¬F쉨Ù!DÄ©šà}…U"j`ÍŒ·Ø) «Deásª&r…Á*‘kVöPÖ*ÚÝÎ×JÁʦR…•¯QVÛžÁ*QYç›Ã*Á«}æ LX}Hœª‰µ(¼œ,‹sqþ~øáÓ=ÈA—X¨yy˜è)t’MDÙ§ÿÊè†éOðqsÛ˲piíwa÷Y÷tãÇežf0ýÝØ"ˆ endstream endobj 126 0 obj 550 endobj 10 0 obj << /Type /Font /Subtype /TrueType /BaseFont /DCCGNS+Times-Bold /FontDescriptor 123 0 R /Widths 124 0 R /FirstChar 33 /LastChar 87 /ToUnicode 125 0 R >> endobj 127 0 obj << /Length 128 0 R /Length1 5800 /Filter /FlateDecode >> stream x½XtTÕ™ÿî}ïÍ›@^2áOá½qIó‡E!&ÉL ÁšA„ !("'òG²©À r¦-BWEWÛuˆ¼Œ,}9ˆ²Š«ÕƪuÙOEzšv=hÔíªµ…äíï½ zº{¶§ó¸÷»ßÿï~ß½7÷BŒˆFS 4£©5¼™œ4”çÑÜMm[µwÛ?Âø]"É¿nóúÖ•m"r¸‰äóë7m_×—÷ÀJ"å3È<ÚÒ^ûÙÜÃYDIûÏiAéwu?|jKëÖm£ªé1àwnº³)L‹ipKßÑÞ¶ÙJ˜ü+àÚáÖæã‡¾B” ”±yKóæ+ÿ“³¸þׯðY¿Dr y,Š´ÑÐ$©žÆ ­4‰È| >ÍÿZaI³)oè¨ùka24þi¸àç¡£t^¢m´ ãûÈ ,ʦJdçiª¥õ3Í NÐ^È}Inª¢ÛÙEø8F-ô&ä2(@‡)ôµÔýiTÙ¥_Ñ\º•¶Sý”ÎÃv.-¥z:Ç»Íwh&ýÞb?3 KÓ‘‘VºŸ˜Ç)Ša©ƒö0/»Û Ûðµ"®ïÑ“ô®ùæ%Ó(;Æ"H.§–À¦0ëDF’È…xfPž–Cã$sò*s ´ÆÒlòQ- Ľ“öÓÈìez­â[…nÓož1Ž|L…þ4D1ªéÚB[áá0¢^ú#[Γ̩æf¯ùªù)d9I”N*tŠ©vo£õtv Ìø—ô¾~úKdóY ²NöCö*ûyÂ^!&º$ÕüŠ™Èx6¢ž‹•XO+i5…áùAú1u#ÆKô%s³©l6ó³'x:ÿ_Çïäçø§¢ v‰ýæ%;ŽJÈÈä͈¼„á«GÞî¡"ŠÒP»Cˆìi:Ko 2Ðý‘®0‰ÉÌɲX>¬/D|¿dxOå^^Î?r„áNñm±_ ú½Ù`†Ì»ÌÓ˜ýø²fnåéVZ…ˆ×bîm¨v;jg}»ñí£Çé)z+ì½Ï¯Á÷›ô½ÿÑLja€>§¯è "ŠDæÂ7žMÆ—ÁòµT5È–°6ÖÎ:Ønv?;€°“ì4{™¬â ü6¾‹ïãÏó·ù/ø¯ø‡ücþ!AH<ÈñOÅ*q…x\J’VK;¥é„cÎàçCs‡¾3´j¨m¨Ï”Í$3Ûl3w™™ªjíIŽó ™&ÉAUa¿.ÆzZ‚ꮡ&ZG·£6ÛÍÃÈç#˜á3tuú ÖÒë˜ÝÛ¨úûô;Ììt™iÛSDž'b=g³Y˜QfTÇêY[ÉV±Õlkaw±l'æØ…ïûfù;ÁzØËìûœ}ɉK<‘§pç¢2U¼_ë •ïä{ù÷ùCüaþ8Šÿ ×ùIþ²ñ F IB†0_@X$,ÂÂ]ÂáGÂSÂ1ágÂ[€pEÅÙâ<ñq§xP|I|ßgRŠ”/HõÒZévé)"=$uK1é}é²cŽC—½òRù>yŸ|XîÆÙöïôØi×ÿÎÐøëѯ?BÏò> ‹ô2°›`ïÌdÏRP\AçpúLæâ‡ØëXY5ÔÄNP*Î:.ÕP:š[8Œ}MæoÐÐ. •ãoèŒy^˜¿ÍóRjÁŽƒÑGŠ l1ÎÕÂl¬ßµ8YfØ»/Û7kæŒüéy¹9ÙßÊÊœ–1Õ{“GS§¤ON›4Ñ=!uü¸±cR\ÉIJâèQ NÙ!‰g”ðV6jú´F]œæ]° ϽaÂ×u ¤ÊetÍÒ ƒuƒ¤’ëþLÒ—ôH2—VDEy¹ZÀ«é}~¯f°K0~Ðï iú€=®µÇâ4Q€x<ÐÐ³F- W¶µDþ¼\Ö[ÜýÉG£òr©7%µ¸{´eY§Šð®7€%Ð'yý}¢cð„Œ@x­\Òð§y<¡¼\U4y×èä-דs†Õm˺\¡;*`ZÛ cÔ¥õäžì7\´¦1'q­wmxeƒ.„a" §äè¼~}ÂŽ~÷5ôê(°˜ù[0užQnŽTê¾Æ.$ÝB-,¼XÍ2 6yg¨Ag0¬YáZ¡Ç'Ñì X”Æšžà-÷¶D66"ç“":-Ýî‰Mšäë5ñÇ- Eê¼½4Í û'÷Œ£ÈÒíÏMôioääåöºÛç{²Þ¼²¼2 Î÷¸Ûãð¿vÇé »ýÜEÀš¥#YcV Þ…˜…®5i Á‹©X]sEš \üB IØ 'T4F\…¨–.e¸¼Zä B½ßH S®/ÈbZÅY0: _ë99zv6jŽú4£L­Ä&Üœ—Û¦§y7»4= ©¢ òæ#ïU².ÃGk€èKâ¸FkÒbäËÏ é¼Ñ✽Ê_oq:®rFÔ½X'í«ÌxÝ9mä_²+ul ¥Pg©_Ãn¶ùÍÊ­1(!ØÐÃØÁÌNƒüé½”@ÂêUy}ÛZîü˜?Ù¹ d{0º9W«DÞ+‘íÑ" ×F´J­ Z̰!Í‘P>¦¾¬aúºî ¥ ›C¡BØ™cÙ Ä#!XØ8lÐ&åBhnn Š<-ذ¤Aïð§é>EÅ:‹´žÅî … U0)"ÞµÁ=ó<Ä\ ~aÜÊ2Ø€‰P$bÙ\f­Ï³‘HZÄÚôqÜ`ôçß0Á KÄÚ ëBÀëI³^׃°B~¸šýsuTôõ.‰š%ˆ¶ØÎpéß(þo’á²o”áò‘HoÈpb.·2ìÿûe8pC†+¿>ÃU#q#Ȉ¶ÊÎð¿Q†«¿I†k¾Q†DzC†kó"+Ëÿ~¾åº ãÀ­»Ã‹÷‘uC.÷%ˆr€$G€3ƒgûÆ rÈF\Hb(a¨—m"wŽëó¢Á¢Åèk‹¨´È5ÝÌÞOJ&ÚXÇãr¡Tð§× áµ+p…­‡OòbøJõ&À/ ‹‹Ÿ°Ì PþàÌc=ã==¢pyo~ËQãˉ—W'}ÁRœ–z…?µý*‰žp²Åß~–¥~?³Om·\Âú.ؑէÞQaûnƒõYÐw]V¿ºFý®º4ÓÖ¿÷w¸¨Îö½°°O­Ê²}W"vJ h}j¹¥S}Øbª4ŽÍ›Ǿ­ÚÖfvÙÖòã3ÉÃs-tsf†/YªnQ=ëÕz5AMˆžf»q(FY»ož}\ŽvÈÑ»åèírt£].GÈÑ9:]ŽÞ$G§Èãœcœ.g’3Ñ9Êét:œ¢“c_Œ3Ì‹¾lë|çpYÀ!Z½h]Ü£COÿCÕen!'߇¶í~´ûÐ:ÐÚÑîEÛ¶ ­ -b^|ÎÒîå~ïIÛh/¿—ï&îà{†G{ø¶áÑ6Þf°‰Ÿ³|ƪqrከ³uÇ>\iuv MÇú@ÈšÚVê.S’2¯ÒÿºF›ØèϹösÿÕ ×t1b5Áí/b™~‚Ô«ìE»ï9%«oÊêqÙ–¬Y¨-µ¢ Ñ7åè°€;]?„›š~4=¤Ï²fz¨FŸn½}zy)/ø{y‰B ½t—–ZtºàAl…-†S»bThˆ±£¤Zbé¨-ÖÓx‰%´Äø=¤Ùb¿Çë·Äz¶ü=…è "ž¡-¶ÈñÌu"]7ŠtÙ"]Ã"i¶•ÌLX©@jè¹)=™7Ù¦^c×ÅÙÓãìé6{î5vVœ]gW}CîÿŸHsù_c °aYy*•–â¯Ë—u^Ȳ÷ÿ²q÷ð.ˆþpµa endstream endobj 128 0 obj 3586 endobj 129 0 obj << /Type /FontDescriptor /Ascent 750 /CapHeight 667 /Descent -250 /Flags 68 /FontBBox [-296 -413 1661 1205] /FontName /DIDUMH+Times-Italic /ItalicAngle 23.27307 /StemV 0 /MaxWidth 1610 /XHeight 500 /FontFile2 127 0 R >> endobj 130 0 obj [ 675 ] endobj 131 0 obj << /Length 132 0 R /Filter /FlateDecode >> stream x]ÁjÃ0DïúŠ=¦‡ §gc()’–:ýEA¼kù࿯¤”zÐA³z3³ÒÇþ½gŸHJ°ž` «XÐ “gux%çmú½UÍÎ&*áa[æžÇ@m«ˆôWF–$íÞ\¸á¥hâ ž'Ú}‡ª kŒwÌàDê:r³ÝÙÄ‹™Aº¢ûÞå¹OÛ>S/®[åF™8<*Ùà°Dc!†'¨¶iºötêØý¥4&ÙU$‡Ôõj~ñõŒçÄ‹O=?ÿºcÇ endstream endobj 132 0 obj 207 endobj 53 0 obj << /Type /Font /Subtype /TrueType /BaseFont /DIDUMH+Times-Italic /FontDescriptor 129 0 R /Widths 130 0 R /FirstChar 33 /LastChar 33 /ToUnicode 131 0 R >> endobj 1 0 obj << /Producer (Mac OS X 10.5.4 Quartz PDFContext) /CreationDate (D:20080926144721Z00'00') /ModDate (D:20080926144721Z00'00') >> endobj xref 0 133 0000000000 65535 f 0000145788 00000 n 0000004110 00000 n 0000047539 00000 n 0000000022 00000 n 0000004090 00000 n 0000004214 00000 n 0000000000 00000 n 0000080648 00000 n 0000000000 00000 n 0000141182 00000 n 0000000000 00000 n 0000089456 00000 n 0000000000 00000 n 0000111492 00000 n 0000000000 00000 n 0000094060 00000 n 0000000000 00000 n 0000116100 00000 n 0000000000 00000 n 0000118708 00000 n 0000000000 00000 n 0000123500 00000 n 0000004415 00000 n 0000004469 00000 n 0000009096 00000 n 0000004515 00000 n 0000009075 00000 n 0000009203 00000 n 0000014291 00000 n 0000009392 00000 n 0000014270 00000 n 0000014398 00000 n 0000018883 00000 n 0000014561 00000 n 0000018862 00000 n 0000018990 00000 n 0000058112 00000 n 0000023703 00000 n 0000019179 00000 n 0000023682 00000 n 0000023810 00000 n 0000028662 00000 n 0000023999 00000 n 0000028641 00000 n 0000028769 00000 n 0000000000 00000 n 0000085517 00000 n 0000032696 00000 n 0000028959 00000 n 0000032675 00000 n 0000032803 00000 n 0000000000 00000 n 0000145618 00000 n 0000037828 00000 n 0000032980 00000 n 0000037807 00000 n 0000037935 00000 n 0000043511 00000 n 0000047662 00000 n 0000038138 00000 n 0000043490 00000 n 0000043619 00000 n 0000047229 00000 n 0000043822 00000 n 0000047208 00000 n 0000047337 00000 n 0000047745 00000 n 0000047837 00000 n 0000047888 00000 n 0000057399 00000 n 0000057420 00000 n 0000057652 00000 n 0000058285 00000 n 0000079287 00000 n 0000079309 00000 n 0000079535 00000 n 0000079879 00000 n 0000080628 00000 n 0000080814 00000 n 0000084929 00000 n 0000084950 00000 n 0000085175 00000 n 0000085199 00000 n 0000085497 00000 n 0000085682 00000 n 0000088882 00000 n 0000088903 00000 n 0000089129 00000 n 0000089153 00000 n 0000089436 00000 n 0000089622 00000 n 0000093465 00000 n 0000093486 00000 n 0000093712 00000 n 0000093740 00000 n 0000094040 00000 n 0000094226 00000 n 0000110442 00000 n 0000110464 00000 n 0000110694 00000 n 0000110903 00000 n 0000111471 00000 n 0000111661 00000 n 0000115520 00000 n 0000115542 00000 n 0000115769 00000 n 0000115794 00000 n 0000116079 00000 n 0000116268 00000 n 0000118133 00000 n 0000118155 00000 n 0000118377 00000 n 0000118402 00000 n 0000118687 00000 n 0000118872 00000 n 0000122900 00000 n 0000122922 00000 n 0000123154 00000 n 0000123179 00000 n 0000123479 00000 n 0000123670 00000 n 0000140041 00000 n 0000140064 00000 n 0000140291 00000 n 0000140533 00000 n 0000141161 00000 n 0000141350 00000 n 0000145028 00000 n 0000145050 00000 n 0000145287 00000 n 0000145312 00000 n 0000145597 00000 n trailer << /Size 133 /Root 68 0 R /Info 1 0 R /ID [ <2ed02d3b70bbd088b4d97310aef9f363> <2ed02d3b70bbd088b4d97310aef9f363> ] >> startxref 145930 %%EOF maq-0.7.1/maq.pod0000644000076600000240000007463511065656462012163 0ustar lh3staff=head1 NAME Maq - Mapping and Assembly with Qualities =head1 SYNOPSIS B I [I] I B I [I] I =head1 DESCRIPTION Maq is a software that builds mapping assemblies from short reads generated by the next-generation sequencing machines. It is particularly designed for Illumina-Solexa 1G Genetic Analyzer, and has a preliminary functionality to handle AB SOLiD data. With Maq you can: =over 2 =item Fast align Illumina/SOLiD reads to the reference genome. With the default options, one million pairs of reads can be mapped to the human genome in about 10 CPU hours with less than 1G memory. =item Accurately measure the error probability of the alignment of each individual read. =item Call the consensus genotypes, including homozygous and heterozygous polymorphisms, with a Phred probabilistic quality assigned to each base. =item Find short indels with paired end reads. =item Accurately find large scale genomic deletions and translocations with paired end reads. =item Discover potential CNVs by checking read depth. =item Evaluate the accuracy of raw base qualities from sequencers and help to check the systematic errors. =back However, Maq can B: =over 2 =item Do I assembly. (Maq can only call the consensus by mapping reads to a known reference.) =item Map shorts reads against themselves. (Maq can only find complete overlap between reads.) =item Align capillary reads or 454 reads to the reference. (Maq cannot align reads longer than 63bp.) =back =head1 MAQ COMMANDS =head2 Key Commands =over 11 =item B B B F F Convert sequences in FASTA format to Maq's BFA (binary FASTA) format. =item B B B [B<-n> I] F F|F Convert reads in FASTQ format to Maq's BFQ (binary FASTQ) format. B =over 9 =item B<-n> I number of reads per file [not specified] =back =item B B B [B<-n> I] [B<-a> I] [B<-c>] [B<-1> I] [B<-2> I] [B<-d> F] [B<-m> I] [B<-u> F] [-e I] [B<-M> c|g] [B<-N>] [B<-H> F] [B<-C> I] F F F [F] 2> F Map reads to the reference sequences. B =over 9 =item B<-n> I Number of maximum mismatches that can always be found [2] =item B<-a> I Maximum outer distance for a correct read pair [250] =item B<-A> I Maximum outer distance of two RF paied read (0 for disable) [0] =item B<-c> Map reads in the colour space (for SOLiD only) =item B<-1> I Read length for the first read, 0 for auto [0] =item B<-2> I Read length for the second read, 0 for auto [0] =item B<-m> I Mutation rate between the reference sequences and the reads [0.001] =item B<-d> F Specify a file containing a single line of the 3'-adapter sequence [null] =item B<-u> F Dump unmapped reads and reads containing more than I mismatches to a separate file [null] =item B<-e> I Threshold on the sum of mismatching base qualities [70] =item B<-H> F Dump multiple/all 01-mismatch hits to I [null] =item B<-C> I Maximum number of hits to output. Unlimited if larger than 512. [250] =item B<-M> c|g methylation alignment mode. All C (or G) on the forward strand will be changed to T (or A). This option is for testing only. =item B<-N> store the mismatch position in the output file F. When this option is in use, the maximum allowed read length is 55bp. =back B =over 2 =item Paired end reads should be prepared in two files, one for each end, with reads are sorted in the same order. This means the k-th read in the first file is mated with the k-th read in the second file. The corresponding read names must be identical up to the tailing `/1' or `/2'. For example, such a pair of read names are allowed: `EAS1_1_5_100_200/1' and `EAS1_1_5_100_200/2'. The tailing `/[12]' is usually generated by the GAPipeline to distinguish the two ends in a pair. =item The output is a compressed binary file. It is affected by the endianness. =item The best way to run this command is to provide about 1 to 3 million reads as input. More reads consume more memory. =item Option B<-n> controls the sensitivity of the alignment. By default, a hit with up to 2 mismatches can be always found. Higher B<-n> finds more hits and also improves the accuracy of mapping qualities. However, this is done at the cost of speed. =item Alignments with many high-quality mismatches should be discarded as false alignments or possible contaminations. This behaviour is controlled by option B<-e>. The B<-e> threshold is only calculated approximately because base qualities are divided by 10 at a certain stage of the alignment. The B<-Q> option in the B command precisely set the threshold. =item A pair of reads are said to be correctly paired if and only if the orientation is I and the outer distance of the pair is no larger than I. There is no limit on the minimum insert size. This setting is determined by the paired end alignment algorithm used in Maq. Requiring a minimum insert size will lead to some wrong alignments with highly overestimated mapping qualities. =item Currently, read pairs from Illumina/Solexa long-insert library have RF read orientation. The maximum insert size is set by option B<-A>. However, long-insert library is also mixed with a small fraction of short-insert read pairs. B<-a> should also be set correctly. =item Sometimes 5'-end or even the entire 3'-adapter sequence may be sequenced. Providing B<-d> renders Maq to eliminate the adapter contaminations. =item Given 2 million reads as input, B usually takes 800MB memory. =back =item B B B F F F [...] Merge a batch of read alignments together. B =over 2 =item In theory, this command can merge unlimited number of alignments. However, as mapmerge will be reading all the inputs at the same time, it may hit the limit of the maximum number of opening files set by the OS. At present, this has to be manually solved by endusers. =item Command B can be used to merge alignment files with different read lengths. All the subsequent analyses do not assume fixed length any more. =back =item B B B F F Remove pairs with identical outer coordinates. In principle, pairs with identical outer coordinates should happen rarely. However, due to the amplification in sample preparation, this occurs much more frequently than by chance. Practical analyses show that removing duplicates helps to improve the overall accuracy of SNP calling. =item B B B [B<-sp>] [B<-m> I] [B<-Q> I] [B<-r> I] [B<-t> I] [B<-q> I] [B<-N> I] F F F 2> F Call the consensus sequences from read mapping. B =over 9 =item B<-t> I Error dependency coefficient [0.93] =item B<-r> I Fraction of heterozygotes among all sites [0.001] =item B<-s> Take single end mapping quality as the final mapping quality; otherwise paired end mapping quality will be used =item B<-p> Discard paired end reads that are not mapped in correct pairs =item B<-m> I Maximum number of mismatches allowed for a read to be used in consensus calling [7] =item B<-Q> I Maximum allowed sum of quality values of mismatched bases [60] =item B<-q> I Minimum mapping quality allowed for a read to be used in consensus calling [0] =item B<-N> I Number of haplotypes in the pool (>=2) [2] =back B =over 2 =item Option B<-Q> sets a limit on the maximum sum of mismatching base qualities. Reads containing many high-quality mismatches should be discarded. =item Option B<-N> sets the number of haplotypes in a pool. It is designed for resequencing of samples by pooling multiple strains/individuals together. For diploid genome resequencing, this option equals 2. =back =item B B B [B<-sp>] [B<-m> I] [B<-Q> I] [B<-r> I] [B<-t> I] [B<-q> I] [B<-N> I] F F F 2> F Calculate log-likelihood for all genotypes and store the results in GLF format (Genotyping Likelihood Format). Please check MAQ website for detailed descriptions of the file format and the related utilities. =item B B B F F > F Call consistent indels from paired end reads. The output is TAB delimited with each line consisting of chromosome, start position, type of the indel, number of reads across the indel, size of the indel and inserted/deleted nucleotides (separated by colon), number of indels on the reverse strand, number of indels on the forward strand, 5' sequence ahead of the indel, 3' sequence following the indel, number of reads aligned without indels and three additional columns for filters. At the 3rd column, type of the indel, a star indicates the indel is confirmed by reads from both strands, a plus means the indel is hit by at least two reads but from the same strand, a minus shows the indel is only found on one read, and a dot means the indel is too close to another indel and is filtered out. Users are recommended to run through `maq.pl indelpe' to correct the number of reads mapped without indels. For more details, see the `maq.pl indelpe' section. =item B B B F F > F Call potential homozygous indels and break points by detecting the abnormal alignment pattern around indels and break points. The output is also TAB delimited with each line consisting of chromosome, approximate coordinate, length of the abnormal region, number of reads mapped across the position, number of reads on the left-hand side of the position and number of reads on the right-hand side. The last column can be ignored. The output contains many false positives. A recommended filter could be: awk '$5+$6-$4 >= 3 && $4 <= 1' in.indelsoa Note that this command does not aim to be an accurate indel detector, but mainly helps to avoid some false positives in substitution calling. In addition, it only works well given deep depth (~40X for example); otherwise the false negative rate would be very high. =back =head2 Format Converting =over 11 =item B B B F F Convert Solexa FASTQ to standard/Sanger FASTQ format. =item B B B F F Convert Maq's BFQ format to standard FASTQ format. =item B B B F F Convert obsolete mapass2's map format to Maq's map format. The old format does not contain read names. =back =head2 Information Extracting =over 11 =item B B B [B<-bN>] F > F Display the read alignment in plain text. For reads aligned before the Smith-Waterman alignment, each line consists of read name, chromosome, position, strand, insert size from the outer coorniates of a pair, paired flag, mapping quality, single-end mapping quality, alternative mapping quality, number of mismatches of the best hit, sum of qualities of mismatched bases of the best hit, number of 0-mismatch hits of the first 24bp, number of 1-mismatch hits of the first 24bp on the reference, length of the read, read sequence and its quality. Alternative mapping quality always equals to mapping quality if the reads are not paired. If reads are paired, it equals to the smaller mapping quality of the two ends. This alternative mapping quality is actually the mapping quality of an abnormal pair. The fifth column, paired flag, is a bitwise flag. Its lower 4 bits give the orientation: 1 stands for FF, 2 for FR, 4 for RF, and 8 for RR, where FR means that the read with smaller coordinate is on the forward strand, and its mate is on the reverse strand. Only FR is allowed for a correct pair. The higher bits of this flag give further information. If the pair meets the paired end requirement, 16 will be set. If the two reads are mapped to different chromosomes, 32 will be set. If one of the two reads cannot be mapped at all, 64 will be set. The flag for a correct pair always equals to 18. For reads aligned by the Smith-Waterman alignment afterwards, the flag is always 130. A line consists of read name, chromosome, position, strand, insert size, flag (always 130), position of the indel on the read (0 if no indel), length of the indels (positive for insertions and negative for deletions), mapping quality of its mate, number of mismatches of the best hit, sum of qualities of mismatched bases of the best hit, two zeros, length of the read, read sequence and its quality. The mate of a 130-flagged read always gets a flag 18. Flag 192 indicates that the read is not mapped but its mate is mapped. For such a read pair, one read has flag 64 and the other has 192. B =over 9 =item B<-b> do not display the read sequence and the quality =item B<-N> display the positions where mismatches occur. This flag only works with a .map file generated by `maq map -N'. =back =item B B B [B<-s>] [B<-m> I] [B<-q> I] F F > F Read quality check. The mapcheck first reports the composition and the depth of the reference. After that there is a form. The first column indicates the position on a read. Following four columns which show the nucleotide composition, substitution rates between the reference and reads will be given. These rates and the numbers in the following columns are scaled to 999 and rounded to nearest integer. The next group of columns show the distribution of base qualities along the reads at a quality interval of 10. A decay in quality can usually be observed, which means bases at the end of read are less accurate. The last group of columns present the fraction of substitutions for read bases at a quality interval. This measures the accuracy of base quality estimation. Idealy, we expect to see 1 in the 3? column, 10 in the 2? column and 100 in the 1? column. B =over 9 =item B<-s> Take single end mapping quality as the final mapping quality =item B<-m> I Maximum number of mismatahces allowed for a read to be counted [4] =item B<-q> I Minimum mapping quality allowed for a read to be counted [30] =back =item B B B [B<-spvP>] [B<-m> I] [B<-Q> I] [B<-q> I] [B<-l> F] F F > F Display the alignment in a `pileup' text format. Each line consists of chromosome, position, reference base, depth and the bases on reads that cover this position. If B<-v> is added on the command line, base qualities and mapping qualities will be presented in the sixth and seventh columns in order. The fifth column always starts with `@'. In this column, read bases identical to the reference are showed in comma `,' or dot `.', and read bases different from the reference in letters. A comma or a upper case indicates that the base comes from a read aligned on the forward strand, while a dot or a lower case on the reverse strand. This command is for users who want to develop their own SNP callers. B =over 9 =item B<-s> Take single end mapping quality as the final mapping quality =item B<-p> Discard paired end reads that are not mapped as correct pairs =item B<-v> Output verbose information including base qualities and mapping qualities =item B<-m> I Maximum number of mismatches allowed for a read to be used [7] =item B<-Q> I Maximum allowed number of quality values of mismatches [60] =item B<-q> I Minimum mapping quality allowed for a read to be used [0] =item B<-l> F File containing the sites at which pileup will be printed out. In this file the first column gives the names of the reference and the second the coordinates. Additional columns will be ignored. [null] =item B<-P> also output the base position on the read =back =item B B B [B<-Q> I] [B<-n> I] [B<-d> I] [B<-D> I] F > F Extract the consensus sequences in FASTQ format. In the sequence lines, bases in lower case are essentially repeats or do not have sufficient coverage; bases in upper case indicate regions where SNPs can be reliably called. In the quality lines, ASCII of a character minus 33 gives the PHRED quality. B =over 9 =item B<-Q> I Minimum mapping quality [40] =item B<-d> I Minimum read depth [3] =item B<-n> I Minimum neighbouring quality [20] =item B<-D> I Maximum read dpeth. >=255 for unlimited. [255] =back =item B B B F > F Extract SNP sites. Each line consists of chromosome, position, reference base, consensus base, Phred-like consensus quality, read depth, the average number of hits of reads covering this position, the highest mapping quality of the reads covering the position, the minimum consensus quality in the 3bp flanking regions at each side of the site (6bp in total), the second best call, log likelihood ratio of the second best and the third best call, and the third best call. The 5th column is the key criterion when you judge the reliability of a SNP. However, as this quality is only calculated assuming site independency, you should also consider other columns to get more accurate SNP calls. Script command `B B' is designed for this (see below). The 7th column implies whether the site falls in a repetitive region. If no read covering the site can be mapped with high mapping quality, the flanking region is possibly repetitive or in the lack of good reads. A SNP at such site is usually not reliable. The 8th column roughly gives the copy number of the flanking region in the reference genome. In most cases, this number approaches 1.00, which means the region is about unique. Sometimes you may see non-zero read depth but 0.00 at the 7th column. This indicates that all the reads covering the position have at least two mismatches. Maq only counts the number of 0- and 1-mismatch hits to the reference. This is due to a complex technical issue. The 9th column gives the neighbouring quality. Filtering on this column is also required to get reliable SNPs. This idea is inspired by NQS, although NQS is initially designed for a single read instead of a consensus. =item B B B F > F Show detailed information at all sites. The output format is identical to B report. =item B B B F > F Extract the reference sequence. =item B B B [B<-w> I] [B<-c> I] [B<-b> I] [B<-e> I] [B<-q> I] F > F Extract information averaged in a tilling window. The output is TAB delimited, which consists of reference name, coordinate divided by 1,000,000, SNP rate, het rate, raw read depth, read depth in approximately unique regions, the average number of hits of reads in the window and percent GC. B =over 9 =item B<-w> I Size of a window [1000] =item B<-c> I Destinated reference sequence; otherwise all references will be used [null] =item B<-b> I Start position, 0 for no constraint [0] =item B<-e> I End position, 0 for no constraint [0] =item B<-q> I Minimum consensus quality of the sites to be used [0] =back =back =head2 Simulation Related =over 11 =item B B B [B<-r> I] [B<-R> I] F > F 2> F Randomly introduce substitutions and indels to the reference. Substitutions and sinlge base-pair indels can be added. B =over 10 =item B<-r> I Mutation rate [0.001] =item B<-R> I Fraction of mutations to be indels [0.1] =back =item B B B F F Estimate/train parameters for read simulation. =item B B B [B<-d> I] [B<-s> I] [B<-N> I] [B<-1> I] [B<-2> I] [B<-r> I] [B<-R> I] [B<-h>] F F F F Simulate paired end reads. File I determines the read lengths and quality distribution. It is generated from B, or can be downloaded from Maq website. In the output read files, a read name consists of the reference sequence name and the outer coordinates of the pair of simulated reads. By default, B assumes reads come from a diploid sequence which is generated by adding two different sets of mutations, including one base-pair indels, to F. B =over 9 =item B<-d> I mean of the outer distance of insert sizes [170] =item B<-s> I standard deviation of insert sizes [20] =item B<-N> I number of pairs of reads to be generated [1000000] =item B<-1> I length of the first read [set by F] =item B<-2> I length of the second read [set by F] =item B<-r> I mutation rate [0.001] =item B<-R> I fraction of 1bp indels [0.1] =item B<-h> add all mutations to F and generate reads from the single mutated sequence (haploid mode) =back B =over 2 =item Reads generated from this command are independent, which deviates from the truth. Whereas alignment evaluation is less affected by this, evaluation on SNP calling should be performed with caution. Error dependency may be one of the major causes of wrong SNP calls. =back =item B B B F > F Evaluate mapping qualities from simulated reads. =back =head2 SOLiD Related =over 11 =item B B B F > F Convert nucleotide FASTA to colour-coded FASTA. Flag B<-c> should be then applied to B command. In the output, letter `A' stands for color 0, `C' for 1, `G' for 2 and `T' for 3. Each sequence in the output is 1bp shorter than the input. =item B B B F F F Convert color alignment to nucleotide alignment. The input F is the nucleotide binary FASTA reference file. It must correspond to the original file from which the color reference is converted. Nucleotide consensus can be called from the resultant alignment. =back =head2 Miscellaneous/Advanced Commands =over 11 =item B B B [B<-q> I] [B<-Q> I] [B<-m> I] [B<-p>] F F Filter bad alignments in F. Command-line options are described in the `B' command. =item B B B [B<-q> I] F F F Convert eland alignment to maq's .map format. File F consists of the sequence names that appear at the seventh column of the eland alignment file F and the name you expect to see in maq alignment. The following is an example: cX.fa chrX c1.fa chr1 c2.fa chr2 If you are aligning reads in several batches using eland, it is important to use the same F for the conversion. In addition, maq will load all the alignments and sort them in the memory. If you have concatenate several eland outputs into one huge file, you should separate it into smaller files to prevent maq from eating all your machine memory. This command actually aims to show Eland alignment in Maqview. As no quality information is available, the resultant maq alignment file should not be used to call consensus genotypes. =item B B B [B<-1> I] [B<-2> I] [B<-a> I] [B<-n>] F F F Convert Illumina's Export format to Maq's F<.map> format. Export format is a new alignment format since SolexaPipeline-0.3.0 which also calculates mapping qualities like maq. The resultant file can be used to call consensus genotypes as most of necessary information is available for maq to do this accurately. B =over 9 =item B<-1> I Length of the first read [0] =item B<-2> I Length of the second read [0] =item B<-a> I Maximum outer distance for a correct read pair [250] =item B<-n> Retain filtered reads =back =back =head1 MAQ-PERL COMMANDS =over 11 =item B B B [B<-h>] [B<-s>] [B<-N> I] [B<-d> I] F F Demonstrate the use of B and its companion scripts. This command will simulate reads from a FASTA file F. The sequence length and qualities are determined by F which is generated from B or can be downloaded from Maq website. The simulated reads will then be mapped with B. The alignment accuracy is evaluated by B, the consensus accuracy by B, and the SNP accuracy by B. By default, paired end reads will be simulated and a diploid sequence will be generated from the input by adding mutations to either haploid type. The insert size and mutation rate are controlled by B. B =over 9 =item B<-h> simulate a haploid sequence instead of a diploid sequence =item B<-s> use single-end mode to align reads instead of paired-end mode =item B<-N> I number of pairs of reads to be simulated [1000000] =item B<-d> I output directory [maqdemo] =back B =over 2 =item The output files from B have not been documented, but you may make a good guess at some of these files. =item This command just demonstrates the use of the maq suite. The accuracy on real data is almost always lower than what you see from pure simulation. =back =item B B B [B<-1> I] [B<-d> I] [B<-n> I] [B<-A> F<3adapter>] [B<-e> I] [B<-q> I] [B<-p>] [B<-2> I] [B<-a> I] [B<-S>] [B<-N>] F F [F] Analyses pipeline for small genomes. Easyrun command will run most of analyses implemented in B. By default, B assumes all the input read sequences files are single-end and independent; when B<-p> is specified, two read sequence files are required, one for each end. Several files will be generated in I, among which the following files are the key output: =over 16 =item F final SNP calls with low quality ones filtered out =item F consensus sequences and qualities in the FASTQ format =back B =over 9 =item B<-d> I output directory [easyrun] =item B<-n> I number of reads/pairs in one batch of alignment [2000000] =item B<-S> apply split-read analysis of short indels (maybe very slow) =item B<-N> I number of haplotypes/strains in the pool (>=2) [2] =item B<-A> F file for 3'-adapter. The file should contain a single line of sequence [null] =item B<-1> I length of the first read, 0 for auto [0] =item B<-e> I minimum read depth required to call a SNP (for SNPfilter) [3] =item B<-q> I minimum consensus quality for SNPs in F [30] =item B<-p> switch to paired end alignment mode =item B<-2> I length of the second read when B<-p> is applied [0] =item B<-a> I maximum insert size when B<-p> is applied [250] =back B =over 2 =item For SNP calling on pooled samples, users should set correct `B<-N>' as well as `B<-E> 0'. =item The input file can be maq's binary format. B will automatically detect the file format. =back =item B B B [B<-d> I] [B<-D> I] [B<-Q> I] [B<-q> I] [B<-w> I] [B<-n> I] [B<-F> F] [B<-f> F] [B<-s> I] [B<-m> I] [B<-a>] [B<-N> I] [B<-W> I] F > F Rule out SNPs that are covered by few reads (specified by B<-d>), by too many reads (specified by B<-D>), near (specified by B<-w>) to a potential indel, falling in a possible repetitve region (characterized by B<-Q>), or having low-quality neighbouring bases (specified by B<-n>). If I or more SNPs appear in any I window, they will also be filtered out together. B =over 10 =item B<-d> I Minimum read depth required to call a SNP [3] =item B<-D> I Maximum read depth required to call a SNP (<255, otherwise ignored) [256] =item B<-Q> I Required maximum mapping quality of reads covering the SNP [40] =item B<-q> I Minimum consensus quality [20] =item B<-n> I Minimum adjacent consensus quality [20] =item B<-w> I Size of the window around the potential indels. SNPs that are close to indels will be suppressed [3] =item B<-F> F The B output [null] =item B<-f> F The B output [null] =item B<-s> I Minimum score for a soa-indel to be considered [3] =item B<-m> I Maximum number of reads that can be mapped across a soa-indel [1] =item B<-a> Alternative filter for single end alignment =back =item B B B F > F Correct the number of reads mapped without indels for homopolymer tracts. This command modify the 4th, 10th and the last three columns of F and output the result in F. After the correction, the following B command gives putative homozygous indels: awk '($3=="*"||$3=="+") && $6+$7>=3 && ($6+$7)/$4>=0.75' and the following gives heterozygotes: awk '($3=="*"||$3=="+") && $6+$7>=3 && ($6+$7)/$4<0.75' Please note that this B command just implements several heuristic rules. It does not correct for impure homopolymer runs or di-nucleotide/triplet repeats. Consequently, the two awk commands only give approximate hom/het indels. =back =head1 EXAMPLES =over 2 =item Easyrun script: maq.pl easyrun -d easyrun ref.fasta part1.fastq part2.fastq =item Key commands behind easyrun: maq fasta2bfa ref.fasta ref.bfa; maq fastq2bfq part1.fastq part1.bfq; maq fastq2bfq part2.fastq part2.bfq; maq map part1.map ref.bfa part1.bfq; maq map part2.map ref.bfa part2.bfq; maq mapmerge aln.map part1.map part2.map; maq assemble cns.cns ref.bfa aln.map; =back =cut =head1 LICENSE GNU General Public License, version 3 (GPLv3) =head1 AVAILABILITY L =head1 AUTHOR Heng Li =cut maq-0.7.1/maqmap.c0000644000076600000240000001045111027727762012303 0ustar lh3staff#include #include #include #include #include "const.h" #include "maqmap.h" maqmap_t *maq_new_maqmap() { maqmap_t *mm = (maqmap_t*)calloc(1, sizeof(maqmap_t)); mm->format = MAQMAP_FORMAT_NEW; return mm; } void maq_delete_maqmap(maqmap_t *mm) { int i; if (mm == 0) return; for (i = 0; i < mm->n_ref; ++i) free(mm->ref_name[i]); free(mm->ref_name); free(mm->mapped_reads); free(mm); } void maqmap_write_header(gzFile fp, const maqmap_t *mm) { int i, len; gzwrite(fp, &mm->format, sizeof(int)); gzwrite(fp, &mm->n_ref, sizeof(int)); for (i = 0; i != mm->n_ref; ++i) { len = strlen(mm->ref_name[i]) + 1; gzwrite(fp, &len, sizeof(int)); gzwrite(fp, mm->ref_name[i], len); } gzwrite(fp, &mm->n_mapped_reads, sizeof(bit64_t)); } maqmap_t *maqmap_read_header(gzFile fp) { maqmap_t *mm; int k, len; mm = maq_new_maqmap(); gzread(fp, &mm->format, sizeof(int)); if (mm->format != MAQMAP_FORMAT_NEW) { if (mm->format > 0) { fprintf(stderr, "** Obsolete map format is detected. Please use 'mapass2maq' command to convert the format.\n"); exit(3); } assert(mm->format == MAQMAP_FORMAT_NEW); } gzread(fp, &mm->n_ref, sizeof(int)); mm->ref_name = (char**)calloc(mm->n_ref, sizeof(char*)); for (k = 0; k != mm->n_ref; ++k) { gzread(fp, &len, sizeof(int)); mm->ref_name[k] = (char*)malloc(len * sizeof(char)); gzread(fp, mm->ref_name[k], len); } /* read number of mapped reads */ gzread(fp, &mm->n_mapped_reads, sizeof(bit64_t)); return mm; } /* mapvalidate */ static void mapvalidate_core(gzFile fpin) { maqmap_t *m = maqmap_read_header(fpin); maqmap1_t *m1, mm1; bit64_t n = 0; int i, l; bit64_t *cnt; m1 = &mm1; cnt = (bit64_t*)calloc(m->n_ref, 8); printf("[message] number of reference sequences: %d\n", m->n_ref); while ((l = maqmap_read1(fpin, m1)) != 0) { if (l != sizeof(maqmap1_t)) { printf("[fatal error] truncated map file.\n"); break; } ++n; if ((int)m1->seqid >= m->n_ref) { printf("[fatal error] maqmap1_t::seqid is invalid (%d >= %d).\n", m1->seqid, m->n_ref); break; } ++cnt[m1->seqid]; if (m1->size >= MAX_READLEN - 1) { printf("[faltal error] maqmap1_t::size is invalid (%d >= %d).\n", m1->size, MAX_READLEN - 1); break; } } if (m->n_mapped_reads != 0) { if (m->n_mapped_reads != n) { printf("[warning] maqmap1_t::n_mapped_reads is set, but not equals the real number (%llu != %llu).\n", m->n_mapped_reads, n); } } for (i = 0; i != m->n_ref; ++i) printf("[message] %s : %llu\n", m->ref_name[i], cnt[i]); free(cnt); maq_delete_maqmap(m); } /* mapview */ static void mapview_core(FILE *fpout, gzFile fpin, int is_verbose, int is_mm) { bit32_t j; maqmap_t *m = maqmap_read_header(fpin); maqmap1_t *m1, mm1; m1 = &mm1; while (maqmap_read1(fpin, m1)) { fprintf(fpout, "%s\t%s\t%d\t%c\t%d\t%u\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d", m1->name, m->ref_name[m1->seqid], (m1->pos>>1) + 1, (m1->pos&1)? '-' : '+', m1->dist, m1->flag, m1->map_qual, (signed char)m1->seq[MAX_READLEN-1], m1->alt_qual, m1->info1&0xf, m1->info2, m1->c[0], m1->c[1], m1->size); if (is_verbose) { fputc('\t', fpout); for (j = 0; j != m1->size; ++j) { if (m1->seq[j] == 0) fputc('n', fpout); else if ((m1->seq[j]&0x3f) < 27) fputc("acgt"[m1->seq[j]>>6&3], fpout); else fputc("ACGT"[m1->seq[j]>>6&3], fpout); } fputc('\t', fpout); for (j = 0; j != m1->size; ++j) fputc((m1->seq[j]&0x3f) + 33, fpout); } if (is_mm) { bit64_t *p = (bit64_t*)(m1->seq + 55); fprintf(fpout, "\t%llx", *p); } fputc('\n', fpout); } maq_delete_maqmap(m); } int ma_mapview(int argc, char *argv[]) { int c, is_verbose = 1, is_mm = 0; while ((c = getopt(argc, argv, "bN")) >= 0) { switch (c) { case 'b': is_verbose = 0; break; case 'N': is_mm = 1; break; } } if (argc == optind) { fprintf(stderr, "Usage: maq mapview [-bN] \n"); return 1; } gzFile fp = (strcmp(argv[optind], "-") == 0)? gzdopen(STDIN_FILENO, "r") : gzopen(argv[optind], "r"); mapview_core(stdout, fp, is_verbose, is_mm); gzclose(fp); return 0; } int ma_mapvalidate(int argc, char *argv[]) { gzFile fp; if (argc < 2) { fprintf(stderr, "Usage: maq mapvalidate \n"); return 1; } fp = (strcmp(argv[optind], "-") == 0)? gzdopen(STDIN_FILENO, "r") : gzopen(argv[1], "r"); mapvalidate_core(fp); gzclose(fp); return 0; } maq-0.7.1/maqmap.h0000644000076600000240000000326011065656462012310 0ustar lh3staff#ifndef MAQMAP_H_ #define MAQMAP_H_ #ifdef MAQ_LONGREADS # define MAX_READLEN 128 #else # define MAX_READLEN 64 #endif #define MAX_NAMELEN 36 #define MAQMAP_FORMAT_OLD 0 #define MAQMAP_FORMAT_NEW -1 #define PAIRFLAG_FF 0x01 #define PAIRFLAG_FR 0x02 #define PAIRFLAG_RF 0x04 #define PAIRFLAG_RR 0x08 #define PAIRFLAG_PAIRED 0x10 #define PAIRFLAG_DIFFCHR 0x20 #define PAIRFLAG_NOMATCH 0x40 #define PAIRFLAG_SW 0x80 #include #include #include "const.h" /* name: read name size: the length of the read seq: read sequence (see also below) seq[MAX_READLEN-1]: single end mapping quality (equals to map_qual if not paired) map_qual: the final mapping quality alt_qual: the lower quality of the two ends (equals to map_qual if not paired) flag: status of the pair dist: offset of the mate (zero if not paired) info1: mismatches in the 24bp (higher 4 bits) and mismatches (lower 4 bits) info2: sum of errors of the best hit c[2]: count of all 0- and 1-mismatch hits on the reference */ typedef struct { bit8_t seq[MAX_READLEN]; /* the last base is the single-end mapping quality. */ bit8_t size, map_qual, info1, info2, c[2], flag, alt_qual; bit32_t seqid, pos; int dist; char name[MAX_NAMELEN]; } maqmap1_t; typedef struct { int format, n_ref; char **ref_name; bit64_t n_mapped_reads; maqmap1_t *mapped_reads; } maqmap_t; #define maqmap_read1(fp, m1) gzread((fp), (m1), sizeof(maqmap1_t)) #ifdef __cplusplus extern "C" { #endif maqmap_t *maq_new_maqmap(); void maq_delete_maqmap(maqmap_t *mm); void maqmap_write_header(gzFile fp, const maqmap_t *mm); maqmap_t *maqmap_read_header(gzFile fp); #ifdef __cplusplus } #endif #endif maq-0.7.1/maqmap_conv.c0000644000076600000240000000312510766735650013334 0ustar lh3staff#include #include #include #include #include "maqmap.h" #include "main.h" typedef struct { bit8_t seq[MAX_READLEN]; bit8_t size, map_qual, i1, i2, c[2], flag, alt_qual; bit32_t seqid, pos; int dist; } maqmap1_oldaux_t; void maqmap_conv_core(gzFile fpold, gzFile fpnew) { maqmap_t *mm = maq_new_maqmap(); bit32_t i, n_reads; maqmap1_oldaux_t *mo1, mmo1; maqmap1_t *m1, mm1; int k, len; mo1 = &mmo1; m1 = &mm1; memset(m1, 0, sizeof(maqmap1_t)); /* read the header */ gzread(fpold, &mm->n_ref, sizeof(int)); if (mm->n_ref == MAQMAP_FORMAT_NEW) { fprintf(stderr, "** New map format is detected. No need to convert the format.\n"); exit(3); } mm->ref_name = (char**)calloc(mm->n_ref, sizeof(char*)); for (k = 0; k != mm->n_ref; ++k) { gzread(fpold, &len, sizeof(int)); mm->ref_name[k] = (char*)malloc(len * sizeof(char)); gzread(fpold, mm->ref_name[k], len); } gzread(fpold, &n_reads, sizeof(bit32_t)); mm->n_mapped_reads = n_reads; maqmap_write_header(fpnew, mm); maq_delete_maqmap(mm); /* read and convert records */ for (i = 0; i != n_reads; ++i) { gzread(fpold, mo1, sizeof(maqmap1_oldaux_t)); memcpy(m1, mo1, sizeof(maqmap1_oldaux_t)); sprintf(m1->name, "%u", i); gzwrite(fpnew, m1, sizeof(maqmap1_t)); } } int ma_mapass2maq(int argc, char *argv[]) { gzFile fpold, fpnew; if (argc < 3) { fprintf(stderr, "maq mapass2maq \n"); return 1; } fpold = gzopen(argv[1], "r"); fpnew = gzopen(argv[2], "w"); assert(fpold && fpnew); maqmap_conv_core(fpold, fpnew); gzclose(fpold); gzclose(fpnew); return 0; } maq-0.7.1/match.cc0000644000076600000240000005617711067172577012307 0ustar lh3staff#include #include #include #include #include #include #include #include #include #include #include "algo.hh" #include "match.hh" #include "bfa.h" #include "read.h" #include "main.h" #include "dword.hh" #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifndef PACKAGE_VERSION #define PACKAGE_VERSION "dummy" #endif #define MATCH_INDEX_SHIFT32 8 #define MATCH_INDEX_SHIFT64 (MATCH_INDEX_SHIFT32+32) #define MATCH_INDEX_SIZE (1ul<<(32-MATCH_INDEX_SHIFT32)) #define MAX_CANDIDATE 32768 static int lsh_global_seed; static int g_is_first_round, g_processed_percent; static bit64_t g_n_candidates, g_tot_ref_len, g_processed_len, g_tot_hits, g_last_tot_hits, g_last_n_candidates; typedef struct { // in attempt to achieve better cache efficiency int is_color, size_l, size_r; int max_err10, max_dist, min_dist; int RF_max_dist; char methy_mode; gzFile hits_fp; int max_hits; } required_option_t; typedef struct { read_t s, m; bit32_t coor, key, k; int f; } ref_candid_t; typedef struct { int n; ref_candid_t list[MAX_CANDIDATE]; } ref_canlist_t; inline int alt_cal_mm(bit64_t x) { x = ((x & 0xAAAAAAAAAAAAAAAAull) >> 1) | (x & 0x5555555555555555ull); x = ((x & 0xAAAAAAAAAAAAAAAAull) >> 1) + (x & 0x5555555555555555ull); x = ((x & 0xCCCCCCCCCCCCCCCCull) >> 2) + (x & 0x3333333333333333ull); x = x + (x >> 4) & 0x0F0F0F0F0F0F0F0FLLU; x = x + (x >> 8); x = x + (x >> 16); x = x + (x >> 32) & 0x0000007F; return x; } inline int alt_cal_err(bit64_t x, bit64_t y) { x = (x | ((x & 0xAAAAAAAAAAAAAAAAull)>>1) | ((x&0x5555555555555555ull)<<1)) & y; x = ((x & 0xCCCCCCCCCCCCCCCCull) >> 2) + (x & 0x3333333333333333ull); x = x + (x >> 4) & 0x0F0F0F0F0F0F0F0FLLU; x = x + (x >> 8); x = x + (x >> 16); x = x + (x >> 32) & 0x0000007F; return x; } inline bit64_t alt_shrink(bit64_t x) { x = ((x & 0xAAAAAAAAAAAAAAAAull) >> 1) | (x & 0x5555555555555555ull); x = ((x & 0xCCCCCCCCCCCCCCCCull) >> 1) | (x & 0x3333333333333333ull); x = ((x & 0xF0F0F0F0F0F0F0F0ull) >> 2) | (x & 0x0F0F0F0F0F0F0F0Full); x = ((x & 0xFF00FF00FF00FF00ull) >> 4) | (x & 0x00FF00FF00FF00FFull); x = ((x & 0xFFFF0000FFFF0000ull) >> 8) | (x & 0x0000FFFF0000FFFFull); return ((x&0xFFFFFFFF00000000ull)>> 16) | (x & 0x00000000FFFFFFFFull); } template inline int alt_cal_mm(const dword_t &x) { return alt_cal_mm(x.w1) + alt_cal_mm(x.w2); } template inline int alt_cal_err(const dword_t &x, const dword_t &y) { return alt_cal_err(x.w1, y.w1) + alt_cal_err(x.w2, y.w2); } template inline dword_t alt_shrink(const dword_t &x) { return dword_t(alt_shrink(x.w2) << (dword_t::n_bits>>1) | alt_shrink(x.w1)); } // hash function. 05JAN2006, http://www.cris.com/~Ttwang/tech/inthash.htm inline bit32_t lsh_hash_64(bit64_t key) { key = (~key) + (key << 18); key ^= key >> 31; key = (key + (key << 2)) + (key << 4); key ^= key >> 11; key += key << 6; key ^= key >> 22; return (bit32_t)key; } inline bit32_t lsh_hash_32(bit32_t key) { key = ~key + (key << 15); // key = (key << 15) - key - 1; key ^= key >> 12; key += key << 2; key ^= key >> 4; key = (key + (key << 3)) + (key << 11); key ^= key >> 16; return key; } inline bool match_tell_dist(bit32_t last, bit32_t curr, int min, int max, int size, int is_color, int RF_max) { if (RF_max) { if (last) { if ((last&1) == 0 && (curr&1) == 1) { // FR pair int dist = int(curr>>1) - int(last>>1) + size; return (dist >= min && dist <= max); } else if ((last&1) == 1 && (curr&1) == 0) { // RF pair int dist = int(curr>>1) - int(last>>1) + size; return (dist >= min && dist <= RF_max); } } } else if (last && (!is_color || ((last^curr)&1) == 0)) { int dist = int(curr>>1) - int(last>>1) + size; return (dist >= min && dist <= max); } return false; } inline void match_add_pair(pair_info_t *p, bit64_t r1, bit64_t r2, int seqid, const matches_t &mm1, const matches_t &mm2) { bit32_t x = (((r1>>56)+(r2>>56))<<24) | ((r1>>32^r2>>32)&0xffffff); if (x <= p->i2) { if (x > p->i1) { // then i2 > x > i1 p->i2 = x; } else { // then x <= p->i1 if (p->p11 != (bit32_t)r1 || p->p12 != (bit32_t)r2 || p->seqid1 != seqid) { // not an identical pair p->i2 = p->i1; p->i1 = x; p->seqid1 = seqid; p->p11 = (bit32_t)r1; p->p12 = (bit32_t)r2; p->m11 = mm1; p->m12 = mm2; } } } } static inline void methy_ref(char methy_mode, read_t query[4], int size_l, int size_r, bit64_t seqi, int j) { if (methy_mode == 'c') { if ((query[0]&3) == 1) { query[0] = (query[1] |= 3); } else if ((query[0]&3) == 2) { query[2] |= read_t(3)<<((size_l-1)<<1); query[3] |= read_t(3)<<((size_r-1)<<1); } } else if (methy_mode == 'g') { if ((query[0]&3) == 2) { query[0] = (query[1] ^= 2); } else if ((query[0]&3) == 1) { query[2] ^= read_t(2)<<((size_l-1)<<1); query[3] ^= read_t(2)<<((size_r-1)<<1); } } } static inline void process_candidate(const required_option_t *o, int longseqid, bit64_t tmp_xor, match_data_t *d, ref_canlist_t *list) { int i; ref_candid_t *p; bit32_t n_reads = d->n_reads; g_n_candidates += list->n; for (i = 0, p = list->list; i != list->n; ++i, ++p) { bit32_t k = p->k, key = p->key, coor = p->coor; int f = p->f, m = coor&1; match_index_t *index = d->index + f; k = index->index[k]; // k is the start position in index->sorted. Here is another cache miss! bit128_t *r = index->sorted; if (k & 0x80000000u) { // there is only one index hit if (r[k & 0x7fffffffu].w2>>32 ^ key) continue; // the sequence is not the same. Cache miss! k &= 0x7fffffffu; // get rid of the leading 0x80000000u } else { // there are more than one index hit for (; (r[k].w2>>32^key) && (r[k].w2>>32^key)>>MATCH_INDEX_SHIFT32 == 0; ++k); // Cache miss! if (k == n_reads || (r[k].w2>>32^key)) continue; // if there is no match, a search will stop here } // calculate number of mismatches/errors and store them if good enough read_t submask, subseq; bit64_t subm_shifted, subs_shifted; subseq = p->s; submask = ~p->m & index->mask; bit32_t signature = bit64_t(subseq) ^ coor ^ tmp_xor; // this will be part of the pseudo-random bits subseq &= index->mask; int shift = index->shift_seed; subs_shifted = bit64_t(subseq>>shift); subm_shifted = bit64_t(submask>>shift); for (; key == r[k].w2>>32; ++k) { // calculate the number of mismatches in the seed bit32_t x = alt_cal_mm((subs_shifted ^ bit64_t(r[k])) | subm_shifted); if (x > MAX_MISMATCH || (x == 0 && (f&2))) continue; match_info_t *seq = d->match + (bit32_t)r[k].w2; // get the read read_t match = (subseq ^ seq->s) | submask | seq->m; // calculate the sum of errors bit32_t y = alt_cal_err(match, seq->q); if (int(y) > o->max_err10) continue; x = alt_cal_mm(bit64_t(match>>shift)); // recalculate the number of mismatches in the seed if (x > MAX_MISMATCH || (x == 0 && (f&2))) continue; if (seq->c[x] < 0xff) ++(seq->c[x]); // update count x = (y << 24) | (lsh_hash_32(signature ^ (bit32_t)r[k].w2) & 0xffffff); matches_t mm = alt_shrink(match).w1; if (o->size_r) { // ***** the following codes are only executed for paired-end data int do_append, do_check; if (o->is_color) { // color do_check = ((m^f)&1) == 0? 1 : 0; do_append = !do_check; } else { // Illumina if (o->RF_max_dist) { // long-insert library do_check = do_append = 1; } else { // short-insert library do_check = m? 1 : 0; do_append = !do_check; } } if (do_check) { // check PE match_info_t *seq2 = (f&1)? seq - 1 : seq + 1; // get the other end if (seq2->last_seqid == longseqid) { pair_info_t *pp = d->pair + (((bit32_t)r[k].w2)>>1); if (f&1) { // this is the second end if (match_tell_dist((bit32_t)seq2->last1, coor, o->min_dist, o->max_dist, o->size_l, o->is_color, o->RF_max_dist)) match_add_pair(pp, seq2->last1, ((bit64_t)x<<32)|coor, longseqid, seq2->mm1, mm); if (match_tell_dist((bit32_t)seq2->last2, coor, o->min_dist, o->max_dist, o->size_l, o->is_color, o->RF_max_dist)) match_add_pair(pp, seq2->last2, ((bit64_t)x<<32)|coor, longseqid, seq2->mm2, mm); } else { // this is the first end if (match_tell_dist((bit32_t)seq2->last1, coor, o->min_dist, o->max_dist, o->size_r, o->is_color, o->RF_max_dist)) match_add_pair(pp, ((bit64_t)x<<32)|coor, seq2->last1, longseqid, mm, seq2->mm1); if (match_tell_dist((bit32_t)seq2->last2, coor, o->min_dist, o->max_dist, o->size_r, o->is_color, o->RF_max_dist)) match_add_pair(pp, ((bit64_t)x<<32)|coor, seq2->last2, longseqid, mm, seq2->mm2); } } } if (do_append) { // append the reads to the queue if (seq->last_seqid != longseqid) { seq->last_seqid = longseqid; seq->last2 = 0; seq->last_mm2 = 0; seq->last1 = ((bit64_t)x << 32) | coor; seq->last_mm1 = mm; } else if (seq->last1 != (((bit64_t)x << 32) | coor)) { seq->last2 = seq->last1; seq->last_mm2 = seq->last_mm1; seq->last1 = ((bit64_t)x << 32) | coor; seq->last_mm1 = mm; } } } ++g_tot_hits; if (o->hits_fp) { // print the hits bit32_t t = alt_cal_mm(bit64_t(match>>shift)); if (t < 2 && g_is_first_round == 1 && (int)seq->c[0] + seq->c[1] <= o->max_hits) gzprintf(o->hits_fp, "A\t%d\t%d\t%c\t%d\n", (bit32_t)r[k].w2, (coor>>1)+1, (coor&1)? '-' : '+', x>>24); } // store the match x if it is good enough if (x > seq->i2) continue; // x is no better than the second best, reject if (x > seq->i1) { // then i2 > x > i1 if (seq->p1 != coor || seq->seqid1 != longseqid) { // should always stand?? seq->i2 = x; seq->mm2 = mm; } } else if (x != seq->i1) { // then x < i1, set the second best as the previous best hit // Here is the source of a random error. If x == seq->i1 and the position // is not the same as the best, the hit will be ignored. This is not correct, // but should happen rarely. The probability that this may happen is 1e-7, // determined by the number of random bits in x. Currently, it is 24-bit. // // This error can be avoided by saving the position of the second best hit. // However, this is at the cost of more memory. I do not like this way. if (seq->p1 != coor || seq->seqid1 != longseqid) { seq->i2 = seq->i1; seq->i1 = x; seq->seqid1 = longseqid; seq->p1 = coor; seq->mm1 = mm; } } } // ~for(k) } // ~for(i) memset(list, 0, sizeof(ref_canlist_t)); } // This is the core function for the search. void match_search(const match_aux_t *o, match_data_t *d, const nst_bfa1_t *l, int longseqid, ref_canlist_t *list) { bit64_t tmp_xor; int i, j; bit32_t n_reads; read_t query[4], mask[4], omask, ofilter; required_option_t oo; oo.is_color = o->is_color; oo.size_l = o->size_l; oo.size_r = o->size_r; oo.max_err10 = o->max_err10; oo.max_dist = o->max_dist; oo.min_dist = o->min_dist; oo.RF_max_dist = o->RF_max_dist; oo.methy_mode = o->methy_mode; oo.hits_fp = o->hits_fp; oo.max_hits = o->max_hits; n_reads = d->n_reads; mask[0] = mask[1] = mask[2] = mask[3] = query[0] = query[1] = query[2] = query[3] = 0; tmp_xor = longseqid ^ lsh_global_seed; for (i = 0; i != l->len; ++i) { bit64_t maski, seqi; maski = l->mask[i]; seqi = l->seq[i]; for (j = 31; j >= 0; --j) { query[1] = query[0] = (query[0]<<2) | (seqi>>(j<<1) & 0x3); // forward word if (!oo.is_color) { // nucleotide space query[2] = (query[2]>>2) | (read_t(3 - (seqi>>(j<<1) & 0x3)) << ((oo.size_l-1)<<1)); // reverse word query[3] = (query[3]>>2) | (read_t(3 - (seqi>>(j<<1) & 0x3)) << ((oo.size_r-1)<<1)); // reverse word if (oo.methy_mode) methy_ref(oo.methy_mode, query, oo.size_l, oo.size_r, seqi, j); } else { // color space query[2] = (query[2]>>2) | (read_t(seqi>>(j<<1) & 0x3) << ((oo.size_l-1)<<1)); // reverse word query[3] = (query[3]>>2) | (read_t(seqi>>(j<<1) & 0x3) << ((oo.size_r-1)<<1)); // reverse word } mask[1] = mask[0] = (mask[0]<<2) | (maski>>(j<<1) & 0x3); mask[2] = (mask[2]>>2) | (read_t(maski>>(j<<1) & 0x3) << ((oo.size_l-1)<<1)); mask[3] = (mask[3]>>2) | (read_t(maski>>(j<<1) & 0x3) << ((oo.size_r-1)<<1)); if ((++g_processed_len) * 100 > g_tot_ref_len * g_processed_percent) { struct rusage r; double sec; getrusage(0, &r); sec = r.ru_utime.tv_sec + r.ru_stime.tv_sec + (r.ru_utime.tv_usec + r.ru_stime.tv_usec) / 1000000.0; fprintf(stderr, "[match_search] %3llu%% processed in %.3lf sec: %llu / %llu = %.3lf\n", g_processed_len * 100 / g_tot_ref_len, sec, g_tot_hits - g_last_tot_hits, g_n_candidates - g_last_n_candidates, (double)(g_tot_hits - g_last_tot_hits) / (g_n_candidates - g_last_n_candidates + 1)); g_last_tot_hits = g_tot_hits; g_last_n_candidates = g_n_candidates; ++g_processed_percent; } if ((mask[0]&0x3) == 0 || (mask[2]&0x3) == 0 || (mask[3]&0x3) == 0) continue; // the first or the last base is N if (list->n+8 >= MAX_CANDIDATE) process_candidate(&oo, longseqid, tmp_xor, d, list); // loop through all filters for (int m = 0; m != 2; ++m) { // 0 for forward strand, and 1 for reverse bit32_t coor = (((i << 5) | (31 - j)) << 1) | m; for (int f = 0; f != 4; ++f) { // loop through the four filters: read1F, read2F, read1R, read2R if (oo.size_r == 0 && (f&1)) continue; // this is not mate-pair read, skip read2F and read2R match_index_t *index = d->index + f; bit32_t k, key = lsh_hash_64(query[(m<<1)|(f&1)]>>index->shift_seed & index->filter); // the hash key k = key>>MATCH_INDEX_SHIFT32; // k is the indexed part of the key if ((d->index4[k>>1]&(1<list + list->n; p->f = f; p->k = k; p->key = key; p->s = query[m<<1|(f&1)]; p->m = mask[m<<1|(f&1)]; p->coor = coor; ++(list->n); } } } } process_candidate(&oo, longseqid, tmp_xor, d, list); } // index lsh_data_t::sorted to accelerate search static void match_index_sorted(int m, const bit128_t *a, bit32_t *b) { int i; bit32_t curr, begin; if (m == 0) { fprintf(stderr, "[match_index_sorted] no reasonable reads are available. Exit!\n"); exit(1); } for (i = 0; i != MATCH_INDEX_SIZE; ++i) b[i] = MA_NO_INDEX; curr = (bit32_t)(a[0].w2>>MATCH_INDEX_SHIFT64); begin = 0; for (i = 1; i != m; ++i) { if (curr != (bit32_t)(a[i].w2>>MATCH_INDEX_SHIFT64)) { b[curr] = begin | ((i - begin == 1)? 0x80000000u : 0); curr = (bit32_t)(a[i].w2>>MATCH_INDEX_SHIFT64); begin = i; } } // now come to the last element b[curr] = begin | ((i - begin == 1)? 0x80000000u : 0); } // generate "sorted" lists static void match_index(match_aux_t *o, match_data_t *d, int start) { int i; // allocate memory d->index4 = (bit8_t*)calloc(MATCH_INDEX_SIZE>>1, 1); for (i = 0; i != 4; ++i) { d->index[i].filter = o->filters[i+start]; d->index[i].mask = o->masks[i+start]; d->index[i].shift_seed = o->shift_seed[i+start]; if (o->size_r || (i&1) == 0) { d->index[i].sorted = (bit128_t*)calloc(d->n_reads + 1, sizeof(bit128_t)); d->index[i].index = (bit32_t*)calloc(MATCH_INDEX_SIZE, sizeof(bit32_t)); } } // fill the sorted array. d->sorted must be in line with o->filters for (i = 0; i != 4; ++i) { int n = 0; match_index_t *index = d->index + i; if (o->size_r == 0 && (i&1)) continue; for (int j = i & 1; j < d->n_reads; j += 2) { // note "j = i&1" and "j += 2" // discard poor quality reads if (alt_cal_mm(d->match[j].m) > MAX_MISMATCH) continue; bit64_t tmp = bit64_t(d->match[j].s>>index->shift_seed); index->sorted[n++] = bit128_t(tmp, (bit64_t)lsh_hash_64(tmp&index->filter)<<32 | j); } index->sorted[n] = 0xffffffffull; algo_sort(n, index->sorted); // the last element has not been sorted match_index_sorted(n, index->sorted, index->index); // fill d->index4 int flag = 1<index[k] != MA_NO_INDEX) d->index4[k>>1] |= flag<<((k&1)<<2); } } void match_core(const char *fn_out, match_aux_t *o, match_data_t *d, FILE *fp, gzFile fp_bfq_l, gzFile fp_bfq_r) { int i, k; nst_bfa1_t *l; ref_canlist_t *list; list = (ref_canlist_t*)calloc(1, sizeof(ref_canlist_t)); g_tot_ref_len = nst_bfa_len(fp); rewind(fp); fprintf(stderr, "[match_core] Total length of the reference: %llu\n", g_tot_ref_len); gzrewind(fp_bfq_l); gzrewind(fp_bfq_r); #ifdef _WIN32 lsh_global_seed = rand(); #else lsh_global_seed = lrand48(); #endif if (o->methy_mode) maq_methy_modify(d, o); d->sum_len = 0; for (i = 0; i < o->n_filters; i += 4) { g_is_first_round = (i == 0)? 1 : 0; fprintf(stderr, "[match_core] round %d/%d...\n", i/4+1, o->n_filters/4); fprintf(stderr, "[match_core] making index...\n"); match_index(o, d, i); rewind(fp); k = 0; g_processed_len = 0; g_processed_percent = 0; while ((l = nst_load_bfa1(fp)) != 0) { // read longseq if (o->hits_fp && i == 0) gzprintf(o->hits_fp, "B\t%s\n", l->name); // print reference names //if (!o->is_quiet) // fprintf(stderr, "[match_core] processing sequence %s (%d bp)...\n", l->name, l->ori_len); if (i == 0) { d->sum_len += l->ori_len; if ((d->n_lname & 0xff) == 0) // then enlarge the memory block d->lname = (char**)realloc(d->lname, sizeof(char*) * (d->n_lname + 0x100)); d->lname[d->n_lname++] = strdup(l->name); } match_search(o, d, l, k++, list); if (o->hits_fp && i == 0) gzprintf(o->hits_fp, "E\t%s\n", l->name); // print reference names nst_delete_bfa1(l); } // free index for (int j = 0; j != 4; ++j) { free(d->index[j].sorted); free(d->index[j].index); } free(d->index4); } free(list); fprintf(stderr, "[match_core] sorting the hits and dumping the results...\n"); gzFile fpout = (strcmp(fn_out, "-") == 0)? gzdopen(STDOUT_FILENO, "w") : gzopen(fn_out, "w"); match_data2map(fpout, fp, fp_bfq_l, fp_bfq_r, o, d); gzclose(fpout); } static int match_usage() { fprintf(stderr, "\n"); fprintf(stderr, "Usage: maq map [options] [reads_2.bfq]\n\n"); fprintf(stderr, "Options: -1 INT length of the first read (<=%d) [0]\n", MAX_READLEN-1); fprintf(stderr, " -2 INT length of the second read (<=%d) [0]\n", MAX_READLEN-1); fprintf(stderr, " -m FLOAT rate of difference between reads and references [0.001]\n"); fprintf(stderr, " -e INT maximum allowed sum of qualities of mismatches [70]\n"); fprintf(stderr, " -d FILE adapter sequence file [null]\n"); fprintf(stderr, " -a INT max distance between two paired reads [250]\n"); fprintf(stderr, " -A INT max distance between two RF paired reads [0]\n"); // fprintf(stderr, " -i INT min distance between two paired reads [0]\n"); // I do not want users to change this. fprintf(stderr, " -n INT number of mismatches in the first 24bp [2]\n"); fprintf(stderr, " -M c|g methylation alignment mode [null]\n"); fprintf(stderr, " -u FILE dump unmapped and poorly aligned reads to FILE [null]\n"); fprintf(stderr, " -H FILE dump multiple/all 01-mismatch hits to FILE [null]\n"); fprintf(stderr, " -C INT max number of hits to output. >512 for all 01 hits. [250]\n"); fprintf(stderr, " -s INT seed for random number generator [random]\n"); // fprintf(stderr, " -P set alternative mapping quality as pair-2-diff flag\n"); fprintf(stderr, " -W disable Smith-Waterman alignment\n"); #ifndef MAQ_LONGREADS fprintf(stderr, " -N record mismatch positions (max read length<=55)\n"); #endif fprintf(stderr, " -t trim all reads (usually not recommended)\n"); fprintf(stderr, " -c match in the colorspace\n"); fprintf(stderr, "\n"); // fprintf(stderr, "%lu,%lu,%lu,%lu\n", sizeof(read_t), sizeof(match_info_t), sizeof(pair_info_t), sizeof(mapping1_t)); return 1; } // this is the true main function int ma_match(int argc, char *argv[]) { FILE *fp_bfa, *tmpfp; gzFile fp_bfq_l, fp_bfq_r, hits_fp; int c, size_l, size_r, n_mismatch, is_sw = 1; float mut_rate = 0.001; int min_dist, max_dist, RF_max_dist, max_hits, is_color, is_trim, is_mm, is_p2diff, max_err10 = 7; match_aux_t *o; match_data_t *d; char adaptor[1024], dump_file[1024], methy_mode, *fn_out; long seed; #ifdef _WIN32 seed = time(0); #else seed = lsh_hash_32(time(0)) ^ lsh_hash_32(getpid()); #endif min_dist = 0; max_dist = 250; RF_max_dist = 0; // for Illumina long insert-size library max_hits = 250; size_l = size_r = 0; n_mismatch = 2; is_color = is_trim = is_mm = is_p2diff = 0; methy_mode = 0; dump_file[0] = adaptor[0] = '\0'; hits_fp = 0; while ((c = getopt(argc, argv, "1:2:n:m:a:i:d:ctM:u:e:s:NH:C:A:PW")) >= 0) { switch (c) { case '1': size_l = atoi(optarg); break; case '2': size_r = atoi(optarg); break; case 'e': max_err10 = int(atoi(optarg) / 10.0 + 0.5); break; case 'd': tmpfp = fopen(optarg, "r"); assert(tmpfp); fscanf(tmpfp, "%s", adaptor); fclose(tmpfp); break; case 'n': n_mismatch = atoi(optarg); break; case 'm': mut_rate = atof(optarg); break; case 'a': max_dist = atoi(optarg); break; case 'A': RF_max_dist = atoi(optarg); break; case 'i': min_dist = atoi(optarg); break; case 'u': strcpy(dump_file, optarg); break; case 'C': max_hits = atoi(optarg); break; case 'H': hits_fp = gzopen(optarg, "w"); assert(hits_fp); break; case 'c': is_color = 1; break; case 't': is_trim = 1; break; case 'P': is_p2diff = 1; break; case 's': seed = atoi(optarg); break; case 'N': is_mm = 1; break; case 'M': methy_mode = tolower(optarg[0]); break; case 'W': is_sw = 0; break; default: return match_usage(); } } if (argc - optind < 3) return match_usage(); if (n_mismatch < 1 || n_mismatch > 3) { fprintf(stderr, "[ma_match] please use 1, 2 or 3 with option -n. Abort!\n"); return 1; } fp_bfa = fopen(argv[optind+1], "r"); fp_bfq_l = gzopen(argv[optind+2], "r"); fp_bfq_r = (optind < argc)? gzopen(argv[optind+3], "r") : 0; assert(fp_bfa); assert(fp_bfq_l); fn_out = strdup(argv[optind]); // core #ifdef _WIN32 srand(seed); #else srand48(seed); #endif // load reads into memory fprintf(stderr, "-- maq-%s\n", PACKAGE_VERSION); d = new_match_data(); ma_init_match_data(d, fp_bfq_l, &size_l, fp_bfq_r, &size_r, is_trim, adaptor, hits_fp); assert(size_l >= 12 && (size_r == 0 || size_r >= 12)); // initialize parameters o = new_match_aux(size_l, size_r, n_mismatch); o->q_rate = int(-4.343 * log(mut_rate) + 0.5); // set q_rate o->min_dist = min_dist; if (o->min_dist < size_l+1 || o->min_dist < size_r+1) { o->min_dist = size_l > size_r? size_l+1 : size_r+1; fprintf(stderr, "[ma_match] set the minimum insert size as %d.\n", o->min_dist); } o->max_dist = max_dist; o->RF_max_dist = RF_max_dist; o->is_color = is_color; o->is_mm = is_mm; o->is_sw = is_sw; o->is_p2diff = is_p2diff; o->max_err10 = max_err10; o->methy_mode = methy_mode; if (dump_file[0]) o->dump_file = strdup(dump_file); if (adaptor[0]) o->adapter = strdup(adaptor); o->hits_fp = hits_fp; o->max_hits = max_hits; // core function match_core(fn_out, o, d, fp_bfa, fp_bfq_l, fp_bfq_r); free(fn_out); gzclose(fp_bfq_l); if (fp_bfq_r) gzclose(fp_bfq_r); fclose(fp_bfa); delete_match_data(d); delete_match_aux(o); return 0; } maq-0.7.1/match.hh0000644000076600000240000000373011065656462012302 0ustar lh3staff#ifndef LH3_MATCH_HH #define LH3_MATCH_HH #include #include #include "maqmap.h" #include "dword.hh" #ifdef _FASTMAP # define SEED_LENGTH 28 # define MAX_MISMATCH 3 #else # define SEED_LENGTH 24 # define MAX_MISMATCH 4 #endif #ifdef MAQ_LONGREADS # define read_t dword_t > # define matches_t dword_t #else # define read_t dword_t # define matches_t bit64_t #endif #define MA_NO_MATCH 0xfffffffful #define MA_NO_INDEX 0xffffffffu typedef dword_t bit128_t; typedef struct __match_info_t { read_t s, q, m; bit32_t i1, p1, i2; matches_t mm1, mm2, last_mm1, last_mm2; bit64_t last1, last2; int seqid1, last_seqid; bit8_t c[MAX_MISMATCH + 1]; } match_info_t; typedef struct { bit32_t i1, p11, p12; bit32_t i2; matches_t m11, m12; int seqid1; } pair_info_t; typedef struct __match_aux_t { int n_mismatch; int size_l, size_r; int n_filters; int max_err10; int max_dist, min_dist; int RF_max_dist; // for Illumina long insert-size library int is_quiet, is_color, is_mm, is_p2diff, is_sw; char methy_mode; char *adapter, *dump_file; int max_hits; gzFile hits_fp; read_t *masks; bit64_t *filters; int *shift_seed; int log_n[256]; int q_rate; // mutation rate in phred unit } match_aux_t; typedef struct { read_t mask; int shift_seed; bit64_t filter; bit128_t *sorted; bit32_t *index; } match_index_t; struct __longreads_t; typedef struct __match_data_t { int n_reads, n_lname; bit32_t sum_len; match_info_t *match; pair_info_t *pair; char **lname; match_index_t index[4]; bit8_t *index4; } match_data_t; match_aux_t *new_match_aux(int size_l, int size_r, int m); match_data_t *new_match_data(); void delete_match_data(match_data_t *d); void delete_match_aux(match_aux_t *o); void match_data2map(gzFile fpout, FILE *fp_bfa, gzFile fp_bfq_l, gzFile fp_bfq_r, const match_aux_t *o, match_data_t *d); void ma_trim_adapter(const char adaptor[], const match_data_t *d, struct __longreads_t *lr); #endif maq-0.7.1/match_aux.cc0000644000076600000240000001733611067172577013156 0ustar lh3staff#include #include #include #include #include #include "read.h" #include "match.hh" #include "main.h" #include "maqmap.h" match_data_t *new_match_data() { return (match_data_t*)calloc(1, sizeof(match_data_t)); } void delete_match_data(match_data_t *d) { if (d == 0) return; int i; // d->index and d->index4 should always be freed in other places if (d->lname) { for (i = 0; i < d->n_lname; ++i) free(d->lname[i]); } free(d->lname); free(d->match); free(d->pair); free(d); } // generate a set of filters. word_length=size, max_mismatch=m bit64_t *ma_gen_filters(int size, int m, int *l) { int n, i, j, k, c, *tmp; bit64_t f, *part, *filter; n = m<<1; j = k = 1; for (i = n; i >= n - m + 1; --i) { j *= i; k *= n - i + 1; } *l = j / k; filter = (bit64_t*)malloc(sizeof(bit64_t) * (*l)); if (size == 0) { // then return a NULL filter. for (i = 0; i != n; ++i) filter[i] = 0; return filter; } part = (bit64_t*)malloc(sizeof(bit64_t) * n); tmp = (int*)malloc(sizeof(int) * n); for (i = 0, j = size, k = 0; i != n; ++i) { tmp[i] = j / (n - i); j -= tmp[i]; k += tmp[i]; part[i] = bit64_t((1ull<<(tmp[i]<<1)) - 1) << ((k - tmp[i])<<1); } for (i = c = 0; i < (1<size_l = size_l; o->size_r = size_r; o->n_mismatch = m; o->q_rate = 30; // default q_rate (0.001) o->max_dist = 250; o->max_hits = 250; o->min_dist = 0; o->dump_file = 0; o->hits_fp = 0; o->is_color = o->is_mm = o->is_p2diff = 0; o->is_sw = 1; o->methy_mode = 0; o->adapter = 0; o->max_err10 = 7; { // generate filters and masks int n_filters; bit64_t *filters_l = ma_gen_filters((size_l > SEED_LENGTH)? SEED_LENGTH : size_l, m, &n_filters); bit64_t *filters_r = ma_gen_filters((size_r > SEED_LENGTH)? SEED_LENGTH : size_r, m, &n_filters); o->filters = (bit64_t*)calloc(n_filters * 2, sizeof(bit64_t)); o->masks = (read_t*)calloc(n_filters * 2, sizeof(read_t)); o->shift_seed = (int*)calloc(n_filters * 2, sizeof(int)); for (i = 0; i != n_filters; ++i) { o->filters[i<<1] = filters_l[i]; o->filters[(i<<1)|1] = filters_r[i]; o->masks[i<<1] = ~(~read_t(0)<<(size_l<<1)); o->masks[(i<<1)|1] = ~(~read_t(0)<<(size_r<<1)); o->shift_seed[i<<1] = (size_l <= SEED_LENGTH)? 0 : (size_l-SEED_LENGTH)<<1; o->shift_seed[i<<1|1] = (size_r <= SEED_LENGTH)? 0 : (size_r-SEED_LENGTH)<<1; } free(filters_l); free(filters_r); o->n_filters = n_filters * 2; } o->log_n[0] = 0; for (i = 1; i != 256; ++i) o->log_n[i] = int(4.343 * log(i) + 0.5); return o; } void delete_match_aux(match_aux_t *o) { free(o->filters); free(o->masks); free(o->shift_seed); free(o->adapter); free(o->dump_file); if (o->hits_fp) gzclose(o->hits_fp); free(o); } static inline void ma_trim_adapter1(int alen, read_t x, int size, bit8_t seq[], matches_t mm, int counter[], int counter2[], int trim_min) { read_t y; int j, k, m, trim_len = 0; for (k = 0, y = 0; k != size; ++k) y = y<<2 | seq[k]>>6; // adapter in the sequence for (k = 0; k < size - alen; ++k) { for (j = m = 0; j != alen; ++j) { if ((y>>((size-1-k-j)<<1)&0x3) != (x>>((alen-1-j)<<1)&0x3)) ++m; if (m > 5) break; } if (m <= 5 && m <= (alen - 1) / 7) { trim_len = size; ++counter[alen]; goto end_trim; } } // adapter at the 5'-end for (j = 1; j < alen - 20; ++j) { int end = (size < alen - j)? size : alen - j; for (k = m = 0; k < end; ++k) { if ((y>>((size-1-k)<<1)&0x3) != (x>>((alen-1-j-k)<<1)&0x3)) ++m; if (m > 5) break; } if (m <= 5 && m <= (alen - j - 1) / 7) { trim_len = size; ++counter[alen]; goto end_trim; } } // adapter at the 3'-end for (j = 0; j != alen - 1; ++j) { for (m = k = 0; k != alen - j; ++k) { if ((y>>(k<<1)&0x3) != (x>>((j+k)<<1)&0x3)) ++m; if (m > 5) break; } int tmp = alen - j; if (m <= 5 && m <= (tmp - 1) / 7) { trim_len = tmp; ++counter[j]; goto end_trim; } } end_trim: if (trim_len > trim_min && (mm&((1ull<size_l, lr->size_r }; int len = strlen(adaptor); clock_t begin = clock(); fprintf(stderr, "[ma_trim_adapter] trimming the 3'-adapter sequence...\n"); counter = (int*)calloc(len + 1, sizeof(int)); counter2 = (int*)calloc(len + 1, sizeof(int)); alen = strlen(adaptor); for (i = 0, x = 0; i != len; ++i) x = x<<2 | (nst_nt4_table[(int)adaptor[i]]&3); if (d == 0) trim_min = 4; // drop reads for (i = 0; i != lr->n_reads; ++i) { if (size[i&1] == 0) continue; matches_t mm = (d && d->match[i].i1 != MA_NO_MATCH)? d->match[i].mm1 : matches_t(0xffff); ma_trim_adapter1(alen, x, size[i&1], lr->seq[i], mm, counter, counter2, trim_min); } for (j = len-2, n = 0; j >= 0; --j) { n += counter2[j]; fprintf(stderr, "[ma_trim_adapter] match length: %d; count: %d:%d\n", len - j, counter[j], counter2[j]); } fprintf(stderr, "[ma_trim_adapter] match length: %d+; count: %d\n", len, counter[len]); fprintf(stderr, "[ma_trim_adapter] %d reads possibly contains adaptor contamination.\n", n += counter[len]); fprintf(stderr, "[ma_trim_adapter] CPU time: %.3f\n", (double)(clock() - begin) / CLOCKS_PER_SEC); free(counter); free(counter2); } void mapping_stat(gzFile fpin) { int i; bit64_t tot_len, tot_reads, flagc[256], qualc_se[26], qualc_pe[26], mmc[16], tot_err; maqmap_t *mm; maqmap1_t *m1, mm1; m1 = &mm1; tot_len = tot_reads = tot_err = 0; memset(flagc, 0, sizeof(bit64_t) * 256); memset(mmc, 0, sizeof(bit64_t) * 16); memset(qualc_se, 0, sizeof(bit64_t) * 26); memset(qualc_pe, 0, sizeof(bit64_t) * 26); mm = maqmap_read_header(fpin); while (maqmap_read1(fpin, m1)) { int q; ++tot_reads; tot_len += m1->size; ++flagc[m1->flag]; q = m1->seq[MAX_READLEN-1]; if (q > 99) q = 99; ++qualc_se[q/10]; q = m1->map_qual; if (q > 99) q = 99; ++qualc_pe[q/10]; ++mmc[m1->info1&0xf]; tot_err += m1->info1&0xf; } maq_delete_maqmap(mm); // print printf("\n"); printf("-- Total number of reads: %lld\n", tot_reads); printf("-- Sum of read length: %lld\n", tot_len); printf("-- Error rate: %lf\n", (double)tot_err/tot_len); printf("-- Average read length: %.2lf\n\n", (double)tot_len/tot_reads); printf("-- Mismatch statistics:\n\n"); for (i = 0; i != 16; ++i) if (mmc[i]) printf("-- MM %2d %15lld\n", i, mmc[i]); printf("\n"); printf("-- Mapping quality statistics:\n\n"); for (i = 0; i != 10; ++i) if (qualc_se[i] || qualc_pe[i]) printf("-- MQ %1d0-%1d9 %15lld %15lld\n", i, i, qualc_se[i], qualc_pe[i]); printf("\n"); printf("-- Flag statistics:\n\n"); for (i = 0; i != 256; ++i) if (flagc[i]) printf("-- FG %3d %15lld\n", i, flagc[i]); printf("\n"); } int ma_mapstat(int argc, char *argv[]) { if (argc == 1) { fprintf(stderr, "Usage: maq mapstat \n"); return 1; } gzFile fp = (strcmp(argv[1], "-") == 0)? gzdopen(STDIN_FILENO, "r") : gzopen(argv[1], "r"); mapping_stat(fp); gzclose(fp); return 0; } maq-0.7.1/merge.cc0000644000076600000240000000554611027727762012302 0ustar lh3staff#include #include #include #include #include #include "algo.hh" #include "maqmap.h" #include "main.h" #define HEAP_EMPTY 0xffffffffffffffffull typedef struct { int i; bit64_t pos; maqmap1_t *m1; } mapping_heap_t; inline bool operator < (const mapping_heap_t &a, const mapping_heap_t &b) { return (a.pos > b.pos); // note that this is ">", not "<" } // This function will open "n" files at the same time. On most OS, there is a limit. // This is a O(N log n) algorithm, where N is the total number of reads and n is // the number of files. void mapping_merge_core(char *out, int n, char **fn) { gzFile *fp, fpout; mapping_heap_t *heap; maqmap_t **mm, *mm_out; int n_ref; fpout = (strcmp(out, "-") == 0)? gzdopen(fileno(stdout), "w") : gzopen(out, "w"); assert(fpout); fp = (gzFile*)calloc(n, sizeof(gzFile)); heap = (mapping_heap_t*)calloc(n, sizeof(mapping_heap_t)); mm = (maqmap_t**)calloc(n, sizeof(maqmap_t*)); bit64_t c = 0; for (int i = 0; i != n; ++i) { mapping_heap_t *h; fp[i] = gzopen(fn[i], "r"); assert(fp[i]); // It would be much better if this program can check whether reads are // aligned to the same reference. However, I am lazy now. I trust // endusers to do the right things. mm[i] = maqmap_read_header(fp[i]); c += mm[i]->n_mapped_reads; h = heap + i; h->i = i; h->m1 = (maqmap1_t*)malloc(sizeof(maqmap1_t)); if (maqmap_read1(fp[i], h->m1)) h->pos = ((bit64_t)h->m1->seqid<<32) | h->m1->pos; else h->pos = HEAP_EMPTY; } // fill mm_out, write to file and then delete it. mm_out = maq_new_maqmap(); n_ref = mm_out->n_ref = mm[0]->n_ref; mm_out->n_mapped_reads = c; mm_out->ref_name = mm[0]->ref_name; maqmap_write_header(fpout, mm_out); mm_out->ref_name = 0; mm_out->n_ref = 0; maq_delete_maqmap(mm_out); // initialize the heap int l_record; algo_heap_make(heap, n); while (heap->pos != HEAP_EMPTY) { gzwrite(fpout, heap->m1, sizeof(maqmap1_t)); if ((l_record = maqmap_read1(fp[heap->i], heap->m1)) != 0) { if (l_record != sizeof(maqmap1_t)) { fprintf(stderr, "[mapping_mapmerge_core] apparently truncated .map file. Abort!\n"); exit(1); } else if ((int)heap->m1->seqid >= n_ref) { fprintf(stderr, "[mapping_mapmerge_core] the %d-th .map file seems to corrupt (%d != %d). Abort!\n", heap->i + 1, heap->m1->seqid, mm_out->n_ref); exit(1); } heap->pos = ((bit64_t)heap->m1->seqid<<32) | heap->m1->pos; } else heap->pos = HEAP_EMPTY; algo_heap_adjust(heap, 0, n); } // free for (int i = 0; i != n; ++i) { gzclose(fp[i]); free(heap[i].m1); maq_delete_maqmap(mm[i]); } free(mm); gzclose(fpout); free(fp); free(heap); } int ma_mapmerge(int argc, char *argv[]) { if (argc < 3) { fprintf(stderr, "Usage: maq mapmerge [...]\n"); return 1; } mapping_merge_core(argv[1], argc - 2, argv + 2); return 0; } maq-0.7.1/missing0000755000076600000240000002557710756564017012301 0ustar lh3staff#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2006-05-10.23 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # 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 2, 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. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). case $1 in lex|yacc) # Not GNU programs, they don't have --version. ;; tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $1 in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: maq-0.7.1/pair_stat.cc0000644000076600000240000001461310766735650013170 0ustar lh3staff#include #include #include #include #include #include "match.hh" #include "stdhash.hh" #include "main.h" #include "bfa.h" #define HIGHQ 30 #define WINSIZE 1000 template static long algo_extend(int size, const TYPE *array, int pos, int *begin, int *end) { if (array[pos] < 0) return -1; long score, ret, max; int max_pos; max = score = 0; max_pos = -1; for (int i = pos; i != size; ++i) { score += array[i]; if (score > max) { max = score; max_pos = i; } if (score < 0) break; } *end = max_pos + 1; ret = max; max = score = 0; max_pos = -1; for (int i = pos; i >= 0; --i) { score += array[i]; if (score > max) { max = score; max_pos = i; } if (score < 0) break; } *begin = max_pos; ret += max; return ret - array[pos]; } static void paircov_mask(short *counter, bit8_t *depth, int seqid, nst_bfa1_t *l, gzFile fp_map) { maqmap1_t *m1, mm1; m1 = &mm1; while (maqmap_read1(fp_map, m1)) { if (int(m1->seqid) != seqid) continue; if (m1->flag == (PAIRFLAG_PAIRED|PAIRFLAG_FR) && m1->dist > 0) { // pair depth short *begin = counter + (m1->pos>>1); short *end = begin + m1->dist; for (short *p = begin; p != end; ++p) if (*p < 0x7fff) ++(*p); } { // read depth bit8_t *begin = depth + (m1->pos>>1) - 1; bit8_t *end = depth + m1->size + (m1->pos>>1); for (bit8_t *p = begin; p != end; ++p) if (*p < 0xff) ++(*p); } } } static int MIN_PAIRCOV = 1; static int MIN_N_LEN = 250; static void paircov_core(FILE *fp_bfa, gzFile fp_map) { nst_bfa1_t *l; int seqid = 0, k, i; hash_map_char *hash_map = new hash_map_char; maqmap_t *mm = maqmap_read_header(fp_map); // skip the sequence names for (k = 0; k != mm->n_ref; ++k) hash_map->insert(mm->ref_name[k], k); k = mm->n_mapped_reads; l = nst_load_bfa1(fp_bfa); assert(l); int ret = hash_map->find(l->name, &seqid); assert(ret); short *counter = (short*)calloc(l->ori_len, 2); bit8_t *depth = (bit8_t*)calloc(l->ori_len, 1); paircov_mask(counter, depth, seqid, l, fp_map); // calculate mean long double mean = 0.0, depth_mean = 0.0; for (i = 0; i != l->ori_len; ++i) { mean += counter[i]; depth_mean += depth[i]; } mean /= l->ori_len; depth_mean /= l->ori_len; fprintf(stderr, "mean=%Lf,depth_mean=%Lf\n", mean, depth_mean); for (i = 0, k = -1; i < l->ori_len; ++i) { int is_N = ((l->mask[i>>5]>>((31-(i&0x1f))<<1))&3)? 0 : 1; if (is_N) { int j; for (j = i; j < l->ori_len; ++j) if ((l->mask[j>>5]>>((31-(j&0x1f))<<1))&3) break; if (j - i > MIN_N_LEN) { if (k >= 0) printf("NN\t%s\t%d\t%d\t%d\n", l->name, k+1, i, i - k); k = j; } i = j - 1; } } // detect absolute break point for (i = 0; i < l->ori_len; ++i) { if (counter[i] > MIN_PAIRCOV) { int j; for (j = i; j < l->ori_len; ++j) if (counter[j] <= MIN_PAIRCOV) break; printf("AB\t%s\t%d\t%d\t%d\n", l->name, i+1, j, j - i); i = j - 1; } } free(counter); free(depth); nst_delete_bfa1(l); maq_delete_maqmap(mm); delete hash_map; } int ma_paircov(int argc, char *argv[]) { if (argc < 3) { fprintf(stderr, "Usage: maq paircov [-d %d] [-n %d] \n", MIN_PAIRCOV, MIN_N_LEN); return 1; } FILE *fp_bfa = fopen(argv[1], "r"); gzFile fp_map = gzopen(argv[2], "r"); assert(fp_bfa); assert(fp_map); paircov_core(fp_bfa, fp_map); fclose(fp_bfa); gzclose(fp_map); return 0; } static int abpair_usage() { fprintf(stderr, "maq abpair \n"); return 0; } int ma_abpair(int argc, char *argv[]) { if (argc == 1) return abpair_usage(); gzFile fpin = gzopen(argv[1], "r"); maqmap_t *mm = maqmap_read_header(fpin); maqmap1_t *m1, mm1; bit64_t n_diffchr, n_nomatch, n_good, n_badori, n_single, n_bad_dist; bit64_t n_diffchr2, n_badori2, n_bad_dist2, n_good_alt, n_sw; n_diffchr = n_nomatch = n_good = n_badori = n_single = n_bad_dist = n_sw = 0; n_diffchr2 = n_badori2 = n_bad_dist2 = n_good_alt = 0; fprintf(stdout, "CC\tDC readName chr coor altMapQ\n"); fprintf(stdout, "CC\tSC readName chr flag altMapQ coor1 coor2\n"); m1 = &mm1; while (maqmap_read1(fpin, m1)) { if (m1->flag && m1->alt_qual >= HIGHQ) ++n_good_alt; if (m1->flag == 0) ++n_single; else if (m1->flag == (PAIRFLAG_PAIRED|PAIRFLAG_FR)) ++n_good; else if (m1->flag == (PAIRFLAG_FR|PAIRFLAG_SW)) ++n_sw; else if (m1->flag == PAIRFLAG_NOMATCH) ++n_nomatch; else if (m1->flag == PAIRFLAG_DIFFCHR) { ++n_diffchr; if (m1->alt_qual >= HIGHQ) ++n_diffchr2; m1->name[MAX_NAMELEN-1] = 0; if (m1->alt_qual > 0) printf("DC\t%s\t%s\t%d\t%d\n", m1->name, mm->ref_name[m1->seqid], (m1->pos>>1) + 1, m1->alt_qual); } else { if (m1->flag & PAIRFLAG_FR) { ++n_bad_dist; if (m1->alt_qual >= HIGHQ) ++n_bad_dist2; } else { ++n_badori; if (m1->alt_qual >= HIGHQ) ++n_badori2; } if (m1->dist > 0 && m1->alt_qual > 0) { // print out bad pairs m1->name[MAX_NAMELEN-1] = 0; printf("SC\t%s\t%s\t%d\t%d\t%d\t%d\n", m1->name, mm->ref_name[m1->seqid], m1->flag, m1->alt_qual, (m1->pos>>1) + 1, (m1->pos>>1) + m1->size); } } } // print out stat in the stderr bit64_t n_paired = mm->n_mapped_reads - n_single; fprintf(stdout, "CC all the numbers mean 'number of reads', not 'number of pairs'.\n"); fprintf(stdout, "MM total mapped reads: %llu\n", mm->n_mapped_reads); fprintf(stdout, "MM total mapped paired reads: %llu (/%llu = %.3f%%)\n", n_paired, mm->n_mapped_reads, 100.0 * n_paired / mm->n_mapped_reads); if (n_paired) { fprintf(stdout, "MM correctly paired reads: %llu (/%llu = %.3f%%)\n", n_good, n_paired , 100.0 * n_good / n_paired); fprintf(stdout, "MM reads added by Smith-Waterman alignment: %llu\n", n_sw); fprintf(stdout, "MM one end unmapped: %llu (/%llu = %.3f%%)\n", n_nomatch, n_paired, 100.0 * n_nomatch / n_paired); fprintf(stdout, "MM ends to difference chr: %llu (/%llu = %.3f%%)\n", n_diffchr, n_paired, 100.0 * n_diffchr / n_paired); fprintf(stdout, "MM bad orientation: %llu (/%llu = %.3f%%)\n", n_badori, n_paired, 100.0 * n_badori / n_paired); fprintf(stdout, "MM bad distance: %llu (/%llu = %.3f%%)\n", n_bad_dist, n_paired, 100.0 * n_bad_dist / n_paired); fprintf(stdout, "MM Q%d alt_qual: %llu\n", HIGHQ, n_good_alt); fprintf(stdout, "MM Q%d ends to difference chr: %llu\n", HIGHQ, n_diffchr2); fprintf(stdout, "MM Q%d bad orientation: %llu\n", HIGHQ, n_badori2); fprintf(stdout, "MM Q%d bad distance: %llu\n", HIGHQ, n_bad_dist2); } maq_delete_maqmap(mm); gzclose(fpin); return 0; } maq-0.7.1/pileup.cc0000644000076600000240000001046410773300343012461 0ustar lh3staff#include #include #include #include #include "match.hh" #include "bfa.h" #include "assemble.h" #include "stdhash.hh" #include "main.h" /** main function for 'pileup' */ static int pileup_usage() { fprintf(stderr, "\n"); fprintf(stderr, "Usage: maq pileup [options] \n\n"); fprintf(stderr, "Options: -Q INT maximum sum of errors [60]\n"); fprintf(stderr, " -m INT maximum number of mismatches [7]\n"); fprintf(stderr, " -q INT minimum mapping quality [0]\n"); fprintf(stderr, " -l FILE only output required positions [null]\n"); fprintf(stderr, " -s use single-end mapping qualities\n"); fprintf(stderr, " -p discard abnormal pairs\n"); fprintf(stderr, " -d only show depth\n"); fprintf(stderr, " -v verbose mode\n"); fprintf(stderr, " -P print position on the read\n\n"); return 1; } int ma_pileup(int argc, char *argv[]) { extern hash_set_char *ma_load_snp_set(FILE *fp_list); int k, c, is_verbose, max_err, max_mm, seqid, min_q, is_single = 0, is_pair_only = 0, is_depth_only, is_show_pos; FILE *fp_bfa, *fpout, *fp_list; gzFile fp_map; nst_bfa1_t *l; is_verbose = is_show_pos = is_depth_only = 0; max_mm = max_err = -1; fp_list = 0; min_q = 0; while ((c = getopt(argc, argv, "Q:l:q:vsdpm:P")) >= 0) { switch (c) { case 'd': is_depth_only = 1; break; case 'p': is_pair_only = 1; break; case 'q': min_q = atoi(optarg); break; case 'v': is_verbose = 1; break; case 'P': is_show_pos = 1; break; case 'l': fp_list = fopen(optarg, "r"); assert(fp_list); break; case 'Q': max_err = atoi(optarg); break; case 's': is_single = 1; break; case 'm': max_mm = atoi(optarg); break; default: return pileup_usage(); } } if (argc - optind < 2) return pileup_usage(); fpout = stdout; fp_bfa = fopen(argv[optind], "r"); fp_map = (strcmp(argv[optind+1], "-") == 0)? gzdopen(fileno(stdin), "r") : gzopen(argv[optind+1], "r"); assert(fp_bfa && fp_map); hash_set_char *hash = 0; if (fp_list) { hash = ma_load_snp_set(fp_list); fclose(fp_list); } char key[256]; rolling_buf_t *buf = (rolling_buf_t*)calloc(1, sizeof(rolling_buf_t)); buf->buf = (maqmap1_t*)calloc(ROLLING_BUF_SIZE, sizeof(maqmap1_t)); assemble_pos_t *pos = (assemble_pos_t*)calloc(1, sizeof(assemble_pos_t)); maqmap_t *mm = maqmap_read_header(fp_map); // skip the sequence names hash_map_char *hash_map = new hash_map_char; for (k = 0; k != mm->n_ref; ++k) hash_map->insert(mm->ref_name[k], k); k = mm->n_mapped_reads; while ((l = nst_load_bfa1(fp_bfa)) != 0) { if (!hash_map->find(l->name, &seqid)) { nst_delete_bfa1(l); continue; } for (int i = 0; i != l->len; ++i) { bit64_t word = l->seq[i]; bit64_t mask = l->mask[i]; for (int j = 31; j >= 0; --j) { int coor = (i<<5) | (31 - j); if (coor >= l->ori_len) break; assemble_get_pos(seqid, coor, fp_map, buf, pos, max_mm, max_err, min_q, is_single, is_pair_only); if (hash) { sprintf(key, "%s.%d", l->name, coor + 1); if (!hash->find(key)) continue; } fprintf(fpout, "%s\t%d\t%c\t%d", l->name, coor + 1, (mask>>(j<<1)&3)? "ACGT"[word>>(j<<1)&3] : 'N', pos->n_bases); if (is_depth_only) { fputc('\n', fpout); continue; } fprintf(fpout, "\t@"); for (k = 0; k != pos->n_bases; ++k) { assemble_posinfo_t *p = pos->bases + k; if ((p->info>>22&1) && (word>>(j<<1)&3) == (p->info>>16&3)) c = (p->info>>18&1)? '.' : ','; else if ((p->info>>22&1) == 0) c = (p->info>>18&1)? 'n' : 'N'; else c = ((p->info>>18&1)? "acgt" : "ACGT")[p->info>>16&3]; fputc(c, fpout); } if (is_verbose) { fprintf(fpout, "\t@"); for (k = 0; k != pos->n_bases; ++k) fputc((pos->bases[k].info>>8&0x3f) + 33, fpout); fprintf(fpout, "\t@"); for (k = 0; k != pos->n_bases; ++k) { c = (pos->bases[k].info&0x7f) + 33; fputc((c > 126)? 126 : c, fpout); } } if (is_show_pos) { fputc('\t', fpout); for (k = 0; k != pos->n_bases; ++k) fprintf(fpout, "%d,", pos->bases[k].pos+1); } fputc('\n', fpout); } } nst_delete_bfa1(l); } gzclose(fp_map); fclose(fp_bfa); maq_delete_maqmap(mm); delete hash_map; if (hash) delete hash; free(buf->buf); free(buf); free(pos->bases); free(pos); return 0; } maq-0.7.1/rbcc.cc0000644000076600000240000000746610766735650012123 0ustar lh3staff#include #include #include #include #include #include #include #include "main.h" #include "const.h" #include "stdhash.hh" hash_map_char *cns_load_dbSNP(FILE *fp_dbSNP) { hash_map_char *hash; char name[256], str1[256], str2[256]; float het_rate; int qual, pos; hash = new hash_map_char; hash->resize(100000); while (fscanf(fp_dbSNP, "%s%d%s%s%d%f", name, &pos, str1, str2, &qual, &het_rate) == 6) { sprintf(str1, "%s.%d", name, pos); hash->insert(str1, qual); } return hash; } static inline bit32_t rbcc_core(bit32_t high, bit32_t hrate) { bit32_t b[3], q[2], tmp; b[0] = high>>24&0xf; b[1] = high>>12&0xf; b[2] = high>>8&0xf; q[0] = high>>16&0xff; q[1] = high&0xff; if (nst_nt16_count_table[b[0]] == 2) { // the best call is a het q[0] += hrate; } else if (nst_nt16_count_table[b[1]] == 2) { // the second best call is a het if (q[0] - hrate < 0) { // then the het should be the best call tmp = b[0]; b[0] = b[1]; b[1] = tmp; // swap b[0] and b[1] q[1] += q[0]; q[0] = hrate - q[0]; } else { // just adjust qualities q[0] -= hrate; q[1] += hrate; } } else if (nst_nt16_count_table[b[2]] == 2) { // the third is a het if (q[0] + q[1] < hrate) { // then the het should be the best call tmp = b[0]; b[0] = b[2]; b[2] = b[1]; b[1] = tmp; // swap tmp = q[0]; q[0] = hrate - q[0] - q[1]; q[1] = tmp; } else if (q[1] < hrate) { // then the het should be the second best call tmp = b[1]; b[1] = b[2]; b[2] = tmp; tmp = q[0] + q[1] - hrate; q[1] = hrate - q[1]; q[0] = tmp; } else q[1] -= hrate; // just adjust qualities } if (q[0] > 255) q[0] = 255; if (q[1] > 255) q[1] = 255; return (high&0xf0000000u) | b[0]<<24 | b[1]<<12 | b[2]<<8 | q[0]<<16 | q[1]; } void cns_rbcc(gzFile fpout, gzFile fp, FILE *fp_dbSNP, float r_ori, float r_good, float r_bad) { int i, len; char key[256]; bit32_t q_good, q_bad; assert(r_ori < 1.0 && r_good < 1.0 && r_bad < 1.0); q_good = int(4.343 * log(r_good / (1.0-r_good) / (r_ori / (1.0-r_ori))) + 0.5); q_bad = int(4.343 * log(r_bad / (1.0-r_bad ) / (r_ori / (1.0-r_ori))) + 0.5); hash_map_char *hash = cns_load_dbSNP(fp_dbSNP); fprintf(stderr, "[cns_rbcc] %d SNPs are loaded.\n", hash->size()); while (gzread(fp, &len, sizeof(int))) { gzwrite(fpout, &len, sizeof(int)); char *name = (char*)malloc(len); gzread(fp, name, len); gzwrite(fpout, name, len); gzread(fp, &len, sizeof(int)); gzwrite(fpout, &len, sizeof(int)); for (i = 0; i != len; ++i) { bit32_t low, high; int qual; gzread(fp, &low, sizeof(bit32_t)); gzwrite(fpout, &low, sizeof(bit32_t)); gzread(fp, &high, sizeof(bit32_t)); sprintf(key, "%s.%d", name, i+1); if (hash->find(key, &qual)) high = rbcc_core(high, qual? q_good : q_bad); gzwrite(fpout, &high, sizeof(bit32_t)); } free(name); } delete hash; } int ma_rbcc(int argc, char *argv[]) { gzFile fp, fpout; FILE *fp_dbSNP; int c; float r_ori, r_good, r_bad; r_ori = 0.001; r_good = 0.1; r_bad = 0.01; while ((c = getopt(argc, argv, "r:g:b:")) >= 0) { switch (c) { case 'r': r_ori = atof(optarg); break; case 'g': r_good = atof(optarg); break; case 'b': r_bad = atof(optarg); break; } } if(argc - optind < 3) { fprintf(stderr, "\n"); fprintf(stderr, "Usage: maq rbcc [options] \n\n"); fprintf(stderr, "Options: -r FLOAT original prior [0.001]\n"); fprintf(stderr, " -g FLOAT prior for validated SNPs [0.1]\n"); fprintf(stderr, " -b FLOAT prior for the rest of SNPs [0.01]\n\n"); return 1; } fpout = gzopen(argv[optind], "w"); fp = gzopen(argv[optind+1], "r"); fp_dbSNP = fopen(argv[optind+2], "r"); assert(fp && fpout && fp_dbSNP); cns_rbcc(fpout, fp, fp_dbSNP, r_ori, r_good, r_bad); gzclose(fp); gzclose(fpout); fclose(fp_dbSNP); return 0; } maq-0.7.1/read.cc0000644000076600000240000002002411067172577012104 0ustar lh3staff#include #include #include #include #include #include #include "read.h" #include "match.hh" #include "main.h" #define TRIM_LOWQ 10 #define TRIM_FRACTION 0.5 void delete_longreads(longreads_t *lr) { int i; if (lr == 0) return; if (lr->seq) { for (i = 0; i != lr->n_reads; ++i) free(lr->seq[i]); free(lr->seq); } if (lr->name) { for (i = 0; i != (lr->n_reads>>1); ++i) free(lr->name[i]); free(lr->name); } free(lr); } longreads_t *ma_load_reads(gzFile fp_l, int size_l, gzFile fp_r, int size_r) { seq_t seq; int j, l; char name[256]; longreads_t *lr = (longreads_t*)calloc(1, sizeof(longreads_t)); fprintf(stderr, "[ma_load_reads] loading reads...\n"); INIT_SEQ(seq); j = 0; while ((l = ma_load_1read(fp_l, &seq, name)) >= 0) { if (size_l == 0) { size_l = l; fprintf(stderr, "[ma_load_reads] set length of the first read as %d.\n", size_l); } if (l < size_l) continue; if ((j & 0xfffff) == 0) { // need to enlarge the arrays lr->name = (char**)realloc(lr->name, sizeof(char*) * (j + 0x100000)); lr->seq = (bit8_t**)realloc(lr->seq, sizeof(bit8_t*) * ((j<<1) + 0x200000)); } lr->name[j] = strdup(name); lr->seq[j<<1] = (bit8_t*)malloc(size_l); memcpy(lr->seq[j<<1], seq.s, size_l); if (fp_r) { // read the second read assert((l = ma_load_1read(fp_r, &seq, name)) >= 0); if (size_r == 0) { size_r = l; fprintf(stderr, "[ma_load_reads] set length of the second read as %d.\n", size_r); } lr->seq[(j<<1) | 1] = (bit8_t*)malloc(size_r); assert(l >= size_r); memcpy(lr->seq[(j<<1) | 1], seq.s, size_r); int tl = strlen(name); assert(strncmp(name, lr->name[j], tl-1) == 0); } else lr->seq[(j<<1) | 1] = 0; ++j; } free(seq.s); lr->n_reads = j<<1; lr->size_l = size_l; lr->size_r = size_r; fprintf(stderr, "[ma_load_reads] %d*2 reads loaded.\n", j); return lr; } static void auto_trim(longreads_t *lr) { int size[2], i, k; int *cnt[2]; size[0] = lr->size_l; size[1] = lr->size_r; cnt[0] = (int*)calloc(size[0], sizeof(int)); cnt[1] = (int*)calloc(size[1], sizeof(int)); for (i = 0; i != lr->n_reads; ++i) { int s = size[i&1]; bit8_t *seq; if (s == 0) continue; seq = lr->seq[i]; for (k = 0; k != s; ++k) if ((seq[k]&0x3f) >= TRIM_LOWQ) ++cnt[i&1][k]; } for (i = 0; i != 2; ++i) { if (size[i] == 0) continue; for (k = size[i] - 1; k >= 0; --k) if (2.0 * cnt[i][k] / lr->n_reads >= TRIM_FRACTION) break; size[i] = k + 1; } lr->size_l = size[0]; lr->size_r = size[1]; fprintf(stderr, "[auto_trim] trimed length: (%d, %d)\n", lr->size_l, lr->size_r); free(cnt[0]); free(cnt[1]); } match_info_t *ma_longread2read(const longreads_t *lr) { match_info_t *matches; read_t mask[2]; int size[2] = { lr->size_l, lr->size_r }; int i, n_reads = lr->n_reads; fprintf(stderr, "[ma_longread2read] encoding reads... "); mask[0] = ~(~read_t(0)<<(size[0]<<1)); mask[1] = ~(~read_t(0)<<(size[1]<<1)); matches = (match_info_t*)calloc(n_reads, sizeof(match_info_t)); assert(matches); for (i = 0; i != n_reads; ++i) { match_info_t *match; read_t s, q, m; bit8_t *r = lr->seq[i]; int cur_size = size[i&1]; match = matches + i; s = q = m = 0; for (int k = 0; k != cur_size; ++k) { int tmp = (int)r[k]; s <<= 2; m <<= 2; q <<= 2; if (tmp&0x3f) { // a valid residue s |= tmp>>6; m |= 3; } tmp = (int)((tmp&0x3f) / 10.0 + 0.5); q |= (tmp < 4)? tmp : 0x3; } match->s = s; match->q = q; match->m = ~m & mask[i&1]; match->i1 = match->i2 = MA_NO_MATCH; match->seqid1 = match->last_seqid = -1; } fprintf(stderr, "%d sequences processed.\n", n_reads); return matches; } void ma_init_match_data(match_data_t *d, gzFile fp_l, int *size_l, gzFile fp_r, int *size_r, int is_trim, const char *adapter, gzFile hits_fp) { longreads_t *lr; int i; lr = ma_load_reads(fp_l, *size_l, fp_r, *size_r); if (adapter[0]) ma_trim_adapter(adapter, 0, lr); // prealignment trimming if (is_trim) auto_trim(lr); d->n_reads = lr->n_reads; d->match = ma_longread2read(lr); *size_l = lr->size_l; *size_r = lr->size_r; if (hits_fp) { // dump read names gzprintf(hits_fp, "C\tC comments\n"); gzprintf(hits_fp, "C\tR readID read_name\n"); gzprintf(hits_fp, "C\tB chr_name\n"); gzprintf(hits_fp, "C\tA readID position strand score\n"); gzprintf(hits_fp, "C\tE chr_name\n"); for (i = 0; i != (lr->n_reads>>1); ++i) gzprintf(hits_fp, "R\t%d\t%s\n", i<<1, lr->name[i]); } delete_longreads(lr); d->pair = 0; if (*size_r) { d->pair = (pair_info_t*)calloc(d->n_reads>>1, sizeof(pair_info_t)); for (i = 0; i != (d->n_reads>>1); ++i) d->pair[i].i1 = d->pair[i].i2 = MA_NO_MATCH; } } void maq_methy_modify(match_data_t *d, match_aux_t *o) { int i, k, size[2]; size[0] = o->size_l; size[1] = o->size_r; for (i = 0; i != d->n_reads; ++i) { int cur_size = size[i&1]; match_info_t *m = d->match + i; for (k = 0; k < cur_size; ++k) { int x = (cur_size-1-k)<<1; if (o->methy_mode == 'c') { if ((m->s>>x&0x3) == 1) // a C here m->s |= read_t(0x3) << x; // C->T } else if (o->methy_mode == 'g') { if ((m->s>>x&0x3) == 2) // a G here m->s ^= read_t(0x2) << x; // G->A } } } } static inline void show_read(int size, read_t s) { for (int i = 0; i < size; ++i) { fputc("ACGT"[s>>((size-1-i)<<1)&0x3], stderr); } fputc('\n', stderr); } int ma_bfq2fastq(int argc, char *argv[]) { if (argc < 3) { fprintf(stderr, "Usage: maq bfq2fastq \n"); return 1; } gzFile fpin; FILE *fpout; seq_t seq; char name[256]; int i, l; INIT_SEQ(seq); fpin = (strcmp(argv[1], "-") == 0)? gzdopen(STDIN_FILENO, "r") : gzopen(argv[1], "r"); fpout = (strcmp(argv[2], "-") == 0)? stdout : fopen(argv[2], "w"); while ((l = ma_load_1read(fpin, &seq, name)) >= 0) { fprintf(fpout, "@%s\n", name); for (i = 0; i != l; ++i) fputc((seq.s[i] == 0)? 'N' : "ACGT"[seq.s[i]>>6&3], fpout); fprintf(fpout, "\n+\n"); for (i = 0; i != l; ++i) fputc((seq.s[i]&0x3f) + 33, fpout); fputc('\n', fpout); } gzclose(fpin); fclose(fpout); return 0; } // filter full A reads (for Sanger's "cat" format only, NOT single end or other format) #define MATCH_A 11 #define NONMATCH_A -59 static void filter_full_A(FILE *fq, int is_pair, int l1) { int l, n_filt = 0, n_tot = 0, l2 = 0; seq_t seq, qual; char name[256]; INIT_SEQ(seq); INIT_SEQ(qual); while ((l = seq_read_fastq(fq, &seq, &qual, name)) >= 0) { int i, score, b = l, e, max, n_A1, n_A, n_N1, n_N, c; double r1, r2; e = n_A1 = n_A = n_N1 = n_N = 0; ++n_tot; if (l1 == 0) l1 = l>>1; if (l2 == 0) l2 = l - l1; for (i = score = max = 0; i != l; ++i) { qual.s[i] += 33; c = toupper(seq.s[i]); if (c == 'A' || c == 'N') { score += MATCH_A; ++n_A; if (c == 'N') ++n_N; if (i < l1) { ++n_A1; if (c == 'N') ++n_N1; } } else score += NONMATCH_A; if (score < 0) score = 0; if (score > max) { max = score; e = i; } } for (i = e, score = max = 0; i >= 0; --i) { score += (seq.s[i] == 'A' || seq.s[i] == 'N')? MATCH_A : NONMATCH_A; if (score > max) { max = score; b = i; } if (score < 0) break; } r1 = (double)(e-b+1) / l; r2 = (double)n_A / l; if (is_pair) { if ((n_N1 >= 5 || n_N-n_N1 >= 5) || r1 >= 0.5 || r2 >= 0.9 || (r1 >= 0.45 && r2 >= 0.75)) { ++n_filt; // fprintf(stderr, "%s\t%s\t%s\n", name, seq.s, qual.s); } else printf("@%s\n%s\n+\n%s\n", name, seq.s, qual.s); } else { if (n_N >= 5 || r1 >= 0.9) { ++n_filt; } else printf("@%s\n%s\n+\n%s\n", name, seq.s, qual.s); } } free(seq.s); free(qual.s); fprintf(stderr, "[filter_full_A] %d out of %d reads have been sorted out\n", n_filt, n_tot); } int maq_catfilter(int argc, char *argv[]) { FILE *fp; int c, is_pair = 1, l1 = 0; while ((c = getopt(argc, argv, "s1:")) >= 0) { switch (c) { case '1': l1 = atoi(optarg); break; case 's': is_pair = 0; break; } } if (argc == optind) { fprintf(stderr, "Usage: maq catfilter [-s] [-1 0] \n"); return 1; } fp = (strcmp(argv[optind], "-") == 0)? stdin : fopen(argv[optind], "r"); assert(fp); filter_full_A(fp, is_pair, l1); fclose(fp); return 0; } maq-0.7.1/read.h0000644000076600000240000000214311005147054011730 0ustar lh3staff#ifndef LH3_READ_H #define LH3_READ_H #include #include "dword.hh" #include "const.h" #include "seq.h" #define MA_NONAME typedef struct __longreads_t { int size_l, size_r; int n_reads; bit8_t **seq; char **name; } longreads_t; struct __match_data_t; struct __match_aux_t; #ifdef __cplusplus extern "C" { #endif longreads_t *ma_load_reads(gzFile fp_l, int size_l, gzFile fp_r, int size_r); void delete_longreads(longreads_t *lr); void ma_init_match_data(struct __match_data_t *d, gzFile fp_l, int *size_l, gzFile fp_r, int *size_r, int is_trim, const char *adapter, gzFile hits_fp); void maq_methy_modify(struct __match_data_t *d, struct __match_aux_t *o); static inline int ma_load_1read(gzFile fp, seq_t *seq, char *name) { int len; if (gzread(fp, &len, sizeof(int)) == 0) return -1; gzread(fp, name, sizeof(char) * len); gzread(fp, &len, sizeof(int)); if (seq->m < len + 1) { seq->m = len + 1; seq->s = (unsigned char*)realloc(seq->s, sizeof(char) * seq->m); } seq->l = len; gzread(fp, seq->s, sizeof(char) * len); return len; } #ifdef __cplusplus } #endif #endif maq-0.7.1/rmdup.cc0000644000076600000240000000750110773300343012310 0ustar lh3staff#include #include #include #include #include #include "maqmap.h" #include "stdhash.hh" #include "main.h" #define BUFFER_SIZE 0x10000 typedef struct { int n, max; maqmap1_t **m1; } tmp_stack_t; typedef hash_map_misc best_hash_t; static int is_auto_trim_name = 1; static inline void stack_insert(tmp_stack_t *stack, maqmap1_t *m1) { if (stack->n == stack->max) { stack->max += 0x10000; stack->m1 = (maqmap1_t**)realloc(stack->m1, sizeof(maqmap1_t) * stack->max); } stack->m1[stack->n++] = m1; } static inline void dump_best(tmp_stack_t *stack, best_hash_t *best_hash, gzFile fpout) { for (int i = 0; i != stack->n; ++i) { gzwrite(fpout, stack->m1[i], sizeof(maqmap1_t)); free(stack->m1[i]); } stack->n = 0; if (best_hash->size() > BUFFER_SIZE) best_hash->clear(); } static inline char *trim_name(char *name, char *buf) { if (is_auto_trim_name) { int c1, c2, tl = strlen(name); if (tl <= 1) return name; c1 = name[tl-1]; c2 = name[tl-2]; if ((c1 == '1' || c1 == '2') && c2 == '/') { // trim the last character strncpy(buf, name, tl-1); buf[tl-1] = 0; return buf; } else return name; // keep the original name } return name; } void maq_rmdup_core(gzFile fpin, gzFile fpout) { maqmap_t *mm; maqmap1_t m1; int last_seqid = -1; hash_set_char *del_set = new hash_set_char; best_hash_t *best_hash = new best_hash_t; bit32_t last_pos = 0xffffffffu; bit64_t n_checked = 0, n_removed = 0; char buf[MAX_NAMELEN+1]; tmp_stack_t stack; stack.n = stack.max = 0; stack.m1 = 0; mm = maqmap_read_header(fpin); maqmap_write_header(fpout, mm); del_set->resize(4 * BUFFER_SIZE); best_hash->resize(3 * BUFFER_SIZE); while (gzread(fpin, &m1, sizeof(maqmap1_t)) == sizeof(maqmap1_t)) { if (int(m1.seqid) != last_seqid || last_pos != m1.pos>>1) { dump_best(&stack, best_hash, fpout); // write the result if (int(m1.seqid) != last_seqid) { best_hash->clear(); if (del_set->size()) { // check fprintf(stderr, "[maq_rmdup_core] %u unmatched pairs\n", unsigned(del_set->size())); del_set->clear(); } last_seqid = m1.seqid; fprintf(stderr, "[maq_rmdup_core] processing reference %s...\n", mm->ref_name[m1.seqid]); } } if (m1.dist == 0 || abs(m1.dist) <= m1.size) { // SE, singlet, diff chr or very short insert size gzwrite(fpout, &m1, sizeof(maqmap1_t)); } else if (m1.dist > 0) { // paired, head ++n_checked; bit64_t key = (bit64_t(m1.pos)<<32) | m1.dist; maqmap1_t *p; if (best_hash->find(key, &p)) { // found in best_hash ++n_removed; if (p->map_qual < m1.map_qual) { // m1 is better del_set->insert(trim_name(p->name, buf)); // current best will be removed memcpy(p, &m1, sizeof(maqmap1_t)); // replaced as m1 } else del_set->insert(trim_name(m1.name, buf)); // m1 will be removed } else { // not found p = (maqmap1_t*)malloc(sizeof(maqmap1_t)); memcpy(p, &m1, sizeof(maqmap1_t)); best_hash->insert(key, p); stack_insert(&stack, p); } } else { // paired, tail char *s = trim_name(m1.name, buf); if (del_set->find(s)) del_set->erase(s); else gzwrite(fpout, &m1, sizeof(maqmap1_t)); } last_pos = m1.pos>>1; } dump_best(&stack, best_hash, fpout); maq_delete_maqmap(mm); delete del_set; delete best_hash; free(stack.m1); fprintf(stderr, "[maq_rmdup_core] %lld / %lld = %.4lf\n", n_removed, n_checked, (double)n_removed/n_checked); } int maq_rmdup(int argc, char *argv[]) { gzFile fpin, fpout; if (argc < 3) { fprintf(stderr, "Usage: maq rmdup \n"); return 1; } fpout = (strcmp(argv[1], "-") == 0)? gzdopen(fileno(stdout), "w") : gzopen(argv[1], "w"); fpin = (strcmp(argv[2], "-") == 0)? gzdopen(fileno(stdin), "r") : gzopen(argv[2], "r"); assert(fpin && fpout); maq_rmdup_core(fpin, fpout); gzclose(fpin); gzclose(fpout); return 0; } maq-0.7.1/scripts/0000755000076600000240000000000011065656455012353 5ustar lh3staffmaq-0.7.1/scripts/asub0000755000076600000240000000700611065656455013236 0ustar lh3staff#!/usr/bin/perl -w # Author: lh3 use strict; use warnings; use Getopt::Std; use Cwd qw/abs_path/; use Sys::Hostname qw/hostname/; my $version = "0.1.5"; my %opts = (R=>'', j=>'', k=>0, q=>'', c=>'', w=>'', M=>'', n=>''); getopts('R:j:k:q:c:pw:M:n:', \%opts); &usage if (-t STDIN && @ARGV == 0); my $is_run = ($opts{k} > 0 && $opts{j})? 1 : 0; if (!$is_run) { # prepare to run my $is_sge = &which('bsub')? 0 : 1; $opts{j} ||= sprintf("asub_$$%.3d", rand(1000)); my ($fh, $K); $K = 0; open($fh, ">$opts{j}.sh") || die; while (<>) { s/&\s*$//; # remove "&" at the end of the command next if (/^\s*$/); print $fh $_; ++$K; } close($fh); $_ = $opts{j}; my $cmd; $opts{c} = $K if ($opts{c} && $opts{c} > $K); $opts{q} = qq/-q $opts{q}/ if ($opts{q}); if (!$is_sge) { # LSF $opts{R} = qq/-R"$opts{R}"/ if ($opts{R}); $opts{c} = qq/\%$opts{c}/ if ($opts{c}); $opts{w} = qq/-w "$opts{w}"/ if ($opts{w}); $opts{n} = qq/-n $opts{n}/ if ($opts{n}); if ($opts{M}) { if ($opts{R}) { chop($opts{R}); # chop the tailing " $opts{R} .= qq/ select[mem>$opts{M}] rusage[mem=$opts{M}]"/; } else { $opts{R} = qq/-R"select[mem>$opts{M}] rusage[mem=$opts{M}]"/; } $opts{R} .= ' -M ' . ($opts{M}*1000); } $cmd = qq(mkdir -p $_.out $_.err && echo '$0 -j $_.sh -k \${LSB_JOBINDEX}' | bsub -J$_) . qq("[1-$K]$opts{c}" -o $_.out/\%I.out -e $_.err/\%I.err $opts{R} $opts{q} $opts{w}); } else { # SGE $opts{R} = qq/-l "$opts{R}"/ if ($opts{R}); $opts{w} = qq/-hold_jid $opts{w}/ if ($opts{w}); my $asub = abs_path($0); $cmd = qq(mkdir -p $_.out $_.err && echo '$asub -j $_.sh -k \${SGE_TASK_ID}' | qsub -N $_ -cwd ) . qq(-t 1-$K -o '$_.out/\$TASK_ID.out' -e '$_.err/\$TASK_ID.err' $opts{R} $opts{q} $opts{w} $opts{n}); } defined($opts{p})? (print "$cmd\n") : system($cmd); } else { # run the command warn("[asub] Hostname: ".hostname.", Arch-OS: ".&get_cpu_sys."\n"); my $fh; my $k = 0; open($fh, $opts{j}) || die; while (<$fh>) { chomp; last if ((++$k) == $opts{k}); } my $cmd = $_; close($fh); warn("[asub] Command: $_\n"); warn("[asub] --- BEGIN OF COMMAND STDERR ---\n"); my $ret = system($_); warn("[asub] --- END OF COMMAND STDERR ---\n"); warn("[asub] Return value: $ret\n"); exit($ret); } sub get_cpu_sys { my $dir = `uname -p 2>/dev/null`; $dir = `uname -m 2>/dev/null` if (!$dir || $dir =~ "unknown"); $dir .= '-'.`uname -s`; $dir = lc($dir); $dir =~ s/\s//g; return $dir; } sub which { my $file = shift; my $path = (@_)? shift : $ENV{PATH}; return if (!defined($path)); foreach my $x (split(":", $path)) { $x =~ s/\/$//; return "$x/$file" if (-x "$x/$file"); } return; } sub usage { die qq( Program: asub (Array Job submission with bsub/qsub) Version: $version Contact: Heng Li \n Usage: asub [options] \n Options: -R STR resources string [null] -w STR job dependency [null] -q STR queue name [default queue] -j STR job name [auto] -c INT number of processors (LSF only) [max] -M INT maximum memory in MB (Sanger LSF only) [null] -n INT # CPUs for a parallel job (LSF only) [null] -p print the submission command only Note: For option -R and -w, SGE and LSF have different syntax. Please check SGE/LSF manual page for details. Here are some examples for LSF: -R "select[type==X86_64&&mem>800] rusage[mem=800]" -w "done(my_job_001)" And for SGE: -R h_cpu=86400,h_data=1000000000 -w my_job_001 ); } maq-0.7.1/scripts/farm-run.pl0000755000076600000240000000764710766735647014470 0ustar lh3staff#!/usr/bin/perl -w # Author: lh3 # Version: 0.1.3 use strict; use warnings; use Sys::Hostname qw/hostname/; use Cwd qw/getcwd/; use Getopt::Std; if (@ARGV < 1) { warn("Arch-OS: " . &get_cpu_sys . "\n"); die("farm-run.pl [-R LSF_resources] [-c n_CPUs] [-q LSF_queue] []\n"); } my %opts; getopts("R:c:q:", \%opts); my $conf_file = $ARGV[0]; die("Fail to find config file '$conf_file'") unless (-f $conf_file); use vars qw/%fr_config/; require qq/$conf_file/; $SIG{SEGV} = $SIG{TERM} = $SIG{KILL} = \&clean_disk; # this is a hook, but temporarily useless &check_config(\%fr_config); # validate the config file &fix_path(\%fr_config); # remove those "/nfs" in $PATH and $PERL5LIB my $n_jobs = $fr_config{n_jobs}; $fr_config{-R} = (defined($opts{R}))? qq{-R"$opts{R}"} : ''; $fr_config{-q} = (defined($opts{q}))? qq{-q $opts{q}} : ''; $fr_config{-c} = (defined($opts{c}))? '%'.($opts{c}<$n_jobs?$opts{c}:$n_jobs) : ''; if (!$fr_config{-R} && $fr_config{LSF_resource}) { $fr_config{-R} = qq{-R"$fr_config{LSF_resource}"}; } if (!$fr_config{-q} && $fr_config{LSF_queue}) { $fr_config{-q} = qq{-q $fr_config{LSF_queue}}; } if (@ARGV == 1) { $conf_file =~ /([^\s\/]+)(\/)?$/; $_ = $1; s/\.pl$//; mkdir("$_.err"); mkdir("$_.out"); my $command = "echo '$0 $conf_file".' ${LSB_JOBINDEX}\' '."| bsub -J$_"."\"[1-$n_jobs]$fr_config{-c}\" $fr_config{-R} $fr_config{-q} -o $_.out/\%I.out -e $_.err/\%I.err"; print "$command\n"; # Just print it out. We can pipe to "| sh" to execute it. } else { print STDERR "Hostname: ".hostname.", Arch-OS: ".&get_cpu_sys."\n"; &farm_action(\%fr_config, $ARGV[1]); } exit 0; ############################################# # check whether the config file is complete sub check_config { my $conf = shift; my @check = ('run_list', 'n_jobs', 'action', 'binary_path', 'script_path'); for (@check) { die(qq([check_config] missing "$_")) unless (defined($conf->{$_})); } die("\$conf->{binary_path} should start with '/'") if ($conf->{binary_path} !~ /^\//); die("\$conf->{script_path} should start with '/'") if ($conf->{script_path} !~ /^\//); } # action happens here sub farm_action { my $conf = shift; my $job_id = shift; my $pwd = getcwd; my @list = &prepare_run_list($conf, $job_id); foreach my $dir (@list) { # $dir = "$pwd/$dir" if ($dir !~ /^\//); # this is not necessary. if (-d $dir) { $dir =~ /([^\s\/]+)(\/)?$/; my $rel_dir = $1; # relative directory name print STDERR "Processing $rel_dir...\n"; chdir($dir); &{$conf->{action}}($rel_dir); chdir($pwd); } else { warn("[farm_run_action] '$dir' is not found."); } } } # the directories in this list will be processed on the computing node sub prepare_run_list { my $conf = shift; my $job_id = shift; my ($fh, $count, @list); $count = 0; open($fh, "$conf->{run_list}") || die("[gen_fam_list] fail to open $conf->{run_list}"); while (<$fh>) { chomp; push(@list, $_) if ($count % $conf->{n_jobs} + 1 == $job_id); ++$count; } close($fh); return @list; } # clean the mess if terminating signals are received sub clean_disk { # no need to do this now. } # Add script_home and binary_home to the path. sub fix_path { my $conf = shift; my (@t, @s); my $dir = &get_cpu_sys; @t = ($ENV{PATH})? split(":", $ENV{PATH}) : (); @s = ("$conf->{binary_path}/$dir", "$conf->{script_path}", "$conf->{binary_path}"); $ENV{PATH} = join(":", @s, @t); @t = ($ENV{PERL5LIB})? split(":", $ENV{PERL5LIB}) : (); @s = ("$conf->{script_path}"); $ENV{PERL5LIB} = join(":", @s, @t); } # an improve version of mkdir(). It can make "dir1/dir2/dir3" even if dir1 does not exist. sub gendir { my $path = shift; return unless($path); $_ = $path; my $tmp = (/^\//)? '/' : ''; s/([^\/\n]+\/)/$tmp.=$1,mkdir($tmp),$1/eg; return $path; } # get some system information sub get_cpu_sys { my $dir = `uname -p 2>/dev/null`; $dir = `uname -m 2>/dev/null` if (!$dir || $dir =~ "unknown"); $dir .= '-'.`uname -s`; $dir = lc($dir); $dir =~ s/\s//g; return $dir; } maq-0.7.1/scripts/fq_all2std.pl0000755000076600000240000002300111065656455014742 0ustar lh3staff#!/usr/bin/perl -w # Author: lh3 # Version: 0.1.7 use strict; use warnings; use Getopt::Std; my $usage = qq( Usage: fq_all2std.pl Command: scarf2std Convert SCARF format to the standard/Sanger FASTQ fqint2std Convert FASTQ-int format to the standard/Sanger FASTQ sol2std Convert Solexa/Illumina FASTQ to the standard FASTQ std2sol Convert standard FASTQ to Solexa/Illumina FASTQ (simplified) fa2std Convert FASTA to the standard FASTQ seqprb2std Convert .seq and .prb files to the standard FASTQ fq2fa Convert various FASTQ-like format to FASTA export2sol Convert Solexa export format to Solexa FASTQ export2std Convert Solexa export format to Sanger FASTQ csfa2std Convert AB SOLiD read format to Sanger FASTQ std2qual Convert standard FASTQ to .seq+.qual instruction Explanation to different format example Show examples of various formats Note: Read/quality sequences MUST be presented in one line. \n); die($usage) if (@ARGV < 1); # Solexa->Sanger quality conversion table my @conv_table; for (-64..64) { $conv_table[$_+64] = chr(int(33 + 10*log(1+10**($_/10.0))/log(10)+.499)); } # parsing command line my $cmd = shift; my %cmd_hash = (scarf2std=>\&scarf2std, fqint2std=>\&fqint2std, sol2std=>\&sol2std, fa2std=>\&fa2std, fq2fa=>\&fq2fa, example=>\&example, instruction=>\&instruction, export2sol=>\&export2sol, export2std=>\&export2std, csfa2std=>\&csfa2std, seqprb2std=>\&seqprb2std, std2sol=>\&std2sol, std2qual=>\&std2qual); if (defined($cmd_hash{$cmd})) { &{$cmd_hash{$cmd}}; } else { die("** Unrecognized command $cmd"); } sub fa2std { my %opts = (q=>25); getopts('q:', \%opts); die("Usage: fq_all2std.pl fa2std [-q $opts{q}] \n") if (-t STDIN && @ARGV == 0); my $q = chr($opts{q} + 33); while (<>) { if (/^>(\S+)/) { print "\@$1\n"; $_ = <>; print "$_+\n", $q x (length($_)-1), "\n"; } } } sub csfa2std { my %opts = (q=>25, Q=>'', l=>0); getopts('q:Q:l:', \%opts); die(" Usage: fq_all2std.pl csfa2std [options] \n Options: -q INT default base quality [$opts{q}] -Q FILE quality file [null] -l INT output read length, 0 for auto [$opts{l}] Note: For paired-end alignment, Maq requires two sequence files as the input. The n-th read in the first file should forms a read pair with the n-th read in the second file. However, SOLiD reads may be singletons and therefore further prepocessing is needed. \n") if (-t STDIN && @ARGV == 0); my ($fh, $name, $seq); my $len = $opts{l}; my $q = chr($opts{q} + 33); if ($opts{Q}) { open($fh, $opts{Q}) || die("** fail to open quality file '$opts{Q}'"); } while (1) { while (<>) { last if (/^>/); } last unless ($_); /^>(\S+)/; $name = $1; $_ = substr(<>, 2); chomp; tr/0123./ACGTN/; $seq = $_; if ($fh) { # .qual file is available while (<$fh>) { last if (/^>(\S+)/); } /^>(\S+)/; die("** unmatched seq-qual name: '$name' ne '$1'") unless ($1 eq $name); $_ = <$fh>; s/(\s*\d+\s*)/chr(int($1) + 33)/eg; $_ = substr($_, 1); } else { $_ = $q x length($seq); } if ($name =~ /^(\S+)_F\d$/) { # change read name for maq $name = "$1/1"; } elsif ($name =~ /^(\S+)_R\d$/) { $name = "$1/2"; } if ($len) { # chop the sequence if required $seq = substr($seq, 1, $len); $_ = substr($_, 1, $len); } print "\@$name\n$seq\n+\n$_\n"; } close($fh) if ($fh); } sub fq2fa { while (<>) { if (/^@(\S+)/) { print ">$1\n"; $_ = <>; print; <>; <>; } } } sub scarf2std { while (<>) { my @t = split(':', $_); my $name = join('_', @t[0..4]); print "\@$name\n$t[5]\n+\n"; my $qual = ''; @t = split(/\s/, $t[6]); $qual .= $conv_table[$_+64] for (@t); print "$qual\n"; } } sub seqprb2std { die("Usage: fq_all2std.pl seqprb2std \n") if (@ARGV != 2); my ($fhs, $fhq); open($fhs, $ARGV[0]) || die; open($fhq, $ARGV[1]) || die; while (<$fhs>) { my @t = split; my $name = join(":", @t[0..3]); $t[4] =~ tr/./N/; print "\@$name\n$t[4]\n+\n"; $_ = <$fhq>; @t = split; my $q = ''; my $max = -100; for (0 .. $#t) { $max = $t[$_] if ($t[$_] > $max); if (($_&0x3) == 3) { $q .= $conv_table[$max+64]; $max = -100; } } print "$q\n"; } close($fhs); close($fhq); } sub export2sol { while (<>) { chomp; my @t = split("\t", $_); if ($t[21] eq 'Y') { my $x = (defined($t[7]) && ($t[7] == 1 || $t[7] == 2))? "/$t[7]" : ''; $t[0] =~ s/^(SLXA|HWI)-//; $t[0] =~ s/_Human//i; $t[0] =~ s/_PhiX//i; $t[0] =~ s/_R1//; my $rn_head = ($t[0] =~ /(^[A-Z]+\d+_\d+)/)? $1 : ($t[1]? "$t[0]_$t[1]" : $t[0]); print "\@$rn_head:$t[2]:$t[3]:$t[4]:$t[5]$x\n$t[8]\n+\n$t[9]\n"; } } } sub export2std { while (<>) { chomp; my @t = split("\t", $_); if ($t[21] eq 'Y') { my $x = (defined($t[7]) && ($t[7] == 1 || $t[7] == 2))? "/$t[7]" : ''; $t[0] =~ s/^SLXA-//; $t[0] =~ s/_Human//i; $t[0] =~ s/_PhiX//i; $t[0] =~ s/_R1//; my $rn_head = ($t[0] =~ /(^[A-Z]+\d+_\d+)/)? $1 : ($t[1]? "$t[0]_$t[1]" : $t[0]); print "\@$rn_head:$t[2]:$t[3]:$t[4]:$t[5]$x\n$t[8]\n"; my @s = split('', $t[9]); my $qual = ''; $qual .= $conv_table[ord($_)] for (@s); print "+\n$qual\n"; } } } sub fqint2std { while (<>) { if (/^@/) { print; $_ = <>; print; $_ = <>; $_ = <>; my @t = split; my $qual = ''; $qual .= $conv_table[$_+64] for (@t); print "+\n$qual\n"; } } } sub sol2std { my $max = 0; while (<>) { if (/^@/) { print; $_ = <>; print; $_ = <>; $_ = <>; my @t = split('', $_); my $qual = ''; $qual .= $conv_table[ord($_)] for (@t); print "+\n$qual\n"; } } } sub std2sol { my $max = 0; while (<>) { if (/^@/) { print; $_ = <>; print; $_ = <>; $_ = <>; chomp; tr/!-]/@-|/; print "+\n$_\n"; } } } sub std2qual { die("Usage fq_all2std.pl std2qual \n") if (@ARGV == 0); my $pre = shift(@ARGV); my ($fhs, $fhq); open($fhs, ">$pre.seq") || die; open($fhq, ">$pre.qual") || die; while (<>) { s/^@/>/; print $fhs $_; print $fhq $_; $_ = <>; print $fhs $_; <>; $_ = <>; s/([!-~])/" ".(ord($1)-33)/eg; $_ = substr($_, 1); print $fhq $_; } close($fhs); close($fhq); } sub instruction { print " FASTQ format is first used in the Sanger Institute, and therefore we take the Sanger specification as the standard FASTQ. Although Solexa/Illumina reads file looks pretty much like the standard FASTQ, they are different in that the qualities are scaled differently. In the quality string, if you can see a character with its ASCII code higher than 90, probably your file is in the Solexa/Illumina format. Sometimes we also use an integer, instead of a single character, to explicitly show the qualities. In that case, negative qualities indicates that Solexa/Illumina qualities are used. "; } sub example { my $exam_scarf = ' USI-EAS50_1:4:2:710:120:GTCAAAGTAATAATAGGAGATTTGAGCTATTT:23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 19 23 23 23 18 23 23 23 USI-EAS50_1:4:2:690:87:GTTTTTTTTTTTCTTTCCATTAATTTCCCTTT:23 23 23 23 23 23 23 23 23 23 23 23 12 23 23 23 23 23 16 23 23 9 18 23 23 23 12 23 18 23 23 23 USI-EAS50_1:4:2:709:32:GAGAAGTCAAACCTGTGTTAGAAATTTTATAC:23 23 23 23 23 23 23 23 20 23 23 23 23 23 23 23 23 23 23 23 23 12 23 18 23 23 23 23 23 23 23 23 USI-EAS50_1:4:2:886:890:GCTTATTTAAAAATTTACTTGGGGTTGTCTTT:23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 USI-EAS50_1:4:2:682:91:GGGTTTCTAGACTAAAGGGATTTAACAAGTTT:23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 20 23 23 23 23 23 23 23 23 23 23 23 18 23 23 23 23 USI-EAS50_1:4:2:663:928:GAATTTGTTTGAAGAGTGTCATGGTCAGATCT:23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 '; my $exam_fqint = ' @4_1_912_360 AAGGGGCTAGAGAAACACGTAATGAAGGGAGGACTC +4_1_912_360 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 21 40 40 40 40 40 40 40 40 40 26 40 40 14 39 40 40 @4_1_54_483 TAATAAATGTGCTTCCTTGATGCATGTGCTATGATT +4_1_54_483 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 16 40 40 40 28 40 40 40 40 40 40 16 40 40 5 40 40 @4_1_537_334 ATTGATGATGCTGTGCACCTAGCAAGAAGTTGCATA +4_1_537_334 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 21 29 40 40 33 40 40 33 40 40 33 31 40 40 40 40 18 26 40 -2 @4_1_920_361 AACGGCACAATCCAGGTTGATGCCTACGGCGGGTAC +4_1_920_361 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 39 40 40 40 40 40 40 40 40 31 40 40 40 40 40 40 15 5 -1 3 @4_1_784_155 AATGCATGCTTCGAATGGCATTCTCTTCAATCACGA +4_1_784_155 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 31 40 40 40 40 40 @4_1_595_150 AAAGACGTGGCCAGATGGGTGGCCAAGTGCCCGACT +4_1_595_150 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 30 40 40 40 40 40 40 40 40 40 20 40 40 40 40 40 14 40 40 '; my $exam_sol = ' @SLXA-B3_649_FC8437_R1_1_1_610_79 GATGTGCAATACCTTTGTAGAGGAA +SLXA-B3_649_FC8437_R1_1_1_610_79 YYYYYYYYYYYYYYYYYYWYWYYSU @SLXA-B3_649_FC8437_R1_1_1_397_389 GGTTTGAGAAAGAGAAATGAGATAA +SLXA-B3_649_FC8437_R1_1_1_397_389 YYYYYYYYYWYYYYWWYYYWYWYWW @SLXA-B3_649_FC8437_R1_1_1_850_123 GAGGGTGTTGATCATGATGATGGCG +SLXA-B3_649_FC8437_R1_1_1_850_123 YYYYYYYYYYYYYWYYWYYSYYYSY @SLXA-B3_649_FC8437_R1_1_1_362_549 GGAAACAAAGTTTTTCTCAACATAG +SLXA-B3_649_FC8437_R1_1_1_362_549 YYYYYYYYYYYYYYYYYYWWWWYWY @SLXA-B3_649_FC8437_R1_1_1_183_714 GTATTATTTAATGGCATACACTCAA +SLXA-B3_649_FC8437_R1_1_1_183_714 YYYYYYYYYYWYYYYWYWWUWWWQQ '; print qq( solexa ====== $exam_sol scarf ===== $exam_scarf fqint ===== $exam_fqint ); } maq-0.7.1/scripts/maq.pl0000755000076600000240000007021511027727761013473 0ustar lh3staff#!/usr/bin/perl -w # Author: lh3 use strict; use warnings; use Getopt::Std; use File::Copy; use File::Spec; use Cwd qw/getcwd abs_path/; my $version = '0.4.7'; &usage if (@ARGV < 1); # global variables my @nucl_type = (0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4); my @conv = split('', 'XACMGRSVTWYHKDBN'); my $command = shift(@ARGV); my %func = (easyrun=>\&easyrun, chrpt2snp=>\&chrpt2snp, fastq2bfq=>\&fastq2bfq, cat2pair=>\&cat2pair, SNPfilter=>\&SNPfilter, ucsc2snp=>\&ucsc2snp, statmap=>\&statmap, sv=>\&sv, demo=>\&demo, splitread=>\&splitread, indelpe=>\&indelpe); die("Unknown command \"$command\".\n") if (!defined($func{$command})); &{$func{$command}}(); exit(0); # # easyrun command # sub easyrun { my %opts = (d=>'easyrun', 1=>0, 2=>0, A=>'', n=>2000000, a=>250, e=>3, q=>40, m=>2, D=>256, E=>20, N=>2, w=>5, b=>60, B=>2); getopts('d:1:2:A:n:a:pe:q:E:D:m:N:b:B:S', \%opts); die qq( Usage: maq.pl easyrun [options] [reads2.fastq] Options: -d DIR output directory [$opts{d}] -n INT number of reads in a split file [$opts{n}] -1 INT length of read1 [$opts{1}] -A FILE file that contains the 3'adapter [null] -m INT number of mismatches in the seed [$opts{m}] -N INT number of haplotypes [$opts{N}] -b INT maximum sum of qualities of mismatches [$opts{b}] -e INT minimum read depth to call a SNP [$opts{e}] -D INT maximum read depth to call a SNP [$opts{D}] -E INT minimum neighbour consensus quality to call a SNP [$opts{E}] -q INT quality threshold for the final SNP calls [$opts{q}] -w INT SNP within +/- INT distant to an indel to be filtered [$opts{w}] -B INT maximum number of SNPs in a window [$opts{B}] -S apply indel detection with the splitread (VERY SLOW) -p mate-pair alignment (PE mode) -2 INT length of read2 (PE only) [$opts{2}] -a INT max insert size (PE only) [$opts{a}] Notes: For pooled data, please specify the number of haplotypes in the pool with `-N' and set `-E 0' at the same time. Do not try `-N 1', which only causes segfault. ) if (@ARGV < 2); if (defined($opts{p}) && @ARGV != 3) { die("** for PE mode, two reads files should be specified.\n"); } my $d = $opts{d}; my $cwd = getcwd; my $mapopt = " -n $opts{m} -e ".($opts{b}+10); map { $_ = File::Spec->rel2abs($_) } @ARGV; # change to absolute path $mapopt .= $opts{1}? " -1 $opts{1}" : ''; $mapopt .= $opts{2}? " -2 $opts{2}" : ''; $mapopt .= $opts{A}? " -d " . File::Spec->rel2abs($opts{A}) : ''; my $filtopt = "-d $opts{e} -D $opts{D} -n $opts{E}"; my $exe = gwhich('maq') || die("** Cannot find 'maq' executable."); my $pl = gwhich($0) || die("** Cannot find 'maq.pl' script. Should be a bug actually."); mkdir($d) unless (-d $d); # run fasta2bfa my ($is_gzip, $first) = &test_file($ARGV[0]); if (ord($first) == ord('>')) { # fasta format if ($is_gzip) { # gzipped &run_cmd("gzip -dc $ARGV[0] | $exe fasta2bfa - $d/ref.bfa 2> /dev/null"); } else { # plain &run_cmd("$exe fasta2bfa $ARGV[0] $d/ref.bfa 2> /dev/null"); } } else { # create a symbolic link &run_cmd("ln -sf $ARGV[0] $d/ref.bfa"); } # run fastq2bfq && match shift(@ARGV); my $i = 0; my (@map_files, $map_file); foreach my $file (@ARGV) { ++$i; ($is_gzip, $first) = &test_file($file); if (ord($first) == ord('@')) { # fastq format if ($is_gzip) { # gzipped &run_cmd("gzip -dc $file | $exe fastq2bfq -n $opts{n} - $d/read$i"); } else { # plain fastq &run_cmd("$exe fastq2bfq -n $opts{n} $file $d/read$i"); } } elsif ($is_gzip) { # probably bfq &run_cmd("ln -sf $file $d/read$i.bfq"); } else { die("** Cannot guess the format of file '$file'."); } } # run alignment if (defined $opts{p}) { # paired reads my @bfq_files = `(cd $d; find . -name "read1*.bfq")`; foreach (@bfq_files) { chomp; /^\.\/read1(.*)\.bfq$/; my $tag = $1; my $bfqs = (-f "$d/read2$tag.bfq")? "read1$tag.bfq read2$tag.bfq" : "read1$tag.bfq"; &run_cmd("(cd $d; $exe map $mapopt aln$tag.map ref.bfa $bfqs 2> aln$tag.map.log)"); push(@map_files, "aln$tag.map"); } } else { # unpaired reads my @bfq_files = `(cd $d; find . -name "read*.bfq")`; foreach (@bfq_files) { chomp; /^\.\/read(.*)\.bfq$/; my $tag = $1; &run_cmd("(cd $d; $exe map $mapopt -u unmap$tag.txt aln$tag.map ref.bfa read$tag.bfq 2> aln$tag.map.log)"); push(@map_files, "aln$tag.map"); } } if (@map_files > 1) { # we should merge them &run_cmd("(cd $d; $exe mapmerge all.map @map_files)"); } else { &run_cmd("(cd $d; mv $map_files[0] all.map)"); } $map_file = "all.map"; &run_cmd("(cd $d; $exe mapcheck ref.bfa $map_file > mapcheck.txt)"); &run_cmd("(cd $d; $exe assemble -N $opts{N} -Q $opts{b} consensus.cns ref.bfa $map_file 2> assemble.log)"); &run_cmd("$exe cns2fq $d/consensus.cns > $d/cns.fq"); &run_cmd("$exe cns2snp $d/consensus.cns > $d/cns.snp"); &run_cmd("$exe cns2win $d/consensus.cns > $d/cns.win"); &run_cmd("$exe indelsoa $d/ref.bfa $d/$map_file > $d/cns.indelse"); if (defined $opts{p}) { &run_cmd("$exe indelpe $d/ref.bfa $d/$map_file > $d/cns.indelpe"); &run_cmd("$pl SNPfilter -q $opts{q} -w $opts{w} -N $opts{B} -f $d/cns.indelse -F $d/cns.indelpe $filtopt -Q60 $d/cns.snp > $d/cns.final.snp"); } else { &run_cmd("(cd $d; touch unmap.indel)"); if (!defined($opts{S})) { &run_cmd("$pl SNPfilter -q $opts{q} -w $opts{w} -N $opts{B} -f $d/cns.indelse $filtopt $d/cns.snp > $d/cns.final.snp"); } else { # call splitread indels &run_cmd("(cd $d; cat unmap*.txt | $pl splitread -p unmap - ref.bfa 2> unmap.log)"); &run_cmd("$pl SNPfilter -q $opts{q} -w $opts{w} -N $opts{B} -f $d/cns.indelse -S $d/unmap.indel $filtopt $d/cns.snp > $d/cns.final.snp"); } } &run_cmd("(cd $d; ln -s cns.final.snp cns.filter.snp)"); # my $maq_plot = gwhich("maq_plot.pl"); # my $gnuplot = gwhich("gnuplot"); # if ($maq_plot && $gnuplot) { # &run_cmd("$maq_plot depth -x 0.2 $d/depth $d/cns.win"); # } &run_cmd("$pl statmap $d/*.map.log"); } sub statmap { my ($is_paired, $n_reads1, $n_reads2, $n_moved_high, $n_moved_low, $n_mapped1, $n_mapped2, $n_paired, $n_added); $is_paired = $n_reads1 = $n_reads2 = $n_moved_high = $n_moved_low = $n_mapped1 = $n_mapped2 = $n_paired = $n_added = 0; while (<>) { if (/^--\s*\(total,\s*isPE,.*\) .*=\s*\((\d+),\s*(\d+),\s*(\d+),\s*(\d+)\)/) { $is_paired = $2; if ($is_paired) { $n_reads2 += $1; $n_mapped2 += $3; } else { $n_reads1 += $1; $n_mapped1 += $3; } $n_paired += $4; } elsif (/match_data2mapping.* (\d+) pairs are added/) { $n_added += $1; } elsif (/match_data2mapping.* first.*\((\d+), (\d+)\).*second.*\((\d+), (\d+)\)/) { $n_moved_high += $1+$3; $n_moved_low += $2+$4; } } my $tot = $n_reads1 + $n_reads2; my $map1_ratio = ($n_reads1 == 0)? 'NA' : int(10000 * $n_mapped1 / $n_reads1) / 100; my $map2_ratio = ($n_reads2 == 0)? 'NA' : int(10000 * $n_mapped2 / $n_reads2) / 100; my $pair_ratio = ($n_mapped2 == 0)? 'NA' : int(10000 * $n_paired / $n_mapped2) / 100; my $add_ratio = ($n_paired == 0)? 'NA' : int(10000 * $n_added / $n_paired) / 100; my $high_ratio = ($n_paired == 0)? 'NA' : int(10000 * $n_moved_high / $n_paired) / 100; my $low_ratio = ($n_paired == 0)? 'NA' : int(10000 * $n_moved_low / $n_paired) / 100; print qq( -- == statmap report ==\n -- # single end (SE) reads: $n_reads1 -- # mapped SE reads: $n_mapped1 (/ $n_reads1 = $map1_ratio%) -- # paired end (PE) reads: $n_reads2 -- # mapped PE reads: $n_mapped2 (/ $n_reads2 = $map2_ratio%) -- # reads that are mapped in pairs: $n_paired (/ $n_mapped2 = $pair_ratio%) -- # Q>=30 reads that are moved to meet mate-pair requirement: $n_moved_high (/ $n_paired = $high_ratio%) -- # Q<30 reads that are moved to meet mate-pair requirement: $n_moved_low ($low_ratio%) \n); } # # SNPfilter command # sub SNPfilter { my %opts = (f=>'', S=>'', s=>3, m=>1, Q=>40, d=>3, F=>'', w=>5, D=>256, N=>2, W=>10, n=>20, c=>-1.0, q=>20); getopts('af:s:m:Q:d:D:w:F:W:N:c:n:S:q:', \%opts); die(qq{ Usage: maq.pl SNPfilter [options] Options: -d INT minimum depth to call a SNP [$opts{d}] -D INT maximum depth (<=254), otherwise ignored [$opts{D}] -n INT minimum neighbouring quality [$opts{n}] -Q INT required max mapping quality of the reads covering the SNP [$opts{Q}] -q INT minimum consensus quality [$opts{q}] -w INT size of the window in which SNPs should be filtered out [$opts{w}] -S FILE splitread output [null] -F FILE indelpe output [null] -f FILE indelsoa output [null] -s INT indelsoa score (= left_clip + right_clip - across) [$opts{s}] -m INT indelsoa: max number of reads mapped across the indel [$opts{m}] -W INT window size for filtering dense SNPs [$opts{W}] -N INT maximum number of SNPs in a window [$opts{N}] -a alternative filter for single end reads \n}) unless (@ARGV); my (%hash, $fh); my $skip = $opts{w}; if ($opts{f}) { # for indelsoa my $n = 0; open($fh, $opts{f}) || die; while (<$fh>) { my @t = split; next unless ($t[4]+$t[5]-$t[3] >= $opts{s} && $t[3] <= $opts{m}); # a simple filter ++$n; if ($t[2] < 0) { # potential deletion for (my $x = $t[1] + $t[2] - $skip; $x <= $t[1] + $skip; ++$x) { $hash{$t[0],$x} = 1; } } else { # potential insertion for (my $x = $t[1] - $skip; $x <= $t[1] + $t[2] + $skip; ++$x) { $hash{$t[0],$x} = 1; } } } close($fh); warn("-- $n potential soa-indels pass the filter.\n"); } if ($opts{F}) { # for indelpe my $n = 0; open($fh, $opts{F}) || die; while (<$fh>) { my @t = split; next unless ($t[2] eq '*' || $t[2] eq '+'); ++$n; for (my $x = $t[1] - 1; $x < $t[1] + 2*$skip; ++$x) { $hash{$t[0],$x} = 1; } } close($fh); warn("-- $n potential pe-indels pass the filter.\n"); } if ($opts{S}) { # for splitread my $n = 0; open($fh, $opts{S}) || die; while (<$fh>) { next unless (/^VR/); my @t = split; next if ($t[5] < 2 || ($t[5] < 4 && $t[4] == 0)); ++$n; $hash{$t[1],$_} = 1 for ($t[2] .. $t[3]); } close($fh); warn("-- $n potential splitread-indels pass the filter.\n"); } my $is_alter = defined($opts{a}); my (@last, $last_chr); $last_chr = ''; while (<>) { my @t = split; next if ($hash{$t[0],$t[1]}); my $is_good; if (!$is_alter) { # the default filter $is_good = ($t[5] >= $opts{d} && $t[5] <= $opts{D} && $t[6] > $opts{c} && $t[7] >= $opts{Q} && $t[8] >= $opts{n})? 1 : 0; } else { # the alternative filter for SE reads $is_good = ($t[5] >= $opts{d} && $t[5] <= $opts{D} && $t[6] > $opts{c} && $t[6] <= 4.0 && $t[8] >= $opts{n})? 1 : 0; } $is_good = 0 unless ($t[4] >= $opts{q} || ($t[2] ne $t[9] && $t[4]+$t[10] >= $opts{q})); # consensus quality filter next unless ($is_good); # drop if ($t[0] ne $last_chr) { # a different chr, print map { print $_->{L} if ($_->{F}) } @last; @last = (); $last_chr = $t[0]; } # The following block provided by Nathans Weeks. Thanks, Nathans. push(@last, {L => $_, X => $t[1], F => 1}); # Enqueue current SNP if ($#last == $opts{N}) { # number of SNPs in queue is N+1 if ($last[$#last]{X} - $last[0]{X} < $opts{W}) { # if all within window W map {$_->{F} = 0} @last; # all SNPs in the window of size W are "bad" } print STDOUT $last[0]{L} if ($last[0]{F}); # print first SNP if good shift @last # dequeue first SNP } } # print the last few lines if applicable map { print $_->{L} if ($_->{F}) } @last; } # # splitread # sub splitread { my %opts = (1=>12, 2=>12, p=>'splitread', a=>20); getopts('1:2:p:a:', \%opts); die(qq/ Usage: maq.pl splitread [options] Options: -1 INT length of read1 [$opts{1}] -2 INT length of read2 [$opts{2}] -a INT maximum indel size [$opts{a}] -p STR prefix [$opts{p}] /) if (@ARGV < 2); my $maq = gwhich('maq') || die("[splitread] fail to locate 'maq'. Abort!\n"); my ($l1, $l2) = ($opts{1}, $opts{2}); my ($n, $fh, $fh1, $fh2); # generate fastq warn("-- generate paired end reads\n"); open($fh, ($ARGV[0]=~/\.gz$/)? "gzip -dc $ARGV[0]" : $ARGV[0]) || die; open($fh1, ">$opts{p}1.fq") || die; open($fh2, ">$opts{p}2.fq") || die; while (<$fh>) { my @t = split; next if ($t[1] != 99); my $l = length($t[2]); die("[splitread] reads are too short!\n") if ($l < $l1 + $l2); # sequence my ($s1, $s2) = (substr($t[2], 0, $l1), substr($t[2], -$l2)); # discard poor reads next if ($s1 =~ /N/i || $s2 =~ /N/i); $n = ($s1 =~ tr/A/A/); next if ($n == $l1); $n = ($s2 =~ tr/A/A/); next if ($n == $l2); # reverse $s2 $s2 = reverse($s2); $s2 =~ tr/ACGTN/TGCAN/; # quality my ($q1, $q2) = (substr($t[3], 0, $l1), substr($t[3], -$l2)); $q2 = reverse($q2); # output print $fh1 "\@$t[0]_$l/1\n$s1\n+\n$q1\n"; print $fh2 "\@$t[0]_$l/2\n$s2\n+\n$q2\n"; } close($fh); close($fh1); close($fh2); # paired end alignment my $ins_size = $l1 + $l2 + $opts{a}; &run_cmd("$maq fastq2bfq $opts{p}1.fq $opts{p}1.bfq"); &run_cmd("$maq fastq2bfq $opts{p}2.fq $opts{p}2.bfq"); &run_cmd("$maq map -Pn1 -a $ins_size $opts{p}.map $ARGV[1] $opts{p}1.bfq $opts{p}2.bfq"); # get indel sites my @last = ('', 0, 0, 0, 0); # name, begin, end, open($fh, "$maq mapview $opts{p}.map |") || die; open($fh1, ">$opts{p}.indel") || die; print $fh1 qq{CC\tCC comments CC\tRD read_id chr begin end ins_size CC\tVR chr begin end ins_size n_reads CC CC\tIn VR lines, zero ins_size indicates that there are indels of different CC\tlengths. In addition, indels supported by one read is not reliable. CC }; while (<$fh>) { my @t = split; next if ($t[5] != 18 || $t[8] == 0 || $t[4] < 0); $t[0] =~ /^(\S+)_(\d+)\/[12]$/; my ($name, $l) = ($1, $2); next if ($t[4] == $l); # no indel if ($last[0] ne $t[1]) { if ($last[0]) { print $fh1 join("\t", "VR", @last), "\n"; } @last = ($t[1], 0, 0, 0, 0); } my ($b, $e, $s) = ($t[2], $t[2]+$t[4]-1, $l - $t[4]); if ($last[1] == 0) { # the first @last = ($t[1], $b, $e, $s, 1); } elsif ($b <= $last[2]) { # overlap if ($s != $last[3]) { # conflict $last[3] = 0; } ++$last[4]; $last[1] = $b; } else { # non-overlap print $fh1 join("\t", "VR", @last), "\n"; @last = ($t[1], $b, $e, $s, 1); } print $fh1 join("\t", 'RD', $name, $t[1], $b, $e, $s), "\n"; } close($fh); close($fh1); } # # for Sanger's PE read format only # sub cat2pair { my %opts = (1=>0, 2=>0); getopts('1:2:', \%opts); die qq(Usage: maq.pl cat2pair [-1 $opts{1}] [-2 $opts{2}] [output.fastq]\n) if (@ARGV < 2); my ($tl1, $tl2) = ($opts{1}, $opts{2}); my $size1 = $ARGV[0]; my $fn = $ARGV[1]; my $fn_out = (@ARGV >= 3)? $ARGV[2] : $ARGV[1]; $fn_out =~ s/^.*\/([^\/\s]+)$/$1/ if ($fn_out =~ /\//); $fn_out =~ s/\.gz$// if ($fn_out =~ /\.gz$/); mkdir("read1"); mkdir("read2"); my ($fh1, $fh2, $fhin); $fn = "gzip -dc $fn |" if ($fn =~ /\.gz$/); open($fhin, $fn) || die; open($fh1, ">read1/$fn_out") || die; open($fh2, ">read2/$fn_out") || die; while (<$fhin>) { if (/^@/) { chomp; print $fh1 "$_/1\n"; print $fh2 "$_/2\n"; $_ = <$fhin>; chomp; # sequence print $fh1 substr($_, $tl1, $size1-$tl1), "\n+\n"; print $fh2 substr($_, $size1+$tl2), "\n+\n"; <$fhin>; $_ = <$fhin>; chomp; # qualities print $fh1 substr($_, $tl1, $size1-$tl1), "\n"; print $fh2 substr($_, $size1+$tl2), "\n"; } } close($fhin); close($fh1); close($fh2); } # # for Sanger's farm only # sub fastq2bfq { my %opts = (s=>1000000, e=>'fastq', d=>'', r=>'', a=>250); getopts('s:e:Ed:r:a:', \%opts); die qq( Usage: maq.pl fastq2bfq [-s nreads] [-e ext] \n Options: -s INT number of reads per file [1000000] -e STR extension of the read files [fastq] -d FILE adapter sequence file [null] -r FILE reference genome [hg18_male.bfa] -a INT maximum insert size [$opts{a}] -E the input in is Solexa's "export" format \n) if (@ARGV < 2); my ($size, $ext) = ($opts{s}, $opts{e}); my $is_export = (defined $opts{E})? 1 : 0; my ($src_dir, $dst_dir) = ($ARGV[0], $ARGV[1]); $dst_dir =~ s/\/$//; my ($fh_lst, $fh_pl); open($fh_lst, ">$dst_dir.lst") || die; open($fh_pl, ">$dst_dir.pl") || die; my $tmp_dir = "$dst_dir/tmp"; my $cwd = getcwd; die("FATAL ERROR: source directory '$src_dir' does not exist!\n") unless (-d $src_dir); mkdir($dst_dir) unless (-d $dst_dir); mkdir($tmp_dir) unless (-d $tmp_dir); chdir($src_dir); my @list = `(find . -name "*.$ext" -follow; find . -name "*.$ext.gz" -follow)`; # get the list of files chdir($cwd); $size = $size >> 1 << 1; # run 'maq fastq2bfq' my $maq = gwhich("maq") || die("ERROR: Cannot find maq\n"); my $fq_all2std = gwhich("fq_all2std.pl") || die("ERROR: Cannot find fq_all2std.pl\n"); foreach (@list) { chomp; s/^\.\///; my $ori = $_; my $prog = (/\.gz$/i? 'zcat' : 'cat') . " $src_dir/$ori"; if ($is_export) { next if ($ori !~ /export/i); $prog = "$prog | $fq_all2std export2sol | $maq sol2sanger - -"; } s/\//-/g; s/\.gz$//i; s/\.$ext$//; my ($cur_size, $name); if ($is_export) { # IMPORTANT: I do not know what single end reads look like. # possibly this part does not work well for SE reads. if (/s_\d+_([12])_/) { # paired $cur_size = int($size/2); $name = "reads$1"; s/(s_\d+_)[12]_/$1/; } } else { if (/read(s?)[12]/) { # paired $cur_size = int($size/2); $name = (/read(s?)1/i)? "reads1" : "reads2"; s/read(s?)[12]//i; } else { $cur_size = $size; $name = "reads.bfq"; } } s/--/-/g; s/^-//; $name = (($name =~ /[12]/)? "$_-PE" : "$_-SE") . ":$name"; &run_cmd("$prog | $maq fastq2bfq -n $cur_size - $tmp_dir/$name"); } # move files to separate directories my $n_jobs = 0; @list = `(cd $tmp_dir; ls)`; foreach (@list) { chomp; if (/(.*):(reads[12]?)\@(\d+)\.bfq$/) { my $d = "$dst_dir/$1\@$3"; my $t = "$d/$2.bfq"; unless (/reads2\@\d+\.bfq/) { ++$n_jobs; print $fh_lst "$d\n"; mkdir($d); } move("$tmp_dir/$_", $t); } } system("rm -fr $tmp_dir"); close($fh_lst); # generate configuration file for farm-run.pl $opts{d} = "-d ".abs_path($opts{d}) if ($opts{d}); if ($opts{r}) { $opts{r} = abs_path($opts{r}); } else { $opts{r} = '../../human_male.bfa'; } print $fh_pl qq(\%fr_config = ( # The list of directories that should be processed. Do NOT change this. run_list=>'$dst_dir.lst', # number of LSF jobs at a time n_jobs=>$n_jobs, LSF_queue=>'long', LSF_resource=>'select[mem>800 && type==X86_64] rusage[mem=800]', # dir of the executables binary_path=>"$ENV{HOME}/lsf-prog", # dir of the scripts, if it is different from binary_path script_path=>"$ENV{HOME}/lsf-prog/scripts", # in each working directory, this function will be called. action=>\\&func ); sub func { my \$dir = shift; # the working directory # The current working dir is the one where *.bfq are staying. # usually the reference sequence is put two-level higher than # the current working dir. my \$maq_comm = "maq map -a $opts{a} $opts{d} $dst_dir.map $opts{r}"; if (-f "reads.bfq") { # single end system("\$maq_comm reads.bfq"); } elsif (-f "reads1.bfq" && ! -f "reads2.bfq") { # single end system("\$maq_comm reads1.bfq"); } elsif (-f "reads1.bfq" && -f "reads2.bfq") { # paired end system("\$maq_comm reads1.bfq reads2.bfq"); } } ); close($fh_pl); } sub sv { my %opts = (i=>150, l=>35, q=>35, s=>7); getopts('s:i:l:q:', \%opts); die(" Usage: maq.pl sv \n Options: -i INT maximum insert size [$opts{i}] -l INT average read length [$opts{l}] -q INT minimum alternative mapping quality [$opts{q}] -s INT minimum length of a region [$opts{s}]\n ") unless (@ARGV); my $d = $opts{i} - $opts{l}; my ($begins, $beginc, $lasts, $lastc) = ('', -1, '', -1); my (@regs, %read, @reg_name); my @reg_seq; warn("-- read the mapview output\n"); while (<>) { my @t = split; next if ($t[8] <= $opts{q}); next if ($t[5] == 18 || $t[5] == 64 || $t[5] == 130); my $do_break = ($t[1] ne $lasts || $t[2] - $lastc > $d)? 1 : 0; if ($do_break) { if ($lastc - $beginc > $opts{s}) { # skip short/unreliable regions my $k = @regs; my $flag = ($lastc - $beginc < $opts{i})? '*' : '.'; push(@reg_name, "$begins\t$beginc\t$lastc\t$flag"); my $p = \@{$regs[$k]}; foreach (@reg_seq) { push(@$p, $_); my @s = split; push(@{$read{$s[0]}}, $k); } } ($begins, $beginc) = @t[1..2]; @reg_seq = (); } $t[0] =~ s/\/[12]$//; push(@reg_seq, join(" ", @t[0..3,5,8,13])); ($lasts, $lastc) = @t[1..2]; } # build connections warn("-- link regions\n"); my %link; foreach my $x (keys %read) { my $p = $read{$x}; next if (@$p != 2); my $key = sprintf("%.10d %.10d", $p->[0], $p->[1]); # $p->[0] < $p->[1] always stands if (defined $link{$key}) { ++$link{$key}; } else { $link{$key} = 1; } } # print connected regions warn("-- print result\n"); foreach (reverse sort{$link{$a}<=>$link{$b}} keys %link) { my @s = split; my $x = $_; my @count; $count[$_] = 0 for (0..3); foreach my $y (@{$regs[$s[0]]}) { my @t = split(" ", $y); ++$count[($t[3] eq '+')? 0 : 1]; } foreach my $y (@{$regs[$s[1]]}) { my @t = split(" ", $y); ++$count[($t[3] eq '+')? 2 : 3]; } # infer flag my $flag = ($s[0] == $s[1])? 'LOP' : ''; if (!$flag) { my @t1 = split(/\s+/, $reg_name[$s[0]]); my @t2 = split(/\s+/, $reg_name[$s[1]]); if ($t1[0] ne $t2[0]) { $flag = 'DIF'; } elsif (($count[1] == 0 && 2*$count[2] < $count[3]) || ($count[2] == 0 && 2*$count[1] < $count[0])) { $flag = 'DEL'; } else { $flag = 'AMB'; } } print "$flag\t$link{$x}\t$reg_name[$s[0]]\t$count[0]\t$count[1]\t$reg_name[$s[1]]\t$count[2]\t$count[3]\n"; } } # # chrpt2snp command # sub chrpt2snp { # calculate @mm my @mm; die("Usage: maq.pl chrpt2snp \n") unless (@ARGV); for (my $i = 0; $i != 0x10000; ++$i) { my ($x, $k) = (1, 0); for (my $l = 0; $l != 16; ++$l, $x <<= 1) { ++$k if ($i & $x); } $mm[$i] = $k; } my $fh; open($fh, "| sort -k1,1 -k2,2n"); while (<>) { next unless (/^\d+/ && /reference$/); my @t = split("\t", $_); next unless ($t[11] =~ /^\d+/); # no position my $vs = $mm[$t[16]&0xffff] + $mm[$t[16]>>16&0xffff]; printf $fh ("chr$t[6]\t$t[11]\tN\tN\t%d\t%.3f\n", $vs*10, ($t[13] ne ' ')? $t[13] : 0.0); } close($fh); } # # ucsc2snp command # sub ucsc2snp { warn("-- only one-basepair substitutions and indels will be retained.\n"); my %conv = (AC=>'M', CA=>'M', AG=>'R', GA=>'R', AT=>'W', TA=>'W', CG=>'S', GC=>'S', CT=>'Y', TC=>'Y', GT=>'K', TG=>'K'); my ($n_not2, $n_not1) = (0, 0); while (<>) { my @t = split; if ($t[9] !~ /-/) { if (length($t[9]) != 3 || length($t[7]) != 1) { ++$n_not1; next; } } my ($a1, $a2) = split("/", $t[9]); my $SNP; if ($t[11] eq 'single') { $SNP = $conv{"$a1$a2"}; } else { if ($t[7] eq '-') { $SNP = ($a1 ne '-')? $a1 : $a2; } else { $SNP = '-'; } } my $qual = 0; if ($t[12] ne 'unknown') { my @s = split(",", $t[12]); $qual = @s * 10; } my $ref = (length($t[7]) == 1)? $t[7] : 'N'; print "$t[1]\t$t[3]\t$ref\t$SNP\t$qual\t$t[13]\t$t[15]\n"; } warn("-- discarded: ($n_not1, $n_not2)\n"); } sub demo { my %opts = (N=>1000000, d=>'maqdemo'); getopts('N:d:hs', \%opts); die(" Usage: maq.pl demo [-N npairs] [-d outdir] [-h] \n Options: -N INT number of read pairs [$opts{N}] -d DIR output directory [$opts{d}] -s single-end mode in alignment -h haploid mode in simulation\n ") if (@ARGV < 2); my $peopt = (defined $opts{s})? '' : '-p'; my $simuopt = "-N $opts{N}"; $simuopt .= " -h" if (defined $opts{h}); my $maq = gwhich("maq"); my $maq_pl = gwhich("maq.pl"); my $eval_pl = gwhich("maq_eval.pl"); die("** 'maq', 'maq.pl' and 'maq_eval.pl' MUST be on the \$PATH\n") unless ($maq && $maq_pl && $eval_pl); &run_cmd("mkdir -p $opts{d}"); &run_cmd("$maq simulate $simuopt $opts{d}/r1.fq $opts{d}/r2.fq $ARGV[0] $ARGV[1] > $opts{d}/true.snp"); &run_cmd("$maq fasta2bfa $ARGV[0] $opts{d}/ref.bfa"); &run_cmd("(cd $opts{d}; $maq_pl easyrun $peopt -d easyrun ref.bfa r1.fq r2.fq)"); &run_cmd("(cd $opts{d}; $maq simustat easyrun/all.map > eval.simustat)"); &run_cmd("(cd $opts{d}; $eval_pl sub -p eval.sub true.snp true.snp easyrun/cns.filter.snp)"); &run_cmd("(cd $opts{d}; $eval_pl indelpe true.snp easyrun/cns.indelpe > eval.indelpe)") if ($peopt); &run_cmd("(cd $opts{d}; $eval_pl indelsoa true.snp easyrun/cns.indelse > eval.indelse)"); warn("++ $opts{d}/easyrun/cns.filter.snp gives the SNPs that passes most of filters.\n"); warn("++ $opts{d}/easyrun/cns.final.snp is the high-quality subset of the previous SNPs.\n"); warn("++ $opts{d}/easyrun/mapcheck.txt gives some statistics about qualities.\n"); warn("++ $opts{d}/true.snp contains all variants used in simulation.\n"); warn("++ $opts{d}/eval.* give various benchmarks. Their formats will be documented later.\n"); } # # # sub indelpe { my %opts = (m=>6, n=>4); getopts('m:n:', \%opts); die("Usage: maq.pl indelpe [-m $opts{m}] [-n $opts{n}] \n") if (@ARGV == 0 && -t STDIN); my ($om, $on) = ($opts{m}, $opts{n}); while (<>) { my @t = split; # calculate length of homopolymer tract $_ = $t[8]; my $c = substr($_, 0, 1); /^($c+)/; my $n_hpt = length($1); $n_hpt = length($1) if (/^(${c}{3,}[^$c\s]{1,2}${c}{3,})/); $n_hpt = length($1) if (/^(${c}{4,}[^$c\s]{1,4}${c}{4,})/); # get rid of reads afftected by homopolymer tract my (@b, @e, @mm, @nb, @ne, @nmm); $_ = $t[10]; s/^@//; @b = split(',', $_); $_ = $t[11]; s/^@//; @e = split(',', $_); $_ = $t[12]; s/^@//; @mm = split(',', $_); for my $i (0 .. $#b) { if ($b[$i] > $om && $e[$i] > $om && $e[$i] > $n_hpt + $on && $mm[$i] <= 2) { push(@nb, $b[$i]); push(@ne, $e[$i]); push(@nmm, $mm[$i]); } } $t[3] = $t[5] + $t[6] + @nb; $t[9] = @nb; $t[10] = "@".join(",", @nb).","; $t[11] = "@".join(",", @ne).","; $t[12] = "@".join(",", @nmm).","; print join("\t", @t), "\n"; } } # # Usage # sub usage { die qq( Program: maq.pl (helper script for maq) Version: $version Contact: Heng Li Usage: maq.pl [options] [...] Command: easyrun simple pipeline for small dataset demo demonstration of maq functionalities (for SE only) SNPfilter filter SNPs statmap extract statistics from the error output of 'maq map' chrpt2snp convert dbSNP's chr_rpt file to .snp file ucsc2snp convert UCSC's SNP dump to .snp file fastq2bfq convert fastq in batch cat2pair convert paired end reads format sv call structural variations indelpe post-processing indelpe output \n); } # # Other utilities # sub test_file { my ($file) = @_; my $gzip = gwhich('gzip') || die; my ($is_gzip, $fh, $first); if (system("$gzip -l $file >/dev/null 2>&1")) { $is_gzip = 0; open($fh, $file); } else { $is_gzip = 1; open($fh, "$gzip -dc $file |"); } read($fh, $first, 1); close($fh); return ($is_gzip, $first); } sub run_cmd { my ($cmd) = @_; warn("-- CMD: $cmd\n"); system("$cmd") && die("** fail to run command '$cmd'"); } # the following codes are copied from treefam::generic sub dirname { my $prog = shift; my $cwd = getcwd; return $cwd if ($prog !~ /\//); $prog =~ s/\/[^\s\/]+$//g; return $prog; } sub which { my $file = shift; my $path = (@_)? shift : $ENV{PATH}; return if (!defined($path)); foreach my $x (split(":", $path)) { $x =~ s/\/$//; return "$x/$file" if (-x "$x/$file" && -f "$x/$file"); } return; } sub gwhich { my $progname = shift; my $addtional_path = shift if (@_); my $dirname = &dirname($0); my $tmp; chomp($dirname); if (-x $progname && -f $progname) { return abs_path($progname); } elsif (defined($addtional_path) && ($tmp = &which($progname, $addtional_path))) { return $tmp; # lh3: Does it work? I will come back to this later } elsif (defined($dirname) && (-x "$dirname/$progname" && -f "$dirname/$progname")) { return abs_path("$dirname/$progname"); } elsif (($tmp = &which($progname))) { # on the $PATH return $tmp; } else { warn("[gwhich] fail to find executable $progname anywhere."); return; } } maq-0.7.1/scripts/maq_eval.pl0000755000076600000240000002536311027727761014506 0ustar lh3staff#!/usr/bin/perl -w # Author: lh3 use strict; use warnings; use Getopt::Std; my $version = "0.1.11"; &usage if (@ARGV < 1); my $command = shift(@ARGV); my %func = (sub=>\&evalsub, geno=>\&evalgeno, indelpe=>\&evalindelpe, indelsoa=>\&evalindelsoa, subfp=>\&subfp); die("Unknown command \"$command\".\n") if (!defined($func{$command})); &{$func{$command}}(); exit(0); # # # sub subfp { my %opts = (L=>2800000000, o=>0, e=>0, q=>20); getopts('L:o:e:q:', \%opts); die ("Usage: subfp [-L len] [-o homRate] [-e hetRate] [-q qual] \n") if (@ARGV == 0 && -t STDIN); my %n; while (<>) { if (/^(\d+)x/) { my $q = $1*10; my @t = split; if ($opts{o} < 0.1 || $opts{e} < 0.1) { $opts{o} = $t[3] / $t[2]; $opts{e} = $t[6] / $t[5]; } next if ($q < $opts{q}); $n{oe} += $t[2] - $t[3] / $opts{o}; $n{ee} += $t[5] - $t[6] / $opts{e}; $n{o} += $t[2]; $n{e} += $t[5]; } } printf("Hom FP: %.2f%% (%d)\n", $n{oe} / $n{o} * 100.0, $n{oe}); printf("Het FP: %.2f%% (%d)\n", $n{ee} / $n{e} * 100.0, $n{ee}); printf("All FP: %.2f%% (%d)\n", ($n{oe} + $n{ee}) / ($n{o} + $n{e}) * 100.0, $n{oe} + $n{ee}); printf("FDR: 1 / %.0f\n", $opts{L}/($n{oe} + $n{ee})); } # # indelsoa command # sub evalindelsoa { my %opts = (w=>5, s=>3, m=>1); getopts('w:s:m:', \%opts); die(" Usage: maq_eval.pl indelsoa [-w $opts{w}] [-s $opts{s}] \n Options: -w INT window size around the true indel [5] -s INT score of SOA indels [3]\n\n") if (@ARGV < 2); my ($fn_true, $fn_pred) = @ARGV; my (%ins, %del, $fh); my $n_all = &read_true_indel($fn_true, \%ins, \%del, $opts{w}); my @count = (0, 0); open($fh, $fn_pred) || die; while (<$fh>) { my @t = split; next if ($t[4] + $t[5] - $t[3] < $opts{s} || $t[3] > $opts{m}); my $t1 = $t[1] + $t[2]; if ($del{$t[0],$t[1]} || $ins{$t[0],$t[1]} || $del{$t[0],$t1} || $ins{$t[0],$t1}) { ++$count[0]; } else { ++$count[1]; } } close($fh); my $fn = ($n_all == 0)? -1.0 : (1 - $count[0] / $n_all) * 100.0; my $fp = ($count[0] + $count[1] == 0)? -1.0 : (1 - $count[0] / ($count[0] + $count[1])) * 100.0; printf qq( IN: $count[0], OUT: $count[1] FN: %.2f%% FP: %.2f%% ), $fn, $fp; } # # indelpe command # sub evalindelpe { my %opts = (w=>20); getopts('w:', \%opts); die(" Usage: maq_eval.pl indelpe [-w $opts{w}] \n Options: -w INT window size around the true indel [$opts{w}]\n\n") if (@ARGV < 2); my ($fn_true, $fn_pred) = @ARGV; my (%ins, %del, $fh); my $n_all = &read_true_indel($fn_true, \%ins, \%del); my %fhash = ("*"=>0, "+"=>1, "-"=>2); my @count = (0, 0, 0, 0, 0, 0); my $ow = $opts{w}; open($fh, $fn_pred) || die; while (<$fh>) { my @t = split; next if ($t[2] eq "."); my $flag = $fhash{$t[2]}; my $i; $t[4] =~ s/:[ACGTN]+//i; if ($t[4] < 0) { for ($i = $t[1]-1; $i < $t[1] + $ow; ++$i) { last if ($del{$t[0],$i}); } ++$count[$flag*2 + ($i >= $t[1] + $ow)]; } else { for ($i = $t[1]-1; $i < $t[1] + $ow; ++$i) { last if ($ins{$t[0],$i}); } ++$count[$flag*2 + ($i >= $t[1] + $ow)]; } } close($fh); my $n_called = $count[0] + $count[1] + $count[2] + $count[3]; my $fn = ($n_all == 0)? -1.0 : ($n_all - $count[0] - $count[1]) / $n_all * 100.0; my $fp = ($n_called == 0)? -1.0 : ($count[1] + $count[3]) / $n_called * 100.0; print "\n"; print "Type '*' - IN: $count[0], OUT: $count[1]\n"; print "Type '+' - IN: $count[2], OUT: $count[3]\n"; print "Type '-' - IN: $count[4], OUT: $count[5]\n\n"; printf "*/+ FN: %.2f%%\n", $fn; printf "*/+ FP: %.2f%%\n", $fp; } sub read_true_indel { my ($fn, $ins, $del) = @_; my $fh; my ($n_ins, $n_del) = (0, 0); open($fh, $fn) || die; while (<$fh>) { my @t = split; if ($t[2] eq "-") { ++$n_ins; $ins->{$t[0], $t[1]} = 1; } if ($t[3] eq "-") { ++$n_del; $del->{$t[0],$t[1]} = 1; } } close($fh); print "true insertions: $n_ins\n"; print "true deletions: $n_del\n"; return $n_ins + $n_del; } # # sub command # sub evalsub { die("Usage: maq_eval.pl sub [-e <.err>] [-g] -p <.snp>\n") if (@ARGV < 4); my (%opts, $fh); getopts('p:e:gs', \%opts); my $is_summary = (defined($opts{s}))? 1 : 0; my $is_gnuplot = (defined($opts{g}))? 1 : 0; my $err_out = ($opts{e})? $opts{e} : ''; my $prefix = ($opts{p})? $opts{p} : "es-$$"; my (%ref_hash, %good_hash, %test_hash); &read_snp_file($ARGV[0], \%ref_hash); &read_snp_file($ARGV[1], \%good_hash); &read_snp_file($ARGV[2], \%test_hash, 1); my (@n_hit, @n_in, @n_iden, @n_q, @n_het, @cover); my (@n_hom10, @n_het10, @n_homhit10, @n_hethit10, @n_cover10); for (my $i = 0; $i != 256; ++$i) { $n_hit[$i] = $n_in[$i] = $n_iden[$i] = $n_q[$i] = $n_het[$i] = $cover[$i] = 0; } for (my $i = 0; $i <= 9; ++$i) { $n_hom10[$i] = $n_het10[$i] = $n_homhit10[$i] = $n_hethit10[$i] = $n_cover10[$i] = 0; } # calculate how many candidate SNPs are in dbSNPs foreach my $pos (keys %test_hash) { $test_hash{$pos} =~ /(\S),(\d+)$/; my $q10 = int($2/10); my $is_het; $is_het = ($1 ne 'A' && $1 ne 'C' && $1 ne 'G' && $1 ne 'T')? 1 : 0; ++$n_q[$2]; if ($is_het) { ++$n_het[$2]; ++$n_het10[$q10]; } else { ++$n_hom10[$q10]; } if (defined($ref_hash{$pos})) { ++$n_hit[$2]; if ($is_het) { ++$n_hethit10[$q10]; } else { ++$n_homhit10[$q10]; } } } # calculate how many ExoSeq SNPs are covered/correct. foreach my $pos (keys %good_hash) { if (defined($test_hash{$pos})) { $test_hash{$pos} =~ /(\S),(\d+)/; ++$n_in[$2]; ++$n_iden[$2] if ($1 eq $good_hash{$pos}); } } # accumulate for (my $i = 98; $i >= 0; --$i) { $n_hit[$i] += $n_hit[$i+1]; $n_in[$i] += $n_in[$i+1]; $n_iden[$i] += $n_iden[$i+1]; $n_q[$i] += $n_q[$i+1]; $n_het[$i] += $n_het[$i+1]; } # calculate the percetage for (my $i = 0; $i <= 99; ++$i) { if ($n_q[$i] == 0) { $n_hit[$i] = 100; $n_het[$i] = 100; } else { $n_hit[$i] /= $n_q[$i] * .01; $n_het[$i] /= $n_q[$i] * .01; } if (scalar(keys %good_hash) == 0) { $n_in[$i] = 100; $n_iden[$i] = 100; } else { $n_in[$i] /= scalar(keys %good_hash) * .01; $n_iden[$i] /= scalar(keys %good_hash) * .01; } } # read ".err" if ($err_out) { my ($tot_len, $sum); open($fh, $err_out) || die; while (<$fh>) { if (/S0 reference length: (\d+)/) { $tot_len = $1/1000.0; $sum = 0; } elsif (/S0 number of gaps in the reference: (\d+)/) { $tot_len -= $1/1000.0; } elsif (/^S1\s+(\d+)\s+(\S+)\s+(\S+)/) { $sum += $2/1000.0; $cover[$1] = $sum / $tot_len * 100.0; $n_cover10[int($1/10)] += $2 / 1000.0; } } close($fh); } # print out to ".txt" open($fh, ">$prefix.txt"); for (my $i = 99; $i >= 0; --$i) { my $tmp = ($n_in[$i] == 0)? 100 : $n_iden[$i]/$n_in[$i]*100; printf $fh ("$i\t$n_q[$i]\t%.2f\t%.2f\t%.2f\t%.2f\t%.2f\n", $n_hit[$i], $n_in[$i], $tmp, $n_het[$i], $cover[$i]); } close($fh); # print out to ".fri" open($fh, ">$prefix.fri"); printf $fh ("Q %12s%8s%8s%8s%8s%8s%8s%8s%8s%8s%8s%12s\n", "coverage", "n_hom", "homHit", "homFrac", "n_het", "hetHit", "hetFrac", "total", "totHit", "totFrac", "totCum", "covCum"); my ($totSum, $covSum) = (0, 0); for (my $i = 9; $i >= 0; --$i) { $totSum += $n_hom10[$i]+$n_het10[$i]; $covSum += $n_cover10[$i]; my $tmp1 = $n_hom10[$i] > 0? 100.0*$n_homhit10[$i]/$n_hom10[$i] : 100; my $tmp2 = $n_het10[$i] > 0? 100.0*$n_hethit10[$i]/$n_het10[$i] : 100; my $tmp3 = $n_hom10[$i]+$n_het10[$i] > 0? ($n_homhit10[$i]+$n_hethit10[$i])/($n_hom10[$i]+$n_het10[$i])*100.0 : 100; printf $fh ("%dx%12.3f%8d%8d%7.2f%%%8d%8d%7.2f%%%8d%8d%7.2f%%%8d%13.3f\n", $i, $n_cover10[$i], $n_hom10[$i], $n_homhit10[$i], $tmp1, $n_het10[$i], $n_hethit10[$i], $tmp2, $n_hom10[$i]+$n_het10[$i], $n_homhit10[$i]+$n_hethit10[$i], $tmp3, $totSum, $covSum); } close($fh); # plot if ($is_gnuplot) { my $fn = "$prefix.txt"; my $y2skip = int($n_q[0]/10+0.5); open($fh, "| gnuplot") || die; print $fh qq( set t po eps so co; set xlab "PHRED quality"; set ylab "Percentage (Cumulated)"; set y2lab "Cumulated Number of SNPs"; set out "$prefix.eps"; set size 1.2,1.2; set key left bottom; set yran [0:100]; set ytics 10; set y2ran [0:$n_q[0]]; set y2tics $y2skip; set grid; plot "$fn" u 1:3 t "in_dbSNP%" w l lw 7, "$fn" u 1:4 t "GenoTyping-cover%" w l lw 7, "$fn" u 1:6 t "het%" w l, "$fn" u 1:7 t "coverage%" w l, "$fn" u 1:2 t "n_SNPs" w l ax x1y2, "$fn" u 1:5 t "GenoTyping-exact%" w l; exit; \n); close($fh); } } sub evalgeno { my %opts = (Q=>40, d=>3, D=>254, q=>20, c=>0.25, n=>20); my %ishom = (A=>1, C=>1, G=>1, T=>1, a=>1, c=>1, g=>1, t=>1); my %test_hash; getopts("Q:q:D:d:c:n:", \%opts); die(" Usage: maq_eval.pl geno [options] \n Options: -q INT minimum consensus quality [$opts{q}] -Q INT minimum mapping quality [$opts{Q}] -d INT minimum read depth [$opts{d}] -D INT maximum read depth [$opts{D}] -n INT minimum neighbouring quality [$opts{n}] \n") if (@ARGV < 2); &read_snp_file($ARGV[1], \%test_hash); my ($fh, $n_total, $n_seg, @count); $n_total = $n_seg = 0; open($fh, $ARGV[0]) || die; for my $x (0..2) { for (0..9) { $count[$x][$_] = 0; } } while (<$fh>) { my @t = split; ++$n_total; my $row = ($t[2] eq $t[10])? 0 : (($ishom{$t[10]})? 1 : 2); my $is_filt = ($t[5] >= $opts{d} && $t[5] <= $opts{D} && $t[6] >= $opts{c} && $t[7] >= $opts{Q} && $t[4] >= $opts{q} && $t[8] >= $opts{n})? 0 : 1; $is_filt = 1 if ($t[2] ne $t[3] && !$test_hash{$t[0],$t[1]}); # correct $is_filt for other filters my $col = ($t[2] eq $t[3])? 1 : (($ishom{$t[3]})? 2 : 3); $col = 0 if ($is_filt); $col = 4 if (lc($t[3]) eq 'n'); ++$n_seg if ($row); my $is_wrong = ($t[3] eq $t[10])? 0 : 1; $col = $col * 2 + $is_wrong; $count[$row][$col]++; warn($_) if ($row < 2 && $is_wrong && $col > 1 && $col < 8); } close($fh); #$count[0][0] = ">=$count[0][0]"; printf "\n# genotyped sites: $n_total\n"; printf "# segregating sites: $n_seg\n\n"; printf "%11s%12s%18s%18s%18s%18s\n", "", "filtered", "mono", "hom", "het", "uncalled(N)"; my @label = ("true_mono", "true_hom", "true_het"); for my $x (0..2) { printf "%11s", $label[$x]; for my $y (0..4) { printf "%8s / %-7s", $count[$x][2*$y], $count[$x][2*$y+1]; } print "\n"; } print "\n"; } sub read_snp_file { my ($fn, $hash2, $is_qual) = @_; my $fh; open($fh, $fn) || die; while (<$fh>) { my @t = split; next if ($t[2] eq '-' || $t[3] eq '-'); # skip indel sites $t[4] = 99 if ($t[4] =~ /^\d+$/ && $t[4] > 99); $hash2->{$t[0],$t[1]} = ($is_qual)? "$t[3],$t[4]" : $t[3]; } close($fh); } sub usage { die qq( Program: maq_eval.pl (evaluate Maq SNPs/indels) Version: $version Contact: Heng Li \n Usage: maq_eval.pl \n Options: sub evaluate substitutions geno evaluate genotyping results indelpe evaluate indelpe results \n); } maq-0.7.1/scripts/maq_plot.pl0000755000076600000240000001143411043135374014516 0ustar lh3staff#!/usr/bin/perl -w # Author: lh3 # This script will call "gnuplot" almost everywhere. use strict; use warnings; use Getopt::Std; &usage if (@ARGV < 1); my $version = "0.1.1"; my $command = shift(@ARGV); my %func = (abpair=>\&abpair, depth=>\&depth_plot, mixed=>\&mixed); die("Unknown command \"$command\".\n") if (!defined($func{$command})); &{$func{$command}}(); exit(0); sub depth_plot { my %opts; getopts('c:D:ax:', \%opts); die qq(Usage: maq_plot.pl depth [-c chr] [-D 100] [-a] [-x 2] \n) if (@ARGV < 2); my $chr = $opts{c}; my $max_depth = $opts{D}? $opts{D} : 100; my $xtics = $opts{x}? $opts{x} : 2; my $back = 5; my $prefix = shift(@ARGV); my ($fh1, $fh2, $fh3, $fh, $fhin); open($fhin, $ARGV[0]) || die; my ($mean, $var, $n) = (0, 0, 0); my $col = (defined $opts{a})? 5 : 4; while (<$fhin>) { my @t = split; $chr = $t[0] if (!$chr); if ($chr eq $t[0] && $t[7] >= 1e-6) { # then, not N ++$n; $mean += $t[$col]; } } $mean /= $n; open($fh1, ">$prefix.depth") || die; open($fh2, ">$prefix.outlier") || die; open($fh3, ">$prefix.gc") || die; seek($fhin, 0, 0); $n = 0; while (<$fhin>) { my @t = split; if ($chr eq $t[0]) { if ($t[$col] < 2 * $mean && $t[$col] > 0.5 * $mean) { if ($t[7] >= 1e-6) { ++$n; $var += ($t[$col] - $mean) * ($t[$col] - $mean); } $fh = ($t[$col] < 1.5 * $mean)? $fh1 : $fh2; } else { $fh = $fh2; } my $depth = ($t[$col] >= $max_depth-$back)? $max_depth - $back * (1.0 - rand()) : $t[$col]; print $fh "$t[1]\t$depth\t$t[7]\n"; if (rand() < 0.1) { print {$fh3} "$depth\t$t[7]\t$t[1]\n"; } } } $var = sqrt($var / $n); close($fh1); close($fh2); close($fh3); close($fhin); open($fh, "| gnuplot") || die; my $label = sprintf("Depth (%.2f +/- %.2f)", $mean, $var); print $fh qq( set t po eps co so 24 set grid; set ylab "Depth"; set xlab "Percent GC"; set out "$prefix.gc.eps"; plot "$prefix.gc" u 2:1 w d t ""; set t po eps co so lw 2 18 set xlab "Coordinate (Mbp)"; set ylab "Depth"; set y2ran [0:100]; set y2tic 10; set xtics $xtics; set yran [-20:$max_depth]; set size 5, 1; set grid; set out "$prefix.depth.eps"; set style line 3 lt 3 lw 3; plot "$prefix.depth" u 1:2 t "$label" w d 1, "$prefix.outlier" u 1:2 t "Outlier" w p 4, "$prefix.gc" u 3:2 smo be axis x1y2 ls 3; exit; ); close($fh); } sub abpair { my %opts; getopts('m:M:c:', \%opts); die qq(Usage: maq_plot.pl abpair [-m 250] [-M 1000000] [-c chr] \n) if (@ARGV < 2); my $min_dist = (defined $opts{m})? $opts{m} : 250; my $max_dist = (defined $opts{M})? $opts{M} : 1000000; my $prefix = $ARGV[0]; my $chr = $opts{c}; my ($fh1, $fh2, $fh, $fhin); open($fhin, "sort +3 -nr $ARGV[1] |") || die; open($fh1, ">$prefix.badori") || die; open($fh2, ">$prefix.baddist") || die; my (%hash1, %hash2); while (<$fhin>) { my @t = split; shift(@t); $chr = $t[0] if (!$chr); my $dist = $t[4] - $t[3] + 1; if ($t[0] eq $chr && $dist >= $min_dist && $dist <= $max_dist) { next if ($hash1{$t[3]} || $hash2{$t[4]}); $hash1{$t[3]} = $hash2{$t[4]} = 1; $fh = ($t[1] == 2)? $fh2 : $fh1; my $q = $t[2] + rand() - 0.5; $q = 0 if ($q < 0); print $fh $t[3]/2000000.0 + $t[4]/2000000.0, "\t$q\t$dist\n"; } } close($fhin); close($fh1); close($fh2); # plot open($fh, "| gnuplot") || die("Fail to execute gnuplot"); print $fh qq( set t po eps co so; set xlab "$chr coordinate (Mbp)"; set ylab "MapQ of abnormal pairs"; set out "$prefix.abpair.eps"; set size 5, 1; set xtics 2; set grid; plot "$prefix.badori" t "bad orientation" w p 2, "$prefix.baddist" t "bad distance" w p 4; exit; ); close($fh); } sub mixed { my %opts = (m=>300, M=>1000000, D=>100); getopts('c:D:m:M:', \%opts); die qq( Usage: maq_plot.pl mixed [options] Options: -c STR target chromosome [the first one] -D INT maximum depth [100] -m INT minumum pair distance [300] -M INT maximum pair distance [1000000] \n) if (@ARGV < 3); my $chr_cmd = $opts{c}? "-c $opts{c}" : ''; system(qq{$0 depth $chr_cmd -D $opts{D} $ARGV[0] $ARGV[1]}) && die; system(qq{$0 abpair $chr_cmd -m $opts{m} -M $opts{M} $ARGV[0] $ARGV[2]}) && die; my $prefix = $ARGV[0]; my $fh; open($fh, "| gnuplot") || die; print $fh qq( set t po eps co so; set xlab "Coordinate (Mbp)"; set ylab "MapQ of abnormal pairs"; set out "$prefix.eps"; set size 5, 1; set y2ran [-20:$opts{D}]; set y2lab "Depth"; set y2tics 10; set xtics 2; set grid; plot "$prefix.badori" t "bad orientation" w p 2, "$prefix.outlier" t "Outlier" axis x1y2 3, "$prefix.baddist" t "bad distance" w p 4; exit; ); close($fh); } sub usage { die qq( Usage: maq_plot.pl Command: abpair plot abnormal pairs along the chromosome depth depth plot mixed mixed plot \n); } maq-0.7.1/scripts/maq_post.pl0000755000076600000240000001073011027727761014534 0ustar lh3staff#!/usr/bin/perl -w # Author: lh3 use strict; use warnings; use Cwd qw/getcwd/; use Getopt::Std; use File::Spec; my $version = '0.1.2'; my %opts = (2=>'', 3=>'', S=>'', Q=>60, n=>20, d=>3, D=>256, q=>10); getopts('2:3:S:Q:n:d:D:q:', \%opts); die(qq( Program: maq_post.pl (run maq jobs on Sanger Inst's computing farm) Contact: lh3 Version: $version Usage: maq_post.pl [options] Options: -2 FILE HapMap-1+2 SNPs [null] -3 FILE HapMap-3 SNPs [null] -S FILE dbSNP in .snp format [null] -Q INT minimum mapping quality [$opts{Q}] -d INT minimum read depth [$opts{d}] -n INT minimum neighbouring quality [$opts{n}] -D INT maximum read depth [$opts{D}] -q INT minimum consensus quality [$opts{q}] )) if (@ARGV < 3); my $maq = gwhich('maq') || die("[maq_post] fail to find 'maq'"); my $maq_pl = gwhich('maq.pl') || die("[maq_post] fail to find 'maq.pl'"); my $maq_eval_pl = gwhich('maq_eval.pl') || die("[maq_post] fail to find 'maq_eval.pl'"); my $asub = gwhich('asub') || die("[maq_post] fail to find 'asub'"); my $outdir = shift(@ARGV); my $ref = File::Spec->rel2abs(shift(@ARGV)); die("[maq_post] fail to stat reference file '$ref'\n") unless (-e $ref); my $aln = File::Spec->rel2abs(shift(@ARGV)); die("[maq_post] fail to stat alignment file '$aln'\n") unless (-e $aln); $_ = $outdir; s/.*\///; my $jn = "$_.$$"; my $cwd = getcwd; # check files for ('2', '3', 'S') { die("[maq_post] fail to find '$opts{$_}'.\n") if ($opts{$_} && !-e $opts{$_}); $opts{$_} = File::Spec->rel2abs($opts{$_}) if ($opts{$_}); } print qq(mkdir -p $outdir; cd $outdir;\n); # make genotype file if ($opts{2} && $opts{3}) { print qq(test ! -e geno.raw.snp && awk 'BEGIN{while((getline<"$opts{2}")>0)l[\$1","\$2]=\$4}l[\$1","\$2]{print \$1,\$2,\$3,\$4,l[\$1","\$2]}' $opts{3}|tr " " "\\t" > geno.raw.snp; awk '\$4==\$5' geno.raw.snp > geno.snp;\n); } elsif ($opts{2}) { print qq(cp $opts{2} geno.snp;\n); } elsif ($opts{3}) { print qq(cp $opts{3} geno.snp;\n); } # compose the command lines my $filt = qq/-Q $opts{Q} -n $opts{n} -d $opts{d} -D $opts{D}/; print qq( $asub -j "$jn.core" < cns.cns.log test ! -e cns.indelsoa && $maq indelsoa $ref $aln > cns.indelsoa test ! -e cns.indelpe && $maq indelpe $ref $aln > cns.indelpe test ! -e aln.mapcheck && $maq mapcheck $ref $aln > aln.mapcheck test ! -e aln.mapstat && $maq mapstat $aln > aln.mapstat EOF $asub -j "$jn.geno" -w "done($jn.core)" < cns.geno EOF $asub -j "$jn.snpreg" -w "done($jn.core)" < cns.snpreg EOF $asub -j "$jn.cns2snp" -w "done($jn.core)" < cns.snp EOF $asub -j "$jn.filt" -w "done($jn.cns2snp)" < cns.flt EOF $asub -j "$jn.evalgeno" -w "done($jn.filt) && done($jn.geno)" < cns.gev EOF test -e '$opts{S}' && test -e 'geno.snp' && bsub -o /dev/null -e /dev/null -J "$jn.evalsub" -w "done($jn.filt)" -R"select[mem>3000] rusage[mem=3000]" -W 3000000 <rel2abs($progname); } elsif (defined($addtional_path) && ($tmp = &which($progname, $addtional_path))) { return $tmp; # lh3: Does it work? I will come back to this later } elsif (defined($dirname) && (-x "$dirname/$progname" && -f "$dirname/$progname")) { return File::Spec->rel2abs("$dirname/$progname"); } elsif (($tmp = &which($progname))) { # on the $PATH return $tmp; } else { warn("[gwhich] fail to find executable $progname anywhere."); return; } } maq-0.7.1/scripts/maq_sanger.pl0000755000076600000240000001426611043135374015025 0ustar lh3staff#!/usr/bin/perl -w # Author: lh3 use strict; use warnings; use Cwd qw/getcwd/; use Getopt::Std; use File::Spec; my $version = '0.1.16'; my %opts = (l=>36, 1=>0, 2=>0, 3=>0, 4=>0, a=>250, n=>2000000, d=>'', A=>0, R=>'select[mem>800 && type==X86_64] rusage[mem=800]'); getopts('l:1:2:a:n:sR:zd:S3:4:f:A:e:', \%opts); die(qq( Program: maq_sanger.pl (run maq jobs on Sanger Inst's computing farm) Contact: lh3 Version: $version Usage: maq_sanger.pl [options] [ [...]] Options: -l INT length of the read1 [$opts{l}] -n INT number of reads in a .bfq file [$opts{n}] -1 INT skip the first few bases of read1 [$opts{1}] -2 INT skip the first few bases of read2 [$opts{2}] -3 INT length of read1 [$opts{3}] -4 INT length of read2 [$opts{4}] -a INT maximum insert size [$opts{a}] -A INT maximum insert size of RF pairs, 0 for short [$opts{A}] -R STR resources [$opts{R}] -d FILE 3'-adapter file [null] -f FILE flag file to delete in the end [null] -S qualities are scaled in the Solexa way -s single end (suppress -l, -1, -2 and -4) -z the input is compressed Example: maq_sanger.pl -l 35 255 /lustre/scratch1/lh3/data/human_b36_female.bfa /nfs/repository/d0033/SLX_1000_A2_TRIO_NA12_WG/255_s*.fastq | sh \n)) if (@ARGV < 3); $opts{n} >>= 1 unless (defined $opts{s}); $opts{R} = $opts{R}? qq/-R'$opts{R}'/ : ''; my $maq = gwhich('maq') || die("[maq_sanger] fail to find 'maq'"); my $maq_pl = gwhich('maq.pl') || die("[maq_sanger] fail to find 'maq.pl'"); my $asub = gwhich('asub') || die("[maq_sanger] fail to find 'asub'"); my $outdir = shift(@ARGV); my $ref = File::Spec->rel2abs(shift(@ARGV)); die("[maq_sanger] fail to stat reference file '$ref'\n") unless (-e $ref); my $files = ''; for my $f (@ARGV) { die("[maq_sanger] read files must be ended with '.fastq' or '.fq'\n") unless ($f =~ /\.fastq$/ || $f =~ /\.fastq\.gz$/ || $f =~ /\.fq$/ || $f =~ /\.fq\.gz$/); die("[maq_sanger] fail to stat read file '$f'\n") unless (-e $f); $files .= " " . File::Spec->rel2abs($f); } my $is_paired = !defined($opts{s})? 1 : 0; $_ = $outdir; s/.*\///; my $jn = "$_.$$"; # compose the command lines my $cwd = getcwd; my $sol2sanger = (defined $opts{S})? "| $maq sol2sanger - -" : ''; my $cmd_generic = qq(bsub -w "done($jn.map)" -J"$jn.merge" -q long $opts{R} -o /dev/null -e aln-rmdup.log 'find map -name "*.map" | xargs $maq mapmerge - | tee aln.map | $maq rmdup aln-rmdup.map -'; $asub -w "done($jn.merge)" -j "$jn.post" $opts{R} < aln.stat; $maq mapstat aln-rmdup.map > aln-rmdup.mapstat $maq mapcheck $ref aln-rmdup.map > aln-rmdup.mapcheck cat unmap/*.txt | gzip > unmap.txt.gz EOF bsub -w "done($jn.post)" 'rm -f aln-rmdup.mapcheck.touch aln.map.touch'; ); my $adap3 = $opts{d}? "-d ".File::Spec->rel2abs($opts{d}) : ''; if ($is_paired) { # paired end my $cat2pair; if (defined $opts{z}) { $cat2pair = qq(ls $files | sed 's/\.gz\$//' | xargs -i echo 'gzip -dc {}.gz | $maq catfilter - $sol2sanger | $maq_pl cat2pair -1 $opts{1} -2 $opts{2} $opts{l} - {}' | $asub -j "$jn.cat" $opts{R};); } else { $cat2pair = qq/ls $files | xargs -i echo '$maq catfilter {} $sol2sanger | $maq_pl cat2pair -1 $opts{1} -2 $opts{2} $opts{l} - {}' | $asub -j "$jn.cat" $opts{R};/; } print qq(mkdir -p $outdir/map $outdir/unmap; cd $outdir; $cat2pair cat >run_script.sh < {}' | $asub -j "$jn.cat" $opts{R};\n); } else { $catfilter = qq( ls *.fastq | xargs -i mv {} {}.tmp; ls *.tmp | sed "s/\.tmp\$//" | xargs -i echo '$maq catfilter -s {}.tmp $sol2sanger > {}' | $asub -j "$jn.cat" $opts{R};\n); } print qq(mkdir -p $outdir/read1; cd $outdir/read1; ls $files | xargs -i ln -s {}; find . -name "*.fq.gz" | sed "s/\.gz$//" | xargs -i ln -s {} {}.fastq.gz find . -name "*.fq" | xargs -i ln -s {} {}.fastq $catfilter cd ..; mkdir -p map unmap; cat >run_script.sh <rel2abs($progname); } elsif (defined($addtional_path) && ($tmp = &which($progname, $addtional_path))) { return $tmp; # lh3: Does it work? I will come back to this later } elsif (defined($dirname) && (-x "$dirname/$progname" && -f "$dirname/$progname")) { return File::Spec->rel2abs("$dirname/$progname"); } elsif (($tmp = &which($progname))) { # on the $PATH return $tmp; } else { warn("[gwhich] fail to find executable $progname anywhere."); return; } } maq-0.7.1/scripts/paf_utils.pl0000755000076600000240000003256311043135374014676 0ustar lh3staff#!/usr/bin/perl -w # Contact: lh3 use strict; use warnings; use Getopt::Std; # PAF: Pairwise Alignment Format: # qName qBegin strand tName tBegin score CIGAR qSeq/. qQual/. meta # # The `score' field can be any non-negative integer but ideally is a # Phred-scaled error probability score. my $version = '0.3.2'; my %cmd_hash = (eland2paf=>\&eland2paf, mapview=>\&mapview, soap2paf=>\&soap2paf, pafeval=>\&pafeval, maq2paf=>\&maq2paf, rmap2paf=>\&rmap2paf, mapview2map=>\&mapview2map, shrimp2paf=>\&shrimp2paf, novo2paf=>\&novo2paf, help=>\&help); die(qq/ Program: paf_utils.pl (Utilities for PAF - the Pairwise Alignment Format) Version: $version Contact: Heng Li Usage: paf_utils.pl Command: eland2paf convert eland alignment format to PAF soap2paf convert soap alignment format to PAF rmap2paf convert rmap alignment format to PAF maq2paf convert maq alignment format to PAF shrimp2paf convert SHRiMP alignment to PAF pafeval evaluate alignment from MAQ simulation mapview view the maq alignment (.map) mapview2map convert mapview to binary .map format help about PAF format \n/) if (@ARGV == 0); my $cmd = shift(@ARGV); die(qq/Unknown command "$cmd".\n/) unless (defined($cmd_hash{$cmd})); &{$cmd_hash{$cmd}}; exit; sub help { print qq{ PAF stands for Pairwise Alignment Format. I design this format to facilitate the comparison between different alignment programs. PAF is TAB delimited. It consists of nine predefined fields and flexible number of additional fields specific to the alignment program. In PAF, each line must contain the following 9 fields: qName qBegin strand tName tBegin score CIGAR qSeq/. qQual/. In this line, `q' stands for query, `t' stands for target, `strand' is either + or -, and `score' is an integer which is ideally the Phred-like quality of the alignment reliability. Both `qBegin' and `tBegin' are the leftmost position of the alignment on the query and target, respectively. The rightmost position of the alignment can be calculated in combination with `CIGAR'. `qSeq' is the full (not padded) sequence of the query. It is presented on the same strand as the target sequence, no matter whether `strand' is + or -. `qQual' is on the same strand as `qSeq'. Either can be a dot if sequence or quality is not available. The 10th column is the name of alignment program. The information of additional fields is determined by the alignment program: eland count0 count1 count2 [mismatch [...]] maq mateDist flag snglMapQ altMapQ nMis sumErr seedCount0 seedCount1 soap a/b flag [mismatch [...]] rmap nMismatches For eland, `score' is estimated by assuming uniform base qualities. Scores are not available for both soap and rmap. }; } sub pafeval { my %opts; getopts('p', \%opts); die("Usage: paf_utils.pl pafeval [-p] \n") if (@ARGV == 0 && -t STDIN); my (@c0, @c1); my $max_q = 0; while (<>) { my @t = split; my $q = int($t[5]/10); my $is_correct = 1; my $l = length($t[7]); # is the read length if ($t[7] eq '.') { # no read sequence my $tmp = $_; $l = $t[1]-1; $_ = $t[6]; s/(\d+)[MI]/$l+=$1,'x'/eg; $_ = $tmp; } $max_q = $q if ($q > $max_q); ++$c0[$q]; if ($t[0] =~ /^([^_\s]+)_(\d+)_(\d+)/) { if ($1 ne $t[3]) { $is_correct = 0; } elsif ($2 < $3) { if ($t[2] eq '+') { $is_correct = 0 if (abs($t[4]-$t[1]+1 - $2) > 1); } else { $is_correct = 0 if (abs($t[4]-$t[1]+1+$l-1 - $3) > 3); # why not zero? because of the indels } } else { if ($t[2] eq '+') { $is_correct = 0 if (abs($t[4]-$t[1]+1 - $3) > 1); } else { $is_correct = 0 if (abs($t[4]-$t[1]+1+$l-1 - $2) > 3); } } } else { die("[pafeval] the reads seem not to be generated by MAQ.\n"); } ++$c1[$q] unless ($is_correct); print $_ if (defined($opts{p}) && !$is_correct); } my ($cc0, $cc1) = (0, 0); for (my $i = $max_q; $i >= 0; --$i) { $c0[$i] = 0 unless (defined $c0[$i]); $c1[$i] = 0 unless (defined $c1[$i]); $cc0 += $c0[$i]; $cc1 += $c1[$i]; printf("%.2dx %12d / %-12d %12d %.3e\n", $i, $c1[$i], $c0[$i], $cc0, $cc1/$cc0); } } sub eland2paf { my %opts = (q=>25); getopts('sq:', \%opts); die("Usage: paf_utils.pl eland2paf [-s] [-q 25] \n") if (@ARGV == 0 && -t STDIN); my $q = $opts{q}; # average base quality my @logn; $logn[$_] = int(3.434 * log($_) + 0.5) for (1 .. 255); my $fh = \*STDOUT; open($fh, "| sort -k4,4 -k5,5n -k3,3") if (defined($opts{s})); while (<>) { my @t = split; next unless ($t[2] =~ /^U/); my $size = length($t[1]); $t[0] =~ s/^>//; $t[6] =~ s/\.fa((sta)?)$//i; # in most cases, we do not want to see the file extension $t[8] =~ tr/FR/+-/; if ($t[8] eq '-') { # reverse $t[1] = reverse($t[1]); $t[1] =~ tr/acgtACGTswmryk/tgcaTGCAswkyrs/; } my $score = 0; if ($t[3] == 1) { if ($t[4]) { $score = $q - $logn[$t[4]]; } elsif ($t[5]) { $score = $q * 2 - $logn[$t[5]]; } else { $score = $q * 3; } } elsif ($t[4] == 1) { $score = $t[5]? $q - $logn[$t[5]] : 2 * $q; } else { # $t[5] == 1 $score = $q; } print $fh join("\t", $t[0], 1, @t[8,6,7], $score, $size."M", $t[1], '.', 'eland', @t[3,4,5]); print "\t", join("\t", @t[10..$#t]) if ($t[3] != 1); print "\n"; } close($fh) if (defined($opts{s})); } sub novo2paf { my %opts; getopts('s', \%opts); die("Usage: paf_utils.pl soap2paf [-s] \n") if (@ARGV == 0 && -t STDIN); my $fh = \*STDOUT; open($fh, "| sort -k4,4 -k5,5n -k3,3") if (defined($opts{s})); while (<>) { next if (/^#/); my @t = split("\t"); next if ($t[4] ne 'U'); $t[0] = substr($t[0], 1); # trim @/> $t[7] = substr($t[7], 1); # trim > $t[9] = ($t[9] =~ /F/)? '+' : '-'; $t[3] = "." unless ($t[3]); my $cigar = length($t[2]) . "M"; if ($t[13] && $t[13] =~ /-/) { $cigar .= '1D'; } print join("\t", $t[0], 1, @t[9,7,8,6], $cigar, @t[2,3]), "\n"; } close($fh) if (defined($opts{s})); } sub soap2paf { my %opts; getopts('s', \%opts); die("Usage: paf_utils.pl soap2paf [-s] \n") if (@ARGV == 0 && -t STDIN); my $fh = \*STDOUT; open($fh, "| sort -k4,4 -k5,5n -k3,3") if (defined($opts{s})); while (<>) { my @t = split; my $size = length($t[1]); my $cigar = $size . "M"; if ($t[9] > 100 && $t[9] <= 200) { my $i = $t[9] - 100; my $j = $size - $t[10]; $cigar = "$t[10]M$i"."D$j"."M"; } elsif ($t[9] > 200) { my $i = $t[9] - 200; my $j = $size - $i - $t[10]; $cigar = "$t[10]M$i"."I$j"."M"; } print $fh join("\t", $t[0], 1, @t[6..8], 0, $cigar, @t[1,2], 'soap', @t[4,9]); print "\t", join("\t", @t[10..$#t]) if ($t[9]); print "\n"; } close($fh) if (defined($opts{s})); } sub rmap2paf { my %opts; getopts('s', \%opts); die("Usage: paf_utils.pl rmap2paf [-s] \n") if (@ARGV == 0 && -t STDIN); my $fh = \*STDOUT; open($fh, "| sort -k4,4 -k5,5n -k3,3") if (defined($opts{s})); while (<>) { my @t = split; ++$t[1]; # change to 1-based coordinate my $cigar = ($t[2] - $t[1] + 1)."M"; print $fh join("\t", $t[3], 1, @t[5,0,1], 0, $cigar, '.', '.', 'rmap', $t[4]), "\n"; } close($fh) if (defined $opts{s}); } sub shrimp2paf { my %opts = (q=>25); getopts('sq:', \%opts); die("Usage: paf_utils.pl shrimp2paf [-s] [-q 25] \n") if (@ARGV == 0 && -t STDIN); my ($fh2, $fh); $fh = \*STDOUT; my $tmp = join(" ", @ARGV); open($fh, "| sort -k4,4 -k5,5n -k3,3") if (defined($opts{s})); open($fh2, qq{grep ^'>' $tmp | sed 's/[a-z_]*=//g' | sed 's/"//g' | sort -k2,2 -k5,5nr |}) || die; my (@s, @score, @count, @logn); my $q = $opts{q}; $logn[$_] = int(3.434 * log($_) + 0.5) for (1 .. 255); $s[0] = ''; while (<$fh2>) { if (/^>/) { my @t = split; if ($t[1] ne $s[0]) { # a new read if ($s[0]) { my $s = 0; if ($count[0] > 1) { $s = 0; } elsif (@score == 1) { $score[0] = 3 if ($score[0] > 3); $s = $q * (3 - $score[0]); } else { $s = ($score[1] - $score[0]) * $q - $logn[$count[1]]; } $s[5] = $s; print $fh join("\t", @s), "\n"; } my $cigar = ($t[10]+$t[11])."M"; $cigar .= "$t[12]D" if ($t[12]); $cigar .= "$t[13]I" if ($t[13]); @s = (@t[1,7,3,2,5], $t[4], $cigar, ".", ".", "shrimp", @t[4,11]); push(@s, $t[15]) if (defined $t[15]); @score = (); @count = (); $score[0] = $t[11] + $t[12] + $t[13]; $count[0] = 1; } else { my $s = $t[11] + $t[12] + $t[13]; $score[@score] = $s if ($s != $score[$#score]); ++$count[$#score]; } } } my $s = 0; if ($count[0] > 1) { $s = 0; } elsif (@score == 1) { $score[0] = 3 if ($score[0] > 3); $s = $q * (3 - $score[0]); } else { $s = ($score[1] - $score[0]) * $q - $logn[$count[1]]; } $s[5] = $s; print $fh join("\t", @s), "\n"; close($fh) if (defined $opts{s}); close($fh2); } sub maq2paf { die("Usage: paf_utils.pl maq2paf \n") if (@ARGV == 0); my ($fh, $buf, @ref); open($fh, "gzip -dc $ARGV[0] |") || die("[maq] Cannot decompress $ARGV[0]"); binmode($fh); # read header $buf = ''; read($fh, $buf, 8); my ($format, $n_ref) = unpack("i2", $buf); for (1..$n_ref) { read($fh, $buf, 4); my $len = unpack("i", $buf); read($fh, $buf, $len); ($_) = unpack("Z$len", $buf); push(@ref, $_); } read($fh, $buf, 8); # read alignment my @ACGT = ('A', 'C', 'G', 'T'); while (read($fh, $buf, 120) == 120) { my ($sq, $qse, $size, $q, $i1, $i2, $c0, $c1, $f, $aq, $sid, $x, $d, $rn) = unpack("a63cC8I2iZ36", $buf); my $cigar = $size."M"; if ($f >= 128 && $q != 0) { $cigar = ($qse > 0)? "${q}M${qse}I".($size-$qse-$q)."M" : "${q}M".(-$qse)."D".($size-$q)."M"; } $q = $aq if ($f >= 128); print "$rn\t1\t", ($x&1)?'-':'+', "\t$ref[$sid]\t", ($x>>1)+1, "\t$q\t$cigar"; my @t = unpack("C$size", $sq); my $seq = ''; foreach my $p (@t) { if ($p == 0) { $seq .= 'N'; } else { $seq .= $ACGT[$p>>6]; } $p = chr(33 + ($p&0x3f)); } print "\t$seq\t", @t, "\tmaq\t", join("\t", $d, $f, $qse, $aq, $i1&0xf, $i2, $c0, $c1), "\n"; } close($fh); } sub mapview { my %opts; getopts('bq:', \%opts); die("Usage: paf_utils.pl mapview [-b] \n") if (@ARGV == 0); my ($fh, $buf, @ref); open($fh, "gzip -dc $ARGV[0] |") || die("[maq] Cannot decompress $ARGV[0]"); binmode($fh); # read header $buf = ''; read($fh, $buf, 8); my ($format, $n_ref) = unpack("i2", $buf); for (1..$n_ref) { read($fh, $buf, 4); my $len = unpack("i", $buf); read($fh, $buf, $len); ($_) = unpack("Z$len", $buf); push(@ref, $_); } read($fh, $buf, 8); # what is read is the number of reads, but frequently it is zero. # read alignment my $is_verbose = defined($opts{b})? 0 : 1; my @ACGT = ('A', 'C', 'G', 'T'); while (read($fh, $buf, 120) == 120) { my ($sq, $qse, $size, $q, $i1, $i2, $c0, $c1, $f, $aq, $sid, $x, $d, $rn) = unpack("a63cC8I2iZ36", $buf); print "$rn\t$ref[$sid]\t", ($x>>1)+1, "\t", ($x&1)?'-':'+', "\t$d\t$f\t$q\t$qse\t$aq\t", $i1&0xf, "\t$i2\t$c0\t$c1\t$size"; if ($is_verbose) { # print sequence and quality my @t = unpack("C$size", $sq); my $seq = ''; foreach my $p (@t) { if ($p == 0) { $seq .= 'N'; } else { $seq .= $ACGT[$p>>6]; } $p = chr(33 + ($p&0x3f)); } print "\t$seq\t", @t; } print "\n"; } close($fh); } sub mapview2map { die(qq/ Usage: paf_utils.pl mapview2map > Notes: This `mapview2map' command works on a stream. It begins to write the output before it reads to the end of the input mapview file. Unfortunately, this command has to write the reference names in the header of and the user must provide correct information to make it work properly. The input MUST satisfy the following conditions: 1) is a file that consists of the names of all reference sequences, one name per line. 2) must be sorted according to the read position. 3) The names in MUST appear in the identical order of sequence names in . \n/) if (@ARGV == 0); my ($fh, @refs, %chr2id); my @ACGT; # array should be faster than hash $ACGT[$_] = 0 for (0..255); $ACGT[ord('A')] = $ACGT[ord('a')] = 0; $ACGT[ord('C')] = $ACGT[ord('c')] = 1; $ACGT[ord('G')] = $ACGT[ord('g')] = 2; $ACGT[ord('T')] = $ACGT[ord('t')] = 3; # read the name of the reference sequences $_ = shift(@ARGV); open($fh, $_) || die("[mapview2map] fail to open $_\n"); while (<$fh>) { push(@refs, $1) if (/^(\S+)/); } close($fh); open($fh, "| gzip -f") || die; # write header syswrite($fh, pack("i2", -1, scalar(@refs)), 8); for my $i (0 .. $#refs) { my $chr = $refs[$i]; $chr2id{$chr} = $i; my $l = length($chr) + 1; syswrite($fh, pack("iZ$l", $l, $chr), 4 + $l); } syswrite($fh, pack("I2", 0, 0), 8); # write alignment my ($seqid, $pos) = (0, 0); while (<>) { my @t = split; $t[0] = substr($t[0], length($t[0])-35, 35) if (length($t[0]) > 35); my $seq = ''; my ($l, $s, $q) = @t[13..15]; for my $p (0 .. $l-1) { my $q = ord(substr $q, $p, 1)-33; $q = 63 if ($q > 63); $seq .= chr($ACGT[ord(substr $s, $p, 1)]<<6 | $q); } my $sid = $chr2id{$t[1]}; die(qq/[mapview2map] undefined sequence name '$t[1]'\n/) unless (defined $sid); $t[1] = $sid; die(qq/[mapview2map] inconsistent order of reference sequences\n/) if ($sid < $seqid); if ($sid > $seqid) { $seqid = $sid; $pos = 0; } die(qq/[mapview2map] unsorted mapview input\n/) if ($t[2] < $pos); $t[2] = ($t[2]-1)<<1 | (($t[3] eq '+')? 0:1); syswrite($fh, pack("a63cC8I2iZ36", $seq, @t[7,13,6,9..12,5,8,1,2,4,0]), 120); } close($fh); } maq-0.7.1/scripts/solid2fastq.pl0000755000076600000240000000577210773300343015144 0ustar lh3staff#!/usr/bin/perl -w # Author: lh3 # Note: Ideally, this script should be written in C. It is a bit slow at present. use strict; use warnings; use Getopt::Std; my %opts; my $version = '0.1.1'; my $usage = qq{ Usage: solid2fastq.pl Note: is the string showed in the `# Title:' line of a ".csfasta" read file. Then F3.csfasta is read sequence file and F3_QV.qual is the quality file. If R3.csfasta is present, this script assumes reads are paired; otherwise reads will be regarded as single-end. The read name will be :panel_x_y/[12] with `1' for F3 tag and `2' for R3. Usually you may want to use short to save diskspace. Long also causes troubles to maq. }; getopts('', \%opts); die($usage) if (@ARGV != 2); my ($title, $pre) = @ARGV; my (@fhr, @fhw); my @fn_suff = ('F3.csfasta', 'F3_QV.qual', 'R3.csfasta', 'R3_QV.qual'); my $is_paired = (-f "$title$fn_suff[2]" || -f "$title$fn_suff[2].gz")? 1 : 0; if ($is_paired) { # paired end for (0 .. 3) { my $fn = "$title$fn_suff[$_]"; $fn = "gzip -dc $fn.gz |" if (!-f $fn && -f "$fn.gz"); open($fhr[$_], $fn) || die("** Fail to open '$fn'.\n"); } open($fhw[0], "|gzip >$pre.read1.fastq.gz") || die; open($fhw[1], "|gzip >$pre.read2.fastq.gz") || die; open($fhw[2], "|gzip >$pre.single.fastq.gz") || die; my (@df, @dr); @df = &read1(1); @dr = &read1(2); while (@df && @dr) { if ($df[0] eq $dr[0]) { # mate pair print {$fhw[0]} $df[1]; print {$fhw[1]} $dr[1]; @df = &read1(1); @dr = &read1(2); } else { if ($df[0] le $dr[0]) { print {$fhw[2]} $df[1]; @df = &read1(1); } else { print {$fhw[2]} $dr[1]; @dr = &read1(2); } } } if (@df) { print {$fhw[2]} $df[1]; while (@df = &read1(1, $fhr[0], $fhr[1])) { print {$fhw[2]} $df[1]; } } if (@dr) { print {$fhw[2]} $dr[1]; while (@dr = &read1(2, $fhr[2], $fhr[3])) { print {$fhw[2]} $dr[1]; } } close($fhr[$_]) for (0 .. $#fhr); close($fhw[$_]) for (0 .. $#fhw); } else { # single end for (0 .. 1) { my $fn = "$title$fn_suff[$_]"; $fn = "gzip -dc $fn.gz |" if (!-f $fn && -f "$fn.gz"); open($fhr[$_], $fn) || die("** Fail to open '$fn'.\n"); } open($fhw[2], "|gzip >$pre.single.fastq.gz") || die; my @df; while (@df = &read1(1, $fhr[0], $fhr[1])) { print {$fhw[2]} $df[1]; } close($fhr[$_]) for (0 .. $#fhr); close($fhw[2]); } sub read1 { my $i = shift(@_); my $j = ($i-1)<<1; my ($key, $seq); my ($fhs, $fhq) = ($fhr[$j], $fhr[$j|1]); while (<$fhs>) { my $t = <$fhq>; if (/^>(\d+)_(\d+)_(\d+)_[FR]3/) { $key = sprintf("%.4d_%.4d_%.4d", $1, $2, $3); # this line could be improved on 64-bit machines die(qq/** unmatched read name: '$_' != '$_'\n/) unless ($_ eq $t); my $name = "$pre:$1_$2_$3/$i"; $_ = substr(<$fhs>, 2); tr/0123./ACGTN/; my $s = $_; $_ = <$fhq>; s/^(\d+)\s*//; s/(\d+)\s*/chr($1+33)/eg; $seq = qq/\@$name\n$s+\n$_\n/; last; } } return defined($seq)? ($key, $seq) : (); } maq-0.7.1/seq.c0000644000076600000240000000560310766735650011626 0ustar lh3staff#include #include #include #include "seq.h" static int SEQ_BLOCK_SIZE = 512; void seq_set_block_size(int size) { SEQ_BLOCK_SIZE = size; } /* Read sequences from file "fp" in FASTA format. Sequence will be saved * in "seq", sequence ID in "locus", and comment saved in "comment", * provided "comment != 0". Sequence length will be returned. If -1 is * returned, no sequence is left in the file. */ int seq_read_fasta(FILE *fp, seq_t *seq, char *locus, char *comment) { int c, l, max; char *p; c = 0; while (!feof(fp) && fgetc(fp) != '>'); if (feof(fp)) return -1; p = locus; while (!feof(fp) && (c = fgetc(fp)) != ' ' && c != '\t' && c != '\n') if (c != '\r') *p++ = c; *p = '\0'; if (comment) { p = comment; if (c != '\n') { while (!feof(fp) && ((c = fgetc(fp)) == ' ' || c == '\t')); if (c != '\n') { *p++ = c; while (!feof(fp) && (c = fgetc(fp)) != '\n') if (c != '\r') *p++ = c; } } *p = '\0'; } else if (c != '\n') while (!feof(fp) && fgetc(fp) != '\n'); l = 0; max = seq->m; while (!feof(fp) && (c = fgetc(fp)) != '>') { if (isalpha(c) || c == '-' || c == '.') { if (l + 1 >= max) { max += SEQ_BLOCK_SIZE; seq->s = (unsigned char*)realloc(seq->s, sizeof(char) * max); } seq->s[l++] = (unsigned char)c; } } if (c == '>') ungetc(c,fp); seq->s[l] = 0; seq->m = max; seq->l = l; return l; } int seq_read_fastq(FILE *fp, seq_t *seq, seq_t *qual, char *name) { int c, l, max; char *p; c = 0; /* first read the sequence */ while (!feof(fp) && fgetc(fp) != '@'); if (feof(fp)) return -1; p = name; while (!feof(fp) && (c = fgetc(fp)) != ' ' && c != '\t' && c != '\n') if (c != '\r') *p++ = c; *p = '\0'; if (c != '\n') while (!feof(fp) && fgetc(fp) != '\n'); l = 0; max = seq->m; while (!feof(fp) && (c = fgetc(fp)) != '+') { if (isalpha(c) || c == '-' || c == '.') { if (l + 1 >= max) { max += SEQ_BLOCK_SIZE; seq->s = (unsigned char*)realloc(seq->s, sizeof(char) * max); } seq->s[l++] = (unsigned char)c; } } if (c == '+') ungetc(c, fp); seq->s[l] = 0; seq->m = max; seq->l = l; /* now come to the qualities */ while (!feof(fp) && fgetc(fp) != '+'); p = name; while (!feof(fp) && (c = fgetc(fp)) != ' ' && c != '\t' && c != '\n') if (c != '\r' && *p++ != c) { fprintf(stderr, "[seq_read_fastq] Inconsistent sequence name: %s. Continue anyway.\n", name); return seq->l; } l = 0; max = qual->m; while (!feof(fp) && l < seq->l) { c = fgetc(fp); if (c >= 33 && c < 127) { if (l + 1 >= max) { max += SEQ_BLOCK_SIZE; qual->s = (unsigned char*)realloc(qual->s, sizeof(char) * max); } qual->s[l++] = (unsigned char)(c - 33); } } c = fgetc(fp); if (c == '@') ungetc(c, fp); qual->s[l] = 0; qual->m = max; qual->l = l; if (seq->l != qual->l) fprintf(stderr, "[seq_read_fastq] Inconsistent length: %d!=%d. Continue anyway.", seq->l, qual->l); return seq->l; } maq-0.7.1/seq.h0000644000076600000240000000130410766735650011625 0ustar lh3staff#ifndef STDSEQ_H_ #define STDSEQ_H_ #include #define SEQ_MAX_NAME_LEN 255 #define INIT_SEQ(seq) (seq).s = 0; (seq).l = (seq).m = 0 #define CHAR2QUAL(c) \ ((isdigit(c))? ((c)-'0') : ((islower(c))? ((c)-'a'+10) : ((isupper(c))? ((c)-'A'+36) : 0))) #define QUAL2CHAR(q) \ (((q)<10)? ((q)+'0') : (((q)<36)? ((q)-10+'a') : (((q)<62)? ((q)-36+'A') : 'Z'))) typedef struct { int l, m; /* length and maximum buffer size */ unsigned char *s; /* sequence */ } seq_t; #ifdef __cplusplus extern "C" { #endif void seq_set_block_size(int size); int seq_read_fasta(FILE*, seq_t*, char*, char*); int seq_read_fastq(FILE*, seq_t*, seq_t *, char*); #ifdef __cplusplus } #endif #endif /* STDSEQ_H_ */ maq-0.7.1/simulate.c0000644000076600000240000003442011065656462012654 0ustar lh3staff#include #include #include #include #include #include #include "main.h" #include "seq.h" #include "genran.h" #include "const.h" #include "maqmap.h" #ifndef MAX_READLEN #define MAX_READLEN 128 #endif #define MAX_QUAL 63 typedef struct { int l_min, l_max, q_max; bit64_t n; bit64_t comp_count[MAX_READLEN][5]; bit64_t qual_count[MAX_READLEN][MAX_QUAL+1]; double fqual_count[MAX_READLEN][MAX_QUAL+1]; bit64_t markov_count[MAX_READLEN][MAX_QUAL+1][MAX_QUAL+1]; double fmarkov_count[MAX_READLEN][MAX_QUAL+1][MAX_QUAL+1]; } fqc_t; fqc_t *fqc_collect(FILE *fp_fq) { seq_t seq, qual; char name[256]; int i, l, q1, q2; fqc_t *fqc = (fqc_t*)calloc(1, sizeof(fqc_t)); fqc->l_min = 1<<30; INIT_SEQ(seq); INIT_SEQ(qual); seq_set_block_size(256); while ((l = seq_read_fastq(fp_fq, &seq, &qual, name)) >= 0) { bit8_t t, tt, prev = 0; if (l < fqc->l_min) fqc->l_min = l; if (l > fqc->l_max) fqc->l_max = l; for (i = 0; i != l; ++i) { t = nst_nt4_table[seq.s[i]]; if (t > 4) t = 4; tt = (qual.s[i] > MAX_QUAL)? MAX_QUAL : qual.s[i]; if (tt > fqc->q_max) fqc->q_max = tt; ++fqc->comp_count[i][t]; ++fqc->qual_count[i][tt]; if (i > 0) ++fqc->markov_count[i][prev][tt]; prev = tt; } ++fqc->n; } free(seq.s); free(qual.s); assert(fqc->l_min == fqc->l_max); // this should not happen for (i = 0; i < fqc->l_max; ++i) { // normalize to 1 bit64_t sum = 0; for (q1 = 0; q1 <= fqc->q_max; ++q1) sum += fqc->qual_count[i][q1]; for (q1 = 0; q1 <= fqc->q_max; ++q1) fqc->fqual_count[i][q1] = (double)fqc->qual_count[i][q1] / sum; for (q1 = 0; q1 <= fqc->q_max; ++q1) { sum = 0; for (q2 = 0; q2 <= fqc->q_max; ++q2) sum += fqc->markov_count[i][q1][q2]; for (q2 = 0; q2 <= fqc->q_max; ++q2) fqc->fmarkov_count[i][q1][q2] = (double)fqc->markov_count[i][q1][q2] / sum; } } return fqc; } int maq_simutrain(int argc, char *argv[]) { fqc_t *fqc; FILE *fp; gzFile *fpout; if (argc < 3) { fprintf(stderr, "Usage: maq simutrain \n"); return 1; } fp = (strcmp(argv[2], "-") == 0)? stdin : fopen(argv[2], "r"); fpout = gzopen(argv[1], "w"); assert(fp && fpout); fqc = fqc_collect(fp); gzwrite(fpout, fqc, sizeof(fqc_t)); gzclose(fpout); fclose(fp); free(fqc); return 0; } static void gen_qual(fqc_t *fqc, char str[], int size) { double ran = ran_uniform(); double *p = fqc->fqual_count[0]; double sum; int i, k, prev; for (k = 0, sum = 0.0; k <= fqc->q_max; ++k) { sum += p[k]; // precalculate this sum will be more effficient, but this is not critical... if (sum >= ran) break; } str[0] = 33 + k; prev = k; for (i = 1; i != size; ++i) { double ran = ran_uniform(); p = fqc->fmarkov_count[i][prev]; for (k = 0, sum = 0.0; k <= fqc->q_max; ++k) { sum += p[k]; if (sum >= ran) break; } str[i] = 33 + k; prev = k; } str[size] = 0; // end of a string } static double MUT_RATE = 0.001; static double INDEL_FRAC = 0.1; void maq_mut_diref(const seq_t *seq, int is_hap, seq_t *hap1, seq_t *hap2) { int i; seq_t *ret[2]; ret[0] = hap1; ret[1] = hap2; ret[0]->l = seq->l; ret[1]->l = seq->l; ret[0]->m = seq->m; ret[1]->m = seq->m; ret[0]->s = (bit8_t*)calloc(seq->m, 1); ret[1]->s = (bit8_t*)calloc(seq->m, 1); for (i = 0; i != seq->l; ++i) { int c; c = ret[0]->s[i] = ret[1]->s[i] = 0x50 | nst_nt4_table[(int)seq->s[i]]; if ((c&0xf) < 4 && ran_uniform() < MUT_RATE) { // mutation if (ran_uniform() >= INDEL_FRAC) { // substitution double r = ran_uniform(); c = (c + (int)(r * 3.0 + 1)) & 3; if (is_hap || ran_uniform() < 0.333333) { // hom ret[0]->s[i] = ret[1]->s[i] = 0x50|c; } else { // het ret[ran_uniform()<0.5?0:1]->s[i] = 0x50|c; } } else { // indel if (ran_uniform() < 0.5) { // deletion if (is_hap || ran_uniform() < 0.333333) { // hom-del ret[0]->s[i] = ret[1]->s[i] = 0x55; } else { // het-del ret[ran_uniform()<0.5?0:1]->s[i] = 0x55; } } else { // insersion int ins = (int)(ran_uniform() * 4.0); if (is_hap || ran_uniform() < 0.333333) { // hom-ins ret[0]->s[i] = ret[1]->s[i] = ins << 4 | (c&0xf); } else { // het-ins ret[ran_uniform()<0.5?0:1]->s[i] = ins << 4 | (c&0xf); } } } } } } void maq_print_mutref(const char *name, const seq_t *seq, seq_t *hap1, seq_t *hap2) { int i; for (i = 0; i != seq->l; ++i) { int c[3]; c[0] = nst_nt4_table[(int)seq->s[i]]; c[1] = hap1->s[i]; c[2] = hap2->s[i]; if (c[0] >= 4) continue; if (c[1] != (c[0]|0x50) || c[2] != (c[0]|0x50)) { printf("%s\t%d\t", name, i+1); if (c[1] == c[2]) { // hom if ((c[1]&0xf) < 5 && c[1]>>4 == 5) { // substitution printf("%c\t%c\t-\n", "ACGTN"[c[0]], "ACGTN"[c[1]&0xf]); } else if (c[1]>>4 < 5) { // ins printf("-\t%c\t-\n", "ACGTN"[c[1]>>4&0xf]); } else if ((c[1]&0xf) == 5) { // del printf("%c\t-\t-\n", "ACGTN"[c[0]]); } else assert(0); } else { // het if ((c[1]&0xf) < 5 && c[1]>>4 == 5 && (c[2]&0xf) < 5 && c[2]>>4 == 5) { // substitution printf("%c\t%c\t+\n", "ACGTN"[c[0]], "XACMGRSVTWYHKDBN"[1<<(c[1]&0xf)|1<<(c[2]&0xf)]); } else if (c[1]>>4 < 5) { // ins1 printf("-\t%c\t+\n", "ACGTN"[c[1]>>4&0xf]); } else if (c[2]>>4 < 5) { // ins2 printf("-\t%c\t+\n", "ACGTN"[c[2]>>4&0xf]); } else if ((c[1]&0xf) == 5) { printf("%c\t-\t+\n", "ACGTN"[c[0]]); } else if ((c[2]&0xf) == 5) { printf("%c\t-\t+\n", "ACGTN"[c[0]]); } else assert(0); } } } } void maq_simulate_core(FILE *fpout1, FILE *fpout2, FILE *fp_fa, gzFile fp_par, int is_hap, bit64_t N, int dist, int std_dev, int size_l, int size_r) { fqc_t *fqc; seq_t seq, rseq[2]; bit64_t tot_len, ii; int i, l, n_ref, k; char name[256], qstr[256], str[1024]; double Q_table[MAX_QUAL+1]; int size[2]; bit8_t tmp_seq[2][256], *target; fqc = (fqc_t*)malloc(sizeof(fqc_t)); l = gzread(fp_par, fqc, sizeof(fqc_t)); for (i = 0; i <= MAX_QUAL; ++i) Q_table[i] = exp(-log(10.0) * i / 10.0); INIT_SEQ(seq); ran_seed(); seq_set_block_size(0x1000000); assert(size_l <= fqc->l_max && size_r <= fqc->l_max); if (size_l == 0) size_l = fqc->l_max; if (size_r == 0) size_r = fqc->l_max; size[0] = size_l; size[1] = size_r; tot_len = n_ref = 0; while ((l = seq_read_fasta(fp_fa, &seq, name, 0)) >= 0) { tot_len += l; ++n_ref; } fprintf(stderr, "-- %d sequences, total length: %llu\n", n_ref, tot_len); rewind(fp_fa); while ((l = seq_read_fasta(fp_fa, &seq, name, 0)) >= 0) { bit64_t n_pairs = (bit64_t)((long double)l / tot_len * N + 0.5); if (l < dist + 2 * std_dev) { fprintf(stderr, "[maq_simulate_core] Each reference sequence should be longer than dist+2*stddev. Abort!\n"); exit(1); } maq_mut_diref(&seq, is_hap, rseq, rseq+1); maq_print_mutref(name, &seq, rseq, rseq+1); for (ii = 0; ii != n_pairs; ++ii) { double ran; int d, pos, s[2], begin, end, is_flip = 0; FILE *fpo[2]; do { ran = ran_normal(); ran = ran * std_dev + dist; if (ran < fqc->l_max) ran = fqc->l_max; d = (int)(ran + 0.5); pos = (int)((l - d + 1) * ran_uniform()); } while (pos < 0 || pos >= seq.l); // flip or not if (ran_uniform() < 0.5) { fpo[0] = fpout1; fpo[1] = fpout2; s[0] = size[0]; s[1] = size[1]; } else { fpo[1] = fpout1; fpo[0] = fpout2; s[1] = size[0]; s[0] = size[1]; is_flip = 1; } // generate the read sequences target = rseq[ran_uniform()<0.5?0:1].s; // haploid from which the reads are generated for (i = pos, k = 0, begin = 0; i < seq.l; ++i) { int c = target[i]; if ((c&0xf) == 5) continue; // deletion if (begin == 0) { begin = i; if ((c&0xf0) < 4) continue; // skip ins at the first base, FIXME! } if ((c>>4) < 4) { tmp_seq[0][k++] = c>>4; if (k == s[0]) break; } tmp_seq[0][k++] = c&0xf; if (k == s[0]) break; } for (i = pos + d - 1, k = 0, end = 0; i >= 0; --i) { int c = target[i]; if ((c&0xf) == 5) continue; // deletion if (end == 0) end = i; tmp_seq[1][k++] = c&0xf; if (k == s[1]) break; if ((c>>4) < 4) { tmp_seq[1][k++] = c>>4; if (k == s[1]) break; } } // start to print out if (!is_flip) sprintf(str, "%s_%u_%u_%llx", name, begin+1, end+1, ii); else sprintf(str, "%s_%u_%u_%llx", name, begin+1, end+1, ii); // print forward read fprintf(fpo[0], "@%s/%d\n", str, is_flip+1); gen_qual(fqc, qstr, s[0]); // generate qual for (i = 0; i < s[0]; ++i) { int c = tmp_seq[0][i]; if (c > 4) c = 4; if (c < 4) { if (ran_uniform() < Q_table[qstr[i]-33]) c = (c + (int)(ran_uniform() * 3.0 + 1)) & 3; } fputc("ACGTN"[c], fpo[0]); } fprintf(fpo[0], "\n+\n%s\n", qstr); // print reverse read fprintf(fpo[1], "@%s/%d\n", str, 2-is_flip); gen_qual(fqc, qstr, s[1]); for (i = 0; i < s[1]; ++i) { int c = tmp_seq[1][i]; if (c > 4) c = 4; if (c < 4) { c = 3 - c; // complement if (ran_uniform() < Q_table[qstr[i]-33]) c = (c + (int)(ran_uniform() * 3.0 + 1)) & 3; } fputc("ACGTN"[c], fpo[1]); } fprintf(fpo[1], "\n+\n%s\n", qstr); } } free(seq.s); free(fqc); } static int simu_usage() { fprintf(stderr, "\n"); fprintf(stderr, "Usage: maq simulate [options] \n\n"); fprintf(stderr, "Options: -d INT outer distance between the two ends [170]\n"); fprintf(stderr, " -s INT standard deviation [20]\n"); fprintf(stderr, " -N INT number of read pairs [1000000]\n"); fprintf(stderr, " -1 INT length of the first read\n"); fprintf(stderr, " -2 INT length of the second read\n"); fprintf(stderr, " -r FLOAT rate of mutations [0.001]\n"); fprintf(stderr, " -R FLOAT fraction of 1bp indels [0.1]\n"); fprintf(stderr, " -h haploid mode\n"); fprintf(stderr, "\n"); return 1; } int maq_simulate(int argc, char *argv[]) { bit64_t N; int dist, std_dev, c, size_l, size_r, is_hap = 0; FILE *fpout1, *fpout2, *fp_fa; gzFile fp_par; N = 1000000; dist = 170; std_dev = 20; size_l = size_r = 0; while ((c = getopt(argc, argv, "d:s:N:1:2:r:R:h")) >= 0) { switch (c) { case 'd': dist = atoi(optarg); break; case 's': std_dev = atoi(optarg); break; case 'N': N = atoi(optarg); break; case '1': size_l = atoi(optarg); break; case '2': size_r = atoi(optarg); break; case 'r': MUT_RATE = atof(optarg); break; case 'R': INDEL_FRAC = atof(optarg); break; case 'h': is_hap = 1; break; } } if (argc - optind < 4) return simu_usage(); fpout1 = fopen(argv[optind+0], "w"); fpout2 = fopen(argv[optind+1], "w"); fp_fa = (strcmp(argv[optind+2], "-") == 0)? stdin : fopen(argv[optind+2], "r"); fp_par = gzopen(argv[optind+3], "r"); if (fpout1 == 0) fprintf(stderr, "[maq_simulate] cannot write to file '%s'", argv[optind+0]); if (fpout2 == 0) fprintf(stderr, "[maq_simulate] cannot write to file '%s'", argv[optind+1]); if (fp_fa == 0) fprintf(stderr, "[maq_simulate] cannot open reference sequence file '%s'", argv[optind+2]); if (fp_par == 0) fprintf(stderr, "[maq_simulate] cannot open parameter file '%s'\n", argv[optind+3]); assert(fpout1 && fpout2 && fp_fa && fp_par); maq_simulate_core(fpout1, fpout2, fp_fa, fp_par, is_hap, N, dist, std_dev, size_l, size_r); fclose(fpout1);fclose(fpout2); fclose(fp_fa); gzclose(fp_par); return 0; } /* simustat */ static void simustat_core(gzFile fp, int Q_thres) { static int n_valid_abflags = 5; static int valid_abflags[5] = {PAIRFLAG_FF, PAIRFLAG_FR, PAIRFLAG_RF, PAIRFLAG_RR, PAIRFLAG_DIFFCHR}; bit32_t wc_single[10], wc_pair[10], abpair[256][10], tot_single[10], tot_pair[10]; maqmap_t *m = maqmap_read_header(fp); maqmap1_t *m1, mm1; char str[256]; int i, k, tc[2][2]; m1 = &mm1; memset(wc_single, 0, 40); memset(tot_single, 0, 40); memset(wc_pair, 0, 40); memset(tot_pair, 0, 40); memset(abpair, 0, 4 * 256 * 10); memset(tc[2], 0, 4 * sizeof(int)); while (maqmap_read1(fp, m1)) { int is_correct; bit32_t p1, p2; if (m1->info2 > 60) continue; p1 = p2 = 0xffffffffu; strcpy(str, m1->name); for (k = 0, i = strlen(str) - 1; i >= 0; --i) { if (str[i] == '_') { if (k == 0) { ++k; str[i] = 0; } else if (k == 1) { p2 = atoi(str + i + 1); ++k; str[i] = 0; } else if (k == 2) { p1 = atoi(str + i + 1); ++k; str[i] = 0; } } } assert(p1 != 0xffffffffu && p2 != 0xffffffffu); is_correct = 1; if (strcmp(str, m->ref_name[m1->seqid])) is_correct = 0; else { if (p1 < p2) { --p1; // zero based if (m1->pos&1) { // reverse if (abs((m1->pos>>1) - (p2 - m1->size)) > 1) is_correct = 0; } else { // forward if (abs((m1->pos>>1) - p1) > 1) is_correct = 0; } } else { --p2; // zero based if (m1->pos&1) { // reverse if (abs((m1->pos>>1) - (p1 - m1->size)) > 1) is_correct = 0; } else { // forward if (abs((m1->pos>>1) - p2) > 1) is_correct = 0; } } } k = m1->seq[MAX_READLEN-1] / 10; if (k > 9) k = 9; ++tot_single[k]; if (!is_correct) ++wc_single[k]; k = m1->map_qual / 10; if (k > 9) k = 0; ++tot_pair[k]; // ++tc[is_correct][m1->info1>>4&1]; // debug only if (!is_correct) ++wc_pair[k]; if (!is_correct && m1->map_qual >= Q_thres) { fprintf(stderr, "%s\t%u\t%c\t%d\t%d\t%d\t%d\n", m1->name, m1->pos>>1, (m1->pos&1)? '-' : '+', m1->map_qual, m1->seq[MAX_READLEN-1], m1->c[0], m1->c[1]); } // count abnormal pairs if (m1->flag != (PAIRFLAG_FR | PAIRFLAG_PAIRED) && m1->flag != PAIRFLAG_NOMATCH) { k = m1->alt_qual / 10; if (k > 9) k = 9; ++abpair[m1->flag][k]; } } // print out // fprintf(stderr, "%d,%d,%d,%d\n", tc[0][0], tc[0][1], tc[1][0], tc[1][1]); printf("%2s%12s / %-12s%12s / %-12s", "Q", "SE_wrong", "SE_tot", "PE_wrong", "PE_tot"); for (i = 0; i != n_valid_abflags; ++i) printf("%12d", valid_abflags[i]); printf("\n"); for (k = 0; k <= 9; ++k) { printf("%dx%12d / %-12d%12d / %-12d", k, wc_single[k], tot_single[k], wc_pair[k], tot_pair[k]); for (i = 0; i != n_valid_abflags; ++i) printf("%12d", abpair[valid_abflags[i]][k]); printf("\n"); } maq_delete_maqmap(m); } int maq_simustat(int argc, char *argv[]) { gzFile fp; int Q = 100; if (argc < 2) { fprintf(stderr, "Usage: maq simustat [=100]\n"); return 1; } fp = gzopen(argv[1], "r"); if (argc >= 3) Q = atoi(argv[2]); assert(fp); simustat_core(fp, Q); gzclose(fp); return 0; } maq-0.7.1/sort_mapping.cc0000644000076600000240000004174211065656462013703 0ustar lh3staff#include #include #include #include #include "read.h" #include "match.hh" #include "algo.hh" // Why "10"? I forget. Probably a wild estimation... #define END_DIFF_QUAL 10 static float match_norm_c[8] = { 0.5, 0.5, 0.25, 0.11, 0.05, 0.021, 0.009, 0.004 }; static inline int ma_is_paired(const match_aux_t *o, bit32_t pos1, bit32_t pos2) { if (!o->is_color) { // nucleotide space if ((pos1&1) == 0) { // the first one is on the forward strand if (pos2&1) { // the other on the reverse strand int dist = int(pos2>>1) - int(pos1>>1) + o->size_l; if (dist >= o->min_dist && dist <= o->max_dist) return 1; } } else { // the first one in on the reverse strand if ((pos2&1) == 0) { // the other on the forward strand int dist = int(pos1>>1) - int(pos2>>1) + o->size_r; if (dist >= o->min_dist && dist <= o->max_dist) return 1; } } if (o->RF_max_dist) { // long-insert library if ((pos1&1) == 1) { // the first is on the reverse if ((pos2&1) == 0) { // the second on the forward int dist = int(pos2>>1) - int(pos1>>1) + o->size_l; if (dist >= o->min_dist && dist <= o->RF_max_dist) return 1; } } else { // the first is on the forward if ((pos2&1) == 1) { // the second on the reverse int dist = int(pos1>>1) - int(pos2>>1) + o->size_r; if (dist >= o->min_dist && dist <= o->RF_max_dist) return 1; } } } } else { // color space if ((pos1&1) == 0 && (pos2&1) == 0) { // both on the forward strand int dist = int(pos1>>1) - int(pos2>>1) + o->size_r; if (dist >= o->min_dist && dist <= o->max_dist) return 1; } else if ((pos1&1) == 1 && (pos2&1) == 1) { // both on the reverse strand int dist = int(pos2>>1) - int(pos1>>1) + o->size_l; if (dist >= o->min_dist && dist <= o->max_dist) return 1; } } return 0; } inline int ma_make_pair(const match_aux_t *o, const match_info_t *m1, const match_info_t *m2, pair_info_t *p) { if (p->i1 != MA_NO_MATCH || m1->i1 == MA_NO_MATCH || m2->i1 == MA_NO_MATCH) return 0; if (m1->seqid1 == m2->seqid1 && ma_is_paired(o, m1->p1, m2->p1)) { p->seqid1 = m1->seqid1; p->m11 = m1->mm1; p->m12 = m2->mm1; p->p11 = m1->p1; p->p12 = m2->p1; p->i1 = (((m1->i1>>24)+(m2->i1>>24))<<24) | (m1->i1^m2->i1&0xffffff); return 1; } return 0; } // match_info_t::last1 MUST be set as the quality before using this function! static inline int ma_cal_pair_qual(const pair_info_t *pair, const match_info_t *m1, const match_info_t *m2, const bit8_t sl[], const bit8_t sr[], const match_aux_t *o) { if (pair->i1 == MA_NO_MATCH) return -1; int q, q_alt = 100; if (pair->i2 != MA_NO_MATCH) q_alt = 0; q = ((pair->p11 == m1->p1)? m1->last1 : 0) + ((pair->p12 == m2->p1)? m2->last1 : 0); if (q_alt < q) q = q_alt; return (q <= 99)? q : 99; } static inline void ma_dim_end_diff(int size, bit8_t seq[], const matches_t &mm) { int k; for (k = 0; k != size; ++k) { if ((mm>>(size-1-k)&1) == 0) break; if ((seq[k]&0x3f) > END_DIFF_QUAL) seq[k] = (seq[k]&0xc0) | END_DIFF_QUAL; } for (k = size - 1; k >= 0; --k) { if ((mm>>(size-1-k)&1) == 0) break; if ((seq[k]&0x3f) > END_DIFF_QUAL) seq[k] = (seq[k]&0xc0) | END_DIFF_QUAL; } } static inline int ma_cal_map_qual(int size, bit8_t seq[], const match_aux_t *o, match_info_t *match, const int qs[8]) { static int q_miss[] = { 0, 2, 4, 8 }; int avg, k, tmp; int q1, m1, q2, m2, aln_qual, aln_alt_qual; int full_m1, full_m2; if (match->i1 == MA_NO_MATCH) return -1; // calculate sum of errors avg = q1 = q2 = full_m1 = full_m2 = 0; for (k = size - 1; k >= 0; --k) { int q = seq[k]&0x3f; if (q > o->q_rate) q = o->q_rate; avg += q; if (match->mm1>>(size-1-k)&1) { q1 += q; ++full_m1; } if (match->mm2>>(size-1-k)&1) { q2 += q; ++full_m2; } } avg = int((float)avg / size + 0.5); // calculate alignment quality // part 1: quality difference m1 = match->q>>8&0xff; m2 = match->q&0xff; if (match->i2 == MA_NO_MATCH) aln_qual = 99; else { aln_qual = q2 - q1 - o->log_n[match->c[m2]]; if (m2 - m1 <= 1 && aln_qual > o->q_rate) aln_qual = o->q_rate; } // part 2: quality for missing hits // In principle, a better fomula should be: 4 + avg_diff * C^{24}_k * (k + 1) // C^{24}_k is merged to avg. This is about Q13-Q15 for each mismatch. if ((avg -= 13) < 0) avg = 0; tmp = o->n_mismatch + 1 - m1; aln_alt_qual = (tmp >= 0)? q_miss[o->n_mismatch] + avg * tmp + qs[tmp] : 0; // calculate final aln_qual if (aln_alt_qual < aln_qual) aln_qual = aln_alt_qual; if (aln_qual < 0) aln_qual = 0; if (aln_qual > 99) aln_qual = 99; // write last_mm2 if (full_m1 > 15) full_m1 = 15; if (q1 > 255) q1 = 255; match->last_mm2 = q1<<8 | m1<<4 | full_m1; return aln_qual; } static void mapping_count_single(const match_data_t *d, int qs[], int is_paired) { int i, n; for (i = 0; i != 8; ++i) qs[i] = 1; // pseudo-count for (i = n = 0; i != d->n_reads; ++i) { if (is_paired == 0 && (i&1)) continue; match_info_t *m = d->match + i; if (m->i1 != MA_NO_MATCH && (m->q>>8&0xff) <= 1) { ++n; if (m->i2 != MA_NO_MATCH) { int t = (m->q&0xff) - (m->q>>8&0xff); if (t < 0) t = 0; ++qs[t]; } } } for (i = 0; i != 8; ++i) { qs[i] = int(-4.343 * log((double)qs[i]/n) - 0.5); if (qs[i] < 0) qs[i] = 0; } fprintf(stderr, "[mapping_count_single] %d, %d, %d, %d\n", qs[0], qs[1], qs[2], qs[3]); } static inline void ma_set_dist_flag(const pair_info_t *p, match_info_t *m1, match_info_t *m2, int dist) { if (p->i1 != MA_NO_MATCH) { m1->last_seqid = dist; m2->last_seqid = -dist; m1->last2 = m2->last2 = ((p->p11>>1 < p->p12>>1)? 1<<((p->p11&1)<<1|(p->p12&1)) : 1<<((p->p12&1)<<1|(p->p11&1))) | PAIRFLAG_PAIRED; } else { m1->last_seqid = m2->last_seqid = 0; // set dist as zero, by default if (m1->i1 != MA_NO_MATCH || m2->i1 != MA_NO_MATCH) { if (m1->i1 == MA_NO_MATCH) { m2->last2 = PAIRFLAG_NOMATCH; } else if (m2->i1 == MA_NO_MATCH) { m1->last2 = PAIRFLAG_NOMATCH; } else { // then both have a match if (m1->seqid1 != m2->seqid1) { m1->last2 = m2->last2 = PAIRFLAG_DIFFCHR; } else { // both matches are on the same chr m1->last_seqid = dist; m2->last_seqid = -dist; if (dist > 0) { // m1 has smaller coordinate m1->last2 = m2->last2 = 1<<((m1->p1&1)<<1 | (m2->p1&1)); } else { // m2 has smaller coordinate m1->last2 = m2->last2 = 1<<((m2->p1&1)<<1 | (m1->p1&1)); } } } } } } static inline int cal_mm(bit64_t x) { x = ((x & 0xAAAAAAAAAAAAAAAAull) >> 1) + (x & 0x5555555555555555ull); x = ((x & 0xCCCCCCCCCCCCCCCCull) >> 2) + (x & 0x3333333333333333ull); x = ((x & 0xF0F0F0F0F0F0F0F0ull) >> 4) + (x & 0x0F0F0F0F0F0F0F0Full); x = ((x & 0xFF00FF00FF00FF00ull) >> 8) + (x & 0x00FF00FF00FF00FFull); x = ((x & 0xFFFF0000FFFF0000ull) >> 16) + (x & 0x0000FFFF0000FFFFull); return ((x&0xFFFFFFFF00000000ull)>> 32) + (x & 0x00000000FFFFFFFFull); } template inline int cal_mm(const dword_t &x) { return cal_mm(x.w1) + cal_mm(x.w2); } /* In this function, match_info_t will be modified: q -> number of seed mismatches m -> whether the pair is 2-diff (a flag, 0 or 1) last1 -> mapping quality last_mm1 -> single end mapping quality last2 -> pair flag last_mm2 -> number of mismatch and sum of mismatch qualities last_seqid -> offset of the mate */ void match_data2map(gzFile fpout, FILE *fp_bfa, gzFile fp_bfq_l, gzFile fp_bfq_r, const match_aux_t *o, match_data_t *d) { int i, size[2] = { o->size_l, o->size_r }; longreads_t *lr; dword_t *sorted; int qs[8], n, n_mapped; extern void maq_indel_pe(FILE *fp_bfa, const match_aux_t *o, const longreads_t *lr, match_data_t *d); // *** STEP 1: load reads again lr = ma_load_reads(fp_bfq_l, o->size_l, fp_bfq_r, o->size_r); // *** STEP 2: calculate read quality for (int k = 0; k != d->n_reads; ++k) { // calculate number of mismatches in the seed match_info_t *match = d->match + k; int m1, m2, s; s = size[k&1]; m1 = m2 = 0; for (int j = 0; j < SEED_LENGTH && j < s; ++j) { if (match->mm1>>(s-1-j)&1) ++m1; if (match->mm2>>(s-1-j)&1) ++m2; } match->q = m1<<8 | m2; // match->q is reused as the number of mismatch in the seed match->m = 0; } mapping_count_single(d, qs, size[1]); for (int k = 0; k != d->n_reads; ++k) { match_info_t *match = d->match + k; // normalize match->c[] for (int j = 0; j <= MAX_MISMATCH; ++j) { int tmp = int(match->c[j] / (0.5 * o->n_filters) / match_norm_c[j] + 0.5); match->c[j] = (tmp < 256)? tmp : 255; } match->last1 = ma_cal_map_qual(size[k&1], lr->seq[k], o, match, qs); // ->last1 is the SE mapping quality match->last_mm1 = match->last1; // ->last_mm1 is the single-end mapping quality match->last_seqid = 0; // ->last_seqid should be the offset of the other pair } // *** STEP 3: calculate pair quality if (size[1]) { int n1, n2, ql1, ql2, qh1, qh2; // for statistics n = n1 = n2 = ql1 = ql2 = qh1 = qh2 = 0; for (int k = 0; k != d->n_reads>>1; ++k) { pair_info_t *pair = d->pair + k; match_info_t *match = d->match + (k<<1); int dist; { // calculate the distance between the pair int p1, p2; if (pair->i1 != MA_NO_MATCH) { p1 = (pair->p11&1)? pair->p11>>1 : (pair->p11>>1) - (size[0] - 1); p2 = (pair->p12&1)? pair->p12>>1 : (pair->p12>>1) - (size[1] - 1); } else { // match or match+1 may be unmapped, but this will be solved later p1 = (match->p1&1)? match->p1>>1 : (match->p1>>1) - (size[0] - 1); p2 = (match[1].p1&1)? match[1].p1>>1 : (match[1].p1>>1) - (size[1] - 1); } dist = p2 - p1 + (p2 > p1? 1 : -1); } if (ma_make_pair(o, match, match+1, pair)) ++n; // find missed pairs ma_set_dist_flag(pair, match, match+1, dist); // actually set ->last2 as the flag and ->last_seqid as the dist if (pair->i1 == MA_NO_MATCH) continue; // no paired match int pair_qual = ma_cal_pair_qual(pair, match, match+1, lr->seq[k<<1], lr->seq[k<<1|1], o); // tell whether the pair is at least 2-diff unique if (pair->i2 == MA_NO_MATCH) { int snm, s; s = (o->size_l <= SEED_LENGTH)? 0 : o->size_l - SEED_LENGTH; snm = cal_mm(pair->m11>>s); s = (o->size_r <= SEED_LENGTH)? 0 : o->size_r - SEED_LENGTH; snm += cal_mm(pair->m12>>s); match->m = match[1].m = (snm < 2)? 1 : 0; } // update single ends if the pair can be aligned if (pair->seqid1 != match->seqid1 || pair->p11 != match->p1) { // the read is moved! if (match->last1 < 30) ++ql1; else ++qh1; ++n1; match->p1 = pair->p11; match->seqid1 = pair->seqid1; match->mm1 = pair->m11; match->last_mm1 = match->last1 = 0; // single end Q should be 0, then. } if ((int)match->last1 < pair_qual) match->last1 = pair_qual; // update the mapping quality ++match; // match now is the other end if (pair->seqid1 != match->seqid1 || pair->p12 != match->p1) { // the read is moved! if (match->last1 < 30) ++ql2; else ++qh2; ++n2; match->p1 = pair->p12; match->seqid1 = pair->seqid1; match->mm1 = pair->m12; match->last_mm1 = match->last1 = 0; // 0! } if ((int)match->last1 < pair_qual) match->last1 = pair_qual; // update the mapping quality } fprintf(stderr, "[match_data2mapping] %d pairs are added afterwards.\n", n); fprintf(stderr, "[match_data2mapping] (%d, %d) reads are moved to meet paired-end requirement.\n", n1, n2); fprintf(stderr, "[match_data2mapping] quality counts of the first reads: (%d, %d); second reads (%d, %d)\n", qh1, ql1, qh2, ql2); } // we can delete match->pair now free(d->pair); d->pair = 0; maq_indel_pe(fp_bfa, o, lr, d); // *** STEP 4: trim adapter and sort the positions if (o->adapter) ma_trim_adapter(o->adapter, d, lr); // *** set coorninate of unmapped read in a pair if (o->size_r) { for (i = 0; i != d->n_reads>>1; ++i) { match_info_t *m1 = d->match + (i<<1); match_info_t *tmp, *m2 = m1 + 1; int do_modify = 0; if (m1->i1 == MA_NO_MATCH && m2->i1 != MA_NO_MATCH) do_modify = 1; else if (m2->i1 == MA_NO_MATCH && m1->i1 != MA_NO_MATCH) { do_modify = 1; tmp = m1; m1 = m2; m2 = tmp; } if (do_modify) { m1->i1 = m2->i1; m1->q = 0; m1->m = 0; m1->last1 = 0; m1->last_mm1 = 0; m1->last_seqid = 0; m1->last2 = PAIRFLAG_SW | PAIRFLAG_NOMATCH; m1->last_mm2 = 0; m1->p1 = m2->p1; m1->seqid1 = m2->seqid1; } } } // *** sort the positions sorted = (dword_t*)malloc(sizeof(dword_t) * d->n_reads); for (i = n_mapped = 0; i != d->n_reads; ++i) { match_info_t *match = d->match + i; if (match->i1 != MA_NO_MATCH) { ma_dim_end_diff(size[i&1], lr->seq[i], match->mm1); // dim the quality for mismatches at the end of a read bit64_t pos = (((match->p1>>1) + 1 - size[i&1]) << 1) | (match->p1 & 1); // this is the start position sorted[n_mapped++] = dword_t((pos<<32) | i, match->seqid1); } } algo_sort(n_mapped, sorted); // *** dump no-match and poor-match reads if (o->dump_file) { fprintf(stderr, "-- Dumping unmapped or poorly mapped reads\n"); FILE *fp_dump = fopen(o->dump_file, "w"); for (i = 0; i != d->n_reads; ++i) { if (!size[1] && (i&1)) continue; match_info_t *match = d->match + i; if (match->i1 == MA_NO_MATCH) { int s = size[i&1]; bit8_t *r = lr->seq[i]; fprintf(fp_dump, "%s\t99\t", lr->name[i>>1]); for (int j = 0; j != s; ++j) { if (r[j] == 0) fputc('N', fp_dump); else fputc("ACGT"[r[j]>>6], fp_dump); } fputc('\t', fp_dump); for (int j = 0; j != s; ++j) fputc((r[j]&0x3f) + 33, fp_dump); fputc('\n', fp_dump); } } fclose(fp_dump); } // *** STEP 5: dumping results maqmap_t *mm = maq_new_maqmap(); char new_name[1024]; mm->n_ref = d->n_lname; mm->ref_name = d->lname; mm->n_mapped_reads = n_mapped; maqmap_write_header(fpout, mm); free(mm); for (i = n = 0; i != n_mapped; ++i) { maqmap1_t *m1 = (maqmap1_t*)calloc(1, sizeof(maqmap1_t)); int k = sorted[i].w1 & 0xfffffffful; match_info_t *match = d->match + k; // get the read m1->size = size[k&1]; // size of the sequence memcpy(m1->seq, lr->seq[k], m1->size); // copy sequence memcpy(m1->c, match->c, 2); // only 0-1 are stored m1->seqid = match->seqid1; // chromosome ID m1->flag = (bit8_t)match->last2; // bit-wise paired information m1->pos = (((match->p1>>1) + 1 - m1->size) << 1) | (match->p1 & 1); // position and strand if (m1->flag & PAIRFLAG_SW) { // aligned be Smith-Waterman alignment m1->map_qual = match->last1; // indel position (0 for no indel) m1->alt_qual = match->last_mm1&0xff; // mapping quality of its mate m1->seq[MAX_READLEN-1] = match->last_mm1>>8&0xff; // length of indels (>0 for ins, <0 for del, ==0 for no indel) } else { if (o->is_color) m1->map_qual = ((match->q>>8&0xff) <= 3)? match->last1 : bit64_t(match->last_mm1); else m1->map_qual = ((match->q>>8&0xff) <= 2)? match->last1 : bit64_t(match->last_mm1); // mapping quality m1->alt_qual = bit64_t(((k&1) == 0)? (((match+1)->last_mm1 < match->last_mm1)? (match+1)->last_mm1 : match->last_mm1) : (((match-1)->last_mm1 < match->last_mm1)? (match-1)->last_mm1 : match->last_mm1)); // altq if (o->is_p2diff) m1->alt_qual = match->m&0x1; m1->seq[MAX_READLEN-1] = (bit8_t)bit64_t(match->last_mm1); // single end mapping quality } m1->dist = match->last_seqid; // distance between pairs m1->info1 = m1->info2 = 0xff; if (match->i1 != MA_NO_MATCH) { m1->info1 = match->last_mm2&0xff; m1->info2 = match->last_mm2>>8&0xff; } { // make read name int l = strlen(lr->name[k>>1]); strcpy(new_name, lr->name[k>>1]); if (new_name[l-1] == '1' && new_name[l-2] == '/') new_name[l-1] += k&1; if (l - MAX_NAMELEN + 1 > 0) strcpy(m1->name, new_name + l - MAX_NAMELEN + 1); else strcpy(m1->name, new_name); } if (m1->flag&(PAIRFLAG_PAIRED|PAIRFLAG_SW)) ++n; // count if paired if (m1->pos & 1) { // then reverse the read if (!o->is_color) { // nucleotide space for (int k = 0; k < m1->size>>1; ++k) { bit8_t tmp = m1->seq[k]; m1->seq[k] = ((3 - (m1->seq[m1->size-k-1]>>6)) << 6) | (m1->seq[m1->size-k-1]&0x3f); m1->seq[m1->size-k-1] = ((3 - (tmp>>6)) << 6) | (tmp&0x3f); } if (m1->size&1) m1->seq[m1->size>>1] = ((3 - (m1->seq[m1->size>>1]>>6)) << 6) | (m1->seq[m1->size>>1]&0x3f); } else { // color space, no need to do complementary for (int k = 0; k < m1->size>>1; ++k) { bit8_t tmp = m1->seq[k]; m1->seq[k] = m1->seq[m1->size-k-1]; m1->seq[m1->size-k-1] = tmp; } } } #ifndef MAQ_LONGREADS if (o->is_mm) { // record mismatch positions bit64_t *p = (bit64_t*)(m1->seq + 55); if (m1->pos&1) { // reverse strand, reverse match->mm1 bit64_t x = match->mm1; *p = 0; for (int k = 0; k < m1->size; ++k, x >>= 1) if (x&1) *p |= 1ull<<(m1->size-1-k); } else *p = match->mm1; } #endif gzwrite(fpout, m1, sizeof(maqmap1_t)); free(m1); } // *** STEP 7: deallocate the memory delete_longreads(lr); free(sorted); fprintf(stderr, "[match_data2mapping] %d out of %d raw reads are mapped with %d in pairs.\n", n_mapped, d->n_reads, n); if (o->size_r) fprintf(stderr, "-- (total, isPE, mapped, paired) = (%d, 1, %d, %d)\n", d->n_reads, n_mapped, n); else fprintf(stderr, "-- (total, isPE, mapped, paired) = (%d, 0, %d, 0)\n", d->n_reads>>1, n_mapped); } maq-0.7.1/stdaln.c0000644000076600000240000007106511065656462012324 0ustar lh3staff/* The MIT License Copyright (c) 2003-2006, 2008, by Heng Li Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include #include #include #include "stdaln.h" /* char -> 17 (=16+1) nucleotides */ unsigned char aln_nt16_table[256] = { 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,16 /*'-'*/,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15, 1,14, 4, 11,15,15, 2, 13,15,15,10, 15, 5,15,15, 15,15, 3, 6, 8,15, 7, 9, 0,12,15,15, 15,15,15,15, 15, 1,14, 4, 11,15,15, 2, 13,15,15,10, 15, 5,15,15, 15,15, 3, 6, 8,15, 7, 9, 0,12,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15, 15,15,15,15 }; char *aln_nt16_rev_table = "XAGRCMSVTWKDYHBN-"; /* char -> 5 (=4+1) nucleotides */ unsigned char aln_nt4_table[256] = { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5 /*'-'*/, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 4, 2, 4, 4, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 4, 2, 4, 4, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }; char *aln_nt4_rev_table = "AGCTN-"; /* char -> 22 (=20+1+1) amino acids */ unsigned char aln_aa_table[256] = { 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,20,21, 21,22 /*'-'*/,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21, 0,21, 4, 3, 6,13, 7, 8, 9,21,11, 10,12, 2,21, 14, 5, 1,15, 16,21,19,17, 21,18,21,21, 21,21,21,21, 21, 0,21, 4, 3, 6,13, 7, 8, 9,21,11, 10,12, 2,21, 14, 5, 1,15, 16,21,19,17, 21,18,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21, 21,21,21,21 }; char *aln_aa_rev_table = "ARNDCQEGHILKMFPSTWYV*X-"; /* 01234567890123456789012 */ /* translation table. They are useless in stdaln.c, but when you realize you need it, you need not write the table again. */ unsigned char aln_trans_table_eu[66] = { 11,11, 2, 2, 1, 1,15,15, 16,16,16,16, 9,12, 9, 9, 6, 6, 3, 3, 7, 7, 7, 7, 0, 0, 0, 0, 19,19,19,19, 5, 5, 8, 8, 1, 1, 1, 1, 14,14,14,14, 10,10,10,10, 20,20,18,18, 20,17, 4, 4, 15,15,15,15, 10,10,13,13, 21, 22 }; char *aln_trans_table_eu_char = "KKNNRRSSTTTTIMIIEEDDGGGGAAAAVVVVQQHHRRRRPPPPLLLL**YY*WCCSSSSLLFFX"; /* 01234567890123456789012345678901234567890123456789012345678901234 */ int aln_sm_blosum62[] = { /* A R N D C Q E G H I L K M F P S T W Y V * X */ 4,-1,-2,-2, 0,-1,-1, 0,-2,-1,-1,-1,-1,-2,-1, 1, 0,-3,-2, 0,-4, 0, -1, 5, 0,-2,-3, 1, 0,-2, 0,-3,-2, 2,-1,-3,-2,-1,-1,-3,-2,-3,-4,-1, -2, 0, 6, 1,-3, 0, 0, 0, 1,-3,-3, 0,-2,-3,-2, 1, 0,-4,-2,-3,-4,-1, -2,-2, 1, 6,-3, 0, 2,-1,-1,-3,-4,-1,-3,-3,-1, 0,-1,-4,-3,-3,-4,-1, 0,-3,-3,-3, 9,-3,-4,-3,-3,-1,-1,-3,-1,-2,-3,-1,-1,-2,-2,-1,-4,-2, -1, 1, 0, 0,-3, 5, 2,-2, 0,-3,-2, 1, 0,-3,-1, 0,-1,-2,-1,-2,-4,-1, -1, 0, 0, 2,-4, 2, 5,-2, 0,-3,-3, 1,-2,-3,-1, 0,-1,-3,-2,-2,-4,-1, 0,-2, 0,-1,-3,-2,-2, 6,-2,-4,-4,-2,-3,-3,-2, 0,-2,-2,-3,-3,-4,-1, -2, 0, 1,-1,-3, 0, 0,-2, 8,-3,-3,-1,-2,-1,-2,-1,-2,-2, 2,-3,-4,-1, -1,-3,-3,-3,-1,-3,-3,-4,-3, 4, 2,-3, 1, 0,-3,-2,-1,-3,-1, 3,-4,-1, -1,-2,-3,-4,-1,-2,-3,-4,-3, 2, 4,-2, 2, 0,-3,-2,-1,-2,-1, 1,-4,-1, -1, 2, 0,-1,-3, 1, 1,-2,-1,-3,-2, 5,-1,-3,-1, 0,-1,-3,-2,-2,-4,-1, -1,-1,-2,-3,-1, 0,-2,-3,-2, 1, 2,-1, 5, 0,-2,-1,-1,-1,-1, 1,-4,-1, -2,-3,-3,-3,-2,-3,-3,-3,-1, 0, 0,-3, 0, 6,-4,-2,-2, 1, 3,-1,-4,-1, -1,-2,-2,-1,-3,-1,-1,-2,-2,-3,-3,-1,-2,-4, 7,-1,-1,-4,-3,-2,-4,-2, 1,-1, 1, 0,-1, 0, 0, 0,-1,-2,-2, 0,-1,-2,-1, 4, 1,-3,-2,-2,-4, 0, 0,-1, 0,-1,-1,-1,-1,-2,-2,-1,-1,-1,-1,-2,-1, 1, 5,-2,-2, 0,-4, 0, -3,-3,-4,-4,-2,-2,-3,-2,-2,-3,-2,-3,-1, 1,-4,-3,-2,11, 2,-3,-4,-2, -2,-2,-2,-3,-2,-1,-2,-3, 2,-1,-1,-2,-1, 3,-3,-2,-2, 2, 7,-1,-4,-1, 0,-3,-3,-3,-1,-2,-2,-3,-3, 3, 1,-2, 1,-1,-2,-2, 0,-3,-1, 4,-4,-1, -4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4, 1,-4, 0,-1,-1,-1,-2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-2, 0, 0,-2,-1,-1,-4,-1 }; int aln_sm_blosum45[] = { /* A R N D C Q E G H I L K M F P S T W Y V * X */ 5,-2,-1,-2,-1,-1,-1, 0,-2,-1,-1,-1,-1,-2,-1, 1, 0,-2,-2, 0,-5, 0, -2, 7, 0,-1,-3, 1, 0,-2, 0,-3,-2, 3,-1,-2,-2,-1,-1,-2,-1,-2,-5,-1, -1, 0, 6, 2,-2, 0, 0, 0, 1,-2,-3, 0,-2,-2,-2, 1, 0,-4,-2,-3,-5,-1, -2,-1, 2, 7,-3, 0, 2,-1, 0,-4,-3, 0,-3,-4,-1, 0,-1,-4,-2,-3,-5,-1, -1,-3,-2,-3,12,-3,-3,-3,-3,-3,-2,-3,-2,-2,-4,-1,-1,-5,-3,-1,-5,-2, -1, 1, 0, 0,-3, 6, 2,-2, 1,-2,-2, 1, 0,-4,-1, 0,-1,-2,-1,-3,-5,-1, -1, 0, 0, 2,-3, 2, 6,-2, 0,-3,-2, 1,-2,-3, 0, 0,-1,-3,-2,-3,-5,-1, 0,-2, 0,-1,-3,-2,-2, 7,-2,-4,-3,-2,-2,-3,-2, 0,-2,-2,-3,-3,-5,-1, -2, 0, 1, 0,-3, 1, 0,-2,10,-3,-2,-1, 0,-2,-2,-1,-2,-3, 2,-3,-5,-1, -1,-3,-2,-4,-3,-2,-3,-4,-3, 5, 2,-3, 2, 0,-2,-2,-1,-2, 0, 3,-5,-1, -1,-2,-3,-3,-2,-2,-2,-3,-2, 2, 5,-3, 2, 1,-3,-3,-1,-2, 0, 1,-5,-1, -1, 3, 0, 0,-3, 1, 1,-2,-1,-3,-3, 5,-1,-3,-1,-1,-1,-2,-1,-2,-5,-1, -1,-1,-2,-3,-2, 0,-2,-2, 0, 2, 2,-1, 6, 0,-2,-2,-1,-2, 0, 1,-5,-1, -2,-2,-2,-4,-2,-4,-3,-3,-2, 0, 1,-3, 0, 8,-3,-2,-1, 1, 3, 0,-5,-1, -1,-2,-2,-1,-4,-1, 0,-2,-2,-2,-3,-1,-2,-3, 9,-1,-1,-3,-3,-3,-5,-1, 1,-1, 1, 0,-1, 0, 0, 0,-1,-2,-3,-1,-2,-2,-1, 4, 2,-4,-2,-1,-5, 0, 0,-1, 0,-1,-1,-1,-1,-2,-2,-1,-1,-1,-1,-1,-1, 2, 5,-3,-1, 0,-5, 0, -2,-2,-4,-4,-5,-2,-3,-2,-3,-2,-2,-2,-2, 1,-3,-4,-3,15, 3,-3,-5,-2, -2,-1,-2,-2,-3,-1,-2,-3, 2, 0, 0,-1, 0, 3,-3,-2,-1, 3, 8,-1,-5,-1, 0,-2,-3,-3,-1,-3,-3,-3,-3, 3, 1,-2, 1, 0,-3,-1, 0,-3,-1, 5,-5,-1, -5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5,-5, 1,-5, 0,-1,-1,-1,-2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0,-2,-1,-1,-5,-1 }; int aln_sm_nt[] = { /* X A G R C M S V T W K D Y H B N */ -2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2, -2, 2,-1, 1,-2, 1,-2, 0,-2, 1,-2, 0,-2, 0,-2, 0, -2,-1, 2, 1,-2,-2, 1, 0,-2,-2, 1, 0,-2,-2, 0, 0, -2, 1, 1, 1,-2,-1,-1, 0,-2,-1,-1, 0,-2, 0, 0, 0, -2,-2,-2,-2, 2, 1, 1, 0,-1,-2,-2,-2, 1, 0, 0, 0, -2, 1,-2,-1, 1, 1,-1, 0,-2,-1,-2, 0,-1, 0, 0, 0, -2,-2, 1,-1, 1,-1, 1, 0,-2,-2,-1, 0,-1, 0, 0, 0, -2, 0, 0, 0, 0, 0, 0, 0,-2, 0, 0, 0, 0, 0, 0, 0, -2,-2,-2,-2,-1,-2,-2,-2, 2, 1, 1, 0, 1, 0, 0, 0, -2, 1,-2,-1,-2,-1,-2, 0, 1, 1,-1, 0,-1, 0, 0, 0, -2,-2, 1,-1,-2,-2,-1, 0, 1,-1, 1, 0,-1, 0, 0, 0, -2, 0, 0, 0,-2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2,-2,-2,-2, 1,-1,-1, 0, 1,-1,-1, 0, 1, 0, 0, 0, -2, 0,-2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2,-2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; int aln_sm_read[] = { /* X A G R C M S V T W K D Y H B N */ -17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17,-17, -17, 2,-17, 1,-17, 1,-17, 0,-17, 1,-17, 0,-17, 0,-17, 0, -17,-17, 2, 1,-17,-17, 1, 0,-17,-17, 1, 0,-17,-17, 0, 0, -17, 1, 1, 1,-17,-17,-17, 0,-17,-17,-17, 0,-17, 0, 0, 0, -17,-17,-17,-17, 2, 1, 1, 0,-17,-17,-17,-17, 1, 0, 0, 0, -17, 1,-17,-17, 1, 1,-17, 0,-17,-17,-17, 0,-17, 0, 0, 0, -17,-17, 1,-17, 1,-17, 1, 0,-17,-17,-17, 0,-17, 0, 0, 0, -17, 0, 0, 0, 0, 0, 0, 0,-17, 0, 0, 0, 0, 0, 0, 0, -17,-17,-17,-17,-17,-17,-17,-17, 2, 1, 1, 0, 1, 0, 0, 0, -17, 1,-17,-17,-17,-17,-17, 0, 1, 1,-17, 0,-17, 0, 0, 0, -17,-17, 1,-17,-17,-17,-17, 0, 1,-17, 1, 0,-17, 0, 0, 0, -17, 0, 0, 0,-17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -17,-17,-17,-17, 1,-17,-17, 0, 1,-17,-17, 0, 1, 0, 0, 0, -17, 0,-17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -17,-17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; int aln_sm_hs[] = { /* A G C T N */ 91, -31,-114,-123, -44, -31, 100,-125,-114, -42, -123,-125, 100, -31, -42, -114,-114, -31, 91, -42, -44, -42, -42, -42, -43 }; int aln_sm_maq[] = { 11, -19, -19, -19, -13, -19, 11, -19, -19, -13, -19, -19, 11, -19, -13, -19, -19, -19, 11, -13, -13, -13, -13, -13, -13 }; /********************/ /* START OF align.c */ /********************/ AlnParam aln_param_bwa = { 28, 9, 5, aln_sm_maq, 5, 50 }; AlnParam aln_param_nt2nt = { 8, 2, 2, aln_sm_nt, 16, 75 }; AlnParam aln_param_rd2rd = { 1, 19, 19, aln_sm_read, 16, 75 }; AlnParam aln_param_aa2aa = { 10, 2, 2, aln_sm_blosum62, 22, 50 }; AlnAln *aln_init_AlnAln() { AlnAln *aa; aa = (AlnAln*)MYALLOC(sizeof(AlnAln)); aa->path = 0; aa->out1 = aa->out2 = aa->outm = 0; aa->path_len = 0; return aa; } void aln_free_AlnAln(AlnAln *aa) { MYFREE(aa->path); MYFREE(aa->cigar); MYFREE(aa->out1); MYFREE(aa->out2); MYFREE(aa->outm); MYFREE(aa); } /***************************/ /* START OF common_align.c */ /***************************/ #define LOCAL_OVERFLOW_THRESHOLD 32000 #define LOCAL_OVERFLOW_REDUCE 16000 #define NT_LOCAL_SCORE int #define NT_LOCAL_SHIFT 16 #define NT_LOCAL_MASK 0xffff #define SET_INF(s) (s).M = (s).I = (s).D = MINOR_INF; #define set_M(MM, cur, p, sc) \ { \ if ((p)->M >= (p)->I) { \ if ((p)->M >= (p)->D) { \ (MM) = (p)->M + (sc); (cur)->Mt = FROM_M; \ } else { \ (MM) = (p)->D + (sc); (cur)->Mt = FROM_D; \ } \ } else { \ if ((p)->I > (p)->D) { \ (MM) = (p)->I + (sc); (cur)->Mt = FROM_I; \ } else { \ (MM) = (p)->D + (sc); (cur)->Mt = FROM_D; \ } \ } \ } #define set_I(II, cur, p) \ { \ if ((p)->M - gap_open > (p)->I) { \ (cur)->It = FROM_M; \ (II) = (p)->M - gap_open - gap_ext; \ } else { \ (cur)->It = FROM_I; \ (II) = (p)->I - gap_ext; \ } \ } #define set_end_I(II, cur, p) \ { \ if (gap_end >= 0) { \ if ((p)->M - gap_open > (p)->I) { \ (cur)->It = FROM_M; \ (II) = (p)->M - gap_open - gap_end; \ } else { \ (cur)->It = FROM_I; \ (II) = (p)->I - gap_end; \ } \ } else set_I(II, cur, p); \ } #define set_D(DD, cur, p) \ { \ if ((p)->M - gap_open > (p)->D) { \ (cur)->Dt = FROM_M; \ (DD) = (p)->M - gap_open - gap_ext; \ } else { \ (cur)->Dt = FROM_D; \ (DD) = (p)->D - gap_ext; \ } \ } #define set_end_D(DD, cur, p) \ { \ if (gap_end >= 0) { \ if ((p)->M - gap_open > (p)->D) { \ (cur)->Dt = FROM_M; \ (DD) = (p)->M - gap_open - gap_end; \ } else { \ (cur)->Dt = FROM_D; \ (DD) = (p)->D - gap_end; \ } \ } else set_D(DD, cur, p); \ } typedef struct { unsigned char Mt:3, It:2, Dt:2; } dpcell_t; typedef struct { int M, I, D; } dpscore_t; /* build score profile for accelerating alignment, in theory */ void aln_init_score_array(unsigned char *seq, int len, int row, int *score_matrix, int **s_array) { int *tmp, *tmp2, i, k; for (i = 0; i != row; ++i) { tmp = score_matrix + i * row; tmp2 = s_array[i]; for (k = 0; k != len; ++k) tmp2[k] = tmp[seq[k]]; } } /*************************** * banded global alignment * ***************************/ int aln_global_core(unsigned char *seq1, int len1, unsigned char *seq2, int len2, const AlnParam *ap, path_t *path, int *path_len) { register int i, j; dpcell_t **dpcell, *q; dpscore_t *curr, *last, *s; path_t *p; int b1, b2, tmp_end; int *mat, end, max; unsigned char type, ctype; int gap_open, gap_ext, gap_end, b; int *score_matrix, N_MATRIX_ROW; /* initialize some align-related parameters. just for compatibility */ gap_open = ap->gap_open; gap_ext = ap->gap_ext; gap_end = ap->gap_end; b = ap->band_width; score_matrix = ap->matrix; N_MATRIX_ROW = ap->row; if (len1 == 0 || len2 == 0) { *path_len = 0; return 0; } /* calculate b1 and b2 */ if (len1 > len2) { b1 = len1 - len2 + b; b2 = b; } else { b1 = b; b2 = len2 - len1 + b; } if (b1 > len1) b1 = len1; if (b2 > len2) b2 = len2; --seq1; --seq2; /* allocate memory */ end = (b1 + b2 <= len1)? (b1 + b2 + 1) : (len1 + 1); dpcell = (dpcell_t**)MYALLOC(sizeof(dpcell_t*) * (len2 + 1)); for (j = 0; j <= len2; ++j) dpcell[j] = (dpcell_t*)MYALLOC(sizeof(dpcell_t) * end); for (j = b2 + 1; j <= len2; ++j) dpcell[j] -= j - b2; curr = (dpscore_t*)MYALLOC(sizeof(dpscore_t) * (len1 + 1)); last = (dpscore_t*)MYALLOC(sizeof(dpscore_t) * (len1 + 1)); /* set first row */ SET_INF(*curr); curr->M = 0; for (i = 1, s = curr + 1; i < b1; ++i, ++s) { SET_INF(*s); set_end_D(s->D, dpcell[0] + i, s - 1); } s = curr; curr = last; last = s; /* core dynamic programming, part 1 */ tmp_end = (b2 < len2)? b2 : len2 - 1; for (j = 1; j <= tmp_end; ++j) { q = dpcell[j]; s = curr; SET_INF(*s); set_end_I(s->I, q, last); end = (j + b1 <= len1 + 1)? (j + b1 - 1) : len1; mat = score_matrix + seq2[j] * N_MATRIX_ROW; ++s; ++q; for (i = 1; i != end; ++i, ++s, ++q) { set_M(s->M, q, last + i - 1, mat[seq1[i]]); /* this will change s->M ! */ set_I(s->I, q, last + i); set_D(s->D, q, s - 1); } set_M(s->M, q, last + i - 1, mat[seq1[i]]); set_D(s->D, q, s - 1); if (j + b1 - 1 > len1) { /* bug fixed, 040227 */ set_end_I(s->I, q, last + i); } else s->I = MINOR_INF; s = curr; curr = last; last = s; } /* last row for part 1, use set_end_D() instead of set_D() */ if (j == len2 && b2 != len2 - 1) { q = dpcell[j]; s = curr; SET_INF(*s); set_end_I(s->I, q, last); end = (j + b1 <= len1 + 1)? (j + b1 - 1) : len1; mat = score_matrix + seq2[j] * N_MATRIX_ROW; ++s; ++q; for (i = 1; i != end; ++i, ++s, ++q) { set_M(s->M, q, last + i - 1, mat[seq1[i]]); /* this will change s->M ! */ set_I(s->I, q, last + i); set_end_D(s->D, q, s - 1); } set_M(s->M, q, last + i - 1, mat[seq1[i]]); set_end_D(s->D, q, s - 1); if (j + b1 - 1 > len1) { /* bug fixed, 040227 */ set_end_I(s->I, q, last + i); } else s->I = MINOR_INF; s = curr; curr = last; last = s; ++j; } /* core dynamic programming, part 2 */ for (; j <= len2 - b2 + 1; ++j) { SET_INF(curr[j - b2]); mat = score_matrix + seq2[j] * N_MATRIX_ROW; end = j + b1 - 1; for (i = j - b2 + 1, q = dpcell[j] + i, s = curr + i; i != end; ++i, ++s, ++q) { set_M(s->M, q, last + i - 1, mat[seq1[i]]); set_I(s->I, q, last + i); set_D(s->D, q, s - 1); } set_M(s->M, q, last + i - 1, mat[seq1[i]]); set_D(s->D, q, s - 1); s->I = MINOR_INF; s = curr; curr = last; last = s; } /* core dynamic programming, part 3 */ for (; j < len2; ++j) { SET_INF(curr[j - b2]); mat = score_matrix + seq2[j] * N_MATRIX_ROW; for (i = j - b2 + 1, q = dpcell[j] + i, s = curr + i; i < len1; ++i, ++s, ++q) { set_M(s->M, q, last + i - 1, mat[seq1[i]]); set_I(s->I, q, last + i); set_D(s->D, q, s - 1); } set_M(s->M, q, last + len1 - 1, mat[seq1[i]]); set_end_I(s->I, q, last + i); set_D(s->D, q, s - 1); s = curr; curr = last; last = s; } /* last row */ if (j == len2) { SET_INF(curr[j - b2]); mat = score_matrix + seq2[j] * N_MATRIX_ROW; for (i = j - b2 + 1, q = dpcell[j] + i, s = curr + i; i < len1; ++i, ++s, ++q) { set_M(s->M, q, last + i - 1, mat[seq1[i]]); set_I(s->I, q, last + i); set_end_D(s->D, q, s - 1); } set_M(s->M, q, last + len1 - 1, mat[seq1[i]]); set_end_I(s->I, q, last + i); set_end_D(s->D, q, s - 1); s = curr; curr = last; last = s; } /* backtrace */ i = len1; j = len2; q = dpcell[j] + i; s = last + len1; max = s->M; type = q->Mt; ctype = FROM_M; if (s->I > max) { max = s->I; type = q->It; ctype = FROM_I; } if (s->D > max) { max = s->D; type = q->Dt; ctype = FROM_D; } p = path; p->ctype = ctype; p->i = i; p->j = j; /* bug fixed 040408 */ ++p; do { switch (ctype) { case FROM_M: --i; --j; break; case FROM_I: --j; break; case FROM_D: --i; break; } q = dpcell[j] + i; ctype = type; switch (type) { case FROM_M: type = q->Mt; break; case FROM_I: type = q->It; break; case FROM_D: type = q->Dt; break; } p->ctype = ctype; p->i = i; p->j = j; ++p; } while (i || j); *path_len = p - path - 1; /* free memory */ for (j = b2 + 1; j <= len2; ++j) dpcell[j] += j - b2; for (j = 0; j <= len2; ++j) MYFREE(dpcell[j]); MYFREE(dpcell); MYFREE(curr); MYFREE(last); return max; } /************************************************* * local alignment combined with banded strategy * *************************************************/ int aln_local_core(unsigned char *seq1, int len1, unsigned char *seq2, int len2, const AlnParam *ap, path_t *path, int *path_len, int do_align) { register NT_LOCAL_SCORE *s; register int i; int q, r, qr, tmp_len, qr_shift; int **s_array, *score_array; int e, f; int is_overflow, of_base; NT_LOCAL_SCORE *eh, curr_h, last_h, curr_last_h; int j, start_i, start_j, end_i, end_j; path_t *p; int score_f, score_r, score_g; int start, end, max_score; int gap_open, gap_ext, b; int *score_matrix, N_MATRIX_ROW; /* initialize some align-related parameters. just for compatibility */ gap_open = ap->gap_open; gap_ext = ap->gap_ext; b = ap->band_width; score_matrix = ap->matrix; N_MATRIX_ROW = ap->row; if (len1 == 0 || len2 == 0) return -1; /* allocate memory */ eh = (NT_LOCAL_SCORE*)MYALLOC(sizeof(NT_LOCAL_SCORE) * (len1 + 1)); s_array = (int**)MYALLOC(sizeof(int*) * N_MATRIX_ROW); for (i = 0; i != N_MATRIX_ROW; ++i) s_array[i] = (int*)MYALLOC(sizeof(int) * len1); /* initialization */ aln_init_score_array(seq1, len1, N_MATRIX_ROW, score_matrix, s_array); q = gap_open; r = gap_ext; qr = q + r; qr_shift = (qr+1) << NT_LOCAL_SHIFT; tmp_len = len1 + 1; start_i = start_j = end_i = end_j = 0; for (i = 0, max_score = 0; i != N_MATRIX_ROW * N_MATRIX_ROW; ++i) if (max_score < score_matrix[i]) max_score = score_matrix[i]; /* convert the coordinate */ --seq1; --seq2; for (i = 0; i != N_MATRIX_ROW; ++i) --s_array[i]; /* forward dynamic programming */ for (i = 0, s = eh; i != tmp_len; ++i, ++s) *s = 0; score_f = 0; is_overflow = of_base = 0; for (j = 1; j <= len2; ++j) { last_h = f = 0; score_array = s_array[seq2[j]]; if (is_overflow) { /* adjust eh[] array if overflow occurs. */ /* If LOCAL_OVERFLOW_REDUCE is too small, optimal alignment might be missed. * If it is too large, this block will be excuted frequently and therefore * slow down the whole program. * Acually, smaller LOCAL_OVERFLOW_REDUCE might also help to reduce the * number of assignments because it sets some cells to zero when overflow * happens. */ int tmp, tmp2; score_f -= LOCAL_OVERFLOW_REDUCE; of_base += LOCAL_OVERFLOW_REDUCE; is_overflow = 0; for (i = 1, s = eh; i <= tmp_len; ++i, ++s) { tmp = *s >> NT_LOCAL_SHIFT; tmp2 = *s & NT_LOCAL_MASK; if (tmp2 < LOCAL_OVERFLOW_REDUCE) tmp2 = 0; else tmp2 -= LOCAL_OVERFLOW_REDUCE; if (tmp < LOCAL_OVERFLOW_REDUCE) tmp = 0; else tmp -= LOCAL_OVERFLOW_REDUCE; *s = (tmp << NT_LOCAL_SHIFT) | tmp2; } } for (i = 1, s = eh; i != tmp_len; ++i, ++s) { /* prepare for calculate current h */ curr_h = (*s >> NT_LOCAL_SHIFT) + score_array[i]; if (curr_h < 0) curr_h = 0; if (last_h > qr) { /* initialize f */ f = (f > last_h - q)? f - r : last_h - qr; if (curr_h < f) curr_h = f; } if (*(s+1) >= qr_shift) { /* initialize e */ curr_last_h = *(s+1) >> NT_LOCAL_SHIFT; e = ((*s & NT_LOCAL_MASK) > curr_last_h - q)? (*s & NT_LOCAL_MASK) - r : curr_last_h - qr; if (curr_h < e) curr_h = e; *s = (last_h << NT_LOCAL_SHIFT) | e; } else *s = last_h << NT_LOCAL_SHIFT; /* e = 0 */ last_h = curr_h; if (score_f < curr_h) { score_f = curr_h; end_i = i; end_j = j; if (score_f > LOCAL_OVERFLOW_THRESHOLD) is_overflow = 1; } } *s = last_h << NT_LOCAL_SHIFT; } score_f += of_base; if (path == 0) goto end_func; /* skip path-filling */ /* reverse dynamic programming */ for (i = end_i, s = eh + end_i; i >= 0; --i, --s) *s = 0; if (end_i == 0 || end_j == 0) goto end_func; /* no local match */ score_r = score_matrix[seq1[end_i] * N_MATRIX_ROW + seq2[end_j]]; is_overflow = of_base = 0; start_i = end_i; start_j = end_j; eh[end_i] = ((NT_LOCAL_SCORE)(qr + score_r)) << NT_LOCAL_SHIFT; /* in order to initialize f and e, 040408 */ start = end_i - 1; end = end_i - 3; if (end <= 0) end = 0; /* second pass DP can be done in a band, speed will thus be enhanced */ for (j = end_j - 1; j != 0; --j) { last_h = f = 0; score_array = s_array[seq2[j]]; if (is_overflow) { /* adjust eh[] array if overflow occurs. */ int tmp, tmp2; score_r -= LOCAL_OVERFLOW_REDUCE; of_base += LOCAL_OVERFLOW_REDUCE; is_overflow = 0; for (i = start, s = eh + start + 1; i >= end; --i, --s) { tmp = *s >> NT_LOCAL_SHIFT; tmp2 = *s & NT_LOCAL_MASK; if (tmp2 < LOCAL_OVERFLOW_REDUCE) tmp2 = 0; else tmp2 -= LOCAL_OVERFLOW_REDUCE; if (tmp < LOCAL_OVERFLOW_REDUCE) tmp = 0; else tmp -= LOCAL_OVERFLOW_REDUCE; *s = (tmp << NT_LOCAL_SHIFT) | tmp2; } } for (i = start, s = eh + start + 1; i != end; --i, --s) { /* prepare for calculate current h */ curr_h = (*s >> NT_LOCAL_SHIFT) + score_array[i]; if (curr_h < 0) curr_h = 0; if (last_h > qr) { /* initialize f */ f = (f > last_h - q)? f - r : last_h - qr; if (curr_h < f) curr_h = f; } if (*(s-1) >= qr_shift) { /* initialize e */ curr_last_h = *(s-1) >> NT_LOCAL_SHIFT; e = ((*s & NT_LOCAL_MASK) > curr_last_h - q)? (*s & NT_LOCAL_MASK) - r : curr_last_h - qr; if (curr_h < e) curr_h = e; *s = (last_h << NT_LOCAL_SHIFT) | e; } else *s = last_h << NT_LOCAL_SHIFT; /* e = 0 */ last_h = curr_h; if (score_r < curr_h) { score_r = curr_h; start_i = i; start_j = j; if (score_r + of_base - qr == score_f) { j = 1; break; } if (score_r > LOCAL_OVERFLOW_THRESHOLD) is_overflow = 1; } } *s = last_h << NT_LOCAL_SHIFT; /* recalculate start and end, the boundaries of the band */ if ((eh[start] >> NT_LOCAL_SHIFT) <= qr) --start; if (start <= 0) start = 0; end = start_i - (start_j - j) - (score_r + of_base + (start_j - j) * max_score) / r - 1; if (end <= 0) end = 0; } if (path_len == 0) { path[0].i = start_i; path[0].j = start_j; path[1].i = end_i; path[1].j = end_j; goto end_func; } score_r += of_base; score_r -= qr; #ifdef DEBUG /* this seems not a bug */ if (score_f != score_r) fprintf(stderr, "[aln_local_core] unknown flaw occurs: score_f(%d) != score_r(%d)\n", score_f, score_r); #endif if (do_align) { /* call global alignment to fill the path */ score_g = 0; j = (end_i - start_i > end_j - start_j)? end_i - start_i : end_j - start_j; ++j; /* j is the maximum band_width */ for (i = ap->band_width;; i <<= 1) { AlnParam ap_real = *ap; ap_real.gap_end = -1; ap_real.band_width = i; score_g = aln_global_core(seq1 + start_i, end_i - start_i + 1, seq2 + start_j, end_j - start_j + 1, &ap_real, path, path_len); if (score_g == score_r || score_f == score_g) break; if (i > j) break; } if (score_r > score_g && score_f > score_g) fprintf(stderr, "[aln_local_core] Cannot find reasonable band width. Continue anyway.\n"); score_f = score_g; /* convert coordinate */ for (p = path + *path_len - 1; p >= path; --p) { p->i += start_i - 1; p->j += start_j - 1; } } else { /* just store the start and end */ *path_len = 2; path[1].i = start_i; path[1].j = start_j; path->i = end_i; path->j = end_j; } end_func: /* free */ MYFREE(eh); for (i = 0; i != N_MATRIX_ROW; ++i) { ++s_array[i]; MYFREE(s_array[i]); } MYFREE(s_array); return score_f; } AlnAln *aln_stdaln_aux(const char *seq1, const char *seq2, const AlnParam *ap, int is_global, int do_align, int len1, int len2) { unsigned char *seq11, *seq22; int score; int i, j, l; path_t *p; char *out1, *out2, *outm; AlnAln *aa; if (len1 < 0) len1 = strlen(seq1); if (len2 < 0) len2 = strlen(seq2); aa = aln_init_AlnAln(); seq11 = (unsigned char*)MYALLOC(sizeof(unsigned char) * len1); seq22 = (unsigned char*)MYALLOC(sizeof(unsigned char) * len2); aa->path = (path_t*)MYALLOC(sizeof(path_t) * (len1 + len2 + 1)); if (ap->row < 10) { /* 4-nucleotide alignment */ for (i = 0; i < len1; ++i) seq11[i] = aln_nt4_table[(int)seq1[i]]; for (j = 0; j < len2; ++j) seq22[j] = aln_nt4_table[(int)seq2[j]]; } else if (ap->row < 20) { /* 16-nucleotide alignment */ for (i = 0; i < len1; ++i) seq11[i] = aln_nt16_table[(int)seq1[i]]; for (j = 0; j < len2; ++j) seq22[j] = aln_nt16_table[(int)seq2[j]]; } else { /* amino acids */ for (i = 0; i < len1; ++i) seq11[i] = aln_aa_table[(int)seq1[i]]; for (j = 0; j < len2; ++j) seq22[j] = aln_aa_table[(int)seq2[j]]; } if (is_global) score = aln_global_core(seq11, len1, seq22, len2, ap, aa->path, &aa->path_len); else score = aln_local_core(seq11, len1, seq22, len2, ap, aa->path, &aa->path_len, do_align); aa->score = score; if (do_align) { out1 = aa->out1 = (char*)MYALLOC(sizeof(char) * (aa->path_len + 1)); out2 = aa->out2 = (char*)MYALLOC(sizeof(char) * (aa->path_len + 1)); outm = aa->outm = (char*)MYALLOC(sizeof(char) * (aa->path_len + 1)); --seq1; --seq2; --seq11; --seq22; p = aa->path + aa->path_len - 1; for (l = 0; p >= aa->path; --p, ++l) { switch (p->ctype) { case FROM_M: out1[l] = seq1[p->i]; out2[l] = seq2[p->j]; outm[l] = (seq11[p->i] == seq22[p->j] && seq11[p->i] != ap->row)? '|' : ' '; break; case FROM_I: out1[l] = '-'; out2[l] = seq2[p->j]; outm[l] = ' '; break; case FROM_D: out1[l] = seq1[p->i]; out2[l] = '-'; outm[l] = ' '; break; } } out1[l] = out2[l] = outm[l] = '\0'; ++seq11; ++seq22; } MYFREE(seq11); MYFREE(seq22); p = aa->path + aa->path_len - 1; aa->start1 = p->i? p->i : 1; aa->end1 = aa->path->i; aa->start2 = p->j? p->j : 1; aa->end2 = aa->path->j; aa->cigar = aln_path2cigar(aa->path, aa->path_len, &aa->n_cigar); return aa; } AlnAln *aln_stdaln(const char *seq1, const char *seq2, const AlnParam *ap, int is_global, int do_align) { return aln_stdaln_aux(seq1, seq2, ap, is_global, do_align, -1, -1); } cigar_t *aln_path2cigar(const path_t *path, int path_len, int *n_cigar) { int i, n; cigar_t *cigar; unsigned char last_type; if (path_len == 0 || path == 0) { *n_cigar = 0; return 0; } last_type = path->ctype; for (i = n = 1; i < path_len; ++i) { if (last_type != path[i].ctype) ++n; last_type = path[i].ctype; } *n_cigar = n; cigar = (cigar_t*)MYALLOC(*n_cigar * sizeof(cigar_t)); cigar[0] = (int)path[path_len-1].ctype << 14 | 1; last_type = path[path_len-1].ctype; for (i = path_len - 2, n = 0; i >= 0; --i) { if (path[i].ctype == last_type) ++cigar[n]; else { cigar[++n] = (int)path[i].ctype << 14 | 1; last_type = path[i].ctype; } } return cigar; } maq-0.7.1/stdaln.h0000644000076600000240000001003611065656462012320 0ustar lh3staff/* The MIT License Copyright (c) 2003-2006, 2008, by Heng Li Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* 2008-08-04, 0.9.8 - Fixed the wrong declaration of aln_stdaln_aux() - Avoid 0 coordinate for global alignment 2008-08-01, 0.9.7 - Change gap_end penalty to 5 in aln_param_bwa - Add function to convert path_t to the CIGAR format 2008-08-01, 0.9.6 - The first gap now costs (gap_open+gap_ext), instead of gap_open. Scoring systems are modified accordingly. - Gap end is now correctly handled. Previously it is not correct. - Change license to MIT. */ #ifndef LH3_STDALN_H_ #define LH3_STDALN_H_ #define STDALN_VERSION 0.9.8 #ifndef MYALLOC # define MYALLOC malloc #endif #ifndef MYFREE # define MYFREE free #endif #define FROM_M 0 #define FROM_I 1 #define FROM_D 2 /* This is the smallest integer. It might be CPU-dependent in very RARE cases. */ #define MINOR_INF -1073741823 typedef unsigned short cigar_t; typedef struct { int gap_open; int gap_ext; int gap_end; int *matrix; int row; int band_width; } AlnParam; typedef struct { int i, j; unsigned char ctype; } path_t; typedef struct { path_t *path; /* for advanced users... :-) */ int path_len; /* for advanced users... :-) */ int start1, end1; /* start and end of the first sequence, coordinations are 1-based */ int start2, end2; /* start and end of the second sequence, coordinations are 1-based */ int score; /* score */ char *out1, *out2; /* print them, and then you will know */ char *outm; int n_cigar; cigar_t *cigar; } AlnAln; #ifdef __cplusplus extern "C" { #endif AlnAln *aln_stdaln_aux(const char *seq1, const char *seq2, const AlnParam *ap, int is_global, int do_align, int len1, int len2); AlnAln *aln_stdaln(const char *seq1, const char *seq2, const AlnParam *ap, int is_global, int do_align); void aln_free_AlnAln(AlnAln *aa); int aln_global_core(unsigned char *seq1, int len1, unsigned char *seq2, int len2, const AlnParam *ap, path_t *path, int *path_len); int aln_local_core(unsigned char *seq1, int len1, unsigned char *seq2, int len2, const AlnParam *ap, path_t *path, int *path_len, int do_align); cigar_t *aln_path2cigar(const path_t *path, int path_len, int *n_cigar); #ifdef __cplusplus } #endif /******************** * global variables * ********************/ extern AlnParam aln_param_bwa; /* = { 37, 9, 0, aln_sm_maq, 5, 50 }; */ extern AlnParam aln_param_nt2nt; /* = { 10, 2, 2, aln_sm_nt, 16, 75 }; */ extern AlnParam aln_param_aa2aa; /* = { 20, 19, 19, aln_sm_read, 16, 75 }; */ extern AlnParam aln_param_rd2rd; /* = { 12, 2, 2, aln_sm_blosum62, 22, 50 }; */ /* common nucleotide score matrix for 16 bases */ extern int aln_sm_nt[]; /* BLOSUM62 and BLOSUM45 */ extern int aln_sm_blosum62[], aln_sm_blosum45[]; /* common read for 16 bases. note that read alignment is quite different from common nucleotide alignment */ extern int aln_sm_read[]; /* human-mouse score matrix for 4 bases */ extern int aln_sm_hs[]; #endif maq-0.7.1/stdhash.hh0000644000076600000240000005555710766735650012666 0ustar lh3staff/* stdhash -- standalone hash library Copyright (c) 2006, Heng Li This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /** Standalone hash library is a free C++ template library for hash tables. It implements open-address hashing with the "double hashing" technique, which makes this library different from most of other implementations, such as STL and TR1 hash based classes, which are all based on chained hashing. However, fewer implementations do not mean open-address hashing is less efficient. As a matter of fact, this hash library is at least as efficient, in terms of both time and space, as STL and TR1 libraries, and in some cases outperforms others. */ /* 2007-07-18, 1.9.2: fixed a bug in hash_*_char when an element is erased. */ #ifndef LH3_STDHASH_H_ #define LH3_STDHASH_H_ #include #include #define LH3_STDHASH_VERSION "1.9.2" typedef unsigned int bit32_t; typedef unsigned long long bit64_t; typedef unsigned short bit16_t; // even on 64-bit systems, hashint_t should be bit32_t typedef bit32_t hashint_t; /* * Hash functions */ // Do a web search "g_str_hash X31_HASH" for more information. /** hash function for strings (char*) */ inline bit32_t __lh3_X31_hash_string(const char *s) { bit32_t h = 0; for ( ; *s; s++) h = (h << 5) - h + *s; return h; } /** Jenkins' hash function for 32-bit integers. Not used in this library. */ inline bit32_t __lh3_Jenkins_hash_int(bit32_t key) { key += (key << 12); key ^= (key >> 22); key += (key << 4); key ^= (key >> 9); key += (key << 10); key ^= (key >> 2); key += (key << 7); key ^= (key >> 12); return key; } /** Jenkins' hash function for 64-bit integers. Used when LH3_HASH_INT macro is set. */ inline bit64_t __lh3_Jenkins_hash_64(bit64_t key) { key += ~(key << 32); key ^= (key >> 22); key += ~(key << 13); key ^= (key >> 8); key += (key << 3); key ^= (key >> 15); key += ~(key << 27); key ^= (key >> 31); return key; } /** Wang's hash function for 32-bit inegers. Used when LH3_HASH_INT macro is set. */ inline bit32_t __lh3_Wang_hash_int(bit32_t key) { key += ~(key << 15); key ^= (key >> 10); key += (key << 3); key ^= (key >> 6); key += ~(key << 11); key ^= (key >> 16); return key; } /** hash function for 16-bit integers */ inline bit32_t __lh3_hash_fun(bit16_t key) { #ifndef LH3_HASH_INT return __lh3_Wang_hash_int(bit32_t(key)); #else return bit32_t(key); #endif } /** hash function for 32-bit integers */ inline bit32_t __lh3_hash_fun(bit32_t key) { #ifndef LH3_HASH_INT return __lh3_Wang_hash_int(key); #else return key; #endif } /** hash function for 64-bit integers */ inline bit32_t __lh3_hash_fun(bit64_t key) { #ifdef LH3_HASH_INT return bit32_t(__lh3_Jenkins_hash_64(key)); #else return bit32_t(key>>16) ^ bit32_t(key); #endif } /** hash function for strings (char*) */ inline bit32_t __lh3_hash_fun(const char *key) { return __lh3_X31_hash_string(key); } /* * Equality operator "==" */ /** "==" for 16-bit integers */ inline bool __lh3_key_equal(bit16_t a, bit16_t b) { return a == b; } /** "==" for 32-bit integers */ inline bool __lh3_key_equal(bit32_t a, bit32_t b) { return a == b; } /** "==" for 64-bit integers */ inline bool __lh3_key_equal(bit64_t a, bit64_t b) { return a == b; } /** "==" for strings (char*) */ inline bool __lh3_key_equal(const char *a, const char *b) { return (a && b && strcmp(a, b) == 0); } /* * Table for primes */ const int __lh3_HASH_PRIME_SIZE = 32; static const bit32_t __lh3_prime_list[__lh3_HASH_PRIME_SIZE] = { 0ul, 3ul, 11ul, 23ul, 53ul, 97ul, 193ul, 389ul, 769ul, 1543ul, 3079ul, 6151ul, 12289ul, 24593ul, 49157ul, 98317ul, 196613ul, 393241ul, 786433ul, 1572869ul, 3145739ul, 6291469ul, 12582917ul, 25165843ul, 50331653ul, 100663319ul, 201326611ul, 402653189ul, 805306457ul, 1610612741ul, 3221225473ul, 4294967291ul }; /** Threshold for rehashing */ const double __lh3_HASH_UPPER = 0.77; /* * Constants and macros for retrieve/set flags "isempty" and "isdel". */ typedef bit32_t __lh3_flag_t; const int __lh3_FLAG_SHIFT = 4; const int __lh3_FLAG_MASK = 0xful; const __lh3_flag_t __lh3_FLAG_DEFAULT = 0xaaaaaaaaul; #define __lh3_isempty(flag, i) ((flag[i>>__lh3_FLAG_SHIFT]>>((i&__lh3_FLAG_MASK)<<1))&2) #define __lh3_isdel(flag, i) ((flag[i>>__lh3_FLAG_SHIFT]>>((i&__lh3_FLAG_MASK)<<1))&1) #define __lh3_isboth(flag, i) ((flag[i>>__lh3_FLAG_SHIFT]>>((i&__lh3_FLAG_MASK)<<1))&3) #define __lh3_set_isdel_false(flag, i) (flag[i>>__lh3_FLAG_SHIFT]&=~(1ul<<((i&__lh3_FLAG_MASK)<<1))) #define __lh3_set_isempty_false(flag, i) (flag[i>>__lh3_FLAG_SHIFT]&=~(2ul<<((i&__lh3_FLAG_MASK)<<1))) #define __lh3_set_isboth_false(flag, i) (flag[i>>__lh3_FLAG_SHIFT]&=~(3ul<<((i&__lh3_FLAG_MASK)<<1))) #define __lh3_set_isdel_true(flag, i) (flag[i>>__lh3_FLAG_SHIFT]|=1ul<<((i&__lh3_FLAG_MASK)<<1)) /* * Auxiliary functions for search/insert/erase. */ template inline hashint_t __lh3_hash_search_aux(const keytype_t &key, hashint_t m, const keytype_t *keys, const __lh3_flag_t *flag) { if (!m) return 0; hashint_t inc, k, i; k = __lh3_hash_fun(key); i = k % m; inc = 1 + k % (m - 1); hashint_t last = i; while (!__lh3_isempty(flag, i) && !__lh3_key_equal(keys[i], key)) { if (i + inc >= m) i = i + inc - m; // inc < m, and so never write this line as: "i += inc - m;" else i += inc; if (i == last) return m; // fail to find } return i; } template inline hashint_t __lh3_hash_insert_aux(const keytype_t &key, hashint_t m, const keytype_t *keys, const __lh3_flag_t *flag) { hashint_t inc, k, i, site; site = m; k = __lh3_hash_fun(key); i = k % m; inc = 1 + k % (m - 1); hashint_t last = i; while (!__lh3_isempty(flag, i) && !__lh3_key_equal(keys[i], key)) { if (__lh3_isdel(flag, i)) site = i; if (i + inc >= m) i = i + inc - m; else i += inc; if (i == last) return site; } if (__lh3_isempty(flag, i) && site != m) return site; else return i; } template inline hashint_t __lh3_hash_erase_aux(const keytype_t &key, hashint_t m, const keytype_t *keys, __lh3_flag_t *flag) { if (!m) return 0; hashint_t i; i = __lh3_hash_search_aux(key, m, keys, flag); if (i != m && !__lh3_isempty(flag, i)) { if (__lh3_isdel(flag, i)) return m; // has been deleted __lh3_set_isdel_true(flag, i); // set "isdel" flag as "true" return i; } else return m; } /** "iterator" class for "hash_set_char" and "hash_set_misc" */ template class __lh3_hash_base_iterator { protected: hashint_t i; keytype_t *keys; __lh3_flag_t *flags; public: __lh3_hash_base_iterator() {} // No initialization. This is unsafe, but reasonable use will not cause any problems. __lh3_hash_base_iterator(hashint_t _i, keytype_t *_keys, __lh3_flag_t *_flags) { i = _i; keys = _keys; flags = _flags; } inline const keytype_t &operator & () { return keys[i]; } // Keys should never be changed by an iterator. inline const keytype_t &key() { return keys[i]; } // an alias of the operator "&" inline bool operator != (const __lh3_hash_base_iterator &iter) { return i != iter.i; } inline bool operator == (const __lh3_hash_base_iterator &iter) { return i == iter.i; } inline bool operator < (const __lh3_hash_base_iterator &iter) { return i < iter.i; } inline bool operator > (const __lh3_hash_base_iterator &iter) { return i > iter.i; } inline void operator ++ () { ++i; } inline void operator ++ (int) { ++i; } inline void operator -- () { --i; } inline void operator -- (int) { --i; } inline bool isfilled() { return !__lh3_isboth(flags, i); } inline bool operator + () { return isfilled(); } // an alias of "isfilled()" }; /** "iterator" class for "hash_map_char" and "hash_map_misc" */ template class __lh3_hash_val_iterator : public __lh3_hash_base_iterator { protected: valtype_t *vals; public: __lh3_hash_val_iterator() {} __lh3_hash_val_iterator(hashint_t _i, keytype_t *_keys, __lh3_flag_t *_flags, valtype_t *_vals) { this->i = _i; this->keys = _keys; this->flags = _flags; vals = _vals; } inline valtype_t &operator * () { return vals[this->i]; } // Values can be changed here. inline const valtype_t &value() { return vals[this->i]; } // the following two functions are alternatives to the operator "*". inline void value(const valtype_t &v) { vals[this->i] = v; } }; /** Base class of all hash classes */ template class __lh3_hash_base_class { protected: hashint_t n_capacity; /**< maximum size of the hash table */ hashint_t n_size; /**< number of elements in hash table */ hashint_t n_occupied; /**< number of cells that have not been flaged as "isempty" (n_capacity >= n_occupied >= n_size) */ hashint_t upper_bound; /**< The upper bound. When n_occupied exceeds this, rehashing will be performed. */ __lh3_flag_t *flags; /**< flag array which stores the status "isempty" or "isdel" of each hash cell. */ keytype_t *keys; /**< array that stores hash keys */ // return 0 for unchanged, 1 for empty, 2 for deleted inline int direct_insert_aux(const keytype_t &key, hashint_t m, keytype_t *K, __lh3_flag_t *F, hashint_t *i) { *i = __lh3_hash_insert_aux(key, m, K, F); if (__lh3_isempty(F, *i)) { K[*i] = key; __lh3_set_isboth_false(F, *i); return 1; } else if (__lh3_isdel(F, *i)) { K[*i] = key; __lh3_set_isboth_false(F, *i); return 2; } else return 0; } inline bool resize_aux1(hashint_t *new_capacity, __lh3_flag_t **new_flags) { hashint_t t; t = __lh3_HASH_PRIME_SIZE - 1; while (__lh3_prime_list[t] > *new_capacity) --t; *new_capacity = __lh3_prime_list[t+1]; if (n_size >= hashint_t(*new_capacity * __lh3_HASH_UPPER + 0.5)) return false; // do not rehash keys = (keytype_t*)realloc(keys, *new_capacity * sizeof(keytype_t)); if (keys == 0) return false; // insufficient memory? *new_flags = (__lh3_flag_t*)malloc(*new_capacity * sizeof(__lh3_flag_t)); if (*new_flags == 0) { // insufficient memory? ::free(*new_flags); return false; } for (t = 0; t < ((*new_capacity>>__lh3_FLAG_SHIFT) + 1); ++t) (*new_flags)[t] = __lh3_FLAG_DEFAULT; return true; } inline void resize_aux2(hashint_t new_capacity, __lh3_flag_t *new_flags) { ::free(flags); flags = new_flags; n_capacity = new_capacity; n_occupied = n_size; upper_bound = hashint_t(n_capacity * __lh3_HASH_UPPER + 0.5); } /** Test whether rehashing is needed and perform rehashing if this is the fact. */ inline void rehash() { if (n_occupied >= upper_bound) { if (n_capacity > (n_size<<1)) resize(n_capacity - 1); // do not enlarge else resize(n_capacity + 1); // enlarge the capacity } } public: typedef __lh3_hash_base_iterator iterator; __lh3_hash_base_class(void) { keys = 0; flags = 0; n_capacity = n_size = n_occupied = upper_bound = 0;; } ~__lh3_hash_base_class(void) { ::free(keys); ::free(flags); } /** resize the hash table and perform rehashing */ inline bool resize(hashint_t new_capacity) { __lh3_flag_t *new_flags; if (!resize_aux1(&new_capacity, &new_flags)) return false; for (hashint_t j = 0; j != n_capacity; ++j) { if (__lh3_isboth(flags, j) == 0) { keytype_t key = keys[j]; // take out the key __lh3_set_isdel_true(flags, j); // mark "deleted" while (1) { hashint_t inc, k, i; k = __lh3_hash_fun(key); i = k % new_capacity; // calculate the new position inc = 1 + k % (new_capacity - 1); while (!__lh3_isempty(new_flags, i)) { if (i + inc >= new_capacity) i = i + inc - new_capacity; else i += inc; } __lh3_set_isempty_false(new_flags, i); if (i < this->n_capacity && __lh3_isboth(flags, i) == 0) { // something is here { keytype_t tmp = keys[i]; keys[i] = key; key = tmp; } // take it out __lh3_set_isdel_true(flags, i); } else { // put key and quit the loop keys[i] = key; break; } } } } resize_aux2(new_capacity, new_flags); return true; } /** get n_size */ inline hashint_t size(void) const { return n_size; }; /** get n_capacity */ inline hashint_t capacity(void) const { return n_capacity; }; /** the first iterator */ inline iterator begin() { return iterator(0, keys, flags); } /** the last iterator */ inline iterator end() { return iterator(n_capacity, keys, flags); } /** clear the hash table, but do not free the memory */ inline void clear(void) { if (flags) { for (hashint_t t = 0; t < ((n_capacity>>__lh3_FLAG_SHIFT) + 1); ++t) flags[t] = __lh3_FLAG_DEFAULT; } n_size = 0; } /** clear the hash table and free the memory */ inline void free() { ::free(keys); ::free(flags); keys = 0; flags = 0; n_capacity = n_size = n_occupied = upper_bound = 0;; } }; /** hash_set_misc class */ template class hash_set_misc : public __lh3_hash_base_class { public: hash_set_misc(void) {}; ~hash_set_misc(void) {}; /** search a key */ inline bool find(const keytype_t &key) const { hashint_t i = __lh3_hash_search_aux(key, this->n_capacity, this->keys, this->flags); return (i != this->n_capacity && __lh3_isboth(this->flags, i) == 0)? true : false; } /** insert a key */ inline bool insert(const keytype_t &key) { __lh3_hash_base_class::rehash(); hashint_t i; int ret = direct_insert_aux(key, this->n_capacity, this->keys, this->flags, &i); if (ret == 0) return true; if (ret == 1) { ++(this->n_size); ++(this->n_occupied); } else ++(this->n_size); // then ret == 2 return false; } /** delete a key */ inline bool erase(const keytype_t &key) { hashint_t i = __lh3_hash_erase_aux(key, this->n_capacity, this->keys, this->flags); if (i != this->n_capacity) { --(this->n_size); return true; } else return false; } }; /** hash_map_misc class */ template class hash_map_misc : public hash_set_misc { valtype_t *vals; /** a copy of __lh3_hash_base_class::rehash() */ inline void rehash() { if (this->n_occupied >= this->upper_bound) { if (this->n_capacity > (this->n_size<<1)) resize(this->n_capacity - 1); else resize(this->n_capacity + 1); } } public: hash_map_misc(void) { vals = 0; }; ~hash_map_misc(void) { ::free(vals); }; typedef __lh3_hash_val_iterator iterator; /** analogy of __lh3_hash_base_class::resize(hashint_t) */ inline bool resize(hashint_t new_capacity) { __lh3_flag_t *new_flags; if (!__lh3_hash_base_class::resize_aux1(&new_capacity, &new_flags)) return false; vals = (valtype_t*)realloc(vals, sizeof(valtype_t) * new_capacity); if (vals == 0) { // insufficient enough memory? ::free(new_flags); return false; } for (hashint_t j = 0; j != this->n_capacity; ++j) { if (__lh3_isboth(this->flags, j) == 0) { keytype_t key = this->keys[j]; // take out the key valtype_t val = vals[j]; __lh3_set_isdel_true(this->flags, j); // mark "deleted" while (1) { hashint_t inc, k, i; k = __lh3_hash_fun(key); i = k % new_capacity; // calculate the new position inc = 1 + k % (new_capacity - 1); while (!__lh3_isempty(new_flags, i)) { if (i + inc >= new_capacity) i = i + inc - new_capacity; else i += inc; } __lh3_set_isempty_false(new_flags, i); if (i < this->n_capacity && __lh3_isboth(this->flags, i) == 0) { // something is here { keytype_t tmp = this->keys[i]; this->keys[i] = key; key = tmp; } // take it out { valtype_t tmp = vals[i]; vals[i] = val; val = tmp; } // take it out __lh3_set_isdel_true(this->flags, i); } else { // clear this->keys[i] = key; vals[i] = val; break; } } } } __lh3_hash_base_class::resize_aux2(new_capacity, new_flags); return true; } inline bool find(const keytype_t &key, valtype_t *q) const { hashint_t i = __lh3_hash_search_aux(key, this->n_capacity, this->keys, this->flags); if (i != this->n_capacity && __lh3_isboth(this->flags, i) == 0) { *q = vals[i]; return true; } else return false; } inline bool insert(const keytype_t &key, const valtype_t &val) { rehash(); hashint_t i; int ret = direct_insert_aux(key, this->n_capacity, this->keys, this->flags, &i); vals[i] = val; if (ret == 0) return true; if (ret == 1) { ++(this->n_size); ++(this->n_occupied); } else ++(this->n_size); // then ret == 2 return false; } inline bool insert(const keytype_t &key, valtype_t **q) { rehash(); hashint_t i; int ret = direct_insert_aux(key, this->n_capacity, this->keys, this->flags, &i); *q = vals + i; if (ret == 0) return true; if (ret == 1) { ++(this->n_size); ++(this->n_occupied); } else ++(this->n_size); // then ret == 2 return false; } inline bool erase(const keytype_t &key) { return hash_set_misc::erase(key); } inline bool erase(const keytype_t &key, valtype_t **q) { hashint_t i = __lh3_hash_erase_aux(key, this->n_capacity, this->keys, this->flags); if (i != this->n_capacity) { --(this->n_size); *q = vals + i; return true; } else return false; } inline iterator begin() { return iterator(0, this->keys, this->flags, vals); } inline iterator end() { return iterator(this->n_capacity, this->keys, this->flags, vals); } inline void free() { hash_set_misc::free(); ::free(vals); vals = 0; } }; typedef char *__lh3_char_t; /** hash_set_char class */ class hash_set_char : public __lh3_hash_base_class { protected: inline int insert_aux(const char *key, hashint_t m, char **K, __lh3_flag_t *F, hashint_t *i) { *i = __lh3_hash_insert_aux((const __lh3_char_t)key, m, K, F); if (__lh3_isempty(F, *i)) { K[*i] = strdup(key); __lh3_set_isboth_false(F, *i); return 1; } else if (__lh3_isdel(F, *i)) { K[*i] = strdup(key); __lh3_set_isboth_false(F, *i); return 2; } else return 0; } public: hash_set_char(void) {}; ~hash_set_char(void) { clear(); }; inline bool find(const char *key) const { hashint_t i = __lh3_hash_search_aux((const __lh3_char_t)key, this->n_capacity, this->keys, this->flags); return (i != this->n_capacity && __lh3_isboth(this->flags, i) == 0)? true : false; } inline bool insert(const char *key) { rehash(); hashint_t i; int ret = insert_aux(key, this->n_capacity, this->keys, this->flags, &i); if (ret == 0) return true; if (ret == 1) { ++(this->n_size); ++(this->n_occupied); } else ++(this->n_size); // then ret == 2 return false; } inline bool erase(const char *key) { hashint_t i = __lh3_hash_erase_aux((const __lh3_char_t)key, this->n_capacity, this->keys, this->flags); if (i != this->n_capacity) { ::free(this->keys[i]); this->keys[i] = 0; --(this->n_size); return true; } else return false; } inline void clear(void) { for (hashint_t i = 0; i != this->n_capacity; ++i) if (!__lh3_isboth(this->flags, i)) { ::free(this->keys[i]); this->keys[i] = 0; } __lh3_hash_base_class::clear(); } inline void free() { clear(); __lh3_hash_base_class::free(); } }; /** hash_map_char class */ template class hash_map_char : public hash_set_char { valtype_t *vals; inline void rehash() { if (this->n_occupied >= this->upper_bound) { if (this->n_capacity > (this->n_size<<1)) resize(this->n_capacity - 1); else resize(this->n_capacity + 1); } } public: typedef __lh3_hash_val_iterator iterator; hash_map_char(void) { vals = 0; }; ~hash_map_char(void) { clear(); ::free(vals); }; inline valtype_t &val(hashint_t i) { return vals[i]; } inline void val(hashint_t i, const valtype_t &v) { return vals[i] = v; } inline bool resize(hashint_t new_capacity) { __lh3_flag_t *new_flags; if (!resize_aux1(&new_capacity, &new_flags)) return false; vals = (valtype_t*)realloc(vals, sizeof(valtype_t) * new_capacity); if (vals == 0) { // insufficient enough memory? ::free(new_flags); return false; } for (hashint_t j = 0; j != this->n_capacity; ++j) { if (__lh3_isboth(this->flags, j) == 0) { char *key = this->keys[j]; // take out the key valtype_t val = vals[j]; __lh3_set_isdel_true(this->flags, j); // mark "deleted" while (1) { hashint_t inc, k, i; k = __lh3_hash_fun(key); i = k % new_capacity; // calculate the new position inc = 1 + k % (new_capacity - 1); while (!__lh3_isempty(new_flags, i)) { if (i + inc >= new_capacity) i = i + inc - new_capacity; else i += inc; } __lh3_set_isempty_false(new_flags, i); if (i < this->n_capacity && __lh3_isboth(this->flags, i) == 0) { // something is here { char* tmp = this->keys[i]; this->keys[i] = key; key = tmp; } // take it out { valtype_t tmp = vals[i]; vals[i] = val; val = tmp; } // take it out __lh3_set_isdel_true(this->flags, i); } else { // clear this->keys[i] = key; vals[i] = val; break; } } } } resize_aux2(new_capacity, new_flags); return true; } inline bool find(const char *key, valtype_t *q) const { hashint_t i = __lh3_hash_search_aux((const __lh3_char_t)key, this->n_capacity, this->keys, this->flags); if (i != this->n_capacity && __lh3_isboth(this->flags, i) == 0) { *q = vals[i]; return true; } else return false; } inline bool insert(const char *key, const valtype_t &val) { rehash(); hashint_t i; int ret = insert_aux(key, this->n_capacity, this->keys, this->flags, &i); vals[i] = val; if (ret == 0) return true; if (ret == 1) { ++(this->n_size); ++(this->n_occupied); } else ++(this->n_size); // then ret == 2 return false; } inline bool insert(const char *key, valtype_t **q) { rehash(); hashint_t i; int ret = insert_aux(key, this->n_capacity, this->keys, this->flags, &i); *q = vals + i; if (ret == 0) return true; if (ret == 1) { ++(this->n_size); ++(this->n_occupied); } else ++(this->n_size); // then ret == 2 return false; } inline bool erase(const char *key) { return hash_set_char::erase(key); } inline bool erase(const char *key, valtype_t **q) { hashint_t i = __lh3_hash_erase_aux((const __lh3_char_t)key, this->n_capacity, this->keys, this->flags); if (i != this->n_capacity) { ::free(this->keys[i]); this->keys[i] = 0; --(this->n_size); *q = vals + i; return true; } else return false; } inline iterator begin() { return iterator(0, this->keys, this->flags, vals); } inline iterator end() { return iterator(this->n_capacity, this->keys, this->flags, vals); } inline void free() { hash_set_char::free(); ::free(vals); vals = 0; } }; #endif // LH3_STDHASH_H_ maq-0.7.1/submap.c0000644000076600000240000000421411027727762012316 0ustar lh3staff#include #include #include #include #include #include #include "main.h" #include "maqmap.h" typedef struct { int min_mapQ, max_mm, is_pair, max_sum_err; } submap_opt_t; static submap_opt_t *maq_new_submap_opt() { submap_opt_t *p; p = (submap_opt_t*)calloc(1, sizeof(submap_opt_t)); p->min_mapQ = 10; p->max_mm = 3; p->is_pair = 0; p->max_sum_err = 60; return p; } static bit64_t maq_submap_core(gzFile fpin, gzFile fpout, const submap_opt_t *so) { maqmap_t *mm; maqmap1_t m1; bit64_t n = 0; mm = maqmap_read_header(fpin); mm->n_mapped_reads = 0; maqmap_write_header(fpout, mm); while (gzread(fpin, &m1, sizeof(maqmap1_t))) { int is_keep = 1; if (m1.map_qual < so->min_mapQ || (m1.info1&0xf) > so->max_mm) is_keep = 0; if (so->is_pair && (m1.flag&PAIRFLAG_PAIRED) == 0) is_keep = 0; if (m1.info2 > so->max_sum_err) is_keep = 0; if (is_keep) { gzwrite(fpout, &m1, sizeof(maqmap1_t)); ++n; } } maq_delete_maqmap(mm); return n; } int maq_submap(int argc, char *argv[]) { int c; gzFile fpin, fpout; submap_opt_t *so = maq_new_submap_opt(); while ((c = getopt(argc, argv, "q:Q:m:p")) >= 0) { switch (c) { case 'q': so->min_mapQ = atoi(optarg); break; case 'Q': so->max_sum_err = atoi(optarg); break; case 'm': so->max_mm = atoi(optarg); break; case 'p': so->is_pair = 1; break; } } if (optind + 1 >= argc) { fprintf(stderr, "\n"); fprintf(stderr, "Usage: maq submap [options] \n\n"); fprintf(stderr, "Options: -q INT minimum mapping quality [%d]\n", so->min_mapQ); fprintf(stderr, " -Q INT maximum sum of errors [%d]\n", so->max_sum_err); fprintf(stderr, " -m INT maximum number of mismatches [%d]\n", so->max_mm); fprintf(stderr, " -p correctly paired reads only\n\n"); free(so); return 1; } fpout = (strcmp(argv[optind], "-") == 0)? gzdopen(fileno(stdout), "w") : gzopen(argv[optind], "w"); fpin = (strcmp(argv[optind+1], "-") == 0)? gzdopen(fileno(stdin), "r") : gzopen(argv[optind+1], "r"); maq_submap_core(fpin, fpout, so); gzclose(fpin); gzclose(fpout); free(so); return 0; } maq-0.7.1/subsnp.cc0000644000076600000240000001570510766735650012517 0ustar lh3staff#include #include #include #include #include #include #include "const.h" #include "main.h" #include "stdhash.hh" #define MAX_LINE_LEN 65536 hash_map_char *ma_load_snp(FILE *fp) { char name[256], key[256]; char *buffer = (char*)calloc(MAX_LINE_LEN, 1); int pos, c, i; hash_map_char *hash = new hash_map_char; while (fscanf(fp, "%s%d", name, &pos) == 2) { sprintf(key, "%s.%d", name, pos); i = 0; while ((c = fgetc(fp)) != EOF && c != '\n') buffer[i++] = c; buffer[i] = 0; hash->insert(key, strdup(buffer)); } free(buffer); return hash; } hash_set_char *ma_load_snp_set(FILE *fp) { char name[256], key[256]; int pos, c; hash_set_char *hash = new hash_set_char; while (fscanf(fp, "%s%d", name, &pos) == 2) { sprintf(key, "%s.%d", name, pos); while ((c = fgetc(fp)) != EOF && c != '\n'); hash->insert(key); } return hash; } void ma_free_char_hash(hash_map_char *hash) { if (hash == 0) return; hash_map_char::iterator iter; for (iter = hash->begin(); iter != hash->end(); ++iter) { if (iter.isfilled()) free(iter.value()); } delete hash; } void cns_snpreg(FILE *fpout, gzFile fp, FILE *fp_snp, bit32_t min_mapq, bit32_t min_depth, bit32_t max_depth, bit32_t min_nQ) { int i, len; bit64_t n, nonn, nn, n_thres[10]; char key[256], *str; hash_map_char *hash = 0; if (fp_snp) { fprintf(stderr, "-- loading .snp file...\n"); hash = ma_load_snp(fp_snp); fprintf(stderr, "-- %u records loaded.\n", hash->size()); } n = nonn = nn = 0; memset(n_thres, 0, sizeof(bit64_t) * 10); while (gzread(fp, &len, sizeof(int))) { char *name = (char*)malloc(len); gzread(fp, name, len); gzread(fp, &len, sizeof(int)); for (i = 0; i != len; ++i) { bit32_t low, high; gzread(fp, &low, sizeof(bit32_t)); gzread(fp, &high, sizeof(bit32_t)); if (high>>28 == 0xf) ++nn; else ++nonn; if ((low>>8&0x3f) >= min_mapq && (float)(low>>20&0xfff)/16.0 >= 0.25 && (low&0xff) >= min_depth && (low&0xff) <= max_depth && (low>>15&0x1f)<<1 >= min_nQ) { if (hash) { sprintf(key, "%s.%d", name, i+1); if (hash->find(key, &str)) fprintf(fpout, "%s\t%d%s\n", name, i+1, str); } ++n; int q = high>>16&0xff; if (q > 99) q = 99; ++n_thres[q/10]; } } free(name); } fprintf(stderr, "-- total length of reference: %lld\n", nonn + nn); fprintf(stderr, "-- length of 'N' regions on the reference: %lld\n", nn); fprintf(stderr, "-- size of good regions: %lld\n", n); fprintf(stderr, "-- uncalled: %.2f%% (= %lld / %lld)\n", 100.0 * (1.0 - (float)n/nonn), nonn - n, nonn); n = 0; for (i = 9; i >= 0; --i) { n += n_thres[i]; fprintf(stderr, "-- %d0-%d9: %lld\n", i, i, n); } ma_free_char_hash(hash); } void cns_subpos(FILE *fpout, gzFile fp, FILE *fp_snp) { int i, len; char key[256], *str; fprintf(stderr, "[cns_cns2pos] loading .snp file...\n"); hash_map_char *hash = ma_load_snp(fp_snp); fprintf(stderr, "[cns_cns2pos] %u records loaded.\n", hash->size()); while (gzread(fp, &len, sizeof(int))) { char *name = (char*)malloc(len); gzread(fp, name, len); gzread(fp, &len, sizeof(int)); for (i = 0; i != len; ++i) { bit32_t low, high; gzread(fp, &low, sizeof(bit32_t)); gzread(fp, &high, sizeof(bit32_t)); sprintf(key, "%s.%d", name, i+1); if (hash->find(key, &str)) { fprintf(fpout, "%s\t%d\t%c\t%c\t%d\t%d\t%.2f\t%d\t%d%s\n", name, i + 1, nst_nt16_rev_table[high>>28], nst_nt16_rev_table[high>>24&0xf], high>>16&0xff, low&0xff, (float)(low>>20&0xfff)/16.0, low>>8&0x3f, (low>>15&0x1f)<<1, str); } } free(name); } ma_free_char_hash(hash); } int ma_subpos(int argc, char *argv[]) { gzFile fp; FILE *fp_snp; if(argc < 3) { fprintf(stderr, "Usage: maq subpos <.snp>\n"); return 1; } fp = gzopen(argv[1], "r"); fp_snp = fopen(argv[2], "r"); assert(fp && fp_snp); cns_subpos(stdout, fp, fp_snp); gzclose(fp); fclose(fp_snp); return 0; } int ma_snpreg(int argc, char *argv[]) { gzFile fp; FILE *fp_snp = 0; int c, min_mapq = 40, min_depth = 3, max_depth = 255, min_nQ = 20; while ((c = getopt(argc, argv, "Q:d:D:n:")) >= 0) { switch (c) { case 'Q': min_mapq = atoi(optarg); break; case 'd': min_depth = atoi(optarg); break; case 'D': max_depth = atoi(optarg); break; case 'n': min_nQ = atoi(optarg); break; default: return 1; } } if(optind >= argc) { fprintf(stderr, "\n"); fprintf(stderr, "Usage: maq snpreg [options] in.cns [in.snp]\n\n"); fprintf(stderr, "Options: -Q INT minimum mapping quality [%d]\n", min_mapq); fprintf(stderr, " -d INT minimum read depth [%d]\n", min_depth); fprintf(stderr, " -n INT minimum neighbouring quality [%d]\n", min_nQ); fprintf(stderr, " -D INT maximum read depth [%d]\n\n", max_depth); return 1; } fp = (strcmp(argv[optind], "-") == 0)? gzdopen(fileno(stdin), "r") : gzopen(argv[optind], "r"); if (optind + 1 < argc) assert(fp_snp = fopen(argv[optind+1], "r")); assert(fp); cns_snpreg(stdout, fp, fp_snp, min_mapq, min_depth, max_depth, min_nQ); gzclose(fp); if (fp_snp) fclose(fp_snp); return 0; } /* CMD: simucns */ static hash_map_char *load_simu_snp(FILE *fp) { hash_map_char *hash = new hash_map_char; char name[256], key[256], a[3], b[3], c[3]; int pos, i; while (fscanf(fp, "%s%d%s%s%s", name, &pos, a, b, c) == 5) { if (a[0] == '-' || b[0] == '-') { for (i = pos - 5; i <= pos + 5; ++i) { sprintf(key, "%s.%d", name, i); hash->insert(key, 15); } } else { sprintf(key, "%s.%d", name, pos); hash->insert(key, nst_nt16_table[(int)b[0]]); } } return hash; } void maq_simucns_core(FILE *fpout, gzFile fp, FILE *fp_snp) { int i, len; char key[256]; bit64_t n_err[10], n_all[10]; fprintf(stderr, "-- loading .snp file...\n"); hash_map_char *hash = load_simu_snp(fp_snp); fprintf(stderr, "-- %u records loaded.\n", hash->size()); memset(n_err, 0, sizeof(bit64_t) * 10); memset(n_all, 0, sizeof(bit64_t) * 10); while (gzread(fp, &len, sizeof(int))) { char *name = (char*)malloc(len); gzread(fp, name, len); gzread(fp, &len, sizeof(int)); for (i = 0; i != len; ++i) { bit32_t low, high; gzread(fp, &low, sizeof(bit32_t)); gzread(fp, &high, sizeof(bit32_t)); sprintf(key, "%s.%d", name, i+1); bit8_t b2, b = high>>28; int q10 = (high>>16&0xff) / 10; if (q10 > 9) q10 = 9; if (hash->find(key, &b2)) b = b2; if (b < 15) { ++n_all[q10]; if (b != (high>>24&0xf)) ++n_err[q10]; } } free(name); } printf("%4s%13s%13s%15s\n", "cnsQ", "#called", "#wrong", "err_rate"); for (i = 0; i != 10; ++i) printf("%1dx %13llu%13llu%15e\n", i, n_all[i], n_err[i], (float)n_err[i] / n_all[i]); delete hash; } int maq_simucns(int argc, char *argv[]) { if (argc < 3) { fprintf(stderr, "Usage: maq simucns \n"); return 1; } gzFile fp_cns = gzopen(argv[1], "r"); FILE *fp_snp = fopen(argv[2], "r"); assert(fp_cns && fp_snp); maq_simucns_core(stdout, fp_cns, fp_snp); return 0; }