RG-Blast-Parser-0.03/0000755015075101507510000000000011775561377013562 5ustar lkajanlkajanRG-Blast-Parser-0.03/t/0000755015075101507510000000000011775561377014025 5ustar lkajanlkajanRG-Blast-Parser-0.03/t/01RG-Blast-Parserload.t0000644015075101507510000000074211734365077020015 0ustar lkajanlkajan# Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl RG-Blast-Parser.t' ######################### # change 'tests => 1' to 'tests => last_test_to_print'; use Test::More tests => 1; BEGIN { use_ok('RG::Blast::Parser') }; ######################### # Insert your test code below, the Test::More module is use()ed here so read # its man page ( perldoc Test::More ) for help writing this test script. RG-Blast-Parser-0.03/t/02test.t0000644015075101507510000000414711734623041015317 0ustar lkajanlkajanuse strict; use warnings; use Test::More tests => 23; #use Data::Dumper; BEGIN { use_ok('RG::Blast::Parser') }; # /usr/share/doc/libextutils-xspp-perl/examples/Object-WithIntAndString/t/02test.t SCOPE: { open(EXAMPLE, '<', '/dev/null') || confess($!); my $o = RG::Blast::Parser->new( \*EXAMPLE ); check_obj($o); is($o->result(), undef); my $res = $o->parse(); is($res, undef); close(EXAMPLE); } SCOPE: { open(EXAMPLE, '<', 'examples/converged.ali') || confess($!); my $o = RG::Blast::Parser->new( \*EXAMPLE ); check_obj($o); my $res = $o->parse(); is($res->{hits}->[1]->{hsps}->[0]->{bit_score}, 226); undef $res; $res = $o->result(); is($res->{hits}->[0]->{hsps}->[0]->{raw_score}, 539); #warn( Dumper($res) ); close(EXAMPLE); } SCOPE: { open(EXAMPLE, '<', 'examples/badformat.ali') || confess($!); my $o = RG::Blast::Parser->new( \*EXAMPLE, "examples/badformat.ali" ); check_obj($o); eval { my $res = $o->parse(); }; is($@, "parser error at ".__FILE__." line ". (__LINE__-2) .".\n"); close(EXAMPLE); } SCOPE: { open(EXAMPLE, '<', 'examples/twores.ali') || confess($!); my $o = RG::Blast::Parser->new( \*EXAMPLE, "examples/twores.ali" ); check_obj($o); my $resnum = 0; while( my $res = $o->parse() ) { ++$resnum; } is($resnum, 2); close(EXAMPLE); } SCOPE: { open( my $oldin, "<&STDIN" ) || confess($!); open( STDIN, '<', 'examples/converged.ali') || confess($!); my $o = RG::Blast::Parser->new(); check_obj($o); my $res = $o->parse(); is($res->{hits}->[1]->{hsps}->[0]->{bit_score}, 226); #warn( Dumper($res) ); open( STDIN, '<&', $oldin ) || confess($!); } #SCOPE: { # open(EXAMPLE, '<', '/home/kajla/project/rostlab/DEBIAN/squashblast/trunk/examples/hsps.ali') || confess($!); # my $o = RG::Blast::Parser->new( \*EXAMPLE, "examples/hsps.ali" ); # check_obj($o); # # my $res = $o->parse(); # # warn( Dumper($res) ); #} sub check_obj { my $o = shift; isa_ok($o, 'RG::Blast::Parser' ); can_ok($o, qw(new get_trace_scanning parse result set_trace_scanning) ); foreach (qw|trace_scanning|){ ok(!$o->can($_)); } } # vim:et:ts=4:ai: RG-Blast-Parser-0.03/Changes0000644015075101507510000000060311775561334015045 0ustar lkajanlkajanRevision history for Perl extension RG::Blast::Parser. 0.03 Fri Juy 06 15:05:00 2012 - updated man page description of result array 0.02 Thu Mar 29 12:51:00 2012 - depends on librostlab-blast 0.01 Thu Mar 22 10:53:24 2012 - original version; created by h2xs 1.23 with options -n RG::Blast::Parser -b 5.8.8 --omit-constant --skip-ppport rostlab/blast-parser-driver -lm RG-Blast-Parser-0.03/Parser.xs0000644015075101507510000000170711734605722015363 0ustar lkajanlkajan/* Copyright (C) 2012 by Laszlo Kajan, Technical University of Munich, Germany This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available. */ #ifdef __cplusplus extern "C" { #include "EXTERN.h" #include "perl.h" #include "XSUB.h" } #endif /* include your class headers here */ #include using namespace rostlab::blast; /* We need one MODULE... line to start the actual XS section of the file. * The XS++ preprocessor will output its own MODULE and PACKAGE lines */ MODULE = RG::Blast::Parser PACKAGE = RG::Blast::Parser ## The include line executes xspp with the supplied typemap and the ## xsp interface code for our class. ## It will include the output of the xsubplusplus run. INCLUDE_COMMAND: $^X -MExtUtils::XSpp::Cmd -e xspp -- --typemap=typemap.xsp Parser.xsp RG-Blast-Parser-0.03/examples/0000755015075101507510000000000011775561377015400 5ustar lkajanlkajanRG-Blast-Parser-0.03/examples/twores.ali0000644015075101507510000002360711734365077017414 0ustar lkajanlkajanBLASTP 2.2.18 [Mar-02-2008] Reference: Altschul, Stephen F., Thomas L. Madden, Alejandro A. Schaffer, Jinghui Zhang, Zheng Zhang, Webb Miller, and David J. Lipman (1997), "Gapped BLAST and PSI-BLAST: a new generation of protein database search programs", Nucleic Acids Res. 25:3389-3402. Reference for compositional score matrix adjustment: Altschul, Stephen F., John C. Wootton, E. Michael Gertz, Richa Agarwala, Aleksandr Morgulis, Alejandro A. Schaffer, and Yi-Kuo Yu (2005) "Protein database searches using compositionally adjusted substitution matrices", FEBS J. 272:5101-5109. Reference for composition-based statistics starting in round 2: Schaffer, Alejandro A., L. Aravind, Thomas L. Madden, Sergei Shavirin, John L. Spouge, Yuri I. Wolf, Eugene V. Koonin, and Stephen F. Altschul (2001), "Improving the accuracy of PSI-BLAST protein database searches with composition-based statistics and other refinements", Nucleic Acids Res. 29:2994-3005. Query= ORF02707 (51 letters) Database: big_80 6,172,567 sequences; 2,144,756,490 total letters Searching..................................................done ***** No hits found ****** Searching..................................................done ***** No hits found ****** Database: big_80 Posted date: Jun 21, 2011 12:12 AM Number of letters in database: 999,999,540 Number of sequences in database: 1,233,551 Database: /mnt/project/rost_db/work/big/20110619-1/big_80.01 Posted date: Jun 21, 2011 12:15 AM Number of letters in database: 999,999,953 Number of sequences in database: 3,404,212 Database: /mnt/project/rost_db/work/big/20110619-1/big_80.02 Posted date: Jun 21, 2011 12:16 AM Number of letters in database: 144,756,997 Number of sequences in database: 1,534,804 Lambda K H 0.322 0.134 0.479 Lambda K H 0.267 0.0412 0.140 Matrix: BLOSUM62 Gap Penalties: Existence: 11, Extension: 1 Number of Hits to DB: 526,009,561 Number of Sequences: 6172567 Number of extensions: 15216483 Number of successful extensions: 47546 Number of sequences better than 1.0: 1 Number of HSP's better than 1.0 without gapping: 0 Number of HSP's successfully gapped in prelim test: 2 Number of HSP's that attempted gapping in prelim test: 47546 Number of HSP's gapped (non-prelim): 2 length of query: 51 length of database: 2,144,756,490 effective HSP length: 24 effective length of query: 27 effective length of database: 1,996,614,882 effective search space: 53908601814 effective search space used: 53908601814 T: 11 A: 40 X1: 16 ( 7.4 bits) X2: 38 (14.6 bits) X3: 64 (24.7 bits) S1: 41 (22.0 bits) S2: 81 (35.8 bits) BLASTP 2.2.18 [Mar-02-2008] Reference: Altschul, Stephen F., Thomas L. Madden, Alejandro A. Schaffer, Jinghui Zhang, Zheng Zhang, Webb Miller, and David J. Lipman (1997), "Gapped BLAST and PSI-BLAST: a new generation of protein database search programs", Nucleic Acids Res. 25:3389-3402. Reference for compositional score matrix adjustment: Altschul, Stephen F., John C. Wootton, E. Michael Gertz, Richa Agarwala, Aleksandr Morgulis, Alejandro A. Schaffer, and Yi-Kuo Yu (2005) "Protein database searches using compositionally adjusted substitution matrices", FEBS J. 272:5101-5109. Query= sp|P47944|MT4_HUMAN Metallothionein-4 OS=Homo sapiens GN=MT4 PE=2 SV=1 (62 letters) Database: big_80 7,170,017 sequences; 2,505,616,640 total letters Searching..................................................done >tr|F7G3K3|F7G3K3_ORNAN Metallothionein OS=Ornithorhynchus anatinus GN=MT4 PE=3 SV=1 Length = 63 Score = 77.0 bits (188), Expect = 4e-13, Method: Compositional matrix adjust. Identities = 54/63 (85%), Positives = 58/63 (92%), Gaps = 1/63 (1%) Query: 1 MDPRECVCMSGGICMCGDNCKCTTCNCKTCRKSCCPCCPPGCAKCARGCICKGGSD-KCS 59 MDP EC CMSGGIC+CGDNCKCT CNCKTCRKSCCPCCPPGCAKCA+GC+CK G+D KCS Sbjct: 1 MDPEECTCMSGGICICGDNCKCTNCNCKTCRKSCCPCCPPGCAKCAQGCVCKRGADNKCS 60 Query: 60 CCP 62 CCP Sbjct: 61 CCP 63 >tr|F7IDP1|F7IDP1_CALJA Metallothionein OS=Callithrix jacchus PE=3 SV=1 Length = 61 Score = 62.4 bits (150), Expect = 1e-08, Method: Compositional matrix adjust. Identities = 38/62 (61%), Positives = 42/62 (67%), Gaps = 1/62 (1%) Query: 1 MDPRECVCMSGGICMCGDNCKCTTCNCKTCRKSCCPCCPPGCAKCARGCICKGGSDKCSC 60 MDP C C +GG C C +CKC C C + RKSCC CCP GCA CA+GCICK SDK SC Sbjct: 1 MDPN-CSCAAGGSCTCTSSCKCKECTCTSYRKSCCSCCPMGCANCAQGCICKEASDKYSC 59 Query: 61 CP 62 C Sbjct: 60 CA 61 >tr|G5CAW2|G5CAW2_HETGA Metallothionein-3 OS=Heterocephalus glaber GN=GW7_14200 PE=4 SV=1 Length = 68 Score = 55.1 bits (131), Expect = 2e-06, Method: Compositional matrix adjust. Identities = 34/67 (50%), Positives = 41/67 (61%), Gaps = 6/67 (8%) Query: 1 MDPRECVCMSGGICMCGDNCKCTTCNCKTCRKSCCPCCPPGCAKCARGCIC------KGG 54 MDP C C +GG C C D+CKC C C C++SCC CCP C KCA+ C+C K Sbjct: 1 MDPETCPCPAGGSCTCADSCKCKGCRCTDCKQSCCSCCPADCEKCAKDCVCTGVKGGKAE 60 Query: 55 SDKCSCC 61 +KCSCC Sbjct: 61 EEKCSCC 67 >sp|P15786|MT1_COLLI Metallothionein-1 OS=Columba livia PE=1 SV=1 Length = 63 Score = 53.5 bits (127), Expect = 5e-06, Method: Compositional matrix adjust. Identities = 40/62 (64%), Positives = 47/62 (75%), Gaps = 1/62 (1%) Query: 1 MDPRECVCMSGGICMCGDNCKCTTCNCKTCRKSCCPCCPPGCAKCARGCICKG-GSDKCS 59 MD ++C C +GG C CGDNCKC C C +C+K CC CCP GCAKCA+GC+CKG S KCS Sbjct: 1 MDSQDCPCAAGGTCTCGDNCKCKNCKCTSCKKGCCSCCPAGCAKCAQGCVCKGPPSAKCS 60 Query: 60 CC 61 CC Sbjct: 61 CC 62 >sp|Q6J1T3|MT_SCYTO Metallothionein OS=Scyliorhinus torazame GN=mt PE=3 SV=1 Length = 68 Score = 51.2 bits (121), Expect = 3e-05, Method: Compositional matrix adjust. Identities = 36/66 (54%), Positives = 43/66 (65%), Gaps = 7/66 (10%) Query: 2 DPRECVCMSGGICMCGDNCKCTTCNCKT-----CRKSCCPCCPPGCAKCARGCICKG-GS 55 D + CVC+ G C C + C+C+ C C T C+KSCC CCP GC CA GC+CKG S Sbjct: 3 DTKPCVCLDGS-CSCENTCRCSDCRCPTSKAGRCQKSCCSCCPAGCTNCANGCVCKGKAS 61 Query: 56 DKCSCC 61 DKCSCC Sbjct: 62 DKCSCC 67 >tr|F6PZW8|F6PZW8_MACMU Metallothionein OS=Macaca mulatta GN=LOC702286 PE=3 SV=1 Length = 61 Score = 50.8 bits (120), Expect = 3e-05, Method: Compositional matrix adjust. Identities = 32/61 (52%), Positives = 39/61 (63%), Gaps = 1/61 (1%) Query: 1 MDPRECVCMSGGICMCGDNCKCTTCNCKTCRKSCCPCCPPGCAKCARGCICKGGSDKCSC 60 MDP C C +G C C +C C C C +C+KSCC GCAKCA+G +CKG S+ CSC Sbjct: 1 MDP-NCSCAAGDSCSCAGSCTCKECKCTSCKKSCCSRYRVGCAKCAQGYVCKGASETCSC 59 Query: 61 C 61 C Sbjct: 60 C 60 >tr|G1QP37|G1QP37_NOMLE Metallothionein OS=Nomascus leucogenys PE=3 SV=1 Length = 63 Score = 47.8 bits (112), Expect = 3e-04, Method: Compositional matrix adjust. Identities = 34/64 (53%), Positives = 42/64 (65%), Gaps = 3/64 (4%) Query: 1 MDPRECVCMSGGICMCGDNCKCTTCNCKTCRKSCCPCC--PPGCAKCARGCICKGGSDKC 58 MDP C C +GG C C + KC C C + +K+ C C P GCAKCA+GC+CKG S+KC Sbjct: 1 MDP-NCSCATGGSCSCASSLKCKECKCTSRKKNVCCCSCCPMGCAKCAQGCVCKGTSEKC 59 Query: 59 SCCP 62 SCC Sbjct: 60 SCCA 63 >tr|G1SSN8|G1SSN8_RABIT Uncharacterized protein OS=Oryctolagus cuniculus GN=MT2A PE=4 SV=1 Length = 53 Score = 46.6 bits (109), Expect = 6e-04, Method: Compositional matrix adjust. Identities = 29/50 (58%), Positives = 37/50 (74%), Gaps = 4/50 (8%) Query: 14 CMCGDNCKC-TTCNCKTCRKSCCPCCPPGCAKCARGCICKGGSDKCSCCP 62 C+ D+C C ++C C +CRKSCCP GC +CA+GCICKG S+KCSCC Sbjct: 7 CITSDSCTCASSCTCMSCRKSCCP---VGCVQCAQGCICKGASNKCSCCA 53 >tr|B5XDS4|B5XDS4_SALSA Metallothionein OS=Salmo salar GN=MT PE=3 SV=1 Length = 59 Score = 46.6 bits (109), Expect = 6e-04, Method: Compositional matrix adjust. Identities = 33/54 (61%), Positives = 35/54 (64%), Gaps = 4/54 (7%) Query: 1 MDPRECVCMSGGICMCGDNCKCTTCNCKTCRKSCCPCCPPGCAKCARGCICKGG 54 MDP C C G C CG CKCT C C T KSCC CCP GC+KCA GC+CK G Sbjct: 1 MDP--CDCSKTGRCSCGGLCKCTNCGCAT--KSCCSCCPTGCSKCASGCVCKEG 50 >tr|G1QP67|G1QP67_NOMLE Metallothionein OS=Nomascus leucogenys GN=MT1CP PE=3 SV=1 Length = 61 Score = 45.4 bits (106), Expect = 0.001, Method: Compositional matrix adjust. Identities = 36/61 (59%), Positives = 43/61 (70%), Gaps = 1/61 (1%) Query: 1 MDPRECVCMSGGICMCGDNCKCTTCNCKTCRKSCCPCCPPGCAKCARGCICKGGSDKCSC 60 MD C C +GG C C +CKC C +C+K+CC CCP GCAKCA+GCICKG +KCSC Sbjct: 1 MD-LSCSCATGGSCTCASSCKCKEYKCTSCKKNCCSCCPVGCAKCAQGCICKGALEKCSC 59 Query: 61 C 61 C Sbjct: 60 C 60 Database: big_80 Posted date: Feb 6, 2012 9:39 AM Number of letters in database: 999,999,843 Number of sequences in database: 1,100,691 Database: /var/tmp/rost_db/data/big/big_80.01 Posted date: Feb 6, 2012 9:42 AM Number of letters in database: 999,999,792 Number of sequences in database: 2,641,400 Database: /var/tmp/rost_db/data/big/big_80.02 Posted date: Feb 6, 2012 9:44 AM Number of letters in database: 505,617,005 Number of sequences in database: 3,427,926 Lambda K H 0.331 0.144 0.623 Lambda K H 0.267 0.0410 0.140 Matrix: BLOSUM62 Gap Penalties: Existence: 11, Extension: 1 Number of Hits to DB: 334,236,310 Number of Sequences: 7170017 Number of extensions: 10911235 Number of successful extensions: 95546 Number of sequences better than 100.0: 10 Number of HSP's better than 100.0 without gapping: 275 Number of HSP's successfully gapped in prelim test: 1456 Number of HSP's that attempted gapping in prelim test: 82115 Number of HSP's gapped (non-prelim): 10847 length of query: 62 length of database: 2,505,616,640 effective HSP length: 34 effective length of query: 28 effective length of database: 2,261,836,062 effective search space: 63331409736 effective search space used: 63331409736 T: 11 A: 40 X1: 15 ( 7.2 bits) X2: 38 (14.6 bits) X3: 64 (24.7 bits) S1: 40 (21.9 bits) S2: 64 (29.3 bits) RG-Blast-Parser-0.03/examples/converged.ali0000644015075101507510000001055611734365077020044 0ustar lkajanlkajanBLASTP 2.2.18 [Mar-02-2008] Reference: Altschul, Stephen F., Thomas L. Madden, Alejandro A. Schaffer, Jinghui Zhang, Zheng Zhang, Webb Miller, and David J. Lipman (1997), "Gapped BLAST and PSI-BLAST: a new generation of protein database search programs", Nucleic Acids Res. 25:3389-3402. Reference for compositional score matrix adjustment: Altschul, Stephen F., John C. Wootton, E. Michael Gertz, Richa Agarwala, Aleksandr Morgulis, Alejandro A. Schaffer, and Yi-Kuo Yu (2005) "Protein database searches using compositionally adjusted substitution matrices", FEBS J. 272:5101-5109. Reference for composition-based statistics starting in round 2: Schaffer, Alejandro A., L. Aravind, Thomas L. Madden, Sergei Shavirin, John L. Spouge, Yuri I. Wolf, Eugene V. Koonin, and Stephen F. Altschul (2001), "Improving the accuracy of PSI-BLAST protein database searches with composition-based statistics and other refinements", Nucleic Acids Res. 29:2994-3005. Query= query (113 letters) Database: big_80 7,170,017 sequences; 2,505,616,640 total letters Searching..................................................done Results from round 1 Score E Sequences producing significant alignments: (bits) Value pdb|pdb|2vh3_B 212 8e-54 >pdb|pdb|2vh3_B Length = 117 Score = 212 bits (539), Expect = 8e-54, Method: Compositional matrix adjust. Identities = 109/113 (96%), Positives = 109/113 (96%) Query: 1 AXAXSFPPXEIPGSKECLAEALQKHQGFKKKSYALIXAYLNYKEDAENYERAAEDFDSAV 60 A A SFPP EIPGSKECLAEALQKHQGFKKKSYALI AYLNYKEDAENYERAAEDFDSAV Sbjct: 1 AXACSFPPXEIPGSKECLAEALQKHQGFKKKSYALICAYLNYKEDAENYERAAEDFDSAV 60 Query: 61 KXTGXKEGVDLHEGNPELIEEGFEKFLASLKIDRKALGSLXTLFQKLYAIPHN 113 K TG KEGVDLHEGNPELIEEGFEKFLASLKIDRKALGSL TLFQKLYAIPHN Sbjct: 61 KCTGXKEGVDLHEGNPELIEEGFEKFLASLKIDRKALGSLCTLFQKLYAIPHN 113 Searching..................................................done Results from round 2 Score E Sequences producing significant alignments: (bits) Value Sequences used in model and found again: pdb|pdb|2vh3_B 226 5e-58 Sequences not found previously or not previously below threshold: CONVERGED! >pdb|pdb|2vh3_B Length = 117 Score = 226 bits (575), Expect = 5e-58, Method: Composition-based stats. Identities = 109/113 (96%), Positives = 109/113 (96%) Query: 1 AXAXSFPPXEIPGSKECLAEALQKHQGFKKKSYALIXAYLNYKEDAENYERAAEDFDSAV 60 A A SFPP EIPGSKECLAEALQKHQGFKKKSYALI AYLNYKEDAENYERAAEDFDSAV Sbjct: 1 AXACSFPPXEIPGSKECLAEALQKHQGFKKKSYALICAYLNYKEDAENYERAAEDFDSAV 60 Query: 61 KXTGXKEGVDLHEGNPELIEEGFEKFLASLKIDRKALGSLXTLFQKLYAIPHN 113 K TG KEGVDLHEGNPELIEEGFEKFLASLKIDRKALGSL TLFQKLYAIPHN Sbjct: 61 KCTGXKEGVDLHEGNPELIEEGFEKFLASLKIDRKALGSLCTLFQKLYAIPHN 113 Database: big_80 Posted date: Feb 6, 2012 9:39 AM Number of letters in database: 999,999,843 Number of sequences in database: 1,100,691 Database: /mnt/project/rost_db/data/big/big_80.01 Posted date: Feb 6, 2012 9:42 AM Number of letters in database: 999,999,792 Number of sequences in database: 2,641,400 Database: /mnt/project/rost_db/data/big/big_80.02 Posted date: Feb 6, 2012 9:44 AM Number of letters in database: 505,617,005 Number of sequences in database: 3,427,926 Lambda K H 0.313 0.133 0.375 Lambda K H 0.267 0.0413 0.140 Matrix: BLOSUM62 Gap Penalties: Existence: 11, Extension: 1 Number of Hits to DB: 932,412,166 Number of Sequences: 7170017 Number of extensions: 30007572 Number of successful extensions: 53414 Number of sequences better than 1.0: 1 Number of HSP's better than 1.0 without gapping: 2 Number of HSP's successfully gapped in prelim test: 0 Number of HSP's that attempted gapping in prelim test: 53412 Number of HSP's gapped (non-prelim): 2 length of query: 113 length of database: 2,505,616,640 effective HSP length: 81 effective length of query: 32 effective length of database: 1,924,845,263 effective search space: 61595048416 effective search space used: 61595048416 T: 11 A: 40 X1: 16 ( 7.2 bits) X2: 38 (14.6 bits) X3: 64 (24.7 bits) S1: 42 (21.9 bits) S2: 82 (36.2 bits) RG-Blast-Parser-0.03/examples/badformat.ali0000644015075101507510000001055611734365077020027 0ustar lkajanlkajanBLASTP 2.2.18 [Mar-02-2008] Reference: Altschul, Stephen F., Thomas L. Madden, Alejandro A. Schaffer, Jinghui Zhang, Zheng Zhang, Webb Miller, and David J. Lipman (1997), "Gapped BLAST and PSI-BLAST: a new generation of protein database search programs", Nucleic Acids Res. 25:3389-3402. Reference for compositional score matrix adjustment: Altschul, Stephen F., John C. Wootton, E. Michael Gertz, Richa Agarwala, Aleksandr Morgulis, Alejandro A. Schaffer, and Yi-Kuo Yu (2005) "Protein database searches using compositionally adjusted substitution matrices", FEBS J. 272:5101-5109. Reference for composition-based statistics starting in round 2: Schaffer, Alejandro A., L. Aravind, Thomas L. Madden, Sergei Shavirin, John L. Spouge, Yuri I. Wolf, Eugene V. Koonin, and Stephen F. Altschul (2001), "Improving the accuracy of PSI-BLAST protein database searches with composition-based statistics and other refinements", Nucleic Acids Res. 29:2994-3005. Query= query (113 letters) Database: big_80 7,170,017 sequences; 2,505,616,640 total letters Searching..................................................done Results from round 1 Score E Sequences producing significant alignments: (bits) Value pdb|pdb|2vh3_B 212 8e-54 >pdb|pdb|2vh3_B Length = 117 Score = 212 bits (539), Expect = 8e-54, Method: Compositional matrix adjust. Identities = 109/113 (96%), Positives = 109/113 (96%) Query: 1 AXAXSFPPXEIPGSKECLAEALQKHQGFKKKSYALIXAYLNYKEDAENYERAAEDFDSAV 60 A A SFPP EIPGSKECLAEALQKHQGFKKKSYALI AYLNYKEDAENYERAAEDFDSAV Query: 1 AXACSFPPXEIPGSKECLAEALQKHQGFKKKSYALICAYLNYKEDAENYERAAEDFDSAV 60 Query: 61 KXTGXKEGVDLHEGNPELIEEGFEKFLASLKIDRKALGSLXTLFQKLYAIPHN 113 K TG KEGVDLHEGNPELIEEGFEKFLASLKIDRKALGSL TLFQKLYAIPHN Sbjct: 61 KCTGXKEGVDLHEGNPELIEEGFEKFLASLKIDRKALGSLCTLFQKLYAIPHN 113 Searching..................................................done Results from round 2 Score E Sequences producing significant alignments: (bits) Value Sequences used in model and found again: pdb|pdb|2vh3_B 226 5e-58 Sequences not found previously or not previously below threshold: CONVERGED! >pdb|pdb|2vh3_B Length = 117 Score = 226 bits (575), Expect = 5e-58, Method: Composition-based stats. Identities = 109/113 (96%), Positives = 109/113 (96%) Query: 1 AXAXSFPPXEIPGSKECLAEALQKHQGFKKKSYALIXAYLNYKEDAENYERAAEDFDSAV 60 A A SFPP EIPGSKECLAEALQKHQGFKKKSYALI AYLNYKEDAENYERAAEDFDSAV Sbjct: 1 AXACSFPPXEIPGSKECLAEALQKHQGFKKKSYALICAYLNYKEDAENYERAAEDFDSAV 60 Query: 61 KXTGXKEGVDLHEGNPELIEEGFEKFLASLKIDRKALGSLXTLFQKLYAIPHN 113 K TG KEGVDLHEGNPELIEEGFEKFLASLKIDRKALGSL TLFQKLYAIPHN Sbjct: 61 KCTGXKEGVDLHEGNPELIEEGFEKFLASLKIDRKALGSLCTLFQKLYAIPHN 113 Database: big_80 Posted date: Feb 6, 2012 9:39 AM Number of letters in database: 999,999,843 Number of sequences in database: 1,100,691 Database: /mnt/project/rost_db/data/big/big_80.01 Posted date: Feb 6, 2012 9:42 AM Number of letters in database: 999,999,792 Number of sequences in database: 2,641,400 Database: /mnt/project/rost_db/data/big/big_80.02 Posted date: Feb 6, 2012 9:44 AM Number of letters in database: 505,617,005 Number of sequences in database: 3,427,926 Lambda K H 0.313 0.133 0.375 Lambda K H 0.267 0.0413 0.140 Matrix: BLOSUM62 Gap Penalties: Existence: 11, Extension: 1 Number of Hits to DB: 932,412,166 Number of Sequences: 7170017 Number of extensions: 30007572 Number of successful extensions: 53414 Number of sequences better than 1.0: 1 Number of HSP's better than 1.0 without gapping: 2 Number of HSP's successfully gapped in prelim test: 0 Number of HSP's that attempted gapping in prelim test: 53412 Number of HSP's gapped (non-prelim): 2 length of query: 113 length of database: 2,505,616,640 effective HSP length: 81 effective length of query: 32 effective length of database: 1,924,845,263 effective search space: 61595048416 effective search space used: 61595048416 T: 11 A: 40 X1: 16 ( 7.2 bits) X2: 38 (14.6 bits) X3: 64 (24.7 bits) S1: 42 (21.9 bits) S2: 82 (36.2 bits) RG-Blast-Parser-0.03/Parser.xsp0000644015075101507510000000245011734605740015537 0ustar lkajanlkajan/* Copyright (C) 2012 by Laszlo Kajan, Technical University of Munich, Germany This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available. */ %module{RG::Blast::Parser}; // /usr/share/doc/libextutils-xspp-perl/examples/Object-WithIntAndString/Object-WithIntAndString.xsp %name{RG::Blast::Parser} class parser_driver { parser_driver( FILE* __istream = stdin, std::string __istream_name = "STDIN" ); ~parser_driver(); rostlab::blast::result parse( bool __trace_parsing=false, bool __trace_scanning=false ) %code{% try { RETVAL = THIS->parse(__trace_parsing, __trace_scanning); } catch( rostlab::blast::parser_error& e ){ croak("parser error", e.what() ); } catch( std::exception& e ){ croak("%s", e.what() ); } catch( ... ){ croak("exception in RG::Blast::Parser"); } %}; %name{get_trace_scanning} bool trace_scanning(); %name{set_trace_scanning} void trace_scanning( bool __b ); rostlab::blast::result result(); }; // vim:et:ts=4:ai: RG-Blast-Parser-0.03/MANIFEST0000644015075101507510000000054711775561377014721 0ustar lkajanlkajanChanges examples/badformat.ali examples/converged.ali examples/twores.ali lib/RG/Blast/Parser.pm Makefile.PL MANIFEST MANIFEST.SKIP Parser.bs Parser.c Parser.o Parser.xs Parser.xsp perlobject.map README t/01RG-Blast-Parserload.t t/02test.t t/RG-Blast-Parser.t typemap typemap.xsp META.yml Module meta-data (added by MakeMaker) RG-Blast-Parser-0.03/typemap0000644015075101507510000001620511734606023015147 0ustar lkajanlkajan# Copyright (C) 2012 by Laszlo Kajan, Technical University of Munich, Germany # # This program is free software; you can redistribute it and/or modify # it under the same terms as Perl itself, either Perl version 5.8.8 or, # at your option, any later version of Perl 5 you may have available. # /usr/share/perl/5.10.1/ExtUtils/typemap TYPEMAP parser_driver* O_OBJECT std::string T_PV rostlab::blast::result T_RO_BLAST_RES OUTPUT T_RO_BLAST_RES { if( $var.empty ) XSRETURN_UNDEF; // PERL_HASH(hash, key, klen) struct phashval { U32 operator()( const char* key, const U32 klen ){ U32 ret; PERL_HASH(ret, key, klen); return ret; } }; static U32 h_bit_score = phashval()( "bit_score", 9 ); static U32 h_desc = phashval()( "desc", 4 ); static U32 h_e_value = phashval()( "e_value", 7 ); static U32 h_gaps = phashval()( "gaps", 4 ); static U32 h_identities = phashval()( "identities", 10 ); static U32 h_match_line = phashval()( "match_line", 10 ); static U32 h_method = phashval()( "method", 6 ); static U32 h_name = phashval()( "name", 4 ); static U32 h_positives = phashval()( "positives", 9 ); static U32 h_q_ali = phashval()( "q_ali", 5 ); static U32 h_q_end = phashval()( "q_end", 5 ); static U32 h_q_frame = phashval()( "q_frame", 7 ); static U32 h_q_start = phashval()( "q_start", 7 ); static U32 h_q_strand = phashval()( "q_strand", 8 ); static U32 h_raw_score = phashval()( "raw_score", 9 ); static U32 h_s_ali = phashval()( "s_ali", 5 ); static U32 h_s_end = phashval()( "s_end", 5 ); static U32 h_s_frame = phashval()( "s_frame", 7 ); static U32 h_s_start = phashval()( "s_start", 7 ); static U32 h_s_strand = phashval()( "s_strand", 8 ); static U32 h_ECompoAdjustModes[rostlab::blast::hsp::eNumCompoAdjustModes] = { phashval()( "", 0), phashval()( "Composition-based stats", 23), phashval()( "Compositional matrix adjust", 27), phashval()( "", 0) }; AV* references = (AV *)sv_2mortal((SV *)newAV()); AV* rounds = (AV *)sv_2mortal((SV *)newAV()); AV* onelines = (AV *)sv_2mortal((SV *)newAV()); AV* hits = (AV *)sv_2mortal((SV *)newAV()); for( std::vector::const_iterator r_i = $var.references.begin(), r_end = $var.references.end(); r_i != r_end; ++r_i ) av_push(references, newSVpvn( r_i->c_str(), r_i->size() )); for( std::vector::const_iterator r_i = $var.rounds.begin(), r_end = $var.rounds.end(); r_i != r_end; ++r_i ) { HV* round = (HV *)sv_2mortal((SV *)newHV()); hv_store(round, "oneline_idx", 11, newSVuv( r_i->oneline_idx ), 0); hv_store(round, "oneline_cnt", 11, newSVuv( r_i->oneline_cnt ), 0); hv_store(round, "hit_idx", 7, newSVuv( r_i->hit_idx ), 0); hv_store(round, "hit_cnt", 7, newSVuv( r_i-> hit_cnt ), 0); hv_store(round, "oneline_new_idx", 15, r_i->oneline_new_idx != rostlab::blast::round::noidx ? newSVuv( r_i->oneline_new_idx ) : &PL_sv_undef, 0); hv_store(round, "oneline_new_cnt", 15, newSVuv( r_i->oneline_new_cnt ), 0); av_push(rounds, newRV_inc((SV *)round)); } for( std::vector::const_iterator o_i = $var.onelines.begin(), o_end = $var.onelines.end(); o_i != o_end; ++o_i ) { HV* oneline = (HV *)sv_2mortal((SV *)newHV()); hv_store(oneline, "name", 4, newSVpvn( o_i->name.c_str(), o_i->name.size() ), h_name); hv_store(oneline, "desc", 4, o_i->desc.empty() ? &PL_sv_undef : newSVpvn( o_i->desc.c_str(), o_i->desc.size() ), h_desc); hv_store(oneline, "bit_score", 9, newSVnv( o_i->bit_score ), h_bit_score); hv_store(oneline, "e_value", 7, newSVnv( o_i->e_value ), h_e_value); av_push(onelines, newRV_inc((SV *)oneline)); } for( std::vector::const_iterator h_i = $var.hits.begin(), h_end = $var.hits.end(); h_i != h_end; ++h_i ) { AV* hsps = (AV *)sv_2mortal((SV *)newAV()); for( std::vector::const_iterator hsp_i = h_i->hsps.begin(), hsp_end = h_i->hsps.end(); hsp_i != hsp_end; ++hsp_i ) { std::string method = rostlab::blast::hsp::methodstr( hsp_i->method ); HV* hsp = (HV *)sv_2mortal((SV *)newHV()); hv_store(hsp, "bit_score", 9, newSVnv( hsp_i->bit_score ), h_bit_score); hv_store(hsp, "raw_score", 9, newSVuv( hsp_i->raw_score ), h_raw_score); hv_store(hsp, "e_value", 7, newSVnv( hsp_i->e_value ), h_e_value); hv_store(hsp, "method", 6, newSVpvn_share( method.c_str(), method.size(), 0), h_ECompoAdjustModes[hsp_i->method]); hv_store(hsp, "identities", 10, newSVuv( hsp_i->identities ), h_identities); hv_store(hsp, "positives", 9, newSVuv( hsp_i->positives ), h_positives); hv_store(hsp, "gaps", 4, newSVuv( hsp_i->gaps ), h_gaps); hv_store(hsp, "q_strand", 8, hsp_i->q_strand.empty() ? &PL_sv_undef : newSVpvn_share( hsp_i->q_strand.c_str(), hsp_i->q_strand.length(), 0), h_q_strand); hv_store(hsp, "s_strand", 8, hsp_i->s_strand.empty() ? &PL_sv_undef : newSVpvn_share( hsp_i->s_strand.c_str(), hsp_i->s_strand.length(), 0), h_s_strand); hv_store(hsp, "q_frame", 7, hsp_i->q_frame == 32 ? &PL_sv_undef : newSViv( hsp_i->q_frame ), h_q_frame); hv_store(hsp, "s_frame", 7, hsp_i->s_frame == 32 ? &PL_sv_undef : newSViv( hsp_i->s_frame ), h_s_frame); hv_store(hsp, "q_start", 7, newSVuv( hsp_i->q_start ), h_q_start); hv_store(hsp, "q_ali", 5, newSVpvn( hsp_i->q_ali.c_str(), hsp_i->q_ali.size() ), h_q_ali); hv_store(hsp, "q_end", 5, newSVuv( hsp_i->q_end ), h_q_end); hv_store(hsp, "match_line", 10, newSVpvn( hsp_i->match_line.c_str(), hsp_i->match_line.size() ), h_match_line); hv_store(hsp, "s_start", 7, newSVuv( hsp_i->s_start ), h_s_start); hv_store(hsp, "s_ali", 5, newSVpvn( hsp_i->s_ali.c_str(), hsp_i->s_ali.size() ), h_s_ali); hv_store(hsp, "s_end", 5, newSVuv( hsp_i->s_end ), h_s_end); av_push(hsps, newRV_inc((SV *)hsp)); } HV* hit = (HV *)sv_2mortal((SV *)newHV()); hv_store(hit, "name", 4, newSVpvn( h_i->name.c_str(), h_i->name.size() ), 0); hv_store(hit, "desc", 4, h_i->desc.empty() ? &PL_sv_undef : newSVpvn( h_i->desc.c_str(), h_i->desc.size() ), 0); hv_store(hit, "length", 6, newSVuv( h_i->length ), 0); hv_store(hit, "hsps", 4, newRV_inc((SV *)hsps), 0); av_push(hits, newRV_inc((SV *)hit)); } HV* res = (HV *)sv_2mortal((SV *)newHV()); hv_store(res, "blast_version", 13, newSVpvn( $var.blast_version.c_str(), $var.blast_version.size() ), 0); hv_store(res, "references", 10, newRV_inc((SV *)references), 0); hv_store(res, "rounds", 6, newRV_inc((SV *)rounds), 0); hv_store(res, "q_name", 6, newSVpvn( $var.q_name.c_str(), $var.q_name.size() ), 0); hv_store(res, "q_desc", 6, $var.q_desc.empty() ? &PL_sv_undef : newSVpvn( $var.q_desc.c_str(), $var.q_desc.size() ), 0); hv_store(res, "q_length", 8, newSVuv( $var.q_length ), 0); hv_store(res, "db_name", 7, newSVpvn( $var.db_name.c_str(), $var.db_name.size() ), 0); hv_store(res, "db_nseq", 7, newSVuv( $var.db_nseq ), 0); hv_store(res, "db_nletter", 10, newSVuv( $var.db_nletter ), 0); hv_store(res, "onelines", 8, newRV_inc((SV *)onelines), 0); hv_store(res, "converged", 9, newSViv( $var.converged ), 0); hv_store(res, "hits", 4, newRV_inc((SV *)hits), 0); hv_store(res, "tail", 4, newSVpvn( $var.tail.c_str(), $var.tail.size() ), 0 ); $arg = newRV_inc((SV*)res); } # vim:noet:ts=4:ai: RG-Blast-Parser-0.03/MANIFEST.SKIP0000644015075101507510000000115311734623041015436 0ustar lkajanlkajan #!start included /usr/share/perl/5.10/ExtUtils/MANIFEST.SKIP # Avoid version control files. \bRCS\b \bCVS\b \bSCCS\b ,v$ \B\.svn\b \B\.git\b \B\.gitignore\b \b_darcs\b # Avoid Makemaker generated and utility files. \bMANIFEST\.bak \bMakefile$ \bblib/ \bMakeMaker-\d \bpm_to_blib\.ts$ \bpm_to_blib$ \bblibdirs\.ts$ # 6.18 through 6.25 generated this # Avoid Module::Build generated and utility files. \bBuild$ \b_build/ # Avoid temp and backup files. ~$ \.old$ \#$ \b\.# \.bak$ # Avoid Devel::Cover files. \bcover_db\b #!end included /usr/share/perl/5.10/ExtUtils/MANIFEST.SKIP .swp$ .vim$ debian zergtest RG-Blast-Parser-0.03/lib/0000755015075101507510000000000011775561377014330 5ustar lkajanlkajanRG-Blast-Parser-0.03/lib/RG/0000755015075101507510000000000011775561377014640 5ustar lkajanlkajanRG-Blast-Parser-0.03/lib/RG/Blast/0000755015075101507510000000000011775561377015705 5ustar lkajanlkajanRG-Blast-Parser-0.03/lib/RG/Blast/Parser.pm0000644015075101507510000001366411775561250017477 0ustar lkajanlkajan# Copyright (C) 2012 by Laszlo Kajan, Technical University of Munich, Germany # # This program is free software; you can redistribute it and/or modify # it under the same terms as Perl itself, either Perl version 5.8.8 or, # at your option, any later version of Perl 5 you may have available. package RG::Blast::Parser; use 5.008008; use strict; use warnings; require Exporter; use AutoLoader qw(AUTOLOAD); our @ISA = qw(Exporter); # Items to export into callers namespace by default. Note: do not export # names by default without a very good reason. Use EXPORT_OK instead. # Do not simply export all your public functions/methods/constants. # This allows declaration use RG::Blast::Parser ':all'; # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK # will save memory. our %EXPORT_TAGS = ( 'all' => [ qw( ) ] ); our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); our @EXPORT = qw( ); our $VERSION = '0.03'; require XSLoader; XSLoader::load('RG::Blast::Parser', $VERSION); # Preloaded methods go here. # Autoload methods go after =cut, and are processed by the autosplit program. 1; __END__ # Below is stub documentation for your module. You'd better edit it! =head1 NAME RG::Blast::Parser - fast NCBI BLAST parser =head1 SYNOPSIS use Data::Dumper; use RG::Blast::Parser; my $parser = RG::Blast::Parser->new(); # read from STDIN open( EXAMPLE, '<', '/usr/share/doc/librg-blast-parser-perl/examples/converged.ali' ) || confess($!); my $parser = RG::Blast::Parser->new( \*EXAMPLE, "converged.ali" ); # read from EXAMPLE, use name "converged.ali" in error messages while( my $res = $parser->parse() ) { print Dumper( $res ); } eval { my $res = $parser->parse(); # ... }; if( $@ && $@ =~ /^parser error/ ) { warn("failed to parse blast result - exception caught"); } =head1 DESCRIPTION This package contains perl binding for a very fast C/C++ library for NCBI BLAST -m 0 (default) output parsing. BLAST results are returned in a convenient hash structure. Multiple results may be concatenated for input. One result is parsed and returned at a time. =head1 CONSTRUCTOR =over =item new( [FILEHANDLE, [NAME]] ) Creates an "RG::Blast::Parser". Blast results are read from FILEHANDLE, STDIN by default. The input stream may be named NAME in error messages (default: "STDIN"). =back =head1 METHODS =over =item parse( [TRACE_PARSING, [TRACE_SCANNING]] ) Parse one complete BLAST result and return it. If no results on input stream, returns "undef". In case of parser error it die()s with an (at present not very useful) error message. The following structure is returned in a hash reference: { blast_version => STRING, references => [ STRING, ... ], rounds => [ { oneline_idx => NUM, # index of first one-line description of # this round in "onelines" array oneline_cnt => NUM, # number of one-line descriptions of # this round hit_idx => NUM, # index of first hit of this round in # "hits" array hit_cnt => NUM, # number of hits of this round oneline_new_idx => NUM|undef# index of first new (not-seen-before) # one-line description of this round # in "onelines" array oneline_new_cnt => NUM # number of new one-line descriptions of # this round }, ... ], q_name => STRING, q_desc => STRING|undef, q_length => NUM, db_name => STRING, db_nseq => NUM, db_nletter => NUM, onelines => [ # one-line descriptions from all rounds { name => STRING, desc => STRING|undef, bit_score => NUM, e_value => NUM }, ... ], converged => BOOLEAN, hits => [ # hits from all rounds { name => STRING, desc => STRING|undef, length => NUM, hsps => [ { bit_score => NUM, raw_score => NUM, e_value => NUM, method => STRING, identities => NUM, positives => NUM, gaps => NUM, q_strand => STRING|undef, s_strand => STRING|undef, q_frame => NUM|undef, s_frame => NUM|undef, q_start => NUM, q_ali => STRING, q_end => NUM, match_line => STRING, s_start => NUM, s_ali => STRING, s_end => NUM }, ... ] }, ... ], tail => STRING # bulk text after the last hit / one-line # description } If you want tracing for parsing and scanning, you can enable them using the parameters of this call. =item result() Returns the last BLAST result parsed or "undef" if no last result. =item get_trace_scanning() Returns scan trace state as a Boolean value. =item set_trace_scanning( BOOLEAN ) Set scan trace - debugging aid. =back =head1 SEE ALSO Zerg(3pm), Zerg::Report(3pm) =head1 AUTHOR Laszlo Kajan, Elkajan@rostlab.orgE =head1 COPYRIGHT AND LICENSE Copyright (C) 2012 by Laszlo Kajan This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available. =cut # vim:et:ts=4:ai:textwidth=78: RG-Blast-Parser-0.03/typemap.xsp0000644015075101507510000000073311734606023015757 0ustar lkajanlkajan/* Copyright (C) 2012 by Laszlo Kajan, Technical University of Munich, Germany This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available. */ %typemap{parser_driver*}{simple}; %typemap{FILE*}{simple}; %typemap{std::string}{simple}; %typemap{rostlab::blast::result}{simple}; %typemap{bool}{simple}; // vim:noet: RG-Blast-Parser-0.03/perlobject.map0000644015075101507510000000507711734365077016415 0ustar lkajanlkajan# "perlobject.map" Dean Roehrich, version 19960302 # # TYPEMAPs # # HV * -> unblessed Perl HV object. # AV * -> unblessed Perl AV object. # # INPUT/OUTPUT maps # # O_* -> opaque blessed objects # T_* -> opaque blessed or unblessed objects # # O_OBJECT -> link an opaque C or C++ object to a blessed Perl object. # T_OBJECT -> link an opaque C or C++ object to an unblessed Perl object. # O_HvRV -> a blessed Perl HV object. # T_HvRV -> an unblessed Perl HV object. # O_AvRV -> a blessed Perl AV object. # T_AvRV -> an unblessed Perl AV object. TYPEMAP HV * T_HvRV AV * T_AvRV ###################################################################### OUTPUT # The Perl object is blessed into 'CLASS', which should be a # char* having the name of the package for the blessing. O_OBJECT sv_setref_pv( $arg, CLASS, (void*)$var ); T_OBJECT sv_setref_pv( $arg, Nullch, (void*)$var ); # Cannot use sv_setref_pv() because that will destroy # the HV-ness of the object. Remember that newRV() will increment # the refcount. O_HvRV $arg = sv_bless( newRV((SV*)$var), gv_stashpv(CLASS,1) ); T_HvRV $arg = newRV((SV*)$var); # Cannot use sv_setref_pv() because that will destroy # the AV-ness of the object. Remember that newRV() will increment # the refcount. O_AvRV $arg = sv_bless( newRV((SV*)$var), gv_stashpv(CLASS,1) ); T_AvRV $arg = newRV((SV*)$var); ###################################################################### INPUT O_OBJECT if( sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVMG) ) $var = ($type)SvIV((SV*)SvRV( $arg )); else{ warn( \"${Package}::$func_name() -- $var is not a blessed SV reference\" ); XSRETURN_UNDEF; } T_OBJECT if( SvROK($arg) ) $var = ($type)SvIV((SV*)SvRV( $arg )); else{ warn( \"${Package}::$func_name() -- $var is not an SV reference\" ); XSRETURN_UNDEF; } O_HvRV if( sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVHV) ) $var = (HV*)SvRV( $arg ); else { warn( \"${Package}::$func_name() -- $var is not a blessed HV reference\" ); XSRETURN_UNDEF; } T_HvRV if( SvROK($arg) && (SvTYPE(SvRV($arg)) == SVt_PVHV) ) $var = (HV*)SvRV( $arg ); else { warn( \"${Package}::$func_name() -- $var is not an HV reference\" ); XSRETURN_UNDEF; } O_AvRV if( sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVAV) ) $var = (AV*)SvRV( $arg ); else { warn( \"${Package}::$func_name() -- $var is not a blessed AV reference\" ); XSRETURN_UNDEF; } T_AvRV if( SvROK($arg) && (SvTYPE(SvRV($arg)) == SVt_PVAV) ) $var = (AV*)SvRV( $arg ); else { warn( \"${Package}::$func_name() -- $var is not an AV reference\" ); XSRETURN_UNDEF; } RG-Blast-Parser-0.03/Makefile.PL0000755015075101507510000000236011735040113015510 0ustar lkajanlkajan#!/usr/bin/perl use 5.008008; use ExtUtils::MakeMaker; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. # /usr/share/doc/libextutils-xspp-perl/examples/Object-WithIntAndString/Makefile.PL my $CC = 'g++'; WriteMakefile( NAME => 'RG::Blast::Parser', VERSION_FROM => 'lib/RG/Blast/Parser.pm', # finds $VERSION PREREQ_PM => { 'ExtUtils::XSpp' => '0.01', }, # e.g., Module::Name => 1.1 ($] >= 5.005 ? ## Add these new keywords supported since 5.005 (ABSTRACT_FROM => 'lib/RG/Blast/Parser.pm', # retrieve abstract from module AUTHOR => 'Laszlo Kajan ') : ()), LIBS => ['-lrostlab-blast'], # e.g., '-lm' DEFINE => '', # e.g., '-DHAVE_SOMETHING' # Insert -I. if you add *.h files later: INC => '-I.', # e.g., '-I/usr/include/other' # Un-comment this if you add C files to link with later: OBJECT => '$(O_FILES)', # link all the C files too XSOPT => '-C++ -hiertype -noprototypes', TYPEMAPS => ['perlobject.map'], CC => $CC, LD => '$(CC)', ); # vim:et:ts=4:ai: RG-Blast-Parser-0.03/README0000644015075101507510000000135111735040113014412 0ustar lkajanlkajanRG-Blast-Parser version 0.01 ============================ This package contains perl binding for a very fast C/C++ library for NCBI BLAST -m 0 (default) output parsing. BLAST results are returned in a convenient hash structure. INSTALLATION To install this module type the following: perl Makefile.PL make make test make install DEPENDENCIES This module requires these other modules and libraries: librostlab-blast COPYRIGHT AND LICENCE Copyright (C) 2012 by Laszlo Kajan, Technical University of Munich, Germany This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available. RG-Blast-Parser-0.03/META.yml0000644015075101507510000000105311775561377015032 0ustar lkajanlkajan--- #YAML:1.0 name: RG-Blast-Parser version: 0.03 abstract: fast NCBI BLAST parser author: - Laszlo Kajan license: unknown distribution_type: module configure_requires: ExtUtils::MakeMaker: 0 build_requires: ExtUtils::MakeMaker: 0 requires: ExtUtils::XSpp: 0.01 no_index: directory: - t - inc generated_by: ExtUtils::MakeMaker version 6.55_02 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4