cutadapt-1.9.1/0000775000175000017500000000000012627541606014072 5ustar marcelmarcel00000000000000cutadapt-1.9.1/tests/0000775000175000017500000000000012627541606015234 5ustar marcelmarcel00000000000000cutadapt-1.9.1/tests/cut/0000775000175000017500000000000012627541606016027 5ustar marcelmarcel00000000000000cutadapt-1.9.1/tests/cut/no_indels.fasta0000664000175000017500000000040412600000013020764 0ustar marcelmarcel00000000000000>3p_orig TGAACATAGC >3p_mism TGAACATAGC >3p_del TGAACATAGCTTAACATATAACCG >3p_ins TGAACATAGCTTAGGACATATAACCG >3p_frontins TAGACATATAACCG >5p_orig TACTGCTTCTCGAA >5p_mism TACTGCTTCTCGAA >5p_del TCCTCGAGATGCCATACTGCTTCTCGAA >5p_ins TCCTCGAGATATGCCATACTGCTTCTCGAA cutadapt-1.9.1/tests/cut/wildcard_adapter_anywhere.fa0000664000175000017500000000006412575761274023541 0ustar marcelmarcel00000000000000>1 TGCATGCA >2 TGCATGCA >3b TGGCTGGCC >4b TGGCTGGCC cutadapt-1.9.1/tests/cut/maxn1.fasta0000664000175000017500000000003612575761274020101 0ustar marcelmarcel00000000000000>r1 >r2 N >r3 AAAA >r4 AAAAN cutadapt-1.9.1/tests/cut/twoadapters.second.fasta0000664000175000017500000000007512575761274022667 0ustar marcelmarcel00000000000000>read2 CTCGAGAATTCTGGATCCTCTCTTCTGCTACCTTTGGGATTTGCTTGCTCTTG cutadapt-1.9.1/tests/cut/anchored_no_indels_wildcard.fasta0000664000175000017500000000030212575761274024537 0ustar marcelmarcel00000000000000>no_mismatch (adapter: TTAGACATAT) GAGGTCAG >one_mismatch GAGGTCAG >two_mismatches TAAGACGTATGAGGTCAG >insertion ATTAGACATATGAGGTCAG >deletion TAGACATATGAGGTCAG >mismatch_plus_wildcard GAGGTCAG cutadapt-1.9.1/tests/cut/solidmaq.fastq0000664000175000017500000000461712575761274020717 0ustar marcelmarcel00000000000000@552:1_13_85/1 CAAGATAANACCTACAGCAAAGCCACAGTTAAGC + &9<&77)&!<7))%4'657-1+9;9,.<8);.;8 @552:1_13_573/1 CGTCCGAANTAGCTACCACCCTG + )3%)&&&&!.1&(6:<'67..*, @552:1_13_1259/1 AGCCGCTANGACGGGTTGGCC + ;<:&:A;A!9<<<,7:<=3=; @552:1_13_1440/1 CAAGATCTNCCCTGCCACATTGCCCTAGTTAAAC + <=A:A=57!7<';<6?5;;6:+:=)71>70<,=: @552:1_14_177/1 CTTAGGGAGAGTTTGCCGCTGTTAGACTTATTCC + 8957;;54)'98924905;;)6:7;1:3<88(9: @552:1_14_238/1 CTTCATCGAATCAAGGCGGGT + ><5=;<<<12>=<;1;;=5); @552:1_15_1098/1 GTTTATTGGGGTTAGAGGTATGTCGGTGGGATTG + ,##(#5##*#($$'#.##)$&#%)$1##-$&##% @552:1_16_404/1 TTCATGAAAGCTAGAGTTCCCG + 8;:;;><>9=9;<<2=><<1;5 @552:1_16_904/1 CGTACAGTTCAGGTCGGTGCTGAGCCGGCCCGCG + >=::6;;99=+/'$+#.#&%$&'(($1*$($.#. @552:1_16_1315/1 TGTCGTCCCGGCATTTACATCAT + 9<8A?>?::;6&,%;6/)8<<#/ @552:1_16_1595/1 GTGTGCCTCGCCCGTAAGGGCAACCGCTTAGACG + ,<=<>@6<;?<=>:/=.>&;;8;)17:=&,>1=+ @552:1_17_1379/1 GACCGCGCCCGGTGTAGTGCTGTCCTGCGAACGT + -1179<1;>>8:':7-%/::0&+=<29,7<8(,2 @552:1_18_1692/1 GTGGGTTATCCAAGCCGTTTGTTAACCGGAAGCA + #(###5%)%2)',2&:+#+&5,($/1#&4&))$6 @552:1_19_171/1 ACACCACGGAGCTGACCCCACCTGAGACGTAATG + 6:65/=3*:(8%)%2>&8&%;%0&#;$3$&:$#& @552:1_22_72/1 TTATATGTGTGGCGCGTACTGGGTTTGAGCAGTT + /#678<:.=9::6:(<538295;9+;&*;)+',& @552:1_22_1377/1 GGGCTTTTCCGGGTCGGACCTGTCGAGGTGGTAA + ##0%.$.1*%,)95+%%14%$#8-###9-()#9+ @552:1_23_585/1 AACATCATCACTATCGCGGC + 55;8><96/18?)<3<58<5 @552:1_23_809/1 TCTACACCACAGCGCCACTGGATAGGGTTAGCCG + 7<59@;<<5;/9;=<;7::.)&&&827(+221%( @552:1_24_138/1 TGCCCTACAACGATGTAAG + )68/;906#,25/&;<$0+ @552:1_24_206/1 TTTATTGAAGGGTAAGAGATATTTCTGCGGCAAA + )4(&)9592)#)694(,)292:(=7$.18,()65 @552:1_25_143/1 TGAGAATATCGAAGGATACTATTAGACGGATCTG + 4;/#&<9;&*;95-7;85&;587#16>%&,9<2& @552:1_25_1866/1 TGACTGCAGGCTCCACCCGACGTTAGGCCTATCC + <>9;<@7?(=6,<&?=6=(=<641:?'<1=;':4 @552:1_27_584/1 AACATTACCACATGCTCCGTGTTATACGCATCAC + 2'('*.-8+%#2)(-&3.,.2,),+.':&,'(&/ @552:1_27_1227/1 GAATAGGCGTAACAATGACAAGATCTATTAGACC + 92:;>A:<;34<<=);:<<;9=7<3::<::3=>' @552:1_27_1350/1 TCTACACCACAGCGCCACTGGAGGGGGCTACGTC + 5,)<(4./;<938=64=+2/,.4),3':97#33& @552:1_29_477/1 TCTACACCACAGCGCCACTTAATAGGGTAATATA + 4=55:75=+:/7><968;;#&+$#3&6,#1#4#' @552:1_30_882/1 ACAGATTAAAGTT + (+-:-3<;5##/; @552:1_31_221/1 TTACTCCGACCAAATATAACAAGTTGGACAGATC + 9>9>5<139/,&:7969972.274&%:78&&746 @552:1_31_1313/1 CTTCCTCTAATTACGGTGCAAACACAC + 3<7=7::)5*4=&;<7>4;795065;9 @552:1_529_129/1 TGGGGTACAGATGGCAGCACTGGGGCTGGTAGNTTAGNTNTNNGGCNNT + >%/((B6-&5A0:6)>;'1)B*38/?(5=%B+!&<-9!%!@!!)%)!!( cutadapt-1.9.1/tests/cut/minlen.noprimer.fa0000664000175000017500000000024412575761274021462 0ustar marcelmarcel00000000000000>read_length6 23302 >read_length7 023302 >read_length8 1023302 >read_length9 11023302 >read_length10 111023302 >read_length11 2111023302 >read_length12 02111023302 cutadapt-1.9.1/tests/cut/rest.fa0000664000175000017500000000020712575761274017322 0ustar marcelmarcel00000000000000>read1 TESTING >read2 TESTING >read3 TESTING >read4 TESTING >read5 TESTING >read6 SOMETHING >read7 SOMETHING >read8 REST >read9 NOREST cutadapt-1.9.1/tests/cut/maxn0.fasta0000664000175000017500000000001612575761274020076 0ustar marcelmarcel00000000000000>r1 >r3 AAAA cutadapt-1.9.1/tests/cut/pairedu.1.fastq0000664000175000017500000000041012575761274020661 0ustar marcelmarcel00000000000000@read1/1 some text TTTGTCTCCAGCTTAGACATATCGCC + HHHHHHHHHHHHHHHHHHHHHHHHHH @read2/1 CAGGCCACATTAGACATATCGGATGG + HHHHHHHHHHHHHHHHHHHHHHHHHH @read3/1 ACTTGATATTAATAACATTAGAC + HHHHHHHHHHHHHHHHHHHHHHH @read4/1 AGGCCGTTTGAATGTTGACGGGATGT + HHHHHHHHHHHHHHHHHHHHHHHHHH cutadapt-1.9.1/tests/cut/maxlen.fa0000664000175000017500000000020112575761274017623 0ustar marcelmarcel00000000000000>read_length0a T >read_length0b T >read_length1 T2 >read_length2 T02 >read_length3 T302 >read_length4 T3302 >read_length5 T23302 cutadapt-1.9.1/tests/cut/solid-no-zerocap.fastq0000664000175000017500000000461712575761274022273 0ustar marcelmarcel00000000000000@1_13_85_F3 T110020300.0113010210002110102330021 + 7&9<&77)& <7))%4'657-1+9;9,.<8);.;8 @1_13_573_F3 T312311200.30213011011132 + 6)3%)&&&& .1&(6:<'67..*, @1_13_1259_F3 T002112130.201222332211 + =;<:&:A;A 9<<<,7:<=3=; @1_13_1440_F3 T110020313.1113211010332111302330001 + =<=A:A=57 7<';<6?5;;6:+:=)71>70<,=: @1_14_177_F3 T31330222020233321121323302013303311 + :8957;;54)'98924905;;)6:7;1:3<88(9: @1_14_238_F3 T0133103120031002212223 + ?><5=;<<<12>=<;1;;=5); @1_15_1098_F3 T32333033222233020223032312232220332 + #,##(#5##*#($$'#.##)$&#%)$1##-$&##% @1_16_404_F3 T03310320002130202331112 + 78;:;;><>9=9;<<2=><<1;5 @1_16_904_F3 T21230102331022312232132021122111212 + 9>=::6;;99=+/'$+#.#&%$&'(($1*$($.#. @1_16_1315_F3 T032312311122103330103103 + <9<8A?>?::;6&,%;6/)8<<#/ @1_16_1595_F3 T22323211312111230022210011213302012 + >,<=<>@6<;?<=>:/=.>&;;8;)17:=&,>1=+ @1_17_1379_F3 T32011212111223230232132311321200123 + /-1179<1;>>8:':7-%/::0&+=<29,7<8(,2 @1_18_1692_F3 T12322233031100211233323300112200210 + .#(###5%)%2)',2&:+#+&5,($/1#&4&))$6 @1_19_171_F3 T10101101220213201111011320201230032 + )6:65/=3*:(8%)%2>&8&%;%0&#;$3$&:$#& @1_22_72_F3 T13303032323221212301322233320210233 + 3/#678<:.=9::6:(<538295;9+;&*;)+',& @1_22_1377_F3 T22221333311222312201132312022322300 + )##0%.$.1*%,)95+%%14%$#8-###9-()#9+ @1_23_585_F3 T300103103101303121221 + >55;8><96/18?)<3<58<5 @1_23_809_F3 T13130101101021211013220302223302112 + :7<59@;<<5;/9;=<;7::.)&&&827(+221%( @1_24_138_F3 T33211130100120323002 + 6)68/;906#,25/&;<$0+ @1_24_206_F3 T33330332002223002020303331321221000 + ))4(&)9592)#)694(,)292:(=7$.18,()65 @1_25_143_F3 T23202003031200220301303302012203132 + :4;/#&<9;&*;95-7;85&;587#16>%&,9<2& @1_25_1866_F3 T03201321022131101112012330221130311 + =<>9;<@7?(=6,<&?=6=(=<641:?'<1=;':4 @1_27_584_F3 T10010330110103213112323303012103101 + 82'('*.-8+%#2)(-&3.,.2,),+.':&,'(&/ @1_27_1227_F3 T02003022123001003201002031303302011 + 492:;>A:<;34<<=);:<<;9=7<3::<::3=>' @1_27_1350_F3 T13130101101021211013220222221301231 + 95,)<(4./;<938=64=+2/,.4),3':97#33& @1_29_477_F3 T13130101101021211013300302223003030 + 94=55:75=+:/7><968;;#&+$#3&6,#1#4#' @1_30_882_F3 T20102033000233 + 2(+-:-3<;5##/; @1_31_221_F3 T03301311201100030300100233220102031 + 89>9>5<139/,&:7969972.274&%:78&&746 @1_31_1313_F3 T0133113130033012232100010101 + ;3<7=7::)5*4=&;<7>4;795065;9 @1_529_129_F3 T132222301020322102101322221322302.3302.3.3..221..3 + >>%/((B6-&5A0:6)>;'1)B*38/?(5=%B+ &<-9 % @ )%) ( cutadapt-1.9.1/tests/cut/illumina5.info.txt0000664000175000017500000000347012600000013021372 0ustar marcelmarcel00000000000000SEQ:1:1101:9010:3891#0/1 adapter start: 51 0 64 81 ATAACCGGAGTAGTTGAAATGGTAATAAGACGACCAATCTGACCAGCAAGGGCCTAACTTCTTA GACTGCCTTAAGGACGT AAGCCAAGATGGGAAAGGTC adapt2 FFFFFEDBE@79@@>@CBCBFDBDFDDDDD<@C>ADD@B;5:978@CBDDFFDB4B?DB21;84 ?DDBC9DEBAB;=@<@@ B@@@@B>CCBBDE98>>0@7 SEQ:1:1101:9010:3891#0/1 adapter start: 51 1 51 64 ATAACCGGAGTAGTTGAAATGGTAATAAGACGACCAATCTGACCAGCAAGG GCCTAACTTCTTA adapt FFFFFEDBE@79@@>@CBCBFDBDFDDDDD<@C>ADD@B;5:978@CBDDF FDB4B?DB21;84 SEQ:1:1101:9240:3898#0/1 -1 CCAGCAAGGAAGCCAAGATGGGAAAGGTCATGCGGCATACGCTCGGCGCCAGTTTGAATATTAGACATAATTTATCCTCAAGTAAGGGGCCGAAGCCCCTG GHGHGHHHHGGGDHHGDCGFEEFHHGDFGEHHGFHHHHHGHEAFDHHGFHHEEFHGHFHHFHGEHFBHHFHHHH@GGGDGDFEEFC@=D?GBGFGF:FB6D SEQ:1:1101:9207:3899#0/1 adapter start: 64 0 77 94 TTAACTTCTCAGTAACAGATACAAACTCATCACGAACGTCAGAAGCAGCCTTATGGCCGTCAACGCCTAACTTCTTA GACTGCCTTAAGGACGT ATACATA adapt2 HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHFHHHHHHCFHHFHHFHFFFFFBHHG HHHFFHHFHGGHHDEBF Gread1 CAGTCGGTCCTGAGAGATGGGCGAGCGCTGG cutadapt-1.9.1/tests/cut/solid5p-anchored.fasta0000664000175000017500000000116212575761274022216 0ustar marcelmarcel00000000000000>read1 212322332333012001112122203233202221000211 >read2 01212322332333200121311212133113001311002032 >read3 2201212322332333211133003002232323010012320300 >read4 02010102312033021011121312131 >read5 21313210102120020302022233110 >read6 31203203013323021010020301321 >read7 1301020302201212322332333203020130202120211322010013211 >read8 310321030130120302201212322332333232202123123111113113003200330 >read9 002132103320302201212322332333020123133023120320131020333011 >read10 0322031320033220302201212322332333201130233321321011303133231200 >read11 02010102312033021011121312131 >read12 1 >read13 >read14 >read15 >read16 cutadapt-1.9.1/tests/cut/paired-trimmed.2.fastq0000664000175000017500000000033412575761274022141 0ustar marcelmarcel00000000000000@read1/2 other text GCTGGAGACAAATAACAGTGGAGTAGTTTT + HHHHHHHHHHHHHHHHHHHHHHHHHHHHHH @read2/2 TGTGGCCTGTTGCAGTGGAGTAACTCCAGC + ###HHHHHHHHHHHHHHHHHHHHHHHHHHH @read3/2 TGTTATTAATATCAAGTTGGCAGTG + #HHHHHHHHHHHHHHHHHHHHHHHH cutadapt-1.9.1/tests/cut/paired-too-short.1.fastq0000664000175000017500000000004512627537126022427 0ustar marcelmarcel00000000000000@read2/1 CAACAGGCCACA + HHHHHHHHHHHH cutadapt-1.9.1/tests/cut/s_1_sequence.txt0000664000175000017500000000011512575761274021146 0ustar marcelmarcel00000000000000@first_sequence SEQUENCE1 + :6;;8<=:< @second_sequence SEQUENCE2 + 83read1 T1212322332333012001112122203233202221000211 >read2 T201212322332333200121311212133113001311002032 >read3 T02201212322332333211133003002232323010012320300 >read4 T302010102312033021011121312131 >read5 T121313210102120020302022233110 >read6 T331203203013323021010020301321 >read7 T21301020302201212322332333203020130202120211322010013211 >read8 T2310321030130120302201212322332333232202123123111113113003200330 >read9 T0002132103320302201212322332333020123133023120320131020333011 >read10 T00322031320033220302201212322332333201130233321321011303133231200 >read11 T402010102312033021011121312131 >read12 T11 >read13 T1 >read14 T >read15 T >read16 T cutadapt-1.9.1/tests/cut/lowercase.fastq0000664000175000017500000000034712575761274021066 0ustar marcelmarcel00000000000000@prefix:1_13_573/1 CGTCCGAANTAGCTACCACCCTGA + )3%)&&&&!.1&(6:<'67..*,: @prefix:1_13_1259/1 AGCCGCTANGACGGGTTGGCCC + ;<:&:A;A!9<<<,7:<=3=;: @prefix:1_13_1440/1 CAAGATCTNCCCTGCCACATTGCCCTAGTTAAAC + <=A:A=57!7<';<6?5;;6:+:=)71>70<,=: cutadapt-1.9.1/tests/cut/solid5p-anchored.fastq0000664000175000017500000000221512575761274022236 0ustar marcelmarcel00000000000000@read1 212322332333012001112122203233202221000211 + 58)2";%4A,8>0;9C\'?276>#)49"<,>?/\'!A4$.%+ @read2 01212322332333200121311212133113001311002032 + 4<@;(<3.37/''=:-9AA<&C2%$$;?A&5!C69:?-;&;65. @read3 2201212322332333211133003002232323010012320300 + !#97*B.0A-@(*","B3><4&16(: @read4 02010102312033021011121312131 + &-81+%)7;<)6?83!&CB9"9B6307=& @read5 21313210102120020302022233110 + 9)27,(-*=,#4:;"/4++5<,@-784*' @read6 31203203013323021010020301321 + !.;:C%97@>75-";';*)A67CCC")$* @read7 1301020302201212322332333203020130202120211322010013211 + ;0B@A"98!<=!*;5;650;';79!+8,4(2=+98:B@C@:+3*>2+6+2++C0. @read8 310321030130120302201212322332333232202123123111113113003200330 + /$-"=6+1.8?AB!?'#.585@6:47@?>.315A-'9<%">6,+)*,)1-;:(691>?C)4A; @read9 002132103320302201212322332333020123133023120320131020333011 + &?527&:=;6@6@03%95(-0#$:B8::B*4?@&)6>79C>)6C'5-#0:A8+2* @read10 0322031320033220302201212322332333201130233321321011303133231200 + 53)>2.+9?7%=&21;8!820961%3#0'5C.28347,2(55*1.,>%:(1A'A5=@7&&5?4' @read11 02010102312033021011121312131 + 8B"195'@,@&:5=7;!&-9:%((> @read12 1 + C @read13 + @read14 + @read15 + @read16 + cutadapt-1.9.1/tests/cut/wildcardN.fa0000664000175000017500000000005212575761274020252 0ustar marcelmarcel00000000000000>perfect TTT >withN TTT >1mism TTTGGGGCGG cutadapt-1.9.1/tests/cut/paired-untrimmed.1.fastq0000664000175000017500000000011112575761274022474 0ustar marcelmarcel00000000000000@read4/1 GACAGGCCGTTTGAATGTTGACGGGATGTT + HHHHHHHHHHHHHHHHHHHHHHHHHHHHHH cutadapt-1.9.1/tests/cut/solid5p.fasta0000664000175000017500000000070712575761274020441 0ustar marcelmarcel00000000000000>read1 12001112122203233202221000211 >read2 00121311212133113001311002032 >read3 11133003002232323010012320300 >read4 02010102312033021011121312131 >read5 21313210102120020302022233110 >read6 31203203013323021010020301321 >read7 03020130202120211322010013211 >read8 32202123123111113113003200330 >read9 20123133023120320131020333011 >read10 01130233321321011303133231200 >read11 02010102312033021011121312131 >read12 1 >read13 >read14 >read15 >read16 cutadapt-1.9.1/tests/cut/overlapa.fa0000664000175000017500000000075712575761274020170 0ustar marcelmarcel00000000000000>read1 T0021110233021 >read2 T0021110233021 >read3 T0021110233021 >read4 T0021110233021 >read5 T0021110233021 >read6 T0021110233021 >read7 T0021110233021 >read8 T0021110233021 >read9 T0021110233021 >read10 T0021110233021330201030 >read11 T002111023302133020103 >read12 T00211102330213302010 >read13 T0021110233021330201 >read14 T002111023302133020 >read15 T00211102330213302 >read16 T0021110233021330 >read17 T002111023302133 >read18 T00211102330213 >read19 T0021110233021 >read20 T002111023302 cutadapt-1.9.1/tests/cut/illumina.fastq0000664000175000017500000004256412575761274020723 0ustar marcelmarcel00000000000000@SEQ:1:1101:9010:3891#0/1 adapter start: 51 ATAACCGGAGTAGTTGAAATGGTAATAAGACGACCAATCTGACCAGCAAGG + FFFFFEDBE@79@@>@CBCBFDBDFDDDDD<@C>ADD@B;5:978@CBDDF @SEQ:1:1101:9240:3898#0/1 CCAGCAAGGAAGCCAAGATGGGAAAGGTCATGCGGCATACGCTCGGCGCCAGTTTGAATATTAGACATAATTTATCCTCAAGTAAGGGGCCGAAGCCCCTG + GHGHGHHHHGGGDHHGDCGFEEFHHGDFGEHHGFHHHHHGHEAFDHHGFHHEEFHGHFHHFHGEHFBHHFHHHH@GGGDGDFEEFC@=D?GBGFGF:FB6D @SEQ:1:1101:9207:3899#0/1 adapter start: 64 TTAACTTCTCAGTAACAGATACAAACTCATCACGAACGTCAGAAGCAGCCTTATGGCCGTCAAC + HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHFHHHHHHCFHHF @SEQ:1:1101:9148:3908#0/1 adapter start: 28 ACGACGCAATGGAGAAAGACGGAGAGCG + HHHHHHHHHHHHGHHHHGHHHHHHHHHH @SEQ:1:1101:9044:3916#0/1 adapter start: 78 AACAGAAGGAGTCTACTGCTCGCGTTGCGTCTATTATGGAAAACACCAATCTTTCCAAGCAACAGCAGGTTTCCGAGA + HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHGHHHHGHHHHHHHHHHHHFHEBFHFFEFHE @SEQ:1:1101:9235:3923#0/1 TTGATGCGGTTATCCATCTGCTTATGGAAGCCAAGCATTGGGGATTGAGAAAGAGTAGAAATGCCACAAGCCTCAATAGCAGGTTTAAGAGCCTCGATACG + HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHFHBHHFHFHHHHHFHHCHHFFHHHHEHHFDHCEEHHHFHHFHFEHHHHHHHHHEHHGFHHCDCEEEFDFFHHHCFFEFE?EBFEB?3 @SEQ:1:1101:9185:3939#0/1 CGTTGAGGCTTGCGTTTATGGTACGCTGGACTTTGTAGGATACCCTCGCTTTCCTGCTCCTGTTGAGTTTATTGCTGCCGTCATTGCTTATTATGTTCATC + HHHHHHHHHHHHHHFHHEHHHDHHFGHHHCHHHHHDHHHHFECEGBD@@?A?DAFF9F<@@08?< @SEQ:1:1101:9140:3961#0/1 adapter start: 66 CAGGAGAAACATACGAAGGCGCATAACGATACCACTGACCCTCAGCAATCTTAAACTTCTTAGACG + HHHHHHHGHHHHHHHHHHHGHHHHHHHHHHHHHHHHFHHHHHHFGHHHHHHHHHHHHHHHHDHHFH @SEQ:1:1101:9073:3961#0/1 adapter start: 49 GTGGCAAGTCTGCCGCTGATAAAGGAAAGGATACTCGTGATTATCTTGC + HHHHHHHHFHHHHHHGHHHHHHHHHEHHGHHGHHHHHHHHHHGEHHHHH @SEQ:1:1101:9196:3971#0/1 adapter start: 18 ACCAGAAGGCGGTTCCTG + HHHHHHHHHFHHHHHHHH @SEQ:1:1101:9053:3973#0/1 TTCACGTTCTGGTTGGTTGTGGCCTGTTGATGCTAAAGGTGAGCCGCTTAAAGCTACCAGGTTTATTGCTGTTTGTTTCTATGTGGCTTAAAACGTTACCA + A39>A################################################################################################ @SEQ:1:1101:9120:3979#0/1 GGCGTTGACAGATGTATCCATCTGAATGCAATGAAGAAAACCACCATTACCAGCATTAACCGTCAAACTATCAAAATATAACGTTGACGATGTAGCTTTAG + HHHHHHHHHHHGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHFFGFFDHBHHHFGEHHHFGHHHEHHHGH @SEQ:1:1101:9045:3988#0/1 adapter start: 91 TAACCCTGAAACAAATGCTTAGGGATTTTATTGGTATCAGGGTTAATCGTGCCAAGAAAAGCGGCATGGTCAATATAACCAGCAGTGTTAA + HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHFHHHHHHHFHHHHHHHHHHHFHHHHHHDHHHHHHHFHFFHHGHEHHGHHHGHGHHFH @SEQ:1:1101:9418:3756#0/1 TAATCGTGCCAAGAAAAGCGGCATGGTCAATATAACCAGTAGTGTTAACAGTCGGGAGAGGAGTGGCATTAACACCATCCTTCATGAACTTAATCCACTGT + HHHHHHHHHHHHHHHHFHHHGHEHHHFHHHHFFEHHFHHHHGHHFHFHHHGHHHDHFHCHFCFBCFEFDEHHHHHG@GGGGHHGHFFEG=AB@C:EDEEEH @SEQ:1:1101:9394:3759#0/1 CCCTCGCTTTCCTGCTCCTGTTGAGGTTATTGCTGCCGTCATTGCTTATTATGTTCATCTCGGCAACATTCATACGGTCTGGCTTATCCGTGCAGAGACTG + ##################################################################################################### @SEQ:1:1101:9365:3766#0/1 AAGCACATCACCTTGAATGCCACCGGAGGCGGCTTTTTGACCGCCTCCAAACAATTTAGACATGGCGCCACCAGCAAGAGCAGAAGCAATACCGCCAGCAA + HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHFFHHHHFHHHHEHHFGHHHHFEHHHHFEHHFDFFAFHEFHFHDFFFFHHDH?DFABFDHADFDHHHFBF @SEQ:1:1101:9436:3776#0/1 GAAGGACGTCAATAGTCACACAGTCCTTGACGGTATAATAACCACCATCATGGCGACCATCCAAAGGATAAACATCATAGGCAGTCGGGAGGGGAGTCGGA + HHHHHHHHHHHHGHHHHHHHHHHHHHHHHHHHHFHGHHHHHHHGHHHHHHFDHHHHHHHHHHHHHFH?HHHHHFBHEH@GHHGD=EEEE88==%893A@@; @SEQ:1:1101:9354:3801#0/1 CCAGCAAGAGCAGAAGCAATACCGCCAGCAATAGCACCAAACATAAATCACCTCACTTAAGTGGCTGGAGACAAATAATCTCTTTAATAACCTGATTCAGC + HHHHHHHHHGHHGHHEGHHEHFGFEHHGHGGHHHHHHHFHGHHFHHEFFFHEHHFHHHDHE5EDFCAC+C)4&27DDA?7HFHDHEFGFG,<@7>?>??::@<5DDDDDCDCBEDCDDDDBDDDBAA1 @SEQ:1:1101:9286:3846#0/1 TGATTAAACTCCTAAGCAGAAAACCTACCGCGCTTCGCTTGGTCAACCCCTCAGCGGCAAAAATTAAAATTTTTACCGCTTCGGCGTTATAACCTCACACT + HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHFHFHHDGCEGGHHHHFHHFHEHHFHEGHGHGF @SEQ:1:1101:9403:3867#0/1 adapter start: 1 G + H @SEQ:1:1101:9341:3873#0/1 adapter start: 88 CCTAAGCAGAAAACCTACCGCGCTTCGCTTGGTCAACCCCTCAGCGGCAAAAATTAAAATTTTTACCGCTTCGGCGTTATAACCTCAC + HHHHHHHGGFHGHHHHHGHHHHFGHGHHHHEHHHFHFHFHFHH?CEEEDFCEFCDFFHFEABEDF.ECDCDFEEEEEGGFADACDHHH @SEQ:1:1101:9381:3881#0/1 adapter start: 41 ACGTTCTGGTTGGTTGTGGCCTGTTGATGCTAAAGGTGAGC + HHHHHHHHHHHHGHGHDHHHHHHHHFEHHHGGGGFFBGFFF @SEQ:1:1101:9360:3884#0/1 TAATACCTTTCTTTTTGGGGTAATTATACTCATCGCGAATATCCTTAAGAGGGCGTTCAGCAGCCAGCTTGCGGCAAAACTGCGTAACCGTCTTCTCGTTC + HGDEHGHDGHFGFGHFDFFF7EEEEGGFGGEGHEGHHHHFFFEHHHFHEHFBFFF>?DEEBF=?CDB:DFBGFBBGDFFHF?FAFGGABFGGFAFE6EDDC @SEQ:1:1101:9323:3894#0/1 adapter start: 100 ATACCGATATTGCTGGCGACCCTGTTTTGTATGGCAACTTGCCGCCGCGTGAAATTTCTATGAAGGATGTTTTCCGTTCTGGTGATTCGTCTAAGAAGTTG + HHGHHHHHHHHHHHHHHHHHHHEHDHHHHHGEHHFFHHFFFHHHHHHHHFHDHHBHGHB?HHDFFF?EFEHFHBFGEGGFFFDFBHFHHHHHFHHEFFFCF @SEQ:1:1101:9267:3900#0/1 adapter start: 89 GTTTTGGATTTAACCGAAGATGATTTCGATTTTCTGACGAGTAACAAAGTTTGGATTGCTACTGACCGCTCTCGTGCTCGTCGCTGCGT + HHHHHHHHHHHHHHHHHHHHHHHHHHFHHHHHHHHHHHHHHFHHHHEHHEHHHFHHHHHHHHHHFHFHECFFHABGGGIGHHHGGFFGF @SEQ:1:1101:9416:3909#0/1 TAAACGTGACGATGAGGGACATAAAAAGTAAAAATGTCTACAGTAGAGTCAATAGCAAGGCCACGACGCAATGGAGAAAGACGGAGAGCGCCAACGGCGTC + HHHHHHHHHHHHHHHHHHHHHHHHHHHHFHHHHHHHHHHHHHHHHHHHEHHGHHFEFHEFHFFDHEFHFAFFFA?GDFGFE@FFFB?B7EEFEFE?DAA## @SEQ:1:1101:9360:3917#0/1 adapter start: 68 ATGCTTGGGAGCGTGCTGGTGCTGATGCTTCCTCTGCTGGTATGGTTGACGCCGGATTTGAGAATCAA + HHHHHHHHHHHHHHHHHHHFHHHHHHHHHHFHHHHHHHFHEFHHHEHHCFFEFEE9AFFBBDCDCAEE @SEQ:1:1101:9337:3918#0/1 adapter start: 14 CATCAGCACCAGCA + FDEGGGCDBEFCDF @SEQ:1:1101:9307:3927#0/1 adapter start: 15 TCAGCGCCTTCCATG + FFFFFFFFFFFFFDF @SEQ:1:1101:9479:3929#0/1 adapter start: 9 GACAAATTA + HHHHHHHHH @SEQ:1:1101:9277:3934#0/1 adapter start: 71 CTGTCTTTTCGTATGCAGGGCGTTGAGTTCGATAATGGTGATATGTATGTTGACGGCCATAAGGCTGCTTC + HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHFHHHHHHEHFHHHHFHHHHHFHHEHFHHHFHHFDHHFHHE @SEQ:1:1101:9442:3934#0/1 AGACCCATAATGTCAATAGATGTGGTAGAAGTCGTCATTTGGCGAGAAAGCTCAGTCTCAGGAGGAAGCGGAGCAGTCCAAATGTTTTTGAGATGGCAGCA + HHHHHHHHHGHHHHHFGHHBHHEHGFHHDHGDEGDHHHHHFHHHHHAHHH?FEEBEFDFBEBEEFEHFE7ECCDCG=FDFFDFFFHHHHFEEBEF;BEAEG @SEQ:1:1101:9329:3935#0/1 AGATGGATAACCGCATCAAGCTCTTGGAAGAGATTCTGTCTTTTCGTATGCAGGGCGTTGAGTTCGATAATGGTGATATGTATGTTGACGGCCATAAGGCT + GFGGGEEGDHHHGGEHHHHHHGGFHHEAHHAGDEGEGGEDG@GGGHHGHHFGGH6@CADDHHBEEE@8EBGEEFGGGHFHHHHGEGFGGEFBGEDDE?E7E @SEQ:1:1101:9445:3956#0/1 adapter start: 81 TGCAACAACTGAACGGACTGGAAACACTGGTCATAATCATGGTGGCGAATAAGTACGCGTTCTTGCAAATCACCAGAAGGC + HHHHHHHHHGFHHHHHHHHHHHHHHGHHHHFHHHHHHHHHHHFGHHHFGHHHHFGHHFHEHHHHHHHHHHHHGBHHHHGFG @SEQ:1:1101:9357:3957#0/1 TTAATCGTGCCAAGAAAAGCGGCATGGTCAATATAACCAGTAGTGTTAACAGTCGGGAGAGGAGTGGCATTAACACCATCCTTCATGAACTTAATCCACTG + HHHHHHGHHHHHHHHHHGHEHHHHHGHEHHHHHHHHHHHHHHGHEBGGFGFFFFFBH?HCEEEDEFHFHBHFHCFHHGGGHEGHEGHEF@GHHFHEDHH;H @SEQ:1:1101:9309:3957#0/1 adapter start: 72 GTCAGATATGGACCTTGCTGCTAAAGGTCTAGGAGCTAAAGAATGGAACAACTCACTAAAAACCAAGCTGTC + HHHHHHHHHHHHHHHHHHHHHHHHHGHFHHHFHHHHHHHHGHHHFHHHHHHHFHDHHHHHHFHCHHEAHHDG @SEQ:1:1101:9425:3960#0/1 CTGACGCAGAAGAAAACGTGCGTCAAAAATTACGTGCAGAAGGAGTGATGTAATGTCTAAAGGTAAAAAACGTTCTGGCGCTCGCCCTGGTCGTCCGCAGC + 8?8?C?BC@BD=ABB==BD?CADD=AD>C@@CCBBDD@B/143'3.>>@9BCBDDDC8@@;@???FB=DFB=>C=EEFFFFFEFFFFF:FEF@FEF @SEQ:1:1101:9363:3989#0/1 adapter start: 95 CCTCCAAGATTTGGAGGCATGAAAACATACAATTGGGAGGGTGTCAATCCTGACGGTTATTTCCTAGACAAATTAGAGCCAATACCATCAGCTTTGCCTAA + HHHHHHHHHHHHHHHHHHHHHGHHHHHHHHHHGHHHHHHHGGEEGB;5 @SEQ:1:1101:9554:3781#0/1 CACGCTCTTTTAAAATGTCAACAAGAGAATCTCTACCATGAACAAAATGTGACTCATATCTAAACCAGTCCTTGACGAACGTGCCAAGCATATTAAGCCAC + HHHHHHHHHHHHHGGHHHHHHGHFHHHHHHEHHFHHHEHHHHHHHEHHGHHHHEHHHGFHHHEHHHHHHEEFFEDFEDFF>ACBAHGHHHHECEGHBCFEE @SEQ:1:1101:9695:3783#0/1 adapter start: 52 AATAACCCTGAAACAAATGCTTAGGGATTTTATTGGTATCAGGGTTAATCGT + HHHHHHHHHHHHHHHHHHHHHHHHHHGHHHHHHHHHHHHHGHHHHHHHHHHF @SEQ:1:1101:9572:3788#0/1 ACCAACACGGCGAGTACAACGGCCCAGCTCAGAAGCGAGAACCAGCTGCGCTTGGGTGGGGCGATGGTGATGGTTTGCATGTTTGGCTCCGGTCTGTAGGC + FFFFFFFFF=EBEB0A@A@>A?;FED;;<7??A>>9A>?DA1ADD?D:FF:BC;@############## @SEQ:1:1101:9601:3793#0/1 GCCGCTAATCAGGTTGTTTCTGTTGGTGCTGATATTGCTTTTGATGCCGACCCTAAATTTTTTGCCTGTTTGGTTCGCTTTGAGTCTTCTTCGGTTCCGAC + HHHHHHHHHHHHHHHHHHHHHHHHHHHGHHHEHEGHFHHHHHHHHFHFHCHHHFHFFHHHHHH@HHHHHHGHHHFHHGFHHCFHEGGGFEGE?GCDAD6AD @SEQ:1:1101:9634:3800#0/1 TTTATGCGGACACTTCCTACAGGTAGCGTTGACCCTAATTTTGGTCGTCGGGTACGCAATCGCCGCCAGTTAAATAGCTTGCAAAATACGTGGCCTTATGG + HHGHFHFHHHHCGHHFHHHHHHGEHHHHHGFBEFHHFEHDHHHGFHHEHHFF9ECD?CEEHEDF?GEEDEEG @SEQ:1:1101:9501:3800#0/1 adapter start: 42 TGACCACCTACATACCAAAGACGAGCGCCTTTACGCTTGCCT + HHHHHHHHHHHHHHHHFHHHHHHHHFHHHHHHHHHHHHHHHH @SEQ:1:1101:9703:3807#0/1 adapter start: 27 TAATAACCTGATTCAGCGAAACCAATC + HHHHHHHHHHHHHHHHHHHHHHGHHHG @SEQ:1:1101:9728:3808#0/1 adapter start: 7 CAGAAAA + HHHFHHH @SEQ:1:1101:9676:3812#0/1 adapter start: 1 T + H @SEQ:1:1101:9620:3815#0/1 TCGCGTAGAGGCTTTGCTATTCAGCGTTTGATGAATGCAATGCGACAGGCTCATGCTGATGGTTGGTTTATCGTTTTTGACACTCTCACGTTGGCTGACGA + HHHHHHHHHHGGHHHGHHGHHHHHHHHHHGFHGHHHHHHHHHFHDHHHDDHFHFHFHHHHFF9EFF>DG?FCBCDFFFEBFFE@DFEGGEEG?GF>>:;@A @SEQ:1:1101:9720:3834#0/1 adapter start: 74 TAGACATTTTTACTTTTTATGTCCCTCATCGTCACGTTTATGGTGAACAGTGGATTAAGTTCATGAAGGATGGT + HGHHHHHHHHHHHHHHHGGHEGGFGHFGHFHHDGHGHGHHHHHHHHHHFHHHHHFHFHFFHEFHF=FFHFHHFF @SEQ:1:1101:9635:3844#0/1 adapter start: 4 GACC + HHHH @SEQ:1:1101:9744:3849#0/1 adapter start: 55 AAACATAGTGCCATGCTCAGGAACAAAGAAACGCGGCACAGAATGTTTATAGGTC + HHHHHHHGCHHFHHFHHFFHEHFGCHHGDGHEFFHFHEHHGBBGFCDGFEEFDCF @SEQ:1:1101:9725:3850#0/1 ATAACCCTGAAACAAATGCTTAGGGATTTTATTGGTATCAGGGTTAATCGTGCCAAGAAAAGCGGCATGGTCAATATAACCAGTAGTGTTAACAGTCGGGA + FDGGGDGGGEGGGGGBGBEGFFFDFFFFGGFGGGGFBGGGGGEFDFFGEGFFEFEDGGEEF9DCF?EFBBEDBBGFGGEGGGGCFGFEB@B7C>CDEEE## @SEQ:1:1101:9544:3854#0/1 TAGCGGTAAAGTTAGACCAAACCATGAAACCAACATAAACATTATTGCCCGGCGTACGGGGAAGGACGTCAATAGTCACACAGTCCTTGACGGTATAATAA + HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHFHHHHHHHHHHHHFFHHHHHHHHHBFHHHHHFHHHHHHHHHHHHHHFCHHHBHE @SEQ:1:1101:9581:3856#0/1 GGGCGGTGGTCTATAGTGTTATTAATATCAAGTTGGGGGAGCACATTGTAGCATTGTGCCAATTCATCCATTAACTTCTCAGTAACAGATACAAACTCATC + HHHHHHEHHHHHHHGHHHHHHHHHHHHHHHHHHHHHHHFHHHHGHHHHHHHHHHHHHHHGGHHHFHHHHHGHFGHGEGHHHHHHFEHFHGDGGFFGHH@DH @SEQ:1:1101:9649:3858#0/1 adapter start: 33 CCTCCAAACAATTTAGACATGGCGCCACCAGCA + BFEEEE@@BA@3>8<>CCDDBEE@ @SEQ:1:1101:9616:3862#0/1 adapter start: 91 GAATTAAATCGAAGTGGACTGCTGGCGGAAAATGAGAAAATTCGACCTATCCTTGCGCAGCTCGAGAAGCTCTTACTTTGCGACCTTTCGC + HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHFHHHHHHHEHHHHHHHHHHHHHHFHHHHHHHFFFHFDHHEHHHGHHHHGDEHHGHHEGH @SEQ:1:1101:9696:3866#0/1 CAAGTTGCCATACAAAACAGGGTCGCCAGCAATATCGGTATAAGTCAAAGCACCTTTAGCGTTAAGGTACTGAATCTCTTTAGTCGCAGTAGGCGGAAAAC + HHHHHHHHHHHHHHHHHHHHEHEHHHEHHHHFHHHHHHFHHHFHFHHHHHHHHFHHHHFHHFEHBHFEHHHHCEEHHFHHHHHHHHHHHHEHHHHCAFEFG @SEQ:1:1101:9512:3869#0/1 GCTCGACGCCATTAATAATGTTTTCCGTAAATTCAGCGCCTTCCATGATGAGACAGGCCGTTTGAATGTTGACGGGATGAACATAATAAGCAATGACGGCA + HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHFHHHHFHHHDHHHEHHFFFFFFHFAFEFH?E@FFGGGFGHFHAEFGFFFCEEFF @SEQ:1:1101:9723:3870#0/1 adapter start: 66 CTTTAGCAGCAAGGTATATATCTGACTTTTTGTTAACGTATTTAGCCACATAGCAACCAACAGACA + ################################################################## @SEQ:1:1101:9667:3874#0/1 CTGCTGCATTTCCTGAGCTTAATGCTTGGGAGCGTGCTGGTGCTGATGCTTCCTCTGCTGGTATGGTTGACGCCGGATTTGAGAATCAAAAAGAGCTTACT + HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHAHHHHEHHD=DAD>D6ADGE@EBE;@?BCGGE?4>ADAAC @SEQ:1:1101:9565:3879#0/1 adapter start: 24 AGCCTTATGGCCGTCAACATACAT + HHHHHHHHHHHHHHHHHFHHGFFH @SEQ:1:1101:9721:3885#0/1 adapter start: 51 TTCCTCAAACGCTTGTTCGGTGGATAAGTTATGGCATTAATCGATTTATTT + >BC?:A?=<>::A=528882.53)5.77;407)*9@:AA8CAA######## @SEQ:1:1101:9707:3894#0/1 adapter start: 40 AACACCATCCTTCATGAACTTAATCCACTGTTCACCATAA + F@F8DEE@EEBCCCCFFEFDDC=DCCFFF=ADD=D>@AA@ @SEQ:1:1101:9560:3900#0/1 adapter start: 6 AGAAGT + GGGGGF @SEQ:1:1101:9696:3913#0/1 adapter start: 2 CC + HH @SEQ:1:1101:9574:3914#0/1 adapter start: 5 GAACA + HHHHH @SEQ:1:1101:9508:3931#0/1 adapter start: 91 TAGAGAACGAGAAGACGGTTACGCAGTTTTGCCGCAAGCTGGCTGCTGAACGCCCTCTTAAGGATATTCGCGATGAGTATAATTACCCCAA + HGHHHHHHHHHHHHHHHHHHGHHHHHFHHHGHHHHFHHHHHHHHHD?ACFEF9FFEEBHBAEFB?E><>B@CBCD==BB @SEQ:1:1101:9903:3754#0/1 ACCAAAATTAGGGTCAACGCTACCTGTAGGAAGTGTCCGCATAAAGTGCACCGCATGGAAATGAAGACGGCCATCAGCTGTACCATACTCAGGCACACAAA + GFEGGGGGBGE@EAEEGGFGGEGGFGEFFGFGFFGGEGGGGEFGCFCEFBF7FGEGEF?BFEEFDFFE??AADD+D@C@CGFCE6FDFFDFBGFDD@DAAD @SEQ:1:1101:9878:3755#0/1 adapter start: 32 AGAACGTGAAAAAGCGTCCTGCGTGTAGCGAA + HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH @SEQ:1:1101:9833:3756#0/1 adapter start: 65 TCATCGTCACGTTTATGGTGAACAGTGGATTAAGTTCATGAAGGATGGTGTTAATGCCACTCCTC + HHHHHHHHHHHHHHHHHFHHHHHHHHHHHHHHHHFHHHHGHHFHHHHHEHEHHHHFHEHHHEHFH @SEQ:1:1101:9991:3777#0/1 GCTTTGAGTCTTCTTCGGTTCCGACTACCCTCCCGACTGCCTATGATGTTTATCCTTTGGATGGTCGCCATGATGGTGGTTATTATACCGTCAAGGACTGT + HHHHHHHHHHHHHHHHHHHHHHGHHHGHHHHHHHGHHHHHHGHHHHHHHHHHHHHFHHFFDFFFCFFDHCFF;BFGEFGEGFGGFFF.CFDCCEDB=CBC@ cutadapt-1.9.1/tests/cut/lowqual.fastq0000664000175000017500000000005112575761274020556 0ustar marcelmarcel00000000000000@first_sequence + @second_sequence + cutadapt-1.9.1/tests/cut/restfront.fa0000664000175000017500000000020412575761274020370 0ustar marcelmarcel00000000000000>read1 REST1 >read2 RESTING >read3 >read4 RESTLESS >read5 RESTORE >read6 SOMETHING >read7 SOMETHING >read8 SOMETHING >read9 NOREST cutadapt-1.9.1/tests/cut/solid5p-anchored.notrim.fastq0000664000175000017500000000226712575761274023554 0ustar marcelmarcel00000000000000@read1 T1212322332333012001112122203233202221000211 + :58)2";%4A,8>0;9C\'?276>#)49"<,>?/\'!A4$.%+ @read2 T201212322332333200121311212133113001311002032 + 44<@;(<3.37/''=:-9AA<&C2%$$;?A&5!C69:?-;&;65. @read3 T02201212322332333211133003002232323010012320300 + 2!#97*B.0A-@(*","B3><4&16(: @read4 T302010102312033021011121312131 + <&-81+%)7;<)6?83!&CB9"9B6307=& @read5 T121313210102120020302022233110 + $9)27,(-*=,#4:;"/4++5<,@-784*' @read6 T331203203013323021010020301321 + 4!.;:C%97@>75-";';*)A67CCC")$* @read7 T21301020302201212322332333203020130202120211322010013211 + ,;0B@A"98!<=!*;5;650;';79!+8,4(2=+98:B@C@:+3*>2+6+2++C0. @read8 T2310321030130120302201212322332333232202123123111113113003200330 + C/$-"=6+1.8?AB!?'#.585@6:47@?>.315A-'9<%">6,+)*,)1-;:(691>?C)4A; @read9 T0002132103320302201212322332333020123133023120320131020333011 + (&?527&:=;6@6@03%95(-0#$:B8::B*4?@&)6>79C>)6C'5-#0:A8+2* @read10 T00322031320033220302201212322332333201130233321321011303133231200 + &53)>2.+9?7%=&21;8!820961%3#0'5C.28347,2(55*1.,>%:(1A'A5=@7&&5?4' @read11 T402010102312033021011121312131 + &8B"195'@,@&:5=7;!&-9:%((> @read12 T11 + ?C @read13 T1 + C @read14 T + @read15 T + @read16 T + cutadapt-1.9.1/tests/cut/example.fa0000664000175000017500000000026612575761274020005 0ustar marcelmarcel00000000000000>read1 MYSEQUENCE >read2 MYSEQUENCE >read3 MYSEQUENCE >read4 MYSEQUENCEADABTER >read5 MYSEQUENCEADAPTR >read6 MYSEQUENCEADAPPTER >read7 MYSEQUENCE >read8 MYSEQUENCE >read9 SOMETHING cutadapt-1.9.1/tests/cut/polya.fasta0000664000175000017500000000005412575761274020201 0ustar marcelmarcel00000000000000>polyAlong CTTAGTTCAATWTTAACCAAACTTCAGAACAG cutadapt-1.9.1/tests/cut/maxn2.fasta0000664000175000017500000000005012575761274020076 0ustar marcelmarcel00000000000000>r1 >r2 N >r3 AAAA >r4 AAAAN >r5 AAANN cutadapt-1.9.1/tests/cut/pairedu.2.fastq0000664000175000017500000000036512575761274020673 0ustar marcelmarcel00000000000000@read1/2 other text GAGACAAATAACAGTGGAGTAGTT + HHHHHHHHHHHHHHHHHHHHHHHH @read2/2 GCCTGTTGCAGTGGAGTAACTCCA + HHHHHHHHHHHHHHHHHHHHHHHH @read3/2 ATTAATATCAAGTTGGCAG + HHHHHHHHHHHHHHHHHHH @read4/2 CCGTCAACATTCAAACGGCCTGTC + ######################## cutadapt-1.9.1/tests/cut/paired-untrimmed.2.fastq0000664000175000017500000000011112575761274022475 0ustar marcelmarcel00000000000000@read4/2 CATCCCGTCAACATTCAAACGGCCTGTCCA + HH############################ cutadapt-1.9.1/tests/cut/paired-filterboth.2.fastq0000664000175000017500000000036312627537126022637 0ustar marcelmarcel00000000000000@read1/2 other text GCTGGAGACAAATAACAGT + HHHHHHHHHHHHHHHHHHH @read2/2 TGTGGCCTGTTGCAGT + ###HHHHHHHHHHHHH @read3/2 TGTTATTAATATCAAGTTGGCAGTG + #HHHHHHHHHHHHHHHHHHHHHHHH @read4/2 CATCCCGTCAACATTCAAACGGCCTGTCCA + HH############################ cutadapt-1.9.1/tests/cut/illumina64.fastq0000664000175000017500000000366312575761274021072 0ustar marcelmarcel00000000000000@14569 AAGTTTATTCCTGGACGAAGGAAGAAAAGGCCAGATGGGAAACAAGAACAAGCCCCTGTTGAAGACGCAGGGCC + cceeeeceeeee`dedbdbdb_^b`abU_cacadabd`dLMZ[XTcT^a^adaaaddcd`aL^`^_`Y\]^`Y_ @19211 AGA + ^\` @9180 GAGGG + b`bLb @19132 TGTGATTATCCACTGGTATAT + Z[QZZLZ[]J[SHZNaZ[_Ia @15868 CTGCCAAGGCTGCCCCCAAA + `c`cc\`\Lb]bL`[`a]L` @1424 GGCCCCAGACTTGCTCCCCCAACAAGGACAATGTCCAAGGAGTGTCCCC + eeeeeeeea`bbdaaadad`Oaaaaccada_aa_d`_X`_^`[`_[_W^ @7855 GTGGGGGCT + ]^\]FW]Z` @17943 ACATGGGACCAGAAAACACCACCAGGGGTTTGGGGCTGTCCTGAG + ccc`\^`aba\b^`\FR`OOPYG[[W```[Ra_RR_\]\\P\_H_ @11100 CGGATAACTGAAAATGCATTTTTAACGCCATGACCGTGTCTCAAGGACCCGCTGTGGAAG + b`b_b_a\bc^Tabadaddcddd``bdaa_^aJ\^_\]\\__O[___L^\_aaa^^^UJ^ @15663 AGGT + aaKa @4698 CCAATTGGCACCCCTCTGCCTTCAGCCATT + cccc\`ccc\caccZccccc]^`LY\bL_b @20649 TCTGGACTGGATCTTTAGGATGGTGGAGATGATCTGGATGTAGGACAAAAGAACCAGGCAGAAGGGTG + eeeeeaddadacdddebeccdddadd\^abbT_]bccTac]]b]L^][]Ve[^ZaY_^_^`\\Y]^Y` @17259 + @6003 CTTCAACTCATCTTGTTATTAATACCATCAATATCCCATGAGGCTCATAAAACGAGTCTTTCTTCTTGGAAACATGACCAAGATTGGGCAAACGT + fffffffffffffffffdffecfcefeffdcfdeeebbbdbccccc\db\`^aa`^Y^^^cbcbaa`bbWY^^^__S_YYR]GWY]\]]XX\_`S @4118 TCAAATTGTACTGCAAAGAAGGTCCCAGCTGGTCTCTTCTGGGAGTGATCTAACTAACTTAAG + dc^ddeeeeeedeee`ceceddadadddcbde_dedc_ec_a^^b\b\\]VIPZY^T^^^\L_ @18416 GTGGGGAAGCCGAAGAAGCAGCGGAGATCGATTGTAAGAACGACG + dddacaabdbea\d^cce\da`dd_^__`a`a`b[_^__^\^^^_ @20115 TGAAAAAGGAAAACATGGTAGTTTTCTTGTATGAGAGAGCCAGAGCCACCTTGGAGATTTTGTTCTCTCTGTGCG + ed^eeafffaddfecdddabc^_badd`bd_ddadaa^bbcad\d\__^_\aaa_aY____aaN_\cdc\^aaYb @16139 TCATCCGAAGAGTTGGCAGGCCCTGTGAATTGTGAAAACAGTATACCCACCCCTTTCCC + cabacacY^c\daaddaadad^\ad_a\Y`[ZQ]Y^^OYQ^X^YT\\]U\^RRX^\YJ^ @14123 GATTTGGGGAAAGGAAACAATAGTTGAGTTTGGGCCACGGGAAATTCAAGATGCCTGGTATGTC + cccccccac^bYbbT_aa_Yb^^Ta\\^]]aaTaaaaab\b\XL`VZZV]QYYY[aa^^^^_^^ @8766 ACCTGTAAGGTCCGCTCCTGGTGGACACCCACGAAGTCCAGGGCCTCAGGCAGGAAGTTGTAGCGCAGAGTTTTGAGCAGCTGCTCCATC + fcfffffcffeffeeefdefddeecdccacddfdYd`d^\_^`\_abbc\b[ba^Y^Z_^^H^Z_^Y_Y_OKWPZR]]Z]`Z``Z^UHZ^ cutadapt-1.9.1/tests/cut/solid.fasta0000664000175000017500000000011612575761274020166 0ustar marcelmarcel00000000000000>problem1 T0112021202222201123121023103020 >problem2 T20201030313112322220210 cutadapt-1.9.1/tests/cut/pairedq.2.fastq0000664000175000017500000000015312575761274020662 0ustar marcelmarcel00000000000000@read1/2 other text GCTGGAGACAAATAA + HHHHHHHHHHHHHHH @read3/2 TGTTATTAATATCAAGTTGG + #HHHHHHHHHHHHHHHHHHH cutadapt-1.9.1/tests/cut/paired.1.fastq0000664000175000017500000000026312575761274020502 0ustar marcelmarcel00000000000000@read1/1 some text TTATTTGTCTCCAGC + ##HHHHHHHHHHHHH @read3/1 CCAACTTGATATTAATAACA + HHHHHHHHHHHHHHHHHHHH @read4/1 GACAGGCCGTTTGAATGTTGACGGGATGTT + HHHHHHHHHHHHHHHHHHHHHHHHHHHHHH cutadapt-1.9.1/tests/cut/anchored_no_indels.fasta0000664000175000017500000000031412575761274022671 0ustar marcelmarcel00000000000000>no_mismatch (adapter: TTAGACATAT) GAGGTCAG >one_mismatch GAGGTCAG >two_mismatches TAAGACGTATGAGGTCAG >insertion ATTAGACATATGAGGTCAG >deletion TAGACATATGAGGTCAG >mismatch_plus_wildcard TNAGACGTATGAGGTCAG cutadapt-1.9.1/tests/cut/discard.fastq0000664000175000017500000000013412575761274020505 0ustar marcelmarcel00000000000000@prefix:1_13_1440/1 CAAGATCTNCCCTGCCACATTGCCCTAGTTAAAC + <=A:A=57!7<';<6?5;;6:+:=)71>70<,=: cutadapt-1.9.1/tests/cut/interleaved.fastq0000664000175000017500000000032512600000013021336 0ustar marcelmarcel00000000000000@read1/1 some text TTATTTGTCTCCAGC + ##HHHHHHHHHHHHH @read1/2 other text GCTGGAGACAAATAA + HHHHHHHHHHHHHHH @read3/1 CCAACTTGATATTAATAACA + HHHHHHHHHHHHHHHHHHHH @read3/2 TGTTATTAATATCAAGTTGG + #HHHHHHHHHHHHHHHHHHH cutadapt-1.9.1/tests/cut/empty.fastq0000664000175000017500000000000012575761274020222 0ustar marcelmarcel00000000000000cutadapt-1.9.1/tests/cut/maxn0.4.fasta0000664000175000017500000000004212575761274020237 0ustar marcelmarcel00000000000000>r1 >r3 AAAA >r4 AAAAN >r5 AAANN cutadapt-1.9.1/tests/cut/paired-trimmed.1.fastq0000664000175000017500000000021712575761274022140 0ustar marcelmarcel00000000000000@read1/1 some text TTATTTGTCTCCAGC + ##HHHHHHHHHHHHH @read2/1 CAACAGGCCACA + HHHHHHHHHHHH @read3/1 CCAACTTGATATTAATAACA + HHHHHHHHHHHHHHHHHHHH cutadapt-1.9.1/tests/cut/no-trim.fastq0000664000175000017500000000013412575761274020461 0ustar marcelmarcel00000000000000@prefix:1_13_1440/1 CAAGATCTNCCCTGCCACATTGCCCTAGTTAAAC + <=A:A=57!7<';<6?5;;6:+:=)71>70<,=: cutadapt-1.9.1/tests/cut/dos.fastq0000664000175000017500000000034712575761274017667 0ustar marcelmarcel00000000000000@prefix:1_13_573/1 CGTCCGAANTAGCTACCACCCTGA + )3%)&&&&!.1&(6:<'67..*,: @prefix:1_13_1259/1 AGCCGCTANGACGGGTTGGCCC + ;<:&:A;A!9<<<,7:<=3=;: @prefix:1_13_1440/1 CAAGATCTNCCCTGCCACATTGCCCTAGTTAAAC + <=A:A=57!7<';<6?5;;6:+:=)71>70<,=: cutadapt-1.9.1/tests/cut/unconditional-back.fastq0000664000175000017500000000036512575761274022646 0ustar marcelmarcel00000000000000@prefix:1_13_573/1 CGTCCGAANTAGCTACCACCCTGATTAGA + )3%)&&&&!.1&(6:<'67..*,:75)'7 @prefix:1_13_1259/1 AGCCGCTANGACGGGTTGGCCCTTAGACG + ;<:&:A;A!9<<<,7:<=3=;:<&7 cutadapt-1.9.1/tests/cut/trimN5.fasta0000664000175000017500000000006012575761274020230 0ustar marcelmarcel00000000000000>read1 GGCCTGGAATTCTCGGGTGCCAAGGAACTCCAGTCACCAG cutadapt-1.9.1/tests/cut/paired.m14.2.fastq0000664000175000017500000000033412575761274021102 0ustar marcelmarcel00000000000000@read1/2 other text GCTGGAGACAAATAACAGTGGAGTAGTTTT + HHHHHHHHHHHHHHHHHHHHHHHHHHHHHH @read3/2 TGTTATTAATATCAAGTTGGCAGTG + #HHHHHHHHHHHHHHHHHHHHHHHH @read4/2 CATCCCGTCAACATTCAAACGGCCTGTCCA + HH############################ cutadapt-1.9.1/tests/cut/wildcard.fa0000664000175000017500000000003012575761274020130 0ustar marcelmarcel00000000000000>1 TGCATGCA >2 TGCATGCA cutadapt-1.9.1/tests/cut/solidqual.fastq0000664000175000017500000000475712575761274021110 0ustar marcelmarcel00000000000000@1_13_85_F3 T110020300.0113010210002110102330021 + 7&9<&77)&!<7))%4'657-1+9;9,.<8);.;8 @1_13_573_F3 T312311200.3021301101113203302010003 + 6)3%)&&&&!.1&(6:<'67..*,:75)'77&&&5 @1_13_1259_F3 T002112130.201222332211133020123031 + =;<:&:A;A!9<<<,7:<=3=;:<&70<,=: @1_14_177_F3 T31330222020233321121323302013303311 + :8957;;54)'98924905;;)6:7;1:3<88(9: @1_14_238_F3 T01331031200310022122230330201030313 + ?><5=;<<<12>=<;1;;=5);.;14:0>2;:3;7 @1_15_1098_F3 T + @1_16_404_F3 T03310320002130202331112133020103031 + 78;:;;><>9=9;<<2=><<1;58;9<<;>(<;<; @1_16_904_F3 T21230102331022312232132021122111212 + 9>=::6;;99=+/'$+#.#&%$&'(($1*$($.#. @1_16_1315_F3 T0323123111221033301031032330201000 + <9<8A?>?::;6&,%;6/)8<<#/;79(448&*. @1_16_1595_F3 T22323211312111230022210011213302012 + >,<=<>@6<;?<=>:/=.>&;;8;)17:=&,>1=+ @1_17_1379_F3 T32011212111223230232132311321200123 + /-1179<1;>>8:':7-%/::0&+=<29,7<8(,2 @1_18_1692_F3 T12322233031100211233323300112200210 + .#(###5%)%2)',2&:+#+&5,($/1#&4&))$6 @1_19_171_F3 T10101101220213201111011320201230 + )6:65/=3*:(8%)%2>&8&%;%0&#;$3$&: @1_22_72_F3 T133030323232212123013222333202 + 3/#678<:.=9::6:(<538295;9+;&*; @1_22_1377_F3 T22221333311222312201132312022322300 + )##0%.$.1*%,)95+%%14%$#8-###9-()#9+ @1_23_585_F3 T30010310310130312122123302013303131 + >55;8><96/18?)<3<58<5:;96=7:1=8=:-< @1_23_809_F3 T131301011010212110132203022233021 + :7<59@;<<5;/9;=<;7::.)&&&827(+221 @1_24_138_F3 T3321113010012032300203302012303131 + 6)68/;906#,25/&;<$0+250#2,<)5,9/+7 @1_24_206_F3 T33330332002223002020303331321221000 + ))4(&)9592)#)694(,)292:(=7$.18,()65 @1_25_143_F3 T2320200303120022030130330201220313 + :4;/#&<9;&*;95-7;85&;587#16>%&,9<2 @1_25_1866_F3 T03201321022131101112012330221130311 + =<>9;<@7?(=6,<&?=6=(=<641:?'<1=;':4 @1_27_584_F3 T10010330110103213112323303012103101 + 82'('*.-8+%#2)(-&3.,.2,),+.':&,'(&/ @1_27_1227_F3 T0200302212300100320100203130330201 + 492:;>A:<;34<<=);:<<;9=7<3::<::3=> @1_27_1350_F3 T1313010110102121101322022222130123 + 95,)<(4./;<938=64=+2/,.4),3':97#33 @1_29_477_F3 T13130101101021211013300302223 + 94=55:75=+:/7><968;;#&+$#3&6, @1_30_882_F3 T20102033000233133320103031311233200 + 2(+-:-3<;5##/;:(%&84'#:,?3&&8>-();5 @1_31_221_F3 T03301311201100030300100233220102031 + 89>9>5<139/,&:7969972.274&%:78&&746 @1_31_1313_F3 T01331131300330122321000101010330201 + ;3<7=7::)5*4=&;<7>4;795065;9';896'= @1_529_129_F3 T132222301020322102101322221322302.3302 + >>%/((B6-&5A0:6)>;'1)B*38/?(5=%B+!&<-9 cutadapt-1.9.1/tests/cut/discard-untrimmed.fastq0000664000175000017500000000012012575761274022502 0ustar marcelmarcel00000000000000@prefix:1_13_1440/1 CTNCCCTGCCACATTGCCCTAGTTAAAC + 57!7<';<6?5;;6:+:=)71>70<,=: cutadapt-1.9.1/tests/cut/paired.2.fastq0000664000175000017500000000026412575761274020504 0ustar marcelmarcel00000000000000@read1/2 other text GCTGGAGACAAATAA + HHHHHHHHHHHHHHH @read3/2 TGTTATTAATATCAAGTTGG + #HHHHHHHHHHHHHHHHHHH @read4/2 CATCCCGTCAACATTCAAACGGCCTGTCCA + HH############################ cutadapt-1.9.1/tests/cut/overlapb.fa0000664000175000017500000000102112575761274020152 0ustar marcelmarcel00000000000000>adaptlen18 ATACTTACCCGTA >adaptlen17 ATACTTACCCGTA >adaptlen16 ATACTTACCCGTA >adaptlen15 ATACTTACCCGTA >adaptlen14 ATACTTACCCGTA >adaptlen13 ATACTTACCCGTA >adaptlen12 ATACTTACCCGTA >adaptlen11 ATACTTACCCGTA >adaptlen10 ATACTTACCCGTA >adaptlen9 TCTCCGTCGATACTTACCCGTA >adaptlen8 CTCCGTCGATACTTACCCGTA >adaptlen7 TCCGTCGATACTTACCCGTA >adaptlen6 CCGTCGATACTTACCCGTA >adaptlen5 CGTCGATACTTACCCGTA >adaptlen4 GTCGATACTTACCCGTA >adaptlen3 TCGATACTTACCCGTA >adaptlen2 CGATACTTACCCGTA >adaptlen1 GATACTTACCCGTA >adaptlen0 ATACTTACCCGTA cutadapt-1.9.1/tests/cut/twoadapters.unknown.fasta0000664000175000017500000000013712575761274023112 0ustar marcelmarcel00000000000000>read3 (no adapter) AATGAAGGTTGTAACCATAACAGGAAGTCATGCGCATTTAGTCGAGCACGTAAGTTCATACGGAAATGGGTAAG cutadapt-1.9.1/tests/cut/paired-separate.1.fastq0000664000175000017500000000033012575761274022277 0ustar marcelmarcel00000000000000@read1/1 some text TTATTTGTCTCCAGC + ##HHHHHHHHHHHHH @read2/1 CAACAGGCCACA + HHHHHHHHHHHH @read3/1 CCAACTTGATATTAATAACA + HHHHHHHHHHHHHHHHHHHH @read4/1 GACAGGCCGTTTGAATGTTGACGGGATGTT + HHHHHHHHHHHHHHHHHHHHHHHHHHHHHH cutadapt-1.9.1/tests/cut/paired-filterboth.1.fastq0000664000175000017500000000033012627537126022630 0ustar marcelmarcel00000000000000@read1/1 some text TTATTTGTCTCCAGC + ##HHHHHHHHHHHHH @read2/1 CAACAGGCCACA + HHHHHHHHHHHH @read3/1 CCAACTTGATATTAATAACA + HHHHHHHHHHHHHHHHHHHH @read4/1 GACAGGCCGTTTGAATGTTGACGGGATGTT + HHHHHHHHHHHHHHHHHHHHHHHHHHHHHH cutadapt-1.9.1/tests/cut/pairedq.1.fastq0000664000175000017500000000015212575761274020660 0ustar marcelmarcel00000000000000@read1/1 some text TTATTTGTCTCCAGC + ##HHHHHHHHHHHHH @read3/1 CCAACTTGATATTAATAACA + HHHHHHHHHHHHHHHHHHHH cutadapt-1.9.1/tests/cut/paired-separate.2.fastq0000664000175000017500000000033112575761274022301 0ustar marcelmarcel00000000000000@read1/2 other text GCTGGAGACAAATAA + HHHHHHHHHHHHHHH @read2/2 TGTGGCCTGTTG + ###HHHHHHHHH @read3/2 TGTTATTAATATCAAGTTGG + #HHHHHHHHHHHHHHHHHHH @read4/2 CATCCCGTCAACATTCAAACGGCCTGTCCA + HH############################ cutadapt-1.9.1/tests/cut/maxn0.2.fasta0000664000175000017500000000003012575761274020232 0ustar marcelmarcel00000000000000>r1 >r3 AAAA >r4 AAAAN cutadapt-1.9.1/tests/cut/small.untrimmed.fastq0000664000175000017500000000013412575761274022207 0ustar marcelmarcel00000000000000@prefix:1_13_1440/1 CAAGATCTNCCCTGCCACATTGCCCTAGTTAAAC + <=A:A=57!7<';<6?5;;6:+:=)71>70<,=: cutadapt-1.9.1/tests/cut/twoadapters.first.fasta0000664000175000017500000000006712575761274022544 0ustar marcelmarcel00000000000000>read1 GATCCTCCTGGAGCTGGCTGATACCAGTATACCAGTGCTGATTGTTG cutadapt-1.9.1/tests/cut/454.fa0000664000175000017500000001607412575761274016672 0ustar marcelmarcel00000000000000>000163_1255_2627 length=8 uaccno=E0R4ISW01DCIQD GTGTGGTG >000652_1085_0667 length=80 uaccno=E0R4ISW01CXJXP ATTGAAGAGGTTGGTAAGTTTTAAGTTGGTAGGTGGTTGGGGAGTGGTTGGAGAGGAGTTGTTGGGAGTTTGTGTCCTGC >000653_1285_1649 length=92 uaccno=E0R4ISW01DE4SJ AATTAGTCGAGCGTTGTGGTGGGTATTTGTAATTTTAGCTACTCTGAAGGCTGAGGCAGGAGAACTGCTTGAACCCGGGAGGCGGAGGTTGC >000902_0715_2005 length=50 uaccno=E0R4ISW01B03K3 GGGTGTTGAATTTAATATGTAGTATATTGATTTGTGATGATTATTTTGCC >001146_1255_0340 length=50 uaccno=E0R4ISW01DCGYU GGGTGTTGAATTTAATATGTAGTATATTGATTTGTGATGATTATTTTGCC >001210_1147_1026 length=124 uaccno=E0R4ISW01C2Z5W GAGGTGGTGAGTGTTGTGTGTTTAGATTGTGTGTGGTGGTTGGGAGTGGGAGTTGTATTTTAGGGTGTGGGTTGGGAGAGTGAAAGTTGTGGGTGTTTTGGATGGTGGGTTAGGTGGTTGTGCC >001278_1608_2022 length=66 uaccno=E0R4ISW01D7HW4 CACACACACTCTTCCCCATACCTACTCACACACACACACACACACACAAACATACACAAATAATTC >001333_1518_1176 length=100 uaccno=E0R4ISW01DZKTM AATTGTCGTTTGATTGTTGGAAAGTAGAGGGTCGGGTTGGGGTAGATTCGAAAGGGGAATTTTGAGAAAAGAAATGGAGGGAGGTAGGAAAATTTTTTGC >001398_1584_1549 length=112 uaccno=E0R4ISW01D5DPB TAATGAAATGGAATGGAATGGAATGGAATGAAATGGAATGGAATGGAATGGAATGGAATGGAATGGAATGGAATGGAATGAAATGGAATGGAGTATAAAGGAATGGAATTAC >001455_1136_2179 length=50 uaccno=E0R4ISW01C12AD GGGTGTTGAATTTAATATGTAGTATATTGATTTGTGATGATTATTTTGCC >001481_1165_0549 length=50 uaccno=E0R4ISW01C4KON GGGTGTTGAATTTAATATGTAGTATATTGATTTGTGATGATTATTTTGCC >001744_1376_3512 length=101 uaccno=E0R4ISW01DM5T2 TAAGTAGGGAAGGTTTGAGGTTGTTGGTGTTGGTAGTAGGGGTGTTTTAGTTAGGGGTTGTAGTTTGTTAAGGGAATTTTATTTGAGTTTAGAATTGAGGC >001893_1084_1137 length=120 uaccno=E0R4ISW01CXG4Z TGTATATTTTGTTGGGTTTGTATATATTGTTAGGTGTGGTTGGTGAGTTGTATTGGTGGTGGTGTAAGGTGAGTGGAAATGGGAATGGATTGTAGATATGTTGGATTTGTGGTTTTTGGT >001927_0254_0706 length=139 uaccno=E0R4ISW01AWLLG TGGAATCATCTAAGGGACACAAATAGAATCATCATTGAATGGAATCGAATGGAATCATCTAATGTACTCGAATGGAATTATTATTGAATAGAATAGAATGGAATTATCGAATGGAATCAAATGGAATGTAATGGAATGC >002007_1338_1037 length=95 uaccno=E0R4ISW01DJRTR GGGTTGTGTATTTGGATAGTATGTGGAAAATGGTATTAAAAAGAATTTGTAGTTGGATTGTTGGTGGTTATTTAGTTTTTGGGTAATGGGTAGAT >002186_1130_0654 length=50 uaccno=E0R4ISW01C1H5C GGGTGTTGAATTTAATATGTAGTATATTGATTTGTGATGATTATTTTGCC >002282_1237_2702 length=92 uaccno=E0R4ISW01DAXWG AATTAGCCGGGCGTGATGGCGGGCGTTTGTAGTTTTAGTTATTCGGGAGGTTGAGGTAGGAGAATGGCGTGAATTCGGGAAGCGGAGTTTGC >002382_1259_0997 length=64 uaccno=E0R4ISW01DCT37 TAAGGGTTGAAGCGAGGTAGGTAGTTTGTTTGTGGTTTTGTTTCGTATTTTTGTTTCGTATCCC >002477_0657_0655 length=131 uaccno=E0R4ISW01BVY8H TTTTTGGAAAGTTGGGTGGGTATAGTTTTGAGTAGTTAGAGGTATTATAATAGTATTAGGAAGTTGAATGTGAGGGTATAAGAGTTAATTTGATTTTTCGTTGATATGTTTGTTGTTTGAAGTTAGAGTGC >003149_1553_2333 length=128 uaccno=E0R4ISW01D2OBZ TATTTAGTTTTAGTTTGTTTAGGTGGTTATAGAATACGGAGTTTATGAAGTTGATTAGGAATATTATTAGTTGAATTAAGAATTGGGAAGAGAGGGGAACGGGAAGGGACGTGAGTGATTATTATTGC >003194_1475_2845 length=58 uaccno=E0R4ISW01DVT7J TATTTTGGGTTAAGTCGGGTTTAGTTGTTAGGGCGAGAAGTTAGTTGTTGACCCCTGC >003206_1315_0479 length=52 uaccno=E0R4ISW01DHQPD GGGTTGGATAATATGATGGTGTTGGGGAATATTTAGGTATGTGGTTTGTGGC >003271_0173_0314 length=82 uaccno=E0R4ISW01APHAK GTTTATTTGTTATTTATTTTTAGGTTTAGAAGAGTGTTTGGTATTTATTGAGGATTTAGTATTTGTTAGAAGGATTGGATTC >003443_1737_2250 length=21 uaccno=E0R4ISW01EITSS TGTAGGTTGTGTTGTAGGTTG >002633_1776_1582 length=40 uaccno=E0R4ISW01EL8JK CAGGGTGGATTGGGGAACACACAGTGTGGCCGCGTGATTC >002663_0725_3154 length=84 uaccno=E0R4ISW01B1Z2S GCGTTTTATATTATAATTTAATATTTTGGAGGTTGGGTGCGGTGGTTTACGTTTGTAGTTTAGTATTTGGGAGGTTAAGGTAGC >002761_1056_4055 length=72 uaccno=E0R4ISW01CU2V9 AATTTTATTCGATTTATGTGATGATTTATTTATTTTATTTGAAGATGATTTTATTCGAGATTATTCGATGAT >002843_0289_2275 length=80 uaccno=E0R4ISW01AZPE9 ATTGAAGAGGTTGGTAAGTTTTAAGTTGGTAGGTGGTTGGGGAGTGGTTGGAGAGGAGTTGTTGGGAGTTTGTGTCCTGC >002934_1762_2177 length=50 uaccno=E0R4ISW01EK0Q7 GGGTGTTGAATTTAATATGTAGTATATTGATTTGTGATGATTATTTTGCC >003515_1711_1058 length=79 uaccno=E0R4ISW01EGIPG AATTGAATGGAATTATTATTGAATGGATTCGAATGGAATTATTATTGAATGGAATCATCGAGTGGAATCGAATGGAATC >003541_1276_1589 length=70 uaccno=E0R4ISW01DECAV TAGTTTAGGGTGGTAGTTTGGATAAGGTAGTTTTACGGTTTAGTAGTAGTAGGTTAAGTAGGAAAACTGC >003587_1522_1804 length=109 uaccno=E0R4ISW01DZXX6 AATTTATGTAGTGGAAGTAGGATATAAAGAATAGGTTAATGGATTTTGAGATATTAAAAAGAGTAGGAAATTAGTTGAGAGGTTAAGTAGTAGTTTATTTTAGCCACCC >003592_0076_0430 length=92 uaccno=E0R4ISW01AGYTC AATTAGTTAGGCGTGGTGGCGGGTGTTTGTAGTTTTAGTTATTCGGGAGGTTGAGGTAGGAGAATGTTGTGAATTTAGGAGGTGGAGTTTGC >003957_0595_0965 length=130 uaccno=E0R4ISW01BQJIV TAATATTAGGTGTCAATTTGACTGGATCGAGGGATGTGTGTCGGTGAGAGTCTCACTAGAGGTTGATATTTGAGTCGTTAGACTGGGAGAGGAAGACCGAACTGTCAAGTGTATGGGCGCCATCCAATTC >003986_1127_2937 length=61 uaccno=E0R4ISW01C1AFF TAATGGAATGGAATTTTCGGAATGGAATGGAATGGAATGGAATGGAATGGAATGGAATTAC >004012_1559_1491 length=72 uaccno=E0R4ISW01D26M9 TAGTGGATATAAATGGAATGGATTGGAATGGAATGGATACGAATGGAATGGATTGGAGTGGAATGGATTGAC >004030_1508_2061 length=123 uaccno=E0R4ISW01DYPWF TACGTATATACGCGTACGCGTATACGTATATACGCGTATACGTATACGCGTACGTATATATACGCGTATACGTTTACGTACGTACGCGTATATACGTACGTATACACACACGCATATGCATAC >004038_1061_2047 length=109 uaccno=E0R4ISW01CVG5D AATTGATTCGAATGGAATGGATTGGAATGGAACGGATTTGAATGGAATGGATTGGAATGGAATGGATTGAATGGAATGGATTGGAGAGGATTGGATTTGAATGGAATTC >004105_1121_0391 length=92 uaccno=E0R4ISW01C0PH1 AATTAGTTGGGCGTGGTGGCGAGTGTTTGTAATTTTAGTTATTTAGGAGGTTGAGGTAGGAGAATTATTTGAACCCGGTAGACGGAAGTTGC >004129_1618_3423 length=79 uaccno=E0R4ISW01D8ELT AATTGAATGGTATTGAAAGGTATTAATTTAGTGGAATGGAATGGAATGTATTGGAATGGAAAATAATGGAATGGAGTGC >004203_0451_0902 length=72 uaccno=E0R4ISW01BDWC4 TAGTTGGTGTGTTGTAATCGAGACGTAGTTGGTTGGTACGGGTTAGGGTTTTGATTGGGTTGTTGTGTTTGC >004626_1937_0919 length=180 uaccno=E0R4ISW01E0CVD TAGAGTAGATAGTAGGGTTAGAGAAGGTAGGGTACGTTTAGTTTGTTAGTAAGGTTTAAGTTTTGGGTGGGAAAGGTTAGTGGCGGGAAGGGACGAAGGTGGTAATCGAGAGTAGATTTAGAGAAGTTTTTGAAGTGGGCGTTGGGAGTTTTCGAAGTATTGAGAGAGAGGAGCTTGTGC >004913_0641_2071 length=92 uaccno=E0R4ISW01BULRD AATTAGTCGAGCGTTGTGGTGGGTATTTGTAATTTTAGCTACTCTGAAGGCTGAGGCAGGAGAACTGCTTGAACCCGGGAGGCGGAGGTTGC >005063_0599_1983 length=84 uaccno=E0R4ISW01BQWX9 ATGTGGTGAAGATTGGTTTTAGGTGTTTTAATGTGGATTTTCAGGGGTTTTAAAAGGGTTGGGAGAGTGAAATATATATAAGGC >005140_0759_3209 length=74 uaccno=E0R4ISW01B4ZKR TAGTATAGAGGGTTTGTGGTCGTGAGGGTGTTGATGGCGGGAGGGTTTTGATGGTAGGAGGGCCCGTGCTGTGC >005351_0883_3221 length=95 uaccno=E0R4ISW01CFVHJ TTAGGTGTTATAGTTGAGTGAGATGTTAGTGTTTAATGGTTTTATTTAGGTTGATGGGTTAATGAGGGGGTATTTGATAGTTTTGAAGATTTGAC >005380_1702_1187 length=160 uaccno=E0R4ISW01EFQC1 GTTTTTCGAGTATATATTTAGTAGTACGCTCGACTTCTCTTATATAAAGGTTTTGGTTTTTATAGGTTTTTCCATTGTGTCTGCCTGGGGGAGGGCCCTTCTCCTTCAGGATACTGTAGCTTCTCTGCGTGATAAGCCAGCATTCACGGCTTTCAGGTGC >005568_1060_1943 length=20 uaccno=E0R4ISW01CVDWP ATAGCGTATTTCTCACCTGC >005740_1536_2697 length=116 uaccno=E0R4ISW01D06VV TAAAGAGGTGTTATTATTAGTTAGGAGAGGAGGTGGTTAGATAGTAGTGGGATTATAGGGGAATATAGAGTTGTTAGTTTAGGGATAAGGGATTGATCGATGGGTTAGGTCTCTGC >005753_1884_3877 length=53 uaccno=E0R4ISW01EVRNB AAACTGAGTTGTGATGTTTGCATTCAACTCACAGAGTTCAACATTCCTTTAAC >read_equals_adapter 1a >read_equals_start_of_adapter 1b >read_equals_end_of_adapter 1c >read_equals_middle_of_adapter 1d >read_ends_with_adapter 2a GCTACTCTGAAGGCTGAGGCAGGAGAACTGCTTGAACCCGGGAGGCG >read_ends_with_start_of_adapter 2b GCTACTCTGAAGGCTGAGGCAGGAGAACTGCTTGAACCCGGGAGGCG >read_contains_adapter_in_the_middle 3 CGTAGTTGGTTGGTACG >read_starts_with_adapter 4a AAAGGTTTTGGTTTTTATAGGTTTTT >read_starts_with_end_of_adapter 4b AAAGGTTTTGGTTTTTATAGGTTTTT cutadapt-1.9.1/tests/cut/issue46.fasta0000664000175000017500000000001412575761274020353 0ustar marcelmarcel00000000000000>readname A cutadapt-1.9.1/tests/cut/paired.m14.1.fastq0000664000175000017500000000026312575761274021102 0ustar marcelmarcel00000000000000@read1/1 some text TTATTTGTCTCCAGC + ##HHHHHHHHHHHHH @read3/1 CCAACTTGATATTAATAACA + HHHHHHHHHHHHHHHHHHHH @read4/1 GACAGGCCGTTTGAATGTTGACGGGATGTT + HHHHHHHHHHHHHHHHHHHHHHHHHHHHHH cutadapt-1.9.1/tests/cut/plus.fastq0000664000175000017500000000024612575761274020063 0ustar marcelmarcel00000000000000@first_sequence some other text SEQUENCE1 +first_sequence some other text :6;;8<=:< @second_sequence and more text SEQUENCE2 +second_sequence and more text 831 >2 >3b TGGCTGGCC >4b TGGCTGGCC cutadapt-1.9.1/tests/cut/solid5p.fastq0000664000175000017500000000146712575761274020465 0ustar marcelmarcel00000000000000@read1 12001112122203233202221000211 + ;9C\'?276>#)49"<,>?/\'!A4$.%+ @read2 00121311212133113001311002032 + -9AA<&C2%$$;?A&5!C69:?-;&;65. @read3 11133003002232323010012320300 + !00>#97*B.0A-@(*","B3><4&16(: @read4 02010102312033021011121312131 + &-81+%)7;<)6?83!&CB9"9B6307=& @read5 21313210102120020302022233110 + 9)27,(-*=,#4:;"/4++5<,@-784*' @read6 31203203013323021010020301321 + !.;:C%97@>75-";';*)A67CCC")$* @read7 03020130202120211322010013211 + 8,4(2=+98:B@C@:+3*>2+6+2++C0. @read8 32202123123111113113003200330 + -'9<%">6,+)*,)1-;:(691>?C)4A; @read9 20123133023120320131020333011 + ?@&)6>79C>)6C'5-#0:A8+2* @read10 01130233321321011303133231200 + 47,2(55*1.,>%:(1A'A5=@7&&5?4' @read11 02010102312033021011121312131 + 8B"195'@,@&:5=7;!&-9:%((> @read12 1 + C @read13 + @read14 + @read15 + @read16 + cutadapt-1.9.1/tests/cut/examplefront.fa0000664000175000017500000000026412575761274021054 0ustar marcelmarcel00000000000000>read1 >read2 MYSEQUENCEADAP >read3 SOMETHINGELSE >read4 MYSEQUENCEADABTER >read5 MYSEQUENCEADAPTR >read6 MYSEQUENCEADAPPTER >read7 MYSEQUENCE >read8 MYSEQUENCE >read9 MYSEQUENCE cutadapt-1.9.1/tests/cut/illumina5.fastq0000664000175000017500000000154212575761274020777 0ustar marcelmarcel00000000000000@SEQ:1:1101:9010:3891#0/1 adapter start: 51 ATAACCGGAGTAGTTGAAATGGTAATAAGACGACCAATCTGACCAGCAAGG + FFFFFEDBE@79@@>@CBCBFDBDFDDDDD<@C>ADD@B;5:978@CBDDF @SEQ:1:1101:9240:3898#0/1 CCAGCAAGGAAGCCAAGATGGGAAAGGTCATGCGGCATACGCTCGGCGCCAGTTTGAATATTAGACATAATTTATCCTCAAGTAAGGGGCCGAAGCCCCTG + GHGHGHHHHGGGDHHGDCGFEEFHHGDFGEHHGFHHHHHGHEAFDHHGFHHEEFHGHFHHFHGEHFBHHFHHHH@GGGDGDFEEFC@=D?GBGFGF:FB6D @SEQ:1:1101:9207:3899#0/1 adapter start: 64 TTAACTTCTCAGTAACAGATACAAACTCATCACGAACGTCAGAAGCAGCCTTATGGCCGTCAAC + HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHFHHHHHHCFHHF @SEQ:1:1101:9148:3908#0/1 adapter start: 28 ACGACGCAATGGAGAAAGACGGAGAGCG + HHHHHHHHHHHHGHHHHGHHHHHHHHHH @SEQ:1:1101:9044:3916#0/1 adapter start: 78 AACAGAAGGAGTCTACTGCTCGCGTTGCGTCTATTATGGAAAACACCAATCTTTCCAAGCAACAGCAGGTTTCCGAGA + HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHGHHHHGHHHHHHHHHHHHFHEBFHFFEFHE cutadapt-1.9.1/tests/cut/paired-onlyA.1.fastq0000664000175000017500000000045012575761274021560 0ustar marcelmarcel00000000000000@read1/1 some text TTATTTGTCTCCAGCTTAGACATATCGCCT + ##HHHHHHHHHHHHHHHHHHHHHHHHHHHH @read2/1 CAACAGGCCACATTAGACATATCGGATGGT + HHHHHHHHHHHHHHHHHHHHHHHHHHHHHH @read3/1 CCAACTTGATATTAATAACATTAGACA + HHHHHHHHHHHHHHHHHHHHHHHHHHH @read4/1 GACAGGCCGTTTGAATGTTGACGGGATGTT + HHHHHHHHHHHHHHHHHHHHHHHHHHHHHH cutadapt-1.9.1/tests/cut/anchored.fasta0000664000175000017500000000012712575761274020641 0ustar marcelmarcel00000000000000>read1 sequence >read2 blablaFRONTADAPTsequence >read3 NTADAPTsequence >read4 sequence cutadapt-1.9.1/tests/cut/unconditional-both.fastq0000664000175000017500000000032712575761274022700 0ustar marcelmarcel00000000000000@prefix:1_13_573/1 GAANTAGCTACCACCCTGATTAGA + &&&!.1&(6:<'67..*,:75)'7 @prefix:1_13_1259/1 CTANGACGGGTTGGCCCTTAGACG + A;A!9<<<,7:<=3=;:<&7 cutadapt-1.9.1/tests/cut/unconditional-front.fastq0000664000175000017500000000036512575761274023076 0ustar marcelmarcel00000000000000@prefix:1_13_573/1 GAANTAGCTACCACCCTGATTAGACAAAT + &&&!.1&(6:<'67..*,:75)'77&&&5 @prefix:1_13_1259/1 CTANGACGGGTTGGCCCTTAGACGTATCT + A;A!9<<<,7:<=3=;:<&70<,=: cutadapt-1.9.1/tests/cut/twoadapters.fasta0000664000175000017500000000032312575761274021411 0ustar marcelmarcel00000000000000>read1 GATCCTCCTGGAGCTGGCTGATACCAGTATACCAGTGCTGATTGTTG >read2 CTCGAGAATTCTGGATCCTCTCTTCTGCTACCTTTGGGATTTGCTTGCTCTTG >read3 (no adapter) AATGAAGGTTGTAACCATAACAGGAAGTCATGCGCATTTAGTCGAGCACGTAAGTTCATACGGAAATGGGTAAG cutadapt-1.9.1/tests/cut/solid.fastq0000664000175000017500000000461712575761274020220 0ustar marcelmarcel00000000000000@1_13_85_F3 T110020300.0113010210002110102330021 + 7&9<&77)&!<7))%4'657-1+9;9,.<8);.;8 @1_13_573_F3 T312311200.30213011011132 + 6)3%)&&&&!.1&(6:<'67..*, @1_13_1259_F3 T002112130.201222332211 + =;<:&:A;A!9<<<,7:<=3=; @1_13_1440_F3 T110020313.1113211010332111302330001 + =<=A:A=57!7<';<6?5;;6:+:=)71>70<,=: @1_14_177_F3 T31330222020233321121323302013303311 + :8957;;54)'98924905;;)6:7;1:3<88(9: @1_14_238_F3 T0133103120031002212223 + ?><5=;<<<12>=<;1;;=5); @1_15_1098_F3 T32333033222233020223032312232220332 + #,##(#5##*#($$'#.##)$&#%)$1##-$&##% @1_16_404_F3 T03310320002130202331112 + 78;:;;><>9=9;<<2=><<1;5 @1_16_904_F3 T21230102331022312232132021122111212 + 9>=::6;;99=+/'$+#.#&%$&'(($1*$($.#. @1_16_1315_F3 T032312311122103330103103 + <9<8A?>?::;6&,%;6/)8<<#/ @1_16_1595_F3 T22323211312111230022210011213302012 + >,<=<>@6<;?<=>:/=.>&;;8;)17:=&,>1=+ @1_17_1379_F3 T32011212111223230232132311321200123 + /-1179<1;>>8:':7-%/::0&+=<29,7<8(,2 @1_18_1692_F3 T12322233031100211233323300112200210 + .#(###5%)%2)',2&:+#+&5,($/1#&4&))$6 @1_19_171_F3 T10101101220213201111011320201230032 + )6:65/=3*:(8%)%2>&8&%;%0&#;$3$&:$#& @1_22_72_F3 T13303032323221212301322233320210233 + 3/#678<:.=9::6:(<538295;9+;&*;)+',& @1_22_1377_F3 T22221333311222312201132312022322300 + )##0%.$.1*%,)95+%%14%$#8-###9-()#9+ @1_23_585_F3 T300103103101303121221 + >55;8><96/18?)<3<58<5 @1_23_809_F3 T13130101101021211013220302223302112 + :7<59@;<<5;/9;=<;7::.)&&&827(+221%( @1_24_138_F3 T33211130100120323002 + 6)68/;906#,25/&;<$0+ @1_24_206_F3 T33330332002223002020303331321221000 + ))4(&)9592)#)694(,)292:(=7$.18,()65 @1_25_143_F3 T23202003031200220301303302012203132 + :4;/#&<9;&*;95-7;85&;587#16>%&,9<2& @1_25_1866_F3 T03201321022131101112012330221130311 + =<>9;<@7?(=6,<&?=6=(=<641:?'<1=;':4 @1_27_584_F3 T10010330110103213112323303012103101 + 82'('*.-8+%#2)(-&3.,.2,),+.':&,'(&/ @1_27_1227_F3 T02003022123001003201002031303302011 + 492:;>A:<;34<<=);:<<;9=7<3::<::3=>' @1_27_1350_F3 T13130101101021211013220222221301231 + 95,)<(4./;<938=64=+2/,.4),3':97#33& @1_29_477_F3 T13130101101021211013300302223003030 + 94=55:75=+:/7><968;;#&+$#3&6,#1#4#' @1_30_882_F3 T20102033000233 + 2(+-:-3<;5##/; @1_31_221_F3 T03301311201100030300100233220102031 + 89>9>5<139/,&:7969972.274&%:78&&746 @1_31_1313_F3 T0133113130033012232100010101 + ;3<7=7::)5*4=&;<7>4;795065;9 @1_529_129_F3 T132222301020322102101322221322302.3302.3.3..221..3 + >>%/((B6-&5A0:6)>;'1)B*38/?(5=%B+!&<-9!%!@!!)%)!!( cutadapt-1.9.1/tests/cut/sra.fastq0000664000175000017500000000070712575761274017667 0ustar marcelmarcel00000000000000@1_13_85_F3 T110020300.0113010210002110102330021 + 7&9<&77)&!<7))%4'657-1+9;9,.<8);.;8 @1_13_573_F3 T312311200.30213011011132 + 6)3%)&&&&!.1&(6:<'67..*, @1_13_1259_F3 T002112130.201222332211 + =;<:&:A;A!9<<<,7:<=3=; @1_13_1440_F3 T110020313.1113211010332111302330001 + =<=A:A=57!7<';<6?5;;6:+:=)71>70<,=: @1_14_177_F3 T31330222020233321121323302013303311 + :8957;;54)'98924905;;)6:7;1:3<88(9: @1_14_238_F3 T0133103120031002212223 + ?><5=;<<<12>=<;1;;=5); cutadapt-1.9.1/tests/cut/solidbfast.fastq0000664000175000017500000000465512575761274021242 0ustar marcelmarcel00000000000000@abc:1_13_85 T110020300.0113010210002110102330021 + 7&9<&77)&!<7))%4'657-1+9;9,.<8);.;8 @abc:1_13_573 T312311200.30213011011132 + 6)3%)&&&&!.1&(6:<'67..*, @abc:1_13_1259 T002112130.201222332211 + =;<:&:A;A!9<<<,7:<=3=; @abc:1_13_1440 T110020313.1113211010332111302330001 + =<=A:A=57!7<';<6?5;;6:+:=)71>70<,=: @abc:1_14_177 T31330222020233321121323302013303311 + :8957;;54)'98924905;;)6:7;1:3<88(9: @abc:1_14_238 T0133103120031002212223 + ?><5=;<<<12>=<;1;;=5); @abc:1_15_1098 T32333033222233020223032312232220332 + #,##(#5##*#($$'#.##)$&#%)$1##-$&##% @abc:1_16_404 T03310320002130202331112 + 78;:;;><>9=9;<<2=><<1;5 @abc:1_16_904 T21230102331022312232132021122111212 + 9>=::6;;99=+/'$+#.#&%$&'(($1*$($.#. @abc:1_16_1315 T032312311122103330103103 + <9<8A?>?::;6&,%;6/)8<<#/ @abc:1_16_1595 T22323211312111230022210011213302012 + >,<=<>@6<;?<=>:/=.>&;;8;)17:=&,>1=+ @abc:1_17_1379 T32011212111223230232132311321200123 + /-1179<1;>>8:':7-%/::0&+=<29,7<8(,2 @abc:1_18_1692 T12322233031100211233323300112200210 + .#(###5%)%2)',2&:+#+&5,($/1#&4&))$6 @abc:1_19_171 T10101101220213201111011320201230032 + )6:65/=3*:(8%)%2>&8&%;%0&#;$3$&:$#& @abc:1_22_72 T13303032323221212301322233320210233 + 3/#678<:.=9::6:(<538295;9+;&*;)+',& @abc:1_22_1377 T22221333311222312201132312022322300 + )##0%.$.1*%,)95+%%14%$#8-###9-()#9+ @abc:1_23_585 T300103103101303121221 + >55;8><96/18?)<3<58<5 @abc:1_23_809 T13130101101021211013220302223302112 + :7<59@;<<5;/9;=<;7::.)&&&827(+221%( @abc:1_24_138 T33211130100120323002 + 6)68/;906#,25/&;<$0+ @abc:1_24_206 T33330332002223002020303331321221000 + ))4(&)9592)#)694(,)292:(=7$.18,()65 @abc:1_25_143 T23202003031200220301303302012203132 + :4;/#&<9;&*;95-7;85&;587#16>%&,9<2& @abc:1_25_1866 T03201321022131101112012330221130311 + =<>9;<@7?(=6,<&?=6=(=<641:?'<1=;':4 @abc:1_27_584 T10010330110103213112323303012103101 + 82'('*.-8+%#2)(-&3.,.2,),+.':&,'(&/ @abc:1_27_1227 T02003022123001003201002031303302011 + 492:;>A:<;34<<=);:<<;9=7<3::<::3=>' @abc:1_27_1350 T13130101101021211013220222221301231 + 95,)<(4./;<938=64=+2/,.4),3':97#33& @abc:1_29_477 T13130101101021211013300302223003030 + 94=55:75=+:/7><968;;#&+$#3&6,#1#4#' @abc:1_30_882 T20102033000233 + 2(+-:-3<;5##/; @abc:1_31_221 T03301311201100030300100233220102031 + 89>9>5<139/,&:7969972.274&%:78&&746 @abc:1_31_1313 T0133113130033012232100010101 + ;3<7=7::)5*4=&;<7>4;795065;9 @abc:1_529_129 T132222301020322102101322221322302.3302.3.3..221..3 + >>%/((B6-&5A0:6)>;'1)B*38/?(5=%B+!&<-9!%!@!!)%)!!( cutadapt-1.9.1/tests/cut/anywhere_repeat.fastq0000664000175000017500000000120412575761274022255 0ustar marcelmarcel00000000000000@prefix:1_13_1400/1 CGTCCGAANTAGCTACCACCCTGATTAGACAAAT + )3%)&&&&!.1&(6:<'67..*,:75)'77&&&5 @prefix:1_13_1500/1 NNNNANNNNNNNNNNNNNNNNNNNNNNNNNNNNN + <=A:A=57!7<';<6?5;;6:+:=)71>70<,=: @prefix:1_13_1550/1 NNNNANNNNNNNNNNNNNNNNNNNNNNNNNNNNN + <=A:A=57!7<';<6?5;;6:+:=)71>70<,=: @prefix:1_13_1600/1 NNNNATGTCCCCTGCCACATTGCCCTAGTNNNNN + <=A:A=57!7<';<6?5;;6:+:=)71>70<,=: @prefix:1_13_1700/1 NNNNATGTCCCCTGCCACATTGCCCTAGTTTATT + <=A:A=57!7<';<6?5;;6:+:=)71>70<,=: @prefix:1_13_1800/1 GTTCATGTCCCCTGCCACATTGCCCTAGTTTATT + <=A:A=57!7<';<6?5;;6:+:=)71>70<,=: @prefix:1_13_1900/1 ATGGCTGTCCCCTGCCACATTGCCCTAGTNNNNN + <=A:A=57!7<';<6?5;;6:+:=)71>70<,=: cutadapt-1.9.1/tests/cut/stripped.fasta0000664000175000017500000000004312575761274020705 0ustar marcelmarcel00000000000000>first SEQUENCE1 >second SEQUENCE2 cutadapt-1.9.1/tests/cut/minlen.fa0000664000175000017500000000030712575761274017630 0ustar marcelmarcel00000000000000>read_length5 T23302 >read_length6 T023302 >read_length7 T1023302 >read_length8 T11023302 >read_length9 T111023302 >read_length10 T2111023302 >read_length11 T02111023302 >read_length12 T002111023302 cutadapt-1.9.1/tests/cut/small.fastq0000664000175000017500000000034712575761274020212 0ustar marcelmarcel00000000000000@prefix:1_13_573/1 CGTCCGAANTAGCTACCACCCTGA + )3%)&&&&!.1&(6:<'67..*,: @prefix:1_13_1259/1 AGCCGCTANGACGGGTTGGCCC + ;<:&:A;A!9<<<,7:<=3=;: @prefix:1_13_1440/1 CAAGATCTNCCCTGCCACATTGCCCTAGTTAAAC + <=A:A=57!7<';<6?5;;6:+:=)71>70<,=: cutadapt-1.9.1/tests/cut/small.trimmed.fastq0000664000175000017500000000021312575761274021642 0ustar marcelmarcel00000000000000@prefix:1_13_573/1 CGTCCGAANTAGCTACCACCCTGA + )3%)&&&&!.1&(6:<'67..*,: @prefix:1_13_1259/1 AGCCGCTANGACGGGTTGGCCC + ;<:&:A;A!9<<<,7:<=3=;: cutadapt-1.9.1/tests/cut/paired-onlyA.2.fastq0000664000175000017500000000033112575761274021557 0ustar marcelmarcel00000000000000@read1/2 other text GCTGGAGACAAATAA + HHHHHHHHHHHHHHH @read2/2 TGTGGCCTGTTG + ###HHHHHHHHH @read3/2 TGTTATTAATATCAAGTTGG + #HHHHHHHHHHHHHHHHHHH @read4/2 CATCCCGTCAACATTCAAACGGCCTGTCCA + HH############################ cutadapt-1.9.1/tests/cut/paired-m27.2.fastq0000664000175000017500000000044512575761274021110 0ustar marcelmarcel00000000000000@read1/2 other text GCTGGAGACAAATAACAGTGGAGTAGTTTT + HHHHHHHHHHHHHHHHHHHHHHHHHHHHHH @read2/2 TGTGGCCTGTTGCAGTGGAGTAACTCCAGC + ###HHHHHHHHHHHHHHHHHHHHHHHHHHH @read3/2 TGTTATTAATATCAAGTTGGCAGTG + #HHHHHHHHHHHHHHHHHHHHHHHH @read4/2 CATCCCGTCAACATTCAAACGGCCTGTCCA + HH############################ cutadapt-1.9.1/tests/cut/illumina.info.txt0000664000175000017500000006100512600000013021303 0ustar marcelmarcel00000000000000SEQ:1:1101:9010:3891#0/1 adapter start: 51 1 51 81 ATAACCGGAGTAGTTGAAATGGTAATAAGACGACCAATCTGACCAGCAAGG GCCTAACTTCTTAGACTGCCTTAAGGACGT AAGCCAAGATGGGAAAGGTC adapt FFFFFEDBE@79@@>@CBCBFDBDFDDDDD<@C>ADD@B;5:978@CBDDF FDB4B?DB21;84?DDBC9DEBAB;=@<@@ B@@@@B>CCBBDE98>>0@7 SEQ:1:1101:9240:3898#0/1 -1 CCAGCAAGGAAGCCAAGATGGGAAAGGTCATGCGGCATACGCTCGGCGCCAGTTTGAATATTAGACATAATTTATCCTCAAGTAAGGGGCCGAAGCCCCTG GHGHGHHHHGGGDHHGDCGFEEFHHGDFGEHHGFHHHHHGHEAFDHHGFHHEEFHGHFHHFHGEHFBHHFHHHH@GGGDGDFEEFC@=D?GBGFGF:FB6D SEQ:1:1101:9207:3899#0/1 adapter start: 64 1 64 94 TTAACTTCTCAGTAACAGATACAAACTCATCACGAACGTCAGAAGCAGCCTTATGGCCGTCAAC GCCTAACTTCTTAGACTGCCTTAAGGACGT ATACATA adapt HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHFHHHHHHCFHHF HHFHFFFFFBHHGHHHFFHHFHGGHHDEBF GCDCEEEFDFFHHHCFFEFE?EBFEB?3 SEQ:1:1101:9185:3939#0/1 -1 CGTTGAGGCTTGCGTTTATGGTACGCTGGACTTTGTAGGATACCCTCGCTTTCCTGCTCCTGTTGAGTTTATTGCTGCCGTCATTGCTTATTATGTTCATC HHHHHHHHHHHHHHFHHEHHHDHHFGHHHCHHHHHDHHHHFECEGBD@@?A?DAFF9F<@@08?< SEQ:1:1101:9140:3961#0/1 adapter start: 66 1 66 96 CAGGAGAAACATACGAAGGCGCATAACGATACCACTGACCCTCAGCAATCTTAAACTTCTTAGACG GCCTAACTTCTTAGACTGCCTTAAGGACGT AATCA adapt HHHHHHHGHHHHHHHHHHHGHHHHHHHHHHHHHHHHFHHHHHHFGHHHHHHHHHHHHHHHHDHHFH HHHEHHFHFHHHHHGHHHHHFHGHGHHHHH EHCFG SEQ:1:1101:9073:3961#0/1 adapter start: 49 1 49 79 GTGGCAAGTCTGCCGCTGATAAAGGAAAGGATACTCGTGATTATCTTGC GCCTAACTTCTTAGACTGCCTTAAGGACGT TGCTGCATTTCCTGAGCTTAAT adapt HHHHHHHHFHHHHHHGHHHHHHHHHEHHGHHGHHHHHHHHHHGEHHHHH GFHFFGHFHHGHHCHHFDGHHHHHFHHHFC DFGHHHHHHCFGHHEGEFBGGB SEQ:1:1101:9196:3971#0/1 adapter start: 18 1 18 48 ACCAGAAGGCGGTTCCTG GCCTAACTTCTTAGACTGCCTTAAGGACGT AATGAATGGGAAGCCTTCAAGAAGGTGATAAGCAGGAGAAACATACGAAGGCG adapt HHHHHHHHHFHHHHHHHH HGHHHGHHHHHHHFHHHHHHHHHHHEHHHH HHHHHHHHFHHGHHHHHEHFHHHHBHEHHGEHFHFHHFHHHHFBDFHF?HHHH SEQ:1:1101:9053:3973#0/1 -1 TTCACGTTCTGGTTGGTTGTGGCCTGTTGATGCTAAAGGTGAGCCGCTTAAAGCTACCAGGTTTATTGCTGTTTGTTTCTATGTGGCTTAAAACGTTACCA A39>A################################################################################################ SEQ:1:1101:9120:3979#0/1 -1 GGCGTTGACAGATGTATCCATCTGAATGCAATGAAGAAAACCACCATTACCAGCATTAACCGTCAAACTATCAAAATATAACGTTGACGATGTAGCTTTAG HHHHHHHHHHHGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHFFGFFDHBHHHFGEHHHFGHHHEHHHGH SEQ:1:1101:9045:3988#0/1 adapter start: 91 1 91 101 TAACCCTGAAACAAATGCTTAGGGATTTTATTGGTATCAGGGTTAATCGTGCCAAGAAAAGCGGCATGGTCAATATAACCAGCAGTGTTAA GCCTAACTTC adapt HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHFHHHHHHHFHHHHHHHHHHHFHHHHHHDHHHHHHHFHFFHHGHEHHGHHHGHGHHFH GHHFFFEFFE SEQ:1:1101:9418:3756#0/1 -1 TAATCGTGCCAAGAAAAGCGGCATGGTCAATATAACCAGTAGTGTTAACAGTCGGGAGAGGAGTGGCATTAACACCATCCTTCATGAACTTAATCCACTGT HHHHHHHHHHHHHHHHFHHHGHEHHHFHHHHFFEHHFHHHHGHHFHFHHHGHHHDHFHCHFCFBCFEFDEHHHHHG@GGGGHHGHFFEG=AB@C:EDEEEH SEQ:1:1101:9394:3759#0/1 -1 CCCTCGCTTTCCTGCTCCTGTTGAGGTTATTGCTGCCGTCATTGCTTATTATGTTCATCTCGGCAACATTCATACGGTCTGGCTTATCCGTGCAGAGACTG ##################################################################################################### SEQ:1:1101:9365:3766#0/1 -1 AAGCACATCACCTTGAATGCCACCGGAGGCGGCTTTTTGACCGCCTCCAAACAATTTAGACATGGCGCCACCAGCAAGAGCAGAAGCAATACCGCCAGCAA HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHFFHHHHFHHHHEHHFGHHHHFEHHHHFEHHFDFFAFHEFHFHDFFFFHHDH?DFABFDHADFDHHHFBF SEQ:1:1101:9436:3776#0/1 -1 GAAGGACGTCAATAGTCACACAGTCCTTGACGGTATAATAACCACCATCATGGCGACCATCCAAAGGATAAACATCATAGGCAGTCGGGAGGGGAGTCGGA HHHHHHHHHHHHGHHHHHHHHHHHHHHHHHHHHFHGHHHHHHHGHHHHHHFDHHHHHHHHHHHHHFH?HHHHHFBHEH@GHHGD=EEEE88==%893A@@; SEQ:1:1101:9354:3801#0/1 -1 CCAGCAAGAGCAGAAGCAATACCGCCAGCAATAGCACCAAACATAAATCACCTCACTTAAGTGGCTGGAGACAAATAATCTCTTTAATAACCTGATTCAGC HHHHHHHHHGHHGHHEGHHEHFGFEHHGHGGHHHHHHHFHGHHFHHEFFFHEHHFHHHDHE5EDFCAC+C)4&27DDA?7HFHDHEFGFG,<@7>?>??EDC@FDDDDCDFE?DEEFGFCC@;@D SEQ:1:1101:9477:3819#0/1 adapter start: 28 1 28 58 ATAAAGGAAAGGATACTCGTGATTATCT GCCTAACTTCTTAGACTGCCTTAAGGACGT TGCTGCTGCATTTCCTGAGCTTAATGCTTGGGAGCGTGCTGGT adapt HHHHHHHHHHHHHHHHGHHHHHHHHHHH HHHHHHHHHHHHHFHHFHFHHHHHHHEHHH HHEHHHHHHEHHDHDHBHHGCEHHHHHGGEFGG=DGDGCGC68 SEQ:1:1101:9428:3823#0/1 -1 CGTCAGTAAGAACGTCAGTGTTTCCTGCGCGTACACGCAAGGTAAACGCGAACAATTCAGCGGCTTTAACCGGACGCTCGACGCCATTAATAATGTTTTCC HHHHHHHHHHHHHHHHHHHHHHHHHFHHHHHFGHGHHHHHHHEHHHHFHHHHHFHHHFHH?FHEFFFDGFDAFDCFAFDBFGBFGFHHHHHHHHHFHFH;8 SEQ:1:1101:9403:3824#0/1 adapter start: 70 1 70 100 GCTCAGGAACAAAGAAACGCGGCACAGAATGTTTATAGGTCTGTTGAACACGACCAGAAAACTGGCCTAA GCCTAACTTCTTAGACTGCCTTAAGGACGT C adapt HHHHHHHHHHHHHHHHHHHEHHHHHHHHHHHHHHHHGDHDHHHHHHHHHGHHHHGHEHGHHHHFFHHHHH EHFHFEHHFGBFFFDHCEHHHHGH=HHH=G E SEQ:1:1101:9362:3824#0/1 -1 ACCATGAAACCAACATAAACATTATTGCCCGGCGTACGGGGAAGGACGTCAATAGTCACACAGTCCTTGACGGTATAATAACCACCATCATGGCGACCATC HHHHHHHGHHHHHHHHHHHHHHHGHHHHHFHHHHHHHHFHHFHHHFHHHHHHHHHFHEHHHFHBHFHHHFCEFDEHHHHGHHHHHHHHHEFFFHHFFFDAG SEQ:1:1101:9480:3842#0/1 adapter start: 54 1 54 84 GTACGGATTGTTCAGTAACTTGACTCATGATTTCTTACCTATTAGTGGTTGAAC GCCTAACTTCTTAGACTGCCTTAAGGACGT CGCATCGGACTCAGATA adapt BDCCC@5<<<@BBB7DDDDD<<<9>::@<5DDDDDCDCBEDCDDDDBDDDBAA1 /82638?D=CD2*><6BCFGFF?E?FEFFHBBFEE3E, ;/97-0(6,?=BB@A@D9D########### SEQ:1:1101:9360:3884#0/1 -1 TAATACCTTTCTTTTTGGGGTAATTATACTCATCGCGAATATCCTTAAGAGGGCGTTCAGCAGCCAGCTTGCGGCAAAACTGCGTAACCGTCTTCTCGTTC HGDEHGHDGHFGFGHFDFFF7EEEEGGFGGEGHEGHHHHFFFEHHHFHEHFBFFF>?DEEBF=?CDB:DFBGFBBGDFFHF?FAFGGABFGGFAFE6EDDC SEQ:1:1101:9323:3894#0/1 adapter start: 100 -1 ATACCGATATTGCTGGCGACCCTGTTTTGTATGGCAACTTGCCGCCGCGTGAAATTTCTATGAAGGATGTTTTCCGTTCTGGTGATTCGTCTAAGAAGTTG HHGHHHHHHHHHHHHHHHHHHHEHDHHHHHGEHHFFHHFFFHHHHHHHHFHDHHBHGHB?HHDFFF?EFEHFHBFGEGGFFFDFBHFHHHHHFHHEFFFCF SEQ:1:1101:9267:3900#0/1 adapter start: 89 1 89 101 GTTTTGGATTTAACCGAAGATGATTTCGATTTTCTGACGAGTAACAAAGTTTGGATTGCTACTGACCGCTCTCGTGCTCGTCGCTGCGT GCCTAACTTCTT adapt HHHHHHHHHHHHHHHHHHHHHHHHHHFHHHHHHHHHHHHHHFHHHHEHHEHHHFHHHHHHHHHHFHFHECFFHABGGGIGHHHGGFFGF FCACFECEB5<; SEQ:1:1101:9416:3909#0/1 -1 TAAACGTGACGATGAGGGACATAAAAAGTAAAAATGTCTACAGTAGAGTCAATAGCAAGGCCACGACGCAATGGAGAAAGACGGAGAGCGCCAACGGCGTC HHHHHHHHHHHHHHHHHHHHHHHHHHHHFHHHHHHHHHHHHHHHHHHHEHHGHHFEFHEFHFFDHEFHFAFFFA?GDFGFE@FFFB?B7EEFEFE?DAA## SEQ:1:1101:9360:3917#0/1 adapter start: 68 1 68 98 ATGCTTGGGAGCGTGCTGGTGCTGATGCTTCCTCTGCTGGTATGGTTGACGCCGGATTTGAGAATCAA GCCTAACTTCTTAGACTGCCTTAAGGACGT AAA adapt HHHHHHHHHHHHHHHHHHHFHHHHHHHHHHFHHHHHHHFHEFHHHEHHCFFEFEE9AFFBBDCDCAEE EFHD??>E4@EC>74<-5@############## SEQ:1:1101:9307:3927#0/1 adapter start: 15 1 15 45 TCAGCGCCTTCCATG GCCTAACTTCTTAGACTGCCTTAAGGACGT ATGAGACAGGCCGTTTGAATGTTGACGGGATGAACATAATAAGCAATGACGGCAGC adapt FFFFFFFFFFFFFDF =EEEEDFFFFBEEEEFFFFFFFFFFFDEEB DFFFFDFFFFEF@FFFBEFFBFFEF--@@EFHFHBHFHCFHHGGGHEGHEGHEF@GHHFHEDHH;H SEQ:1:1101:9309:3957#0/1 adapter start: 72 1 72 101 GTCAGATATGGACCTTGCTGCTAAAGGTCTAGGAGCTAAAGAATGGAACAACTCACTAAAAACCAAGCTGTC GCCTAACTTCTTAGACTGCCTTAAGGACG adapt HHHHHHHHHHHHHHHHHHHHHHHHHGHFHHHFHHHHHHHHGHHHFHHHHHHHFHDHHHHHHFHCHHEAHHDG GHFHFHDHHHGHHEHHFFH?HHHFDGGG? SEQ:1:1101:9425:3960#0/1 -1 CTGACGCAGAAGAAAACGTGCGTCAAAAATTACGTGCAGAAGGAGTGATGTAATGTCTAAAGGTAAAAAACGTTCTGGCGCTCGCCCTGGTCGTCCGCAGC 8?8?C?BC@BD=ABB==BD?CADD=AD>C@@CCBBDD@B/143'3.>>@9BCBDDDC8@@;@???FB=DFB=>C=EEFFFFFEFFFFF:FEF@FEF EFBGGGFFGHFFHD5DGB=>>@;A>C5?A SEQ:1:1101:9363:3989#0/1 adapter start: 95 -1 CCTCCAAGATTTGGAGGCATGAAAACATACAATTGGGAGGGTGTCAATCCTGACGGTTATTTCCTAGACAAATTAGAGCCAATACCATCAGCTTTGCCTAA HHHHHHHHHHHHHHHHHHHHHGHHHHHHHHHHGHHHHHHHGB B;FBFFEGGEGB==EGFHHGEEGB;5 SEQ:1:1101:9554:3781#0/1 -1 CACGCTCTTTTAAAATGTCAACAAGAGAATCTCTACCATGAACAAAATGTGACTCATATCTAAACCAGTCCTTGACGAACGTGCCAAGCATATTAAGCCAC HHHHHHHHHHHHHGGHHHHHHGHFHHHHHHEHHFHHHEHHHHHHHEHHGHHHHEHHHGFHHHEHHHHHHEEFFEDFEDFF>ACBAHGHHHHECEGHBCFEE SEQ:1:1101:9695:3783#0/1 adapter start: 52 1 52 82 AATAACCCTGAAACAAATGCTTAGGGATTTTATTGGTATCAGGGTTAATCGT GCCTAACTTCTTAGACTGCCTTAAGGACGT GCCAAGAAAAGCGGCATGG adapt HHHHHHHHHHHHHHHHHHHHHHHHHHGHHHHHHHHHHHHHGHHHHHHHHHHF HHHHHHFHGEHEHHHHHGHHHHHHHHHFHH FHGGHHHHHHGGHGFHHHG SEQ:1:1101:9572:3788#0/1 -1 ACCAACACGGCGAGTACAACGGCCCAGCTCAGAAGCGAGAACCAGCTGCGCTTGGGTGGGGCGATGGTGATGGTTTGCATGTTTGGCTCCGGTCTGTAGGC FFFFFFFFF=EBEB0A@A@>A?;FED;;<7??A>>9A>?DA1ADD?D:FF:BC;@############## SEQ:1:1101:9601:3793#0/1 -1 GCCGCTAATCAGGTTGTTTCTGTTGGTGCTGATATTGCTTTTGATGCCGACCCTAAATTTTTTGCCTGTTTGGTTCGCTTTGAGTCTTCTTCGGTTCCGAC HHHHHHHHHHHHHHHHHHHHHHHHHHHGHHHEHEGHFHHHHHHHHFHFHCHHHFHFFHHHHHH@HHHHHHGHHHFHHGFHHCFHEGGGFEGE?GCDAD6AD SEQ:1:1101:9634:3800#0/1 -1 TTTATGCGGACACTTCCTACAGGTAGCGTTGACCCTAATTTTGGTCGTCGGGTACGCAATCGCCGCCAGTTAAATAGCTTGCAAAATACGTGGCCTTATGG HHGHFHFHHHHCGHHFHHHHHHGEHHHHHGFBEFHHFEHDHHHGFHHEHHFF9ECD?CEEHEDF?GEEDEEG SEQ:1:1101:9501:3800#0/1 adapter start: 42 1 42 72 TGACCACCTACATACCAAAGACGAGCGCCTTTACGCTTGCCT GCCTAACTTCTTAGACTGCCTTAAGGACGT TTAGTACCTCGCAACGGCTGCGGACGACC adapt HHHHHHHHHHHHHHHHFHHHHHHHHFHHHHHHHHHHHHHHHH HHHHHFHHHHHHHHHHHHHHFBHAEDBEFB BEF=ADEEGGGEFCC>B1CCDCB7FGFFE SEQ:1:1101:9703:3807#0/1 adapter start: 27 1 27 57 TAATAACCTGATTCAGCGAAACCAATC GCCTAACTTCTTAGACTGCCTTAAGGACGT CGCGGCATTTAGTAGCGGTAAAGTTAGACCAAACCATGAAACCA adapt HHHHHHHHHHHHHHHHHHHHHHGHHHG HHHFHGFHHHHFFHHHHHDHHHHBGFEFHH HFHFHFDHFDFFFEHHGHDHHGHHEHHG@E?FDGBEBDGGFFGF SEQ:1:1101:9728:3808#0/1 adapter start: 7 1 7 37 CAGAAAA GCCTAACTTCTTAGACTGCCTTAAGGACGT CCTACCGCGCTTCGCTTGGTCAACCCCTCAGCGGCAAAAATTAAAATTTTTACCGCTTCGGCGT adapt HHHFHHH HHHHHHHHHHHHHHHFHHHHHHHHHHHFB8 @B9C?CC@CHCFFFHF=FEED<4:?:>@,@;@>.>6;+?&@><:BC?DE@=7@### SEQ:1:1101:9676:3812#0/1 adapter start: 1 1 1 31 T GCCTAACTTCTTAGACTGCCTTAAGGACGT TATTGCCCGGCGTACGGGGAAGGACGTCAATAGTCACACAGTCCTTGACGGTATAATAACCACCATCATG adapt H HHHHHHHHHHHHHHHHHHHHHHHFHHHHHH HDHFHHHHHHHECHHEHEHHH=HHFHHFHFHHFHFHGFFEECFFHEFFGFGHFFEHHFHHFFFHFDG?FCBCDFFFEBFFE@DFEGGEEG?GF>>:;@A SEQ:1:1101:9720:3834#0/1 adapter start: 74 1 74 101 TAGACATTTTTACTTTTTATGTCCCTCATCGTCACGTTTATGGTGAACAGTGGATTAAGTTCATGAAGGATGGT GCCTAACTTCTTAGACTGCCTTAAGGA adapt HGHHHHHHHHHHHHHHHGGHEGGFGHFGHFHHDGHGHGHHHHHHHHHHFHHHHHFHFHFFHEFHF=FFHFHHFF HFGAGGHHDHGHBHHHEGDGC>FEC@D SEQ:1:1101:9635:3844#0/1 adapter start: 4 1 4 34 GACC GCCTAACTTCTTAGACTGCCTTAAGGACGT ATCCAAAGGATAAACATCATAGGCAGTCGGGAGGGTAGTCGGAACCGAAGAAGACTCAAAGCGAACC adapt HHHH GHHHHHHHHHGHHHHHHGHHGHHHGHGHHH HFHHH;GGCGFH?HHFHEHHFFHFHFFFHHFDHHHHHHHHHEGHHHHGHGHEHHHHC@?GFEGBGHH SEQ:1:1101:9744:3849#0/1 adapter start: 55 1 55 85 AAACATAGTGCCATGCTCAGGAACAAAGAAACGCGGCACAGAATGTTTATAGGTC GCCTAACTTCTTAGACTGCCTTAAGGACGT TGTTGAACACGACCAG adapt HHHHHHHGCHHFHHFHHFFHEHFGCHHGDGHEFFHFHEHHGBBGFCDGFEEFDCF FGEEEHEHFHHHCFF?EEFDEFD6FHGEHH HEHHHBBE?:CCDA7G SEQ:1:1101:9725:3850#0/1 -1 ATAACCCTGAAACAAATGCTTAGGGATTTTATTGGTATCAGGGTTAATCGTGCCAAGAAAAGCGGCATGGTCAATATAACCAGTAGTGTTAACAGTCGGGA FDGGGDGGGEGGGGGBGBEGFFFDFFFFGGFGGGGFBGGGGGEFDFFGEGFFEFEDGGEEF9DCF?EFBBEDBBGFGGEGGGGCFGFEB@B7C>CDEEE## SEQ:1:1101:9544:3854#0/1 -1 TAGCGGTAAAGTTAGACCAAACCATGAAACCAACATAAACATTATTGCCCGGCGTACGGGGAAGGACGTCAATAGTCACACAGTCCTTGACGGTATAATAA HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHFHHHHHHHHHHHHFFHHHHHHHHHBFHHHHHFHHHHHHHHHHHHHHFCHHHBHE SEQ:1:1101:9581:3856#0/1 -1 GGGCGGTGGTCTATAGTGTTATTAATATCAAGTTGGGGGAGCACATTGTAGCATTGTGCCAATTCATCCATTAACTTCTCAGTAACAGATACAAACTCATC HHHHHHEHHHHHHHGHHHHHHHHHHHHHHHHHHHHHHHFHHHHGHHHHHHHHHHHHHHHGGHHHFHHHHHGHFGHGEGHHHHHHFEHFHGDGGFFGHH@DH SEQ:1:1101:9649:3858#0/1 adapter start: 33 1 33 63 CCTCCAAACAATTTAGACATGGCGCCACCAGCA GCCTAACTTCTTAGACTGCCTTAAGGACGT AGAGCAGAAGCAATACCGCCAGCAATAGCAACAAACAT adapt BFEEEE@@BA@3>8<>CCDDBEE@ DEFFDDFE=EEB@EDEEFDFDECEEBEB:C -@<698<@BBA@DCBDDFCEBFCCD;DC=D@C###### SEQ:1:1101:9616:3862#0/1 adapter start: 91 1 91 101 GAATTAAATCGAAGTGGACTGCTGGCGGAAAATGAGAAAATTCGACCTATCCTTGCGCAGCTCGAGAAGCTCTTACTTTGCGACCTTTCGC GCCTAACTTC adapt HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHFHHHHHHHEHHHHHHHHHHHHHHFHHHHHHHFFFHFDHHEHHHGHHHHGDEHHGHHEGH GCHHHHEHFG SEQ:1:1101:9696:3866#0/1 -1 CAAGTTGCCATACAAAACAGGGTCGCCAGCAATATCGGTATAAGTCAAAGCACCTTTAGCGTTAAGGTACTGAATCTCTTTAGTCGCAGTAGGCGGAAAAC HHHHHHHHHHHHHHHHHHHHEHEHHHEHHHHFHHHHHHFHHHFHFHHHHHHHHFHHHHFHHFEHBHFEHHHHCEEHHFHHHHHHHHHHHHEHHHHCAFEFG SEQ:1:1101:9512:3869#0/1 -1 GCTCGACGCCATTAATAATGTTTTCCGTAAATTCAGCGCCTTCCATGATGAGACAGGCCGTTTGAATGTTGACGGGATGAACATAATAAGCAATGACGGCA HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHFHHHHFHHHDHHHEHHFFFFFFHFAFEFH?E@FFGGGFGHFHAEFGFFFCEEFF SEQ:1:1101:9723:3870#0/1 adapter start: 66 1 66 96 CTTTAGCAGCAAGGTATATATCTGACTTTTTGTTAACGTATTTAGCCACATAGCAACCAACAGACA GCCTAACTTCTTAGACTGCCTTAAGGACGT TATAA adapt ################################################################## ############################## ##### SEQ:1:1101:9667:3874#0/1 -1 CTGCTGCATTTCCTGAGCTTAATGCTTGGGAGCGTGCTGGTGCTGATGCTTCCTCTGCTGGTATGGTTGACGCCGGATTTGAGAATCAAAAAGAGCTTACT HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHAHHHHEHHD=DAD>D6ADGE@EBE;@?BCGGE?4>ADAAC SEQ:1:1101:9565:3879#0/1 adapter start: 24 1 24 54 AGCCTTATGGCCGTCAACATACAT GCCTAACTTCTTAGACTGCCTTAAGGACGT ATCACCATTATCGAACTCAACGCCCTGCATACGAAAAGACAGAATCT adapt HHHHHHHHHHHHHHHHHFHHGFFH HHHHHHHHHDGHHFHFHHHHHFECHFFHHH HHEHFCFFFFHEHDEFHHCHHEG?GFEGGEGHHHHHH?HH?EFFFFF SEQ:1:1101:9721:3885#0/1 adapter start: 51 1 51 81 TTCCTCAAACGCTTGTTCGGTGGATAAGTTATGGCATTAATCGATTTATTT GCCTAACTTCTTAGACTGCCTTAAGGACGT ATCTCGCGGAAGAAAAACAC adapt >BC?:A?=<>::A=528882.53)5.77;407)*9@:AA8CAA######## ############################## #################### SEQ:1:1101:9707:3894#0/1 adapter start: 40 1 40 70 AACACCATCCTTCATGAACTTAATCCACTGTTCACCATAA GCCTAACTTCTTAGACTGCCTTAAGGACGT ACGTGACGATGAGGGACATAAAAAGTAAAAA adapt F@F8DEE@EEBCCCCFFEFDDC=DCCFFF=ADD=D>@AA@ FFFDE99>,>>@=856>;6C<@1:39@>6@ =??:BAEEEBEDFBF69:<8B5D>@DEDEEF?F><>B@CBCD==BB DCDCCDD=8A>@<3A499:1@@@@CDC@@= @=<6@<@:=>189<16 SEQ:1:1101:9903:3754#0/1 -1 ACCAAAATTAGGGTCAACGCTACCTGTAGGAAGTGTCCGCATAAAGTGCACCGCATGGAAATGAAGACGGCCATCAGCTGTACCATACTCAGGCACACAAA GFEGGGGGBGE@EAEEGGFGGEGGFGEFFGFGFFGGEGGGGEFGCFCEFBF7FGEGEF?BFEEFDFFE??AADD+D@C@CGFCE6FDFFDFBGFDD@DAAD SEQ:1:1101:9878:3755#0/1 adapter start: 32 1 32 62 AGAACGTGAAAAAGCGTCCTGCGTGTAGCGAA GCCTAACTTCTTAGACTGCCTTAAGGACGT CTGCGATGGGCATACTGTAACCATAAGGCCACGTATTTT adapt HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH HFHHHBHHHHHHHHHFHFHEHHHHHHHHHH HHHEFHFHHHDFHHHHFGHHHHHFCEHECHHF?D5D7@D SEQ:1:1101:9833:3756#0/1 adapter start: 65 1 65 95 TCATCGTCACGTTTATGGTGAACAGTGGATTAAGTTCATGAAGGATGGTGTTAATGCCACTCCTC GCCTAACTTCTTAGACTGCCTTAAGGACGT TCCCGA adapt HHHHHHHHHHHHHHHHHFHHHHHHHHHHHHHHHHFHHHHGHHFHHHHHEHEHHHHFHEHHHEHFH HHFHHFEFFB=;,01:99;;HHHHHHEFGE EFFBFB SEQ:1:1101:9991:3777#0/1 -1 GCTTTGAGTCTTCTTCGGTTCCGACTACCCTCCCGACTGCCTATGATGTTTATCCTTTGGATGGTCGCCATGATGGTGGTTATTATACCGTCAAGGACTGT HHHHHHHHHHHHHHHHHHHHHHGHHHGHHHHHHHGHHHHHHGHHHHHHHHHHHHHFHHFFDFFFCFFDHCFF;BFGEFGEGFGGFFF.CFDCCEDB=CBC@ cutadapt-1.9.1/tests/cut/anchored-back.fasta0000664000175000017500000000013012575761274021531 0ustar marcelmarcel00000000000000>read1 sequence >read2 sequenceBACKADAPTERblabla >read3 sequenceBACKADA >read4 sequence cutadapt-1.9.1/tests/cut/suffix.fastq0000664000175000017500000000553212600000013020345 0ustar marcelmarcel00000000000000@1_13_85_my_suffix_no_adapter T110020300.0113010210002110102330021 + 7&9<&77)&!<7))%4'657-1+9;9,.<8);.;8 @1_13_573_my_suffix_1 T312311200.30213011011132 + 6)3%)&&&&!.1&(6:<'67..*, @1_13_1259_my_suffix_1 T002112130.201222332211 + =;<:&:A;A!9<<<,7:<=3=; @1_13_1440_my_suffix_no_adapter T110020313.1113211010332111302330001 + =<=A:A=57!7<';<6?5;;6:+:=)71>70<,=: @1_14_177_my_suffix_no_adapter T31330222020233321121323302013303311 + :8957;;54)'98924905;;)6:7;1:3<88(9: @1_14_238_my_suffix_1 T0133103120031002212223 + ?><5=;<<<12>=<;1;;=5); @1_15_1098_my_suffix_no_adapter T32333033222233020223032312232220332 + #,##(#5##*#($$'#.##)$&#%)$1##-$&##% @1_16_404_my_suffix_1 T03310320002130202331112 + 78;:;;><>9=9;<<2=><<1;5 @1_16_904_my_suffix_no_adapter T21230102331022312232132021122111212 + 9>=::6;;99=+/'$+#.#&%$&'(($1*$($.#. @1_16_1315_my_suffix_1 T032312311122103330103103 + <9<8A?>?::;6&,%;6/)8<<#/ @1_16_1595_my_suffix_no_adapter T22323211312111230022210011213302012 + >,<=<>@6<;?<=>:/=.>&;;8;)17:=&,>1=+ @1_17_1379_my_suffix_no_adapter T32011212111223230232132311321200123 + /-1179<1;>>8:':7-%/::0&+=<29,7<8(,2 @1_18_1692_my_suffix_no_adapter T12322233031100211233323300112200210 + .#(###5%)%2)',2&:+#+&5,($/1#&4&))$6 @1_19_171_my_suffix_no_adapter T10101101220213201111011320201230032 + )6:65/=3*:(8%)%2>&8&%;%0&#;$3$&:$#& @1_22_72_my_suffix_no_adapter T13303032323221212301322233320210233 + 3/#678<:.=9::6:(<538295;9+;&*;)+',& @1_22_1377_my_suffix_no_adapter T22221333311222312201132312022322300 + )##0%.$.1*%,)95+%%14%$#8-###9-()#9+ @1_23_585_my_suffix_1 T300103103101303121221 + >55;8><96/18?)<3<58<5 @1_23_809_my_suffix_no_adapter T13130101101021211013220302223302112 + :7<59@;<<5;/9;=<;7::.)&&&827(+221%( @1_24_138_my_suffix_1 T33211130100120323002 + 6)68/;906#,25/&;<$0+ @1_24_206_my_suffix_no_adapter T33330332002223002020303331321221000 + ))4(&)9592)#)694(,)292:(=7$.18,()65 @1_25_143_my_suffix_no_adapter T23202003031200220301303302012203132 + :4;/#&<9;&*;95-7;85&;587#16>%&,9<2& @1_25_1866_my_suffix_no_adapter T03201321022131101112012330221130311 + =<>9;<@7?(=6,<&?=6=(=<641:?'<1=;':4 @1_27_584_my_suffix_no_adapter T10010330110103213112323303012103101 + 82'('*.-8+%#2)(-&3.,.2,),+.':&,'(&/ @1_27_1227_my_suffix_no_adapter T02003022123001003201002031303302011 + 492:;>A:<;34<<=);:<<;9=7<3::<::3=>' @1_27_1350_my_suffix_no_adapter T13130101101021211013220222221301231 + 95,)<(4./;<938=64=+2/,.4),3':97#33& @1_29_477_my_suffix_no_adapter T13130101101021211013300302223003030 + 94=55:75=+:/7><968;;#&+$#3&6,#1#4#' @1_30_882_my_suffix_1 T20102033000233 + 2(+-:-3<;5##/; @1_31_221_my_suffix_no_adapter T03301311201100030300100233220102031 + 89>9>5<139/,&:7969972.274&%:78&&746 @1_31_1313_my_suffix_1 T0133113130033012232100010101 + ;3<7=7::)5*4=&;<7>4;795065;9 @1_529_129_my_suffix_no_adapter T132222301020322102101322221322302.3302.3.3..221..3 + >>%/((B6-&5A0:6)>;'1)B*38/?(5=%B+!&<-9!%!@!!)%)!!( cutadapt-1.9.1/tests/testcolorspace.py0000664000175000017500000001000012575761274020636 0ustar marcelmarcel00000000000000# coding: utf-8 from __future__ import print_function, division, absolute_import from cutadapt.colorspace import encode, decode from cutadapt.scripts.cutadapt import main from .utils import run, datapath # If there are any unknown characters in the test sequence, # round tripping will only work if all characters after the # first unknown character are also unknown: # encode("TNGN") == "T444", but # decode("T444") == "TNNN". sequences = [ "", "C", "ACGGTC", "TN", "TN.", "TNN.N", "CCGGCAGCATTCATTACGACAACGTGGCACCGTGTTTTCTCGGTGGTA", "TGCAGTTGATGATCGAAGAAAACGACATCATCAGCCAGCAAGTGC", "CAGGGTTTGATGAGTGGCTGTGGGTGCTGGCGTATCCGGG" ] def test_encode(): assert encode("AA") == "A0" assert encode("AC") == "A1" assert encode("AG") == "A2" assert encode("AT") == "A3" assert encode("CA") == "C1" assert encode("CC") == "C0" assert encode("CG") == "C3" assert encode("CT") == "C2" assert encode("GA") == "G2" assert encode("GC") == "G3" assert encode("GG") == "G0" assert encode("GT") == "G1" assert encode("TA") == "T3" assert encode("TC") == "T2" assert encode("TG") == "T1" assert encode("TT") == "T0" assert encode("TN") == "T4" assert encode("NT") == "N4" assert encode("NN") == "N4" assert encode("ACGGTC") == "A13012" assert encode("TTT.N") == "T0044" assert encode("TTNT.N") == "T04444" def test_decode(): for s in sequences: expected = s.replace('.', 'N') encoded = encode(s) assert decode(encoded) == expected assert decode('A.') == 'AN' assert decode('C.') == 'CN' assert decode('G.') == 'GN' assert decode('T.') == 'TN' def test_qualtrim_csfastaqual(): '''-q with csfasta/qual files''' run("-c -q 10", "solidqual.fastq", "solid.csfasta", 'solid.qual') def test_E3M(): '''Read the E3M dataset''' # not really colorspace, but a fasta/qual file pair main(['-o', '/dev/null', datapath("E3M.fasta"), datapath("E3M.qual")]) def test_bwa(): '''MAQ-/BWA-compatible output''' run("-c -e 0.12 -a 330201030313112312 -x 552: --maq", "solidmaq.fastq", "solid.csfasta", 'solid.qual') def test_bfast(): '''BFAST-compatible output''' run("-c -e 0.12 -a 330201030313112312 -x abc: --strip-f3", "solidbfast.fastq", "solid.csfasta", 'solid.qual') def test_trim_095(): '''some reads properly trimmed since cutadapt 0.9.5''' run("-c -e 0.122 -a 330201030313112312", "solid.fasta", "solid.fasta") def test_solid(): run("-c -e 0.122 -a 330201030313112312", "solid.fastq", "solid.fastq") def test_solid_basespace_adapter(): '''colorspace adapter given in basespace''' run("-c -e 0.122 -a CGCCTTGGCCGTACAGCAG", "solid.fastq", "solid.fastq") def test_solid5p(): '''test 5' colorspace adapter''' # this is not a real adapter, just a random string # in colorspace: C0302201212322332333 run("-c -e 0.1 --trim-primer -g CCGGAGGTCAGCTCGCTATA", "solid5p.fasta", "solid5p.fasta") def test_solid5p_prefix_notrim(): '''test anchored 5' colorspace adapter, no primer trimming''' run("-c -e 0.1 -g ^CCGGAGGTCAGCTCGCTATA", "solid5p-anchored.notrim.fasta", "solid5p.fasta") def test_solid5p_prefix(): '''test anchored 5' colorspace adapter''' run("-c -e 0.1 --trim-primer -g ^CCGGAGGTCAGCTCGCTATA", "solid5p-anchored.fasta", "solid5p.fasta") def test_solid5p_fastq(): '''test 5' colorspace adapter''' # this is not a real adapter, just a random string # in colorspace: C0302201212322332333 run("-c -e 0.1 --trim-primer -g CCGGAGGTCAGCTCGCTATA", "solid5p.fastq", "solid5p.fastq") def test_solid5p_prefix_notrim_fastq(): '''test anchored 5' colorspace adapter, no primer trimming''' run("-c -e 0.1 -g ^CCGGAGGTCAGCTCGCTATA", "solid5p-anchored.notrim.fastq", "solid5p.fastq") def test_solid5p_prefix_fastq(): '''test anchored 5' colorspace adapter''' run("-c -e 0.1 --trim-primer -g ^CCGGAGGTCAGCTCGCTATA", "solid5p-anchored.fastq", "solid5p.fastq") def test_sra_fastq(): '''test SRA-formatted colorspace FASTQ''' run("-c -e 0.1 --format sra-fastq -a CGCCTTGGCCGTACAGCAG", "sra.fastq", "sra.fastq") def test_no_zero_cap(): run("--no-zero-cap -c -e 0.122 -a CGCCTTGGCCGTACAGCAG", "solid-no-zerocap.fastq", "solid.fastq") cutadapt-1.9.1/tests/testpaired.py0000664000175000017500000002232412627537126017757 0ustar marcelmarcel00000000000000# coding: utf-8 from __future__ import print_function, division, absolute_import import shutil from nose.tools import raises from cutadapt.scripts import cutadapt from .utils import run, files_equal, datapath, cutpath, redirect_stderr, temporary_path def run_paired(params, in1, in2, expected1, expected2): if type(params) is str: params = params.split() with temporary_path("temp-paired.1.fastq") as p1: with temporary_path("temp-paired.2.fastq") as p2: params += ['-o', p1, '-p', p2] params += [datapath(in1), datapath(in2)] assert cutadapt.main(params) is None assert files_equal(cutpath(expected1), p1) assert files_equal(cutpath(expected2), p2) def run_interleaved(params, inpath, expected): if type(params) is str: params = params.split() with temporary_path("temp-interleaved.fastq") as tmp: params += ['--interleaved', '-o', tmp, datapath(inpath)] assert cutadapt.main(params) is None assert files_equal(cutpath(expected), tmp) def run_interleaved2(params, inpath, expected1, expected2): if type(params) is str: params = params.split() with temporary_path("temp-paired.1.fastq") as p1: with temporary_path("temp-paired.2.fastq") as p2: params += ['--interleaved', '-o', p1, '-p', p2] params += [datapath(inpath)] assert cutadapt.main(params) is None assert files_equal(cutpath(expected), p1) assert files_equal(cutpath(expected), p2) def test_paired_separate(): '''test separate trimming of paired-end reads''' run('-a TTAGACATAT', 'paired-separate.1.fastq', 'paired.1.fastq') run('-a CAGTGGAGTA', 'paired-separate.2.fastq', 'paired.2.fastq') def test_paired_end_legacy(): '''--paired-output, not using -A/-B/-G''' # the -m 14 filters out one read, which should then also be filtered out in the second output file # -q 10 should not change anything: qualities in file 1 are high enough, # qualities in file 2 should not be inspected. run_paired('-a TTAGACATAT -m 14 -q 10', in1='paired.1.fastq', in2='paired.2.fastq', expected1='paired.m14.1.fastq', expected2='paired.m14.2.fastq' ) def test_untrimmed_paired_output(): with temporary_path("tmp-untrimmed.1.fastq") as untrimmed1: with temporary_path("tmp-untrimmed.2.fastq") as untrimmed2: run_paired(['-a', 'TTAGACATAT', '--untrimmed-output', untrimmed1, '--untrimmed-paired-output', untrimmed2], in1='paired.1.fastq', in2='paired.2.fastq', expected1='paired-trimmed.1.fastq', expected2='paired-trimmed.2.fastq' ) assert files_equal(cutpath('paired-untrimmed.1.fastq'), untrimmed1) assert files_equal(cutpath('paired-untrimmed.2.fastq'), untrimmed2) def test_explicit_format_with_paired(): # Use --format=fastq with input files whose extension is .txt with temporary_path("paired.1.txt") as txt1: with temporary_path("paired.2.txt") as txt2: shutil.copyfile(datapath("paired.1.fastq"), txt1) shutil.copyfile(datapath("paired.2.fastq"), txt2) run_paired('--format=fastq -a TTAGACATAT -m 14', in1=txt1, in2=txt2, expected1='paired.m14.1.fastq', expected2='paired.m14.2.fastq' ) def test_no_trimming_legacy(): # make sure that this doesn't divide by zero cutadapt.main(['-a', 'XXXXX', '-o', '/dev/null', '-p', '/dev/null', datapath('paired.1.fastq'), datapath('paired.2.fastq')]) def test_no_trimming(): # make sure that this doesn't divide by zero cutadapt.main(['-a', 'XXXXX', '-A', 'XXXXX', '-o', '/dev/null', '-p', '/dev/null', datapath('paired.1.fastq'), datapath('paired.2.fastq')]) @raises(SystemExit) def test_missing_file(): with redirect_stderr(): cutadapt.main(['-a', 'XX', '--paired-output', 'out.fastq', datapath('paired.1.fastq')]) @raises(SystemExit) def test_first_too_short(): with temporary_path("truncated.1.fastq") as trunc1: # Create a truncated file in which the last read is missing with open(datapath('paired.1.fastq')) as f: lines = f.readlines() lines = lines[:-4] with open(trunc1, 'w') as f: f.writelines(lines) with redirect_stderr(): cutadapt.main('-a XX --paired-output out.fastq'.split() + [trunc1, datapath('paired.2.fastq')]) @raises(SystemExit) def test_second_too_short(): with temporary_path("truncated.2.fastq") as trunc2: # Create a truncated file in which the last read is missing with open(datapath('paired.2.fastq')) as f: lines = f.readlines() lines = lines[:-4] with open(trunc2, 'w') as f: f.writelines(lines) with redirect_stderr(): cutadapt.main('-a XX --paired-output out.fastq'.split() + [datapath('paired.1.fastq'), trunc2]) @raises(SystemExit) def test_unmatched_read_names(): with temporary_path("swapped.1.fastq") as swapped: # Create a file in which reads 2 and are swapped with open(datapath('paired.1.fastq')) as f: lines = f.readlines() lines = lines[0:4] + lines[8:12] + lines[4:8] + lines[12:] with open(swapped, 'w') as f: f.writelines(lines) with redirect_stderr(): cutadapt.main('-a XX -o out1.fastq --paired-output out2.fastq'.split() + [swapped, datapath('paired.2.fastq')]) def test_legacy_minlength(): '''Ensure -m is not applied to second read in a pair in legacy mode''' run_paired('-a XXX -m 27', in1='paired.1.fastq', in2='paired.2.fastq', expected1='paired-m27.1.fastq', expected2='paired-m27.2.fastq' ) def test_paired_end(): '''single-pass paired-end with -m''' run_paired('-a TTAGACATAT -A CAGTGGAGTA -m 14', in1='paired.1.fastq', in2='paired.2.fastq', expected1='paired.1.fastq', expected2='paired.2.fastq' ) def test_paired_anchored_back_no_indels(): run_paired("-a BACKADAPTER$ -A BACKADAPTER$ -N --no-indels", in1='anchored-back.fasta', in2='anchored-back.fasta', expected1='anchored-back.fasta', expected2="anchored-back.fasta" ) def test_paired_end_qualtrim(): '''single-pass paired-end with -q and -m''' run_paired('-q 20 -a TTAGACATAT -A CAGTGGAGTA -m 14 -M 90', in1='paired.1.fastq', in2='paired.2.fastq', expected1='pairedq.1.fastq', expected2='pairedq.2.fastq' ) def test_paired_end_qualtrim_swapped(): '''single-pass paired-end with -q and -m, but files swapped''' run_paired('-q 20 -a CAGTGGAGTA -A TTAGACATAT -m 14', in1='paired.2.fastq', in2='paired.1.fastq', expected1='pairedq.2.fastq', expected2='pairedq.1.fastq' ) def test_paired_end_cut(): run_paired('-u 3 -u -1 -U 4 -U -2', in1='paired.1.fastq', in2='paired.2.fastq', expected1='pairedu.1.fastq', expected2='pairedu.2.fastq' ) def test_paired_end_A_only(): run_paired('-A CAGTGGAGTA', in1='paired.1.fastq', in2='paired.2.fastq', expected1='paired-onlyA.1.fastq', expected2='paired-onlyA.2.fastq' ) def test_discard_untrimmed(): # issue #146 # the first adapter is a sequence cut out from the first read run_paired('-a CTCCAGCTTAGACATATC -A XXXXXXXX --discard-untrimmed', in1='paired.1.fastq', in2='paired.2.fastq', expected1='empty.fastq', expected2='empty.fastq' ) def test_discard_trimmed(): run_paired('-A C -O 1 --discard-trimmed', # applies everywhere in1='paired.1.fastq', in2='paired.2.fastq', expected1='empty.fastq', expected2='empty.fastq' ) def test_interleaved(): '''single-pass interleaved paired-end with -q and -m''' run_interleaved('-q 20 -a TTAGACATAT -A CAGTGGAGTA -m 14 -M 90', inpath='interleaved.fastq', expected='interleaved.fastq' ) @raises(SystemExit) def test_interleaved_no_paired_output(): with temporary_path("temp-paired.1.fastq") as p1: with temporary_path("temp-paired.2.fastq") as p2: params = '-a XX --interleaved'.split() with redirect_stderr(): params += [ '-o', p1, '-p1', p2, 'paired.1.fastq', 'paired.2.fastq'] cutadapt.main(params) """ def test_interleaved_input_paired_output(): '''single-pass interleaved paired-end with -q and -m, paired output''' run_interleaved2('-q 20 -a TTAGACATAT -A CAGTGGAGTA -m 14 -M 90', inpath='interleaved.fastq', expected1='pairedq1.fastq', expected2='pairedq2.fastq' ) """ def test_pair_filter(): run_paired('--pair-filter=both -a TTAGACATAT -A GGAGTA -m 14', in1='paired.1.fastq', in2='paired.2.fastq', expected1='paired-filterboth.1.fastq', expected2='paired-filterboth.2.fastq' ) def test_too_short_paired_output(): with temporary_path("temp-too-short.1.fastq") as p1: with temporary_path("temp-too-short.2.fastq") as p2: run_paired('-a TTAGACATAT -A CAGTGGAGTA -m 14 --too-short-output ' '{0} --too-short-paired-output {1}'.format(p1, p2), in1='paired.1.fastq', in2='paired.2.fastq', expected1='paired.1.fastq', expected2='paired.2.fastq' ) assert files_equal(cutpath('paired-too-short.1.fastq'), p1) assert files_equal(cutpath('paired-too-short.2.fastq'), p2) def test_too_long_output(): with temporary_path("temp-too-long.1.fastq") as p1: with temporary_path("temp-too-long.2.fastq") as p2: run_paired('-a TTAGACATAT -A CAGTGGAGTA -M 14 --too-long-output ' '{0} --too-long-paired-output {1}'.format(p1, p2), in1='paired.1.fastq', in2='paired.2.fastq', expected1='paired-too-short.1.fastq', expected2='paired-too-short.2.fastq' ) assert files_equal(cutpath('paired.1.fastq'), p1) assert files_equal(cutpath('paired.2.fastq'), p2) @raises(SystemExit) def test_too_short_output_paired_option_missing(): with temporary_path("temp-too-short.1.fastq") as p1: run_paired('-a TTAGACATAT -A CAGTGGAGTA -m 14 --too-short-output ' '{0}'.format(p1), in1='paired.1.fastq', in2='paired.2.fastq', expected1='paired.1.fastq', expected2='paired.2.fastq' ) cutadapt-1.9.1/tests/testalign.py0000664000175000017500000000745512611676207017612 0ustar marcelmarcel00000000000000# coding: utf-8 from __future__ import print_function, division, absolute_import from cutadapt.align import (locate, compare_prefixes, compare_suffixes, Aligner) from cutadapt.adapters import BACK class TestAligner(): def test(self): reference = 'CTCCAGCTTAGACATATC' aligner = Aligner(reference, 0.1, flags=BACK) aligner.locate('CC') def test_100_percent_error_rate(self): reference = 'GCTTAGACATATC' aligner = Aligner(reference, 1.0, flags=BACK) aligner.locate('CAA') def test_polya(): s = 'AAAAAAAAAAAAAAAAA' t = 'ACAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' result = locate(s, t, 0.0, BACK) #start_s, stop_s, start_t, stop_t, matches, cost = result assert result == (0, len(s), 4, 4 + len(s), len(s), 0) # Sequences with IUPAC wildcards # R=A|G, Y=C|T, S=G|C, W=A|T, K=G|T, M=A|C, B=C|G|T, D=A|G|T, H=A|C|T, V=A|C|G, # N=A|C|G|T, X={} WILDCARD_SEQUENCES = [ 'CCCATTGATC', # original sequence without wildcards 'CCCRTTRATC', # R=A|G 'YCCATYGATC', # Y=C|T 'CSSATTSATC', # S=G|C 'CCCWWWGATC', # W=A|T 'CCCATKKATC', # K=G|T 'CCMATTGMTC', # M=A|C 'BCCATTBABC', # B=C|G|T 'BCCATTBABC', # B 'CCCDTTDADC', # D=A|G|T 'CHCATHGATC', # H=A|C|T 'CVCVTTVATC', # V=A|C|G 'CCNATNGATC', # N=A|C|G|T 'CCCNTTNATC', # N # 'CCCXTTXATC', # X ] def test_compare_prefixes(): assert compare_prefixes('AAXAA', 'AAAAATTTTTTTTT') == (0, 5, 0, 5, 4, 1) assert compare_prefixes('AANAA', 'AACAATTTTTTTTT', wildcard_ref=True) == (0, 5, 0, 5, 5, 0) assert compare_prefixes('AANAA', 'AACAATTTTTTTTT', wildcard_ref=True) == (0, 5, 0, 5, 5, 0) assert compare_prefixes('XAAAAA', 'AAAAATTTTTTTTT') == (0, 6, 0, 6, 4, 2) a = WILDCARD_SEQUENCES[0] for s in WILDCARD_SEQUENCES: r = s + 'GCCAGGGTTGATTCGGCTGATCTGGCCG' result = compare_prefixes(a, r, wildcard_query=True) assert result == (0, 10, 0, 10, 10, 0), result result = compare_prefixes(r, a, wildcard_ref=True) assert result == (0, 10, 0, 10, 10, 0) for s in WILDCARD_SEQUENCES: for t in WILDCARD_SEQUENCES: r = s + 'GCCAGGG' result = compare_prefixes(s, r, ) assert result == (0, 10, 0, 10, 10, 0) result = compare_prefixes(r, s, wildcard_ref=True, wildcard_query=True) assert result == (0, 10, 0, 10, 10, 0) r = WILDCARD_SEQUENCES[0] + 'GCCAGG' for wildc_ref in (False, True): for wildc_query in (False, True): result = compare_prefixes('CCCXTTXATC', r, wildcard_ref=wildc_ref, wildcard_query=wildc_query) assert result == (0, 10, 0, 10, 8, 2) def test_compare_suffixes(): assert compare_suffixes('AAXAA', 'TTTTTTTAAAAA') == (0, 5, 7, 12, 4, 1) assert compare_suffixes('AANAA', 'TTTTTTTAACAA', wildcard_ref=True) == (0, 5, 7, 12, 5, 0) assert compare_suffixes('AANAA', 'TTTTTTTAACAA', wildcard_ref=True) == (0, 5, 7, 12, 5, 0) assert compare_suffixes('AAAAAX', 'TTTTTTTAAAAA') == (0, 6, 6, 12, 4, 2) def test_wildcards_in_adapter(): r = 'CATCTGTCC' + WILDCARD_SEQUENCES[0] + 'GCCAGGGTTGATTCGGCTGATCTGGCCG' for a in WILDCARD_SEQUENCES: result = locate(a, r, 0.0, BACK, wildcard_ref=True) assert result == (0, 10, 9, 19, 10, 0), result a = 'CCCXTTXATC' result = locate(a, r, 0.0, BACK, wildcard_ref=True) assert result is None def test_wildcards_in_read(): a = WILDCARD_SEQUENCES[0] for s in WILDCARD_SEQUENCES: r = 'CATCTGTCC' + s + 'GCCAGGGTTGATTCGGCTGATCTGGCCG' result = locate(a, r, 0.0, BACK, wildcard_query=True) if 'X' in s: assert result is None else: assert result == (0, 10, 9, 19, 10, 0), result def test_wildcards_in_both(): for a in WILDCARD_SEQUENCES: for s in WILDCARD_SEQUENCES: if 'X' in s or 'X' in a: continue r = 'CATCTGTCC' + s + 'GCCAGGGTTGATTCGGCTGATCTGGCCG' result = locate(a, r, 0.0, BACK, wildcard_ref=True, wildcard_query=True) assert result == (0, 10, 9, 19, 10, 0), result def test_no_match(): a = locate('CTGATCTGGCCG', 'AAAAGGG', 0.1, BACK) assert a is None, a cutadapt-1.9.1/tests/testmodifiers.py0000664000175000017500000000227412575761274020503 0ustar marcelmarcel00000000000000# coding: utf-8 from __future__ import print_function, division, absolute_import from cutadapt.seqio import Sequence from cutadapt.modifiers import UnconditionalCutter, NEndTrimmer, QualityTrimmer def test_unconditional_cutter(): uc = UnconditionalCutter(length=5) s = 'abcdefg' assert UnconditionalCutter(length=2)(s) == 'cdefg' assert UnconditionalCutter(length=-2)(s) == 'abcde' assert UnconditionalCutter(length=100)(s) == '' assert UnconditionalCutter(length=-100)(s) == '' def test_nend_trimmer(): trimmer = NEndTrimmer() seqs = ['NNNNAAACCTTGGNNN', 'NNNNAAACNNNCTTGGNNN', 'NNNNNN'] trims = ['AAACCTTGG', 'AAACNNNCTTGG', ''] for seq, trimmed in zip(seqs, trims): _seq = Sequence('read1', seq, qualities='#'*len(seq)) _trimmed = Sequence('read1', trimmed, qualities='#'*len(trimmed)) assert trimmer(_seq) == _trimmed def test_quality_trimmer(): read = Sequence('read1', 'ACGTTTACGTA', '##456789###') qt = QualityTrimmer(10, 10, 33) assert qt(read) == Sequence('read1', 'GTTTAC', '456789') qt = QualityTrimmer(0, 10, 33) assert qt(read) == Sequence('read1', 'ACGTTTAC', '##456789') qt = QualityTrimmer(10, 0, 33) assert qt(read) == Sequence('read1', 'GTTTACGTA', '456789###') cutadapt-1.9.1/tests/data/0000775000175000017500000000000012627541606016145 5ustar marcelmarcel00000000000000cutadapt-1.9.1/tests/data/no_indels.fasta0000664000175000017500000000056212600000013021107 0ustar marcelmarcel00000000000000# 3' adapter: TTAGACATAT # 5' adapter: GAGATTGCCA >3p_orig TGAACATAGCTTAGACATATAACCG >3p_mism TGAACATAGCTTACACATATAACCG >3p_del TGAACATAGCTTAACATATAACCG >3p_ins TGAACATAGCTTAGGACATATAACCG >3p_frontins TAGACATATAACCG >5p_orig TCCTCGAGATTGCCATACTGCTTCTCGAA >5p_mism TCCTCGAGATAGCCATACTGCTTCTCGAA >5p_del TCCTCGAGATGCCATACTGCTTCTCGAA >5p_ins TCCTCGAGATATGCCATACTGCTTCTCGAA cutadapt-1.9.1/tests/data/withplus.fastq0000664000175000017500000000015412575761274021073 0ustar marcelmarcel00000000000000@first_sequence SEQUENCE1 +this is different :6;;8<=:< @second_sequence SEQUENCE2 +also different 83read1 TESTINGADAPTERREST1 >read2 TESTINGADAPTERRESTING >read3 TESTINGADAPTER >read4 TESTINGADAPTERRESTLESS >read5 TESTINGADAPTERRESTORE >read6 ADAPTERSOMETHING >read7 DAPTERSOMETHING >read8 RESTADAPTERSOMETHING >read9 NOREST cutadapt-1.9.1/tests/data/simple.fastq0000664000175000017500000000011512575761274020502 0ustar marcelmarcel00000000000000@first_sequence SEQUENCE1 + :6;;8<=:< @second_sequence SEQUENCE2 + 83read1 CAGTCGGTCCTGAGAGATGGGCGAGCGCTGGNANNNNNNNG cutadapt-1.9.1/tests/data/solid.qual0000664000175000017500000000726212575761274020161 0ustar marcelmarcel00000000000000# Tue May 5 13:57:32 2009 /share/apps/corona/bin/filter_fasta.pl --output=/data/results/s0103/s0103_20090430_552to561_2_2/552to561/results.01/primary.20090505091459275 --name=s0103_20090430_552to561_2_2_552to561 --tag=F3 --minlength=35 --mincalls=25 --prefix=T /data/results/s0103/s0103_20090430_552to561_2_2/552to561/jobs/postPrimerSetPrimary.197/rawseq # Cwd: /state/partition1/home/pipeline # Title: s0103_20090430_552to561_2_2_552to561 >1_13_85_F3 22 5 24 27 5 22 22 8 5 -1 27 22 8 8 4 19 6 21 20 22 12 16 10 24 26 24 11 13 27 23 8 26 13 26 23 >1_13_573_F3 21 8 18 4 8 5 5 5 5 -1 13 16 5 7 21 25 27 6 21 22 13 13 9 11 25 22 20 8 6 22 22 5 5 5 20 >1_13_1259_F3 28 26 27 25 5 25 32 26 32 -1 24 27 27 27 11 22 25 27 28 18 28 26 25 27 5 27 30 27 30 23 27 26 28 27 5 >1_13_1440_F3 28 27 28 32 25 32 28 20 22 -1 22 27 6 26 27 21 30 20 26 26 21 25 10 25 28 8 22 16 29 22 15 27 11 28 25 >1_14_177_F3 25 23 24 20 22 26 26 20 19 8 6 24 23 24 17 19 24 15 20 26 26 8 21 25 22 26 16 25 18 27 23 23 7 24 25 >1_14_238_F3 30 29 27 20 28 26 27 27 27 16 17 29 28 27 26 16 26 26 28 20 8 26 13 26 16 19 25 15 29 17 26 25 18 26 22 >1_15_1098_F3 2 11 2 2 7 2 20 2 2 9 2 7 3 3 6 2 13 2 2 8 3 5 2 4 8 3 16 2 2 12 3 5 2 2 4 >1_16_404_F3 22 23 26 25 26 26 29 27 29 24 28 24 26 27 27 17 28 29 27 27 16 26 20 23 26 24 27 27 26 29 7 27 26 27 26 >1_16_904_F3 24 29 28 25 25 21 26 26 24 24 28 10 14 6 3 10 2 13 2 5 4 3 5 6 7 7 3 16 9 3 7 3 13 2 13 >1_16_1315_F3 27 24 27 23 32 30 29 30 25 25 26 21 5 11 4 26 21 14 8 23 27 27 2 14 26 22 24 7 19 19 23 5 9 13 8 >1_16_1595_F3 29 11 27 28 27 29 31 21 27 26 30 27 28 29 25 14 28 13 29 5 26 26 23 26 8 16 22 25 28 5 11 29 16 28 10 >1_17_1379_F3 14 12 16 16 22 24 27 16 26 29 29 23 25 6 25 22 12 4 14 25 25 15 5 10 28 27 17 24 11 22 27 23 7 11 17 >1_18_1692_F3 13 2 7 2 2 2 20 4 8 4 17 8 6 11 17 5 25 10 2 10 5 20 11 7 3 14 16 2 5 19 5 8 8 3 21 >1_19_171_F3 8 21 25 21 20 14 28 18 9 25 7 23 4 8 4 17 29 5 23 5 4 26 4 15 5 2 26 3 18 3 5 25 3 2 5 >1_22_72_F3 18 14 2 21 22 23 27 25 13 28 24 25 25 21 25 7 27 20 18 23 17 24 20 26 24 10 26 5 9 26 8 10 6 11 5 >1_22_1377_F3 8 2 2 15 4 13 3 13 16 9 4 11 8 24 20 10 4 4 16 19 4 3 2 23 12 2 2 2 24 12 7 8 2 24 10 >1_23_585_F3 29 20 20 26 23 29 27 24 21 14 16 23 30 8 27 18 27 20 23 27 20 25 26 24 21 28 22 25 16 28 23 28 25 12 27 >1_23_809_F3 25 22 27 20 24 31 26 27 27 20 26 14 24 26 28 27 26 22 25 25 13 8 5 5 5 23 17 22 7 10 17 17 16 4 7 >1_24_138_F3 21 8 21 23 14 26 24 15 21 2 11 17 20 14 5 26 27 3 15 10 17 20 15 2 17 11 27 8 20 11 24 14 10 22 8 >1_24_206_F3 8 8 19 7 5 8 24 20 24 17 8 2 8 21 24 19 7 11 8 17 24 17 25 7 28 22 3 13 16 23 11 7 8 21 20 >1_25_143_F3 25 19 26 14 2 5 27 24 26 5 9 26 24 20 12 22 26 23 20 5 26 20 23 22 2 16 21 29 4 5 11 24 27 17 5 >1_25_1866_F3 28 27 29 24 26 27 31 22 30 7 28 21 11 27 5 30 28 21 28 7 28 27 21 19 16 25 30 6 27 16 28 26 6 25 19 >1_27_584_F3 23 17 6 7 6 9 13 12 23 10 4 2 17 8 7 12 5 18 13 11 13 17 11 8 11 10 13 6 25 5 11 6 7 5 14 >1_27_1227_F3 19 24 17 25 26 29 32 25 27 26 18 19 27 27 28 8 26 25 27 27 26 24 28 22 27 18 25 25 27 25 25 18 28 29 6 >1_27_1350_F3 24 20 11 8 27 7 19 13 14 26 27 24 18 23 28 21 19 28 10 17 14 11 13 19 8 11 18 6 25 24 22 2 18 18 5 >1_29_477_F3 24 19 28 20 20 25 22 20 28 10 25 14 22 29 27 24 21 23 26 26 2 5 10 3 2 18 5 21 11 2 16 2 19 2 6 >1_30_882_F3 17 7 10 12 25 12 18 27 26 20 2 2 14 26 25 7 4 5 23 19 6 2 25 11 30 18 5 5 23 29 12 7 8 26 20 >1_31_221_F3 23 24 29 24 29 20 27 16 18 24 14 11 5 25 22 24 21 24 24 22 17 13 17 22 19 5 4 25 22 23 5 5 22 19 21 >1_31_1313_F3 26 18 27 22 28 22 25 25 8 20 9 19 28 5 26 27 22 29 19 26 22 24 20 15 21 20 26 24 6 26 23 24 21 6 28 >1_529_129_F3 29 29 4 14 7 7 33 21 12 5 20 32 15 25 21 8 29 26 6 16 8 33 9 18 23 14 30 7 20 28 4 33 10 -1 5 27 12 24 -1 4 -1 31 -1 -1 8 4 8 -1 -1 7 cutadapt-1.9.1/tests/data/prefix-adapter.fasta0000664000175000017500000000003312575761274022103 0ustar marcelmarcel00000000000000>prefixadapter ^FRONTADAPT cutadapt-1.9.1/tests/data/wildcardN.fa0000664000175000017500000000007012575761274020370 0ustar marcelmarcel00000000000000>perfect TTTGGGGGGG >withN TTTGGNGGGG >1mism TTTGGGGCGG cutadapt-1.9.1/tests/data/small.fastq.gz0000664000175000017500000000033212575761274020741 0ustar marcelmarcel00000000000000Osmall.fastq]1n0 @]Pn '#:ngjlE"~|nie)2o*">bfp2Dݔ/0Mo#Bz_pO|qEi撪6|ؤم0".D4RkAAR|SfW\ܖ;~Ȼm\3t@}eͥ,x:@F%cutadapt-1.9.1/tests/data/solid5p.fasta0000664000175000017500000000160612575761274020556 0ustar marcelmarcel00000000000000# used adapter: CCGGAGGTCAGCTCGCTATA # in colorspace: C0302201212322332333 >read1 T1212322332333012001112122203233202221000211 >read2 T201212322332333200121311212133113001311002032 >read3 T02201212322332333211133003002232323010012320300 >read4 T0302201212322332333002010102312033021011121312131 >read5 T20302201212322332333221313210102120020302022233110 >read6 T20302211212322332333031203203013323021010020301321 >read7 T21301020302201212322332333203020130202120211322010013211 >read8 T2310321030130120302201212322332333232202123123111113113003200330 >read9 T0002132103320302201212322332333020123133023120320131020333011 >read10 T00322031320033220302201212322332333201130233321321011303133231200 >read11 T0302201212322332333.02010102312033021011121312131 >read12 T030220121232233233321 >read13 T03022012123223323332 >read14 T0302201212322332333 >read15 T030220121232233233 >read16 T030220121232233233 cutadapt-1.9.1/tests/data/E3M.fasta0000664000175000017500000000663312575761274017570 0ustar marcelmarcel00000000000000>E3MFGYR02JWQ7T length=260 xy=3946_2103 region=2 run=R_2008_01_09_16_16_00_ tcagGGTCTACATGTTGGTTAACCCGTACTGATTTGAATTGGCTCTTTGTCTTTCCAAAG GGAATTCATCTTCTTATGGCACACATAAAGGATAAATACAAGAATCTTCCTATTTACATC ACTGAAAATGGCATGGCTGAATCAAGGAATGACTCAATACCAGTCAATGAAGCCCGCAAG GATAGTATAAGGATTAGATACCATGATGGCCATCTTAAATTCCTTCTTCAAGCGATCAAG GAAGGTGTTAATTTGAAGGGGCTTa >E3MFGYR02JA6IL length=265 xy=3700_3115 region=2 run=R_2008_01_09_16_16_00_ tcagTTTTTTTTGGAAAGGAAAACGGACGTACTCATAGATGGATCATACTGACGTTAGGA AAATAATTCATAAGACAATAAGGAAACAAAGTGTAAAAAAAAAACCTAAATGCTCAAGGA AAATACATAGCCATCTGAACAGATTTCTGCTGGAAGCCACATTTCTCGTAGAACGCCTTG TTCTCGACGCTGCAATCAAGAATCACCTTGTAGCATCCCATTGAACGCGCATGCTCCGTG AGGAACTTGATGATTCTCTTTCCCAAATGcc >E3MFGYR02JHD4H length=292 xy=3771_2095 region=2 run=R_2008_01_09_16_16_00_ tcagAAAGACAAGTGGTATCAACGCAGAGTGGCCATTACGCCGGGGACTAGGTCATGTTA AGAGTGTAGCTTTGTGATGCTCTGCATCCGTCTTATGATAAAATTGAGGTTATCCTGAAA TAAAGTGTCTCAAACGATTTATTTTCCATTTATTGTATTTAATTTGAGTCCAAACTAGAT TAGAGATCTCTGTAATAAAACATGTTTGTTAGTTTAATTTCAATAACATTTAGTATTGTG TCGTAAAAAAAAAAAAAACGAAAAAAAAAAAAACAAAAAAAAAAACAAATGTACGGccgg ctagagaacg >E3MFGYR02GFKUC length=295 xy=2520_2738 region=2 run=R_2008_01_09_16_16_00_ tcagCGGCCGGGCCTCTCATCGGTGGTGGAATCACTGGCCTTGTTTACGAGGTTGTCTTT ATCAGCCACACCCACGAGCAGCTTCCCACCACTGACTACTAGAGGGGGGGAAATGAAAAA TAAAAAAAAAAAATTGTGTATTATTGAATTTCTCTGGAATCTTCTTCTGTGTATGGTTTT CCTTCCTTGTGTTTTCTTCCTAATTCACTTTCGAGGGTTGTACTTGTTCCTTTCGTCTTA AATCCTTGGATGGTTGATGATCATGAAGTTCTCTTTAAAGTTAAATTATTATCATTTTG >E3MFGYR02FTGED length=277 xy=2268_2739 region=2 run=R_2008_01_09_16_16_00_ tcagTGGTAATGGGGGGAAATTTAATTTTCTGATTTTATTATATATAGTTAATTGATGCT TTCGACGGTTTATATTTATGCGATTTGGTTTAGGTTTCAATGGAATTTTGTTGGTAGTTT ATATGATTGTATATAGTTATCAGCAACCTTATATTGTTTGCTTGCCTTTCTAGAGCACTC AGTGGAGATTTGAAACTTTGTTAGTGGAAAATTTGCAATTGTATGTTAATTGGAGATGGA GACAAAAAAGGAGGCAGATATTAATATTTATTTGGATATCA >E3MFGYR02FR9G7 length=256 xy=2255_0361 region=2 run=R_2008_01_09_16_16_00_ tcagCTCCGTAAGAAGGTGCTGCCCGCCGTCATCGTCCGCCAGCGCAAGCCTTGGCGCCG AAAGGACGGTGTTTACATGTACTTCGAAGATAATGCTGGTGTTATCGTGAATCCCAAGGG TGAAATGAAAGGTTCTGCTATCACTGGTCCAATTGGGAAGGAGTGTGCTGATCTGTGGCC CAGGATTGCAAGTGCTGCCAATGCTATTGTTTAAGCTAGGATTTTAGTTTTTGTAATGTT TCAGCTTCTTGAAGTTGTTTc >E3MFGYR02GAZMS length=271 xy=2468_1618 region=2 run=R_2008_01_09_16_16_00_ tcagAAAGAAGTAAGGTAAATAACAAACGACAGAGTGGCACATACTCCGGCAGTTCATGG GCAGTGACCCAGTTCAGAGAACCAAAGAACCTGAATAAGAATCTATGTCTACTGTGAATT TTGTGGCTTTCGTTGGAACGAAGGTAGCTTCGAAACAATAAAGTTATCTACTTCGCAATA TGAAGTGTTTCTGTTAGTTCTATGGTTCCTACTCCTAGCACCTCTTTTTCTTATAGAAAT GGACCACCGTGATTGGTACAAAAGNTGTACCTAGAtga >E3MFGYR02HHZ8O length=150 xy=2958_1574 region=2 run=R_2008_01_09_16_16_00_ tcagACTTTCTTCTTTACCGTAACGTTGTTAAATTATCTGAGTATATGAAGGACCCTATT TGGGTTCTATAACTACAGAACATATCTCAGTCCAATAGTGACGGAATAACAATATTATAA ACTAGTTTAACGCTTTATGAAAAAAAAAAAAAAAgaaaaaaaaacatgtcggccgctgag acacgcaacaggggataggcaaggcacacaggggataggnn >E3MFGYR02GPGB1 length=221 xy=2633_0607 region=2 run=R_2008_01_09_16_16_00_ tcagAAGCAGTGGTATCAACGCAGAGTGGCCATTACGGCCGGGTCTGATGAGTATGTGTC GAAGATCCCAAATAACAAGGTTGGTCTTGTAATTGGTAAAGGTGGAGAAACAATAAAGAA TATGCAAGCTTCAACTGGAGCAAGAATTCAGGTGATTCCTCTTCATCTTCCACCTGGTGA CACATCTACCAAAAAAAAAAAAAAAAAAAAACCAAATGTCGGCCGctgagacacgcaaca gggataggcaaggcacacaggggataggn >E3MFGYR02F7Z7G length=130 xy=2434_1658 region=2 run=R_2008_01_09_16_16_00_ tcagAATCATCCACTTTTTAACGTTTTGTTTTGTTCATCTCTTAACAACAATTCTAGGGC GACAGAGAGAGTAAGTACCCACTAACCAGTCCCCAAGTACCAAAATAACAATTTAAACAA CAAAACACAAACAGatcttatcaacaaaactcaaagttcctaactgagacacgcaacagg ggataagacaaggcacacaggggataggnnnnnnnnnnn cutadapt-1.9.1/tests/data/overlapa.fa0000664000175000017500000000115512575761274020277 0ustar marcelmarcel00000000000000>read1 T0021110233021330201030313112312 >read2 T002111023302133020103031311231 >read3 T00211102330213302010303131123 >read4 T0021110233021330201030313112 >read5 T002111023302133020103031311 >read6 T00211102330213302010303131 >read7 T0021110233021330201030313 >read8 T002111023302133020103031 >read9 T00211102330213302010303 >read10 T0021110233021330201030 >read11 T002111023302133020103 >read12 T00211102330213302010 >read13 T0021110233021330201 >read14 T002111023302133020 >read15 T00211102330213302 >read16 T0021110233021330 >read17 T002111023302133 >read18 T00211102330213 >read19 T0021110233021 >read20 T002111023302 cutadapt-1.9.1/tests/data/lowqual.fastq0000664000175000017500000000011512575761274020675 0ustar marcelmarcel00000000000000@first_sequence SEQUENCE1 + ######### @second_sequence SEQUENCE2 + ######### cutadapt-1.9.1/tests/data/maxn.fasta0000664000175000017500000000006212575761274020135 0ustar marcelmarcel00000000000000>r1 >r2 N >r3 AAAA >r4 AAAAN >r5 AAANN >r6 AANNN cutadapt-1.9.1/tests/data/example.fa0000664000175000017500000000036112575761274020117 0ustar marcelmarcel00000000000000>read1 MYSEQUENCEADAPTER >read2 MYSEQUENCEADAP >read3 MYSEQUENCEADAPTERSOMETHINGELSE >read4 MYSEQUENCEADABTER >read5 MYSEQUENCEADAPTR >read6 MYSEQUENCEADAPPTER >read7 ADAPTERMYSEQUENCE >read8 PTERMYSEQUENCE >read9 SOMETHINGADAPTERMYSEQUENCE cutadapt-1.9.1/tests/data/polya.fasta0000664000175000017500000000026112575761274020317 0ustar marcelmarcel00000000000000>polyA AAACTTCAGAACAGAAAAAAAAAAAAAAAAAAAAA >polyAlong CTTAGTTCAATWTTAACCAAACTTCAGAACAGAAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAA >polyA2 AAACTTAACAAGAACAAGAAAAAAAAAAAAAAAAAAAAA cutadapt-1.9.1/tests/data/E3M.qual0000664000175000017500000002066612575761274017436 0ustar marcelmarcel00000000000000>E3MFGYR02JWQ7T length=260 xy=3946_2103 region=2 run=R_2008_01_09_16_16_00_ 23 24 26 38 31 11 27 28 25 28 22 25 27 28 36 27 32 22 33 23 27 16 40 33 18 28 28 24 25 20 26 26 37 31 10 21 27 16 36 28 32 22 27 26 28 37 30 9 28 27 26 36 29 8 33 23 37 30 9 37 30 9 34 26 32 22 28 28 28 22 33 23 28 31 21 28 26 33 23 28 27 28 28 28 21 25 37 33 16 34 28 25 28 37 33 17 28 28 27 34 27 25 30 25 26 24 34 27 34 27 23 28 36 32 14 24 28 27 27 23 26 25 27 25 36 32 18 1 27 29 21 26 24 27 31 22 27 26 26 34 26 28 27 33 26 34 26 33 26 28 26 27 27 27 27 28 19 25 25 31 23 28 28 28 27 33 26 26 26 27 18 21 35 31 12 21 28 34 28 32 26 27 27 23 25 27 28 26 34 28 34 28 27 34 28 28 26 28 26 19 32 27 28 25 27 27 26 33 25 34 28 24 28 21 30 21 37 33 16 23 12 27 18 27 18 25 34 28 24 30 22 22 23 28 27 25 26 34 28 33 26 19 6 34 28 25 25 32 27 34 28 37 33 17 25 34 28 36 32 18 2 17 24 14 17 >E3MFGYR02JA6IL length=265 xy=3700_3115 region=2 run=R_2008_01_09_16_16_00_ 24 24 26 28 45 32 22 17 12 9 5 1 36 28 40 34 15 36 27 42 35 21 6 28 34 24 27 28 28 21 28 28 28 28 25 27 28 28 28 27 36 28 27 28 28 24 28 28 28 28 28 24 28 28 36 27 28 36 28 43 36 22 10 28 19 5 36 28 28 25 28 37 28 28 12 28 33 26 28 24 11 35 26 41 34 15 27 40 33 18 28 28 24 24 44 26 17 13 10 7 6 4 2 1 22 9 27 36 33 17 27 26 26 27 28 30 22 33 26 36 33 19 4 25 18 27 24 22 24 26 31 23 27 24 28 25 25 31 23 27 27 28 26 32 28 7 27 23 24 25 26 33 25 32 24 24 34 26 25 23 27 33 29 8 25 25 26 25 26 25 27 29 20 28 26 32 24 33 25 25 29 20 24 26 28 23 25 26 26 27 25 27 27 27 18 27 28 31 23 27 31 23 27 23 27 33 27 34 27 27 26 28 26 27 28 27 37 33 15 24 33 26 27 27 18 26 25 27 27 27 25 28 26 27 25 34 28 27 24 27 25 34 28 31 23 22 34 28 26 27 27 28 27 34 28 25 25 23 36 32 14 37 33 17 37 33 17 23 25 25 15 >E3MFGYR02JHD4H length=292 xy=3771_2095 region=2 run=R_2008_01_09_16_16_00_ 19 23 27 28 41 34 16 27 27 27 27 16 28 22 33 23 23 28 27 27 36 28 28 28 28 22 26 26 28 26 34 24 36 27 26 37 28 28 27 28 36 28 43 36 22 9 24 21 26 28 36 27 27 28 28 28 27 37 28 36 27 28 24 28 27 27 28 24 28 28 40 33 14 26 21 28 27 28 27 28 23 27 27 28 27 27 26 33 25 27 26 25 34 27 28 28 27 28 28 38 34 22 10 34 28 27 27 34 27 34 28 27 27 33 27 27 28 35 30 11 28 37 33 17 27 28 26 27 27 23 25 36 32 14 27 27 24 32 28 7 28 36 32 19 3 30 21 22 37 33 15 21 34 27 28 22 26 36 33 17 34 28 37 33 17 26 21 26 24 34 27 35 31 12 20 27 27 28 25 34 28 27 25 27 27 25 27 28 27 28 23 28 27 28 20 28 38 34 22 9 23 24 28 28 36 32 13 27 19 7 20 26 37 33 17 21 9 37 33 17 23 32 25 22 29 21 27 24 34 30 10 28 26 25 28 33 26 23 21 27 28 27 26 23 32 20 11 7 5 3 2 1 1 1 1 1 1 1 20 25 33 21 13 8 6 4 3 2 2 1 1 1 1 23 34 25 16 11 9 7 5 4 3 1 1 21 37 33 17 21 27 25 28 28 34 27 32 27 21 9 17 25 20 27 18 17 32 24 17 16 >E3MFGYR02GFKUC length=295 xy=2520_2738 region=2 run=R_2008_01_09_16_16_00_ 24 23 24 27 28 36 28 37 28 39 32 13 34 25 22 28 27 28 26 28 28 37 28 28 36 28 26 36 28 36 28 27 28 27 28 26 36 28 36 28 35 26 28 41 34 17 28 28 28 27 36 28 37 28 28 27 28 41 34 16 25 28 28 26 27 36 28 28 27 28 41 34 17 28 25 28 28 27 28 27 26 27 34 27 37 33 17 25 33 27 26 27 27 28 25 28 28 27 27 25 27 26 28 38 32 23 17 12 8 2 37 33 17 28 26 38 34 23 12 1 28 34 23 15 10 8 6 4 3 2 1 1 1 31 23 28 26 26 28 26 34 27 24 34 27 28 34 27 37 33 16 27 24 25 28 34 27 34 27 28 28 34 26 26 34 28 27 27 28 27 28 27 28 28 34 28 38 34 23 11 34 28 34 27 34 26 34 28 28 27 26 38 35 22 9 27 30 22 33 26 28 34 28 34 28 28 27 28 37 33 15 25 27 23 32 27 6 32 25 28 22 26 26 32 24 27 33 26 26 17 34 30 11 28 26 27 22 33 26 34 30 10 26 30 22 34 28 33 25 26 27 34 28 31 26 24 28 28 28 28 26 28 28 27 28 32 24 26 34 26 27 28 26 34 30 10 32 28 7 27 33 25 35 31 12 34 27 25 30 22 23 28 27 23 38 34 23 11 26 >E3MFGYR02FTGED length=277 xy=2268_2739 region=2 run=R_2008_01_09_16_16_00_ 21 24 28 24 28 35 27 28 35 28 28 44 35 24 16 9 2 41 34 17 40 34 15 34 26 43 36 22 9 28 25 26 26 41 34 20 5 26 37 28 27 27 28 28 28 28 28 28 37 28 36 28 37 28 28 28 27 26 26 38 31 11 28 24 28 28 36 27 36 29 8 26 27 28 36 29 8 27 28 27 28 28 24 34 27 5 32 22 40 33 14 28 37 28 41 34 16 28 32 24 23 34 28 34 27 38 34 22 9 27 34 28 34 27 27 26 26 36 32 13 28 27 26 28 28 25 34 26 27 28 28 27 28 23 27 28 34 26 27 25 27 26 28 23 32 24 34 28 33 26 28 26 27 27 18 25 36 32 13 27 27 32 24 27 32 25 35 31 12 27 28 26 27 21 27 27 27 26 28 28 27 26 28 33 25 22 28 28 37 33 17 26 37 33 17 20 36 32 14 28 34 27 26 27 28 34 28 38 34 22 8 37 33 15 27 28 34 27 33 26 27 26 27 28 28 33 25 34 28 34 28 34 26 24 24 28 25 34 28 28 27 25 23 38 33 24 17 11 5 34 28 25 31 26 22 27 27 27 26 22 34 26 34 27 26 24 34 30 11 19 37 33 15 34 28 27 25 28 25 27 27 >E3MFGYR02FR9G7 length=256 xy=2255_0361 region=2 run=R_2008_01_09_16_16_00_ 21 22 26 28 28 24 35 26 27 28 36 28 28 37 28 36 27 28 28 26 25 24 37 30 9 28 36 28 28 21 28 26 28 28 28 28 36 28 28 35 26 27 25 25 28 28 36 28 23 31 20 32 22 29 18 27 27 34 25 28 39 33 13 36 27 28 28 35 25 28 28 40 34 15 27 28 28 27 27 28 28 28 34 28 27 27 34 28 27 27 27 34 27 28 28 28 27 34 27 27 28 34 26 28 27 27 27 27 28 34 27 27 35 31 11 34 27 34 30 10 28 27 34 30 10 27 28 37 33 15 33 25 33 26 26 28 26 27 27 27 28 26 26 28 27 34 27 26 31 23 34 28 34 28 37 33 15 34 28 34 28 27 23 27 28 27 27 28 23 28 27 25 27 24 27 22 34 28 37 33 16 26 33 26 25 34 26 25 28 33 25 27 27 23 27 28 28 32 24 34 27 27 27 27 28 27 29 20 27 33 28 8 32 27 23 28 25 24 34 28 26 38 34 22 9 27 26 38 34 23 13 3 27 26 34 28 26 28 36 32 14 23 28 27 20 33 25 28 30 22 26 33 25 23 34 28 23 34 30 10 27 >E3MFGYR02GAZMS length=271 xy=2468_1618 region=2 run=R_2008_01_09_16_16_00_ 18 25 28 28 40 34 17 19 33 26 21 17 34 24 31 21 28 41 34 17 28 37 28 28 41 34 17 27 27 21 28 18 24 23 26 25 31 20 28 26 27 28 23 25 27 25 33 23 30 20 28 28 26 31 21 27 28 23 38 31 11 28 28 28 28 28 26 39 33 13 28 28 35 25 28 26 28 27 28 35 26 36 27 35 31 11 28 32 24 34 28 26 25 34 28 28 34 28 24 33 25 27 27 28 26 27 27 26 27 27 27 27 27 26 27 28 34 27 38 34 22 10 25 23 32 25 28 37 33 16 26 26 29 20 33 26 27 18 27 25 23 13 32 24 27 22 24 27 34 28 27 27 36 32 14 27 27 18 26 33 29 8 28 34 27 23 26 28 27 28 27 32 24 28 27 23 34 26 25 27 27 24 34 28 26 25 27 36 32 17 25 25 27 33 27 27 27 34 28 28 28 27 25 34 28 33 27 34 28 28 27 23 25 34 28 27 27 27 28 27 34 27 20 23 38 34 24 15 7 26 22 11 28 27 23 26 36 32 14 22 34 28 28 33 27 27 30 22 25 22 24 27 34 28 34 28 26 26 27 37 33 20 6 28 0 25 28 27 24 34 28 25 28 28 27 25 26 26 >E3MFGYR02HHZ8O length=150 xy=2958_1574 region=2 run=R_2008_01_09_16_16_00_ 22 22 25 23 25 28 41 34 17 28 37 28 28 35 28 6 24 30 19 28 25 32 22 27 25 37 28 28 27 15 38 31 11 36 28 27 24 28 28 27 20 28 23 26 25 22 19 28 35 26 34 25 26 41 34 17 26 28 36 29 7 36 29 8 35 26 28 28 28 24 33 23 28 24 27 27 23 25 34 24 26 24 28 27 22 28 26 28 24 27 28 34 27 34 27 26 27 28 26 27 28 28 34 28 31 23 25 30 22 27 29 21 26 27 34 27 28 26 37 33 17 17 26 18 28 34 30 11 19 6 27 24 27 35 30 11 27 22 28 32 19 11 6 4 3 2 1 1 1 1 1 1 1 1 27 36 28 19 14 11 8 6 4 2 19 19 27 27 28 27 33 26 33 26 25 27 25 28 26 22 28 25 27 27 28 25 34 28 28 24 38 34 21 7 28 25 17 33 26 26 31 26 34 27 27 27 27 26 26 28 38 34 23 12 27 28 25 33 27 0 0 >E3MFGYR02GPGB1 length=221 xy=2633_0607 region=2 run=R_2008_01_09_16_16_00_ 21 24 27 28 36 28 28 28 26 28 28 36 28 28 27 24 28 36 27 28 28 28 23 27 27 28 28 37 28 36 27 27 37 28 28 28 37 28 36 27 41 34 17 28 28 28 28 27 28 28 28 26 28 28 28 28 28 28 28 28 28 37 28 28 27 28 39 32 13 41 34 16 28 37 28 28 34 28 34 28 34 28 34 27 27 26 34 28 27 27 34 28 34 28 34 28 27 37 33 15 34 27 28 34 28 28 28 37 33 16 28 34 26 27 37 33 16 27 34 27 26 27 27 27 28 34 28 26 23 34 27 25 34 27 28 26 34 28 27 25 28 34 27 27 33 26 34 28 27 28 34 27 27 27 27 34 28 34 27 25 26 34 27 26 24 27 28 34 27 32 24 27 31 23 28 34 27 27 25 28 27 25 27 27 27 28 27 17 32 24 35 16 8 4 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 21 9 36 31 13 24 27 26 28 34 28 34 27 19 22 23 19 28 28 26 26 20 23 22 26 34 27 25 25 36 32 17 27 27 24 24 14 21 34 27 31 23 23 28 22 27 27 28 36 32 18 2 27 27 22 25 15 0 >E3MFGYR02F7Z7G length=130 xy=2434_1658 region=2 run=R_2008_01_09_16_16_00_ 22 21 23 28 26 15 12 21 28 21 36 28 27 27 43 35 23 12 1 36 28 27 27 41 34 20 5 28 43 36 22 9 27 35 26 28 26 27 26 28 22 33 26 37 28 26 36 27 28 35 27 31 20 26 28 13 38 32 12 26 23 24 27 28 27 22 25 28 19 27 28 20 36 27 25 20 26 41 34 17 28 28 17 36 28 35 27 20 28 28 43 36 22 8 33 26 25 27 27 31 26 38 34 22 10 25 34 28 26 34 27 32 27 5 37 33 17 20 23 13 27 37 33 19 4 27 28 20 37 33 17 24 26 23 27 21 26 33 26 26 27 28 34 27 21 38 34 21 7 28 25 24 37 33 17 28 34 28 32 24 27 33 27 27 20 28 27 27 22 28 19 25 22 28 32 26 27 23 37 33 20 5 24 24 34 28 28 11 26 30 25 33 26 28 25 22 26 27 27 38 34 23 11 28 26 28 34 26 0 0 0 0 0 0 0 0 0 0 0 cutadapt-1.9.1/tests/data/restfront.txt0000664000175000017500000000012112575761274020735 0ustar marcelmarcel00000000000000TESTING read1 TESTING read2 TESTING read3 TESTING read4 TESTING read5 REST read8 cutadapt-1.9.1/tests/data/illumina64.fastq0000664000175000017500000000765512575761274021215 0ustar marcelmarcel00000000000000@14569 AAGTTTATTCCTGGACGAAGGAAGAAAAGGCCAGATGGGAAACAAGAACAAGCCCCTGTTGAAGACGCAGGGCCAACAGGGGCCAACGAAGCTGC + cceeeeceeeee`dedbdbdb_^b`abU_cacadabd`dLMZ[XTcT^a^adaaaddcd`aL^`^_`Y\]^`Y_BBBBBBBBBBBBBBBBBBBBB @19211 AGAGGGCGTGTGATTGCTGGATGTGGGCGGGGGGCCGGGGGAGCCCCATGGGCAGGAGACCTGAGAGCCAGGCGGTGAGGCACTATGAACGCGAG + ^\`BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB @9180 GAGGGGCAGCGACTAGTCACCGGACCTGTCAGGCAAGCATAAGCCGTGCGTCAGCACCACGCTGACGGTGCTCCCGCACTCGCGGGACGCGCCAC + b`bLbBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB @19132 TGTGATTATCCACTGGTATATCGGCGTGCCGTCCGCACGAGGAAAAAAGGCAT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_aaa^^^UJ^BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB @15663 AGGTGAAGTGGCAGGAGGACCGCCGGAAGAAGCTCTTCAGAACTCAGGGGGAGGGGGAAAGCAGAAACCAGAAGTCCAGTGAGCAGGGGGCTGAG + aaKaBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB @4698 CCAATTGGCACCCCTCTGCCTTCAGCCATTCCCTCTGGCTACTGCTCTCTGGTCGGGGCGCCTGGGCGACAGACTCTCTCCCCCCACCCCCCCGC + cccc\`ccc\caccZccccc]^`LY\bL_bBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB @20649 TCTGGACTGGATCTTTAGGATGGTGGAGATGATCTGGATGTAGGACAAAAGAACCAGGCAGAAGGGTGTCATCAGAAGAACACTGCTAGACACCA + eeeeeaddadacdddebeccdddadd\^abbT_]bccTac]]b]L^][]Ve[^ZaY_^_^`\\Y]^Y`BBBBBBBBBBBBBBBBBBBBBBBBBBB @17259 GCCTTGTGTTGTTCCTGGCATCACCGCAGGGAGCCCTGGGGGGCCAGGCGGGCGCTGACCCTGGGCACTGCCGCGCCTGGAGGGGCTGAGCACCG + BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB @6003 CTTCAACTCATCTTGTTATTAATACCATCAATATCCCATGAGGCTCATAAAACGAGTCTTTCTTCTTGGAAACATGACCAAGATTGGGCAAACGT + fffffffffffffffffdffecfcefeffdcfdeeebbbdbccccc\db\`^aa`^Y^^^cbcbaa`bbWY^^^__S_YYR]GWY]\]]XX\_`S @4118 TCAAATTGTACTGCAAAGAAGGTCCCAGCTGGTCTCTTCTGGGAGTGATCTAACTAACTTAAGCTGACCCTGTGACTGGCTGAGGATAATCCCTT + dc^ddeeeeeedeee`ceceddadadddcbde_dedc_ec_a^^b\b\\]VIPZY^T^^^\L_BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB @18416 GTGGGGAAGCCGAAGAAGCAGCGGAGATCGATTGTAAGAACGACGTCCATGACCAGGGTTGGTGGAGACTGCTTCTCTGCATGCGGGGGAAGGCG + dddacaabdbea\d^cce\da`dd_^__`a`a`b[_^__^\^^^_BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB @20115 TGAAAAAGGAAAACATGGTAGTTTTCTTGTATGAGAGAGCCAGAGCCACCTTGGAGATTTTGTTCTCTCTGTGCGCACCAGTGATGACACAGGGG + ed^eeafffaddfecdddabc^_badd`bd_ddadaa^bbcad\d\__^_\aaa_aY____aaN_\cdc\^aaYbBBBBBBBBBBBBBBBBBBBB @16139 TCATCCGAAGAGTTGGCAGGCCCTGTGAATTGTGAAAACAGTATACCCACCCCTTTCCCGGAGCAGGACGCTGAATGTCCAGAGGATGCCAGACC + cabacacY^c\daaddaadad^\ad_a\Y`[ZQ]Y^^OYQ^X^YT\\]U\^RRX^\YJ^BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB @14123 GATTTGGGGAAAGGAAACAATAGTTGAGTTTGGGCCACGGGAAATTCAAGATGCCTGGTATGTCAAGTCTGGCAGTTGAAGCAGCAGGGCTGGCG + cccccccac^bYbbT_aa_Yb^^Ta\\^]]aaTaaaaab\b\XL`VZZV]QYYY[aa^^^^_^^BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB @8766 ACCTGTAAGGTCCGCTCCTGGTGGACACCCACGAAGTCCAGGGCCTCAGGCAGGAAGTTGTAGCGCAGAGTTTTGAGCAGCTGCTCCATCAGGGA + fcfffffcffeffeeefdefddeecdccacddfdYd`d^\_^`\_abbc\b[ba^Y^Z_^^H^Z_^Y_Y_OKWPZR]]Z]`Z``Z^UHZ^BBBBB cutadapt-1.9.1/tests/data/solid.fasta0000664000175000017500000000013612575761274020306 0ustar marcelmarcel00000000000000>problem1 T01120212022222011231210231030201330 >problem2 T20201030313112322220210033020133031 cutadapt-1.9.1/tests/data/paired.1.fastq0000664000175000017500000000045012575761274020616 0ustar marcelmarcel00000000000000@read1/1 some text TTATTTGTCTCCAGCTTAGACATATCGCCT + ##HHHHHHHHHHHHHHHHHHHHHHHHHHHH @read2/1 CAACAGGCCACATTAGACATATCGGATGGT + HHHHHHHHHHHHHHHHHHHHHHHHHHHHHH @read3/1 CCAACTTGATATTAATAACATTAGACA + HHHHHHHHHHHHHHHHHHHHHHHHHHH @read4/1 GACAGGCCGTTTGAATGTTGACGGGATGTT + HHHHHHHHHHHHHHHHHHHHHHHHHHHHHH cutadapt-1.9.1/tests/data/anchored_no_indels.fasta0000664000175000017500000000034012575761274023006 0ustar marcelmarcel00000000000000>no_mismatch (adapter: TTAGACATAT) TTAGACATATGAGGTCAG >one_mismatch TAAGACATATGAGGTCAG >two_mismatches TAAGACGTATGAGGTCAG >insertion ATTAGACATATGAGGTCAG >deletion TAGACATATGAGGTCAG >mismatch_plus_wildcard TNAGACGTATGAGGTCAG cutadapt-1.9.1/tests/data/s_1_sequence.txt.gz0000664000175000017500000000014112575761274021702 0ustar marcelmarcel00000000000000Mcompressed.fastqsH,*./N-,MKN v usv52r(NMKTfTfalcooaf>Mcutadapt-1.9.1/tests/data/interleaved.fastq0000664000175000017500000000111512600000013021452 0ustar marcelmarcel00000000000000@read1/1 some text TTATTTGTCTCCAGCTTAGACATATCGCCT + ##HHHHHHHHHHHHHHHHHHHHHHHHHHHH @read1/2 other text GCTGGAGACAAATAACAGTGGAGTAGTTTT + HHHHHHHHHHHHHHHHHHHHHHHHHHHHHH @read2/1 CAACAGGCCACATTAGACATATCGGATGGT + HHHHHHHHHHHHHHHHHHHHHHHHHHHHHH @read2/2 TGTGGCCTGTTGCAGTGGAGTAACTCCAGC + ###HHHHHHHHHHHHHHHHHHHHHHHHHHH @read3/1 CCAACTTGATATTAATAACATTAGACA + HHHHHHHHHHHHHHHHHHHHHHHHHHH @read3/2 TGTTATTAATATCAAGTTGGCAGTG + #HHHHHHHHHHHHHHHHHHHHHHHH @read4/1 GACAGGCCGTTTGAATGTTGACGGGATGTT + HHHHHHHHHHHHHHHHHHHHHHHHHHHHHH @read4/2 CATCCCGTCAACATTCAAACGGCCTGTCCA + HH############################ cutadapt-1.9.1/tests/data/empty.fastq0000664000175000017500000000000012575761274020340 0ustar marcelmarcel00000000000000cutadapt-1.9.1/tests/data/tooshort.noprimer.fa0000664000175000017500000000016512575761274022201 0ustar marcelmarcel00000000000000>read_length0a >read_length0b >read_length1 >read_length2 2 >read_length3 02 >read_length4 302 >read_length5 3302 cutadapt-1.9.1/tests/data/dos.fastq0000664000175000017500000000043712575761274020005 0ustar marcelmarcel00000000000000@prefix:1_13_573/1 CGTCCGAANTAGCTACCACCCTGATTAGACAAAT + )3%)&&&&!.1&(6:<'67..*,:75)'77&&&5 @prefix:1_13_1259/1 AGCCGCTANGACGGGTTGGCCCTTAGACGTATCT + ;<:&:A;A!9<<<,7:<=3=;:<&70<,=: cutadapt-1.9.1/tests/data/rest.txt0000664000175000017500000000010712575761274017670 0ustar marcelmarcel00000000000000REST1 read1 RESTING read2 RESTLESS read4 RESTORE read5 SOMETHING read8 cutadapt-1.9.1/tests/data/trimN5.fasta0000664000175000017500000000006112575761274020347 0ustar marcelmarcel00000000000000>read1 NGGCCTGGAATTCTCGGGTGCCAAGGAACTCCAGTCACCAG cutadapt-1.9.1/tests/data/wildcard.fa0000664000175000017500000000005012575761274020250 0ustar marcelmarcel00000000000000>1 ANGTACGTTGCATGCA >2 ACGTANGTTGCATGCA cutadapt-1.9.1/tests/data/adapter.fasta0000664000175000017500000000010012575761274020603 0ustar marcelmarcel00000000000000>adapter1 GCCGAACTTCTTAGACTGCCTTAAGGACGT >adapter2 CAGGTATATCGA cutadapt-1.9.1/tests/data/paired.2.fastq0000664000175000017500000000044512575761274020623 0ustar marcelmarcel00000000000000@read1/2 other text GCTGGAGACAAATAACAGTGGAGTAGTTTT + HHHHHHHHHHHHHHHHHHHHHHHHHHHHHH @read2/2 TGTGGCCTGTTGCAGTGGAGTAACTCCAGC + ###HHHHHHHHHHHHHHHHHHHHHHHHHHH @read3/2 TGTTATTAATATCAAGTTGGCAGTG + #HHHHHHHHHHHHHHHHHHHHHHHH @read4/2 CATCCCGTCAACATTCAAACGGCCTGTCCA + HH############################ cutadapt-1.9.1/tests/data/overlapb.fa0000664000175000017500000000121712575761274020277 0ustar marcelmarcel00000000000000>adaptlen18 TTAGACATATCTCCGTCGATACTTACCCGTA >adaptlen17 TAGACATATCTCCGTCGATACTTACCCGTA >adaptlen16 AGACATATCTCCGTCGATACTTACCCGTA >adaptlen15 GACATATCTCCGTCGATACTTACCCGTA >adaptlen14 ACATATCTCCGTCGATACTTACCCGTA >adaptlen13 CATATCTCCGTCGATACTTACCCGTA >adaptlen12 ATATCTCCGTCGATACTTACCCGTA >adaptlen11 TATCTCCGTCGATACTTACCCGTA >adaptlen10 ATCTCCGTCGATACTTACCCGTA >adaptlen9 TCTCCGTCGATACTTACCCGTA >adaptlen8 CTCCGTCGATACTTACCCGTA >adaptlen7 TCCGTCGATACTTACCCGTA >adaptlen6 CCGTCGATACTTACCCGTA >adaptlen5 CGTCGATACTTACCCGTA >adaptlen4 GTCGATACTTACCCGTA >adaptlen3 TCGATACTTACCCGTA >adaptlen2 CGATACTTACCCGTA >adaptlen1 GATACTTACCCGTA >adaptlen0 ATACTTACCCGTA cutadapt-1.9.1/tests/data/illumina.fastq.gz0000664000175000017500000001577112575761274021460 0ustar marcelmarcel00000000000000S\ےHn}WlĆ;;=x{ҏ6~w(T=*4Bvpe.vfo?nc'kMZ;e:zO8ts4ى__~KO_71hƘx] .ކ`ti^ !G7]MκkgZcw.Ħ6^,fkߏi  '>kh9x=&+bZ ZHŐ#Gz)s1QʑѦ O<cr|@ß@]N9];ۊl4|>n,Yt'I&:fy^"QXNFV$!1zO`%n &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t'zI֥[Y䦡q,UtYm%Sj]ΑU=8.zZ^aO&ٝ4G {ĕŖ!c㏏hQ!BH֘j\d=cGw\Zrw-:`ʉxN){5O@.l*$\*V!̔K ar k] va?J'$&;[%tObpՄz^cutadapt-1.9.1/tests/data/454.fa0000664000175000017500000002277712575761274017017 0ustar marcelmarcel00000000000000>000163_1255_2627 length=52 uaccno=E0R4ISW01DCIQD CCATCTCATCCCTGCGTGTCCCATCTGTTCCCTTCCTTGTCTCAGTGTGGTG >000652_1085_0667 length=122 uaccno=E0R4ISW01CXJXP ATTGAAGAGGTTGGTAAGTTTTAAGTTGGTAGGTGGTTGGGGAGTGGTTGGAGAGGAGTTGTTGGGAGTTTGTGTCCTGCTGAGACACGCAACGGGGATAGGCAAGGCACACAGGGGATAGG >000653_1285_1649 length=135 uaccno=E0R4ISW01DE4SJ AATTAGTCGAGCGTTGTGGTGGGTATTTGTAATTTTAGCTACTCTGAAGGCTGAGGCAGGAGAACTGCTTGAACCCGGGAGGCGGAGGTTGCTGAGACACGCAACAGGAGATAGGCAAGGCACACAGGGGATAGG >000902_0715_2005 length=92 uaccno=E0R4ISW01B03K3 GGGTGTTGAATTTAATATGTAGTATATTGATTTGTGATGATTATTTTGCCTGAGACACGCAACAGGGGTAGGCAAGGCACACAGGGGATAGG >001146_1255_0340 length=92 uaccno=E0R4ISW01DCGYU GGGTGTTGAATTTAATATGTAGTATATTGATTTGTGATGATTATTTTGCCTGAGACACGCAACAGGGGTAGGCAAGGCACACAGGGGATAGG >001210_1147_1026 length=171 uaccno=E0R4ISW01C2Z5W TAGGGAGGTGGTGAGTGTTGTGTGTTTAGATTGTGTGTGGTGGTTGGGAGTGGGAGTTGTATTTTAGGGTGTGGGTTGGGAGAGTGAAAGTTGTGGGTGTTTTGGATGGTGGGTTAGGTGGTTGTGCCTGAGACACGCAACAGGGGAAAGGCAAGGCACACAGGGGATAGG >001278_1608_2022 length=109 uaccno=E0R4ISW01D7HW4 CACACACACTCTTCCCCATACCTACTCACACACACACACACACACACAAACATACACAAATAATTCTGAGACACGCAACAGGAGATAGGCAAGGCACACAGGGGATAGG >001333_1518_1176 length=142 uaccno=E0R4ISW01DZKTM AATTGTCGTTTGATTGTTGGAAAGTAGAGGGTCGGGTTGGGGTAGATTCGAAAGGGGAATTTTGAGAAAAGAAATGGAGGGAGGTAGGAAAATTTTTTGCTGAGACACGCAACAGGGGTAGGCAAGGCACACAGGGGATAGG >001398_1584_1549 length=154 uaccno=E0R4ISW01D5DPB TAATGAAATGGAATGGAATGGAATGGAATGAAATGGAATGGAATGGAATGGAATGGAATGGAATGGAATGGAATGGAATGAAATGGAATGGAGTATAAAGGAATGGAATTACTGAGACACGCAACAGGGGAAGGCAAGGCACACAGGGGATAGG >001455_1136_2179 length=92 uaccno=E0R4ISW01C12AD GGGTGTTGAATTTAATATGTAGTATATTGATTTGTGATGATTATTTTGCCTGAGACACGCAACAGGGGTAGGCAAGGCACACAGGGGATAGG >001481_1165_0549 length=92 uaccno=E0R4ISW01C4KON GGGTGTTGAATTTAATATGTAGTATATTGATTTGTGATGATTATTTTGCCTGAGACACGCAACAGGGGTAGGCAAGGCACACAGGGGATAGG >001744_1376_3512 length=144 uaccno=E0R4ISW01DM5T2 TAAGTAGGGAAGGTTTGAGGTTGTTGGTGTTGGTAGTAGGGGTGTTTTAGTTAGGGGTTGTAGTTTGTTAAGGGAATTTTATTTGAGTTTAGAATTGAGGCTGAGACACGCAAAAGGGGATAGGCAAGGCACACAGGGGATAGG >001893_1084_1137 length=162 uaccno=E0R4ISW01CXG4Z TGTATATTTTGTTGGGTTTGTATATATTGTTAGGTGTGGTTGGTGAGTTGTATTGGTGGTGGTGTAAGGTGAGTGGAAATGGGAATGGATTGTAGATATGTTGGATTTGTGGTTTTTGGTTGAGACACGAACAGGGGATAGGCAAGGCACACAGGGGATAGG >001927_0254_0706 length=182 uaccno=E0R4ISW01AWLLG TGGAATCATCTAAGGGACACAAATAGAATCATCATTGAATGGAATCGAATGGAATCATCTAATGTACTCGAATGGAATTATTATTGAATAGAATAGAATGGAATTATCGAATGGAATCAAATGGAATGTAATGGAATGCTGAGACACGCAACAGGGGAAAGGCAAGGCACACAGGGGATAGG >002007_1338_1037 length=139 uaccno=E0R4ISW01DJRTR GGGTTGTGTATTTGGATAGTATGTGGAAAATGGTATTAAAAAGAATTTGTAGTTGGATTGTTGGTGGTTATTTAGTTTTTGGGTAATGGGTAGATTCCTGAGACACGCAAAGGGATAGGCAAGGCACACAGGGGATAGG >002186_1130_0654 length=92 uaccno=E0R4ISW01C1H5C GGGTGTTGAATTTAATATGTAGTATATTGATTTGTGATGATTATTTTGCCTGAGACACGCAACAGGGGTAGGCAAGGCACACAGGGGATAGG >002282_1237_2702 length=134 uaccno=E0R4ISW01DAXWG AATTAGCCGGGCGTGATGGCGGGCGTTTGTAGTTTTAGTTATTCGGGAGGTTGAGGTAGGAGAATGGCGTGAATTCGGGAAGCGGAGTTTGCTGAGACACGCAACAGGGGTAGGCAAGGCACACAGGGGATAGG >002382_1259_0997 length=107 uaccno=E0R4ISW01DCT37 TAAGGGTTGAAGCGAGGTAGGTAGTTTGTTTGTGGTTTTGTTTCGTATTTTTGTTTCGTATCCCTGAGACACGCAACAGAGGATAGGCAAGGCACACAGGGGATAGG >002477_0657_0655 length=174 uaccno=E0R4ISW01BVY8H TTTTTGGAAAGTTGGGTGGGTATAGTTTTGAGTAGTTAGAGGTATTATAATAGTATTAGGAAGTTGAATGTGAGGGTATAAGAGTTAATTTGATTTTTCGTTGATATGTTTGTTGTTTGAAGTTAGAGTGCTGAGACACGCAACAGGAGATAGGCAAGGCACACAGGGGATAGG >003149_1553_2333 length=170 uaccno=E0R4ISW01D2OBZ TATTTAGTTTTAGTTTGTTTAGGTGGTTATAGAATACGGAGTTTATGAAGTTGATTAGGAATATTATTAGTTGAATTAAGAATTGGGAAGAGAGGGGAACGGGAAGGGACGTGAGTGATTATTATTGCTGAGACACGCAAAGGGGATAGGCAAGGCACACAGGGGATAGG >003194_1475_2845 length=101 uaccno=E0R4ISW01DVT7J TATTTTGGGTTAAGTCGGGTTTAGTTGTTAGGGCGAGAAGTTAGTTGTTGACCCCTGCTGAGACACGCAAAAGGGGATAGGCAAGGCACACAGGGGATAGG >003206_1315_0479 length=95 uaccno=E0R4ISW01DHQPD GGGTTGGATAATATGATGGTGTTGGGGAATATTTAGGTATGTGGTTTGTGGCTGAGACACGCAACAGAGGATAGGCAAGGCACACAGGGGATAGG >003271_0173_0314 length=125 uaccno=E0R4ISW01APHAK GTTTATTTGTTATTTATTTTTAGGTTTAGAAGAGTGTTTGGTATTTATTGAGGATTTAGTATTTGTTAGAAGGATTGGATTCTGAGACACGCAACAGGGGGTAGGCAAGGCACACAGGGGATAGG >003443_1737_2250 length=67 uaccno=E0R4ISW01EITSS TGTAGGTTGTGTTGTAGGTTGTCCTGAGACACGCAACAGGGGAAAGGCAAGGCACACAGGGGATAGG >002633_1776_1582 length=81 uaccno=E0R4ISW01EL8JK CAGGGTGGATTGGGGAACACACAGTGTGGCCGCGTGATTCTGAGACACGCAACAGGGAAGGCAAGGCACACAGGGGATAGG >002663_0725_3154 length=126 uaccno=E0R4ISW01B1Z2S GCGTTTTATATTATAATTTAATATTTTGGAGGTTGGGTGCGGTGGTTTACGTTTGTAGTTTAGTATTTGGGAGGTTAAGGTAGCTGAGACACGCAACGGGGATAGGCAAGGCACACAGGGGATAGG >002761_1056_4055 length=121 uaccno=E0R4ISW01CU2V9 AATTTTATTCGATTTATGTGATGATTTATTTATTTTATTTGAAGATGATTTTATTCGAGATTATTCGATGATTCCATTCCTGAGACACGCAAGGGGATAGGCAAGGCACACAGGGGATAGG >002843_0289_2275 length=122 uaccno=E0R4ISW01AZPE9 ATTGAAGAGGTTGGTAAGTTTTAAGTTGGTAGGTGGTTGGGGAGTGGTTGGAGAGGAGTTGTTGGGAGTTTGTGTCCTGCTGAGACACGCAACGGGGATAGGCAAGGCACACAGGGGATAGG >002934_1762_2177 length=92 uaccno=E0R4ISW01EK0Q7 GGGTGTTGAATTTAATATGTAGTATATTGATTTGTGATGATTATTTTGCCTGAGACACGCAACAGGGGTAGGCAAGGCACACAGGGGATAGG >003515_1711_1058 length=122 uaccno=E0R4ISW01EGIPG AATTGAATGGAATTATTATTGAATGGATTCGAATGGAATTATTATTGAATGGAATCATCGAGTGGAATCGAATGGAATCTGAGACACGCAACAGGGGAAAGGCAAGGCACACAGGGGATAGG >003541_1276_1589 length=112 uaccno=E0R4ISW01DECAV TAGTTTAGGGTGGTAGTTTGGATAAGGTAGTTTTACGGTTTAGTAGTAGTAGGTTAAGTAGGAAAACTGCTGAGACACGCAAAGGGGATAGGCAAGGCACACAGGGGATAGG >003587_1522_1804 length=152 uaccno=E0R4ISW01DZXX6 AATTTATGTAGTGGAAGTAGGATATAAAGAATAGGTTAATGGATTTTGAGATATTAAAAAGAGTAGGAAATTAGTTGAGAGGTTAAGTAGTAGTTTATTTTAGCCACCCTGAGACACGCAACAGGAGATAGGCAAGGCACACAGGGGATAGG >003592_0076_0430 length=134 uaccno=E0R4ISW01AGYTC AATTAGTTAGGCGTGGTGGCGGGTGTTTGTAGTTTTAGTTATTCGGGAGGTTGAGGTAGGAGAATGTTGTGAATTTAGGAGGTGGAGTTTGCTGAGACACGCAACAGGGGAAGGCAAGGCACACAGGGGATAGG >003957_0595_0965 length=173 uaccno=E0R4ISW01BQJIV TAATATTAGGTGTCAATTTGACTGGATCGAGGGATGTGTGTCGGTGAGAGTCTCACTAGAGGTTGATATTTGAGTCGTTAGACTGGGAGAGGAAGACCGAACTGTCAAGTGTATGGGCGCCATCCAATTCTGAGACACGCAACAGGGGAAAGGCAAGGCACACAGGGGATAGG >003986_1127_2937 length=103 uaccno=E0R4ISW01C1AFF TAATGGAATGGAATTTTCGGAATGGAATGGAATGGAATGGAATGGAATGGAATGGAATTACTGAGACACGCAACAGGGGAAGGCAAGGCACACAGGGGATAGG >004012_1559_1491 length=111 uaccno=E0R4ISW01D26M9 TAGTGGATATAAATGGAATGGATTGGAATGGAATGGATACGAATGGAATGGATTGGAGTGGAATGGATTGACTGAGACACGCAACAGGGGGCAAGGCACACAGGGGATAGG >004030_1508_2061 length=166 uaccno=E0R4ISW01DYPWF TACGTATATACGCGTACGCGTATACGTATATACGCGTATACGTATACGCGTACGTATATATACGCGTATACGTTTACGTACGTACGCGTATATACGTACGTATACACACACGCATATGCATACTGAGACACGCAACAGGGGAAAGGCAAGGCACACAGGGGATAGG >004038_1061_2047 length=152 uaccno=E0R4ISW01CVG5D AATTGATTCGAATGGAATGGATTGGAATGGAACGGATTTGAATGGAATGGATTGGAATGGAATGGATTGAATGGAATGGATTGGAGAGGATTGGATTTGAATGGAATTCTGAGACACGCAACAGGGGAAAGGCAAGGCACACAGGGGATAGG >004105_1121_0391 length=135 uaccno=E0R4ISW01C0PH1 AATTAGTTGGGCGTGGTGGCGAGTGTTTGTAATTTTAGTTATTTAGGAGGTTGAGGTAGGAGAATTATTTGAACCCGGTAGACGGAAGTTGCTGAGACACGCAACAGGGGAAAGGCAAGGCACACAGGGGATAGG >004129_1618_3423 length=122 uaccno=E0R4ISW01D8ELT AATTGAATGGTATTGAAAGGTATTAATTTAGTGGAATGGAATGGAATGTATTGGAATGGAAAATAATGGAATGGAGTGCTGAGACACGCAACAGGGGAAAGGCAAGGCACACAGGGGATAGG >004203_0451_0902 length=115 uaccno=E0R4ISW01BDWC4 TAGTTGGTGTGTTGTAATCGAGACGTAGTTGGTTGGTACGGGTTAGGGTTTTGATTGGGTTGTTGTGTTTGCTGAGACACGCAACATGGGATAGGCAAGGCACACAGGGGATAGG >004626_1937_0919 length=223 uaccno=E0R4ISW01E0CVD TAGAGTAGATAGTAGGGTTAGAGAAGGTAGGGTACGTTTAGTTTGTTAGTAAGGTTTAAGTTTTGGGTGGGAAAGGTTAGTGGCGGGAAGGGACGAAGGTGGTAATCGAGAGTAGATTTAGAGAAGTTTTTGAAGTGGGCGTTGGGAGTTTTCGAAGTATTGAGAGAGAGGAGCTTGTGCTGAGACATGCAACAGAGGATAGGCAAGGCACACAGGGGATAGG >004913_0641_2071 length=135 uaccno=E0R4ISW01BULRD AATTAGTCGAGCGTTGTGGTGGGTATTTGTAATTTTAGCTACTCTGAAGGCTGAGGCAGGAGAACTGCTTGAACCCGGGAGGCGGAGGTTGCTGAGACACGCAACAGGAGATAGGCAAGGCACACAGGGGATAGG >005063_0599_1983 length=127 uaccno=E0R4ISW01BQWX9 ATGTGGTGAAGATTGGTTTTAGGTGTTTTAATGTGGATTTTCAGGGGTTTTAAAAGGGTTGGGAGAGTGAAATATATATAAGGCTGAGACACGCAAAAGGGGATAGGCAAGGCACACAGGGGATAGG >005140_0759_3209 length=116 uaccno=E0R4ISW01B4ZKR TAGTATAGAGGGTTTGTGGTCGTGAGGGTGTTGATGGCGGGAGGGTTTTGATGGTAGGAGGGCCCGTGCTGTGCTGAGACACGCAACAGGGGAAGGCAAGGCACACAGGGGATAGG >005351_0883_3221 length=137 uaccno=E0R4ISW01CFVHJ TTAGGTGTTATAGTTGAGTGAGATGTTAGTGTTTAATGGTTTTATTTAGGTTGATGGGTTAATGAGGGGGTATTTGATAGTTTTGAAGATTTGACTGAGACACGCAACGGGGATAGGCAAGGCACACAGGGGATAGG >005380_1702_1187 length=207 uaccno=E0R4ISW01EFQC1 TAGGGTTTTTCGAGTATATATTTAGTAGTACGCTCGACTTCTCTTATATAAAGGTTTTGGTTTTTATAGGTTTTTCCATTGTGTCTGCCTGGGGGAGGGCCCTTCTCCTTCAGGATACTGTAGCTTCTCTGCGTGATAAGCCAGCATTCACGGCTTTCAGGTGCTGAGACATGCAACAGGGGAAAGGCAAGGCACACAGGGGATAGG >005568_1060_1943 length=63 uaccno=E0R4ISW01CVDWP ATAGCGTATTTCTCACCTGCTGAGACACGCAACAGGGGAAAGGCAAGGCACACAGGGGATAGG >005740_1536_2697 length=159 uaccno=E0R4ISW01D06VV TAAAGAGGTGTTATTATTAGTTAGGAGAGGAGGTGGTTAGATAGTAGTGGGATTATAGGGGAATATAGAGTTGTTAGTTTAGGGATAAGGGATTGATCGATGGGTTAGGTCTCTGCTGAGACACGCAAAAGGGGATAGGCAAGGCACACAGGGGATAGG >005753_1884_3877 length=95 uaccno=E0R4ISW01EVRNB AAACTGAGTTGTGATGTTTGCATTCAACTCACAGAGTTCAACATTCCTTTAACTGAGACACGCAACAGGGTTAGGCAAGGCACACAGGGTATAGG >read_equals_adapter 1a TGAGACACGCAACAGGGGAAAGGCAAGGCACACAGGGGATAGG >read_equals_start_of_adapter 1b TGAGACACGCAACAGGGGAAAG >read_equals_end_of_adapter 1c GAAAGGCAAGGCACACAGGGGATAGG >read_equals_middle_of_adapter 1d GCAACAGGGGAAAGGCAAGGCACACAGG >read_ends_with_adapter 2a GCTACTCTGAAGGCTGAGGCAGGAGAACTGCTTGAACCCGGGAGGCGTGAGACACGCAACAGGGGAAAGGCAAGGCACACAGGGGATAGG >read_ends_with_start_of_adapter 2b GCTACTCTGAAGGCTGAGGCAGGAGAACTGCTTGAACCCGGGAGGCGTGAGACACGCAACAGGGGAAAGGCAAGG >read_contains_adapter_in_the_middle 3 CGTAGTTGGTTGGTACGTGAGACACGCAACAGGGGAAAGGCAAGGCACACAGGGGATAGGGGTTAGGGTTTTGATTGGGTTGT >read_starts_with_adapter 4a TGAGACACGCAACAGGGGAAAGGCAAGGCACACAGGGGATAGGAAAGGTTTTGGTTTTTATAGGTTTTT >read_starts_with_end_of_adapter 4b AACAGGGGAAAGGCAAGGCACACAGGGGATAGGAAAGGTTTTGGTTTTTATAGGTTTTT cutadapt-1.9.1/tests/data/issue46.fasta0000664000175000017500000000002012575761274020466 0ustar marcelmarcel00000000000000>readname CGTGA cutadapt-1.9.1/tests/data/solid.csfasta0000664000175000017500000000365712575761274020647 0ustar marcelmarcel00000000000000# Tue May 5 13:57:32 2009 /share/apps/corona/bin/filter_fasta.pl --output=/data/results/s0103/s0103_20090430_552to561_2_2/552to561/results.01/primary.20090505091459275 --name=s0103_20090430_552to561_2_2_552to561 --tag=F3 --minlength=35 --mincalls=25 --prefix=T /data/results/s0103/s0103_20090430_552to561_2_2/552to561/jobs/postPrimerSetPrimary.197/rawseq # Cwd: /state/partition1/home/pipeline # Title: s0103_20090430_552to561_2_2_552to561 >1_13_85_F3 T110020300.0113010210002110102330021 >1_13_573_F3 T312311200.3021301101113203302010003 >1_13_1259_F3 T002112130.2012223322111330201230313 >1_13_1440_F3 T110020313.1113211010332111302330001 >1_14_177_F3 T31330222020233321121323302013303311 >1_14_238_F3 T01331031200310022122230330201030313 >1_15_1098_F3 T32333033222233020223032312232220332 >1_16_404_F3 T03310320002130202331112133020103031 >1_16_904_F3 T21230102331022312232132021122111212 >1_16_1315_F3 T03231231112210333010310323302010003 >1_16_1595_F3 T22323211312111230022210011213302012 >1_17_1379_F3 T32011212111223230232132311321200123 >1_18_1692_F3 T12322233031100211233323300112200210 >1_19_171_F3 T10101101220213201111011320201230032 >1_22_72_F3 T13303032323221212301322233320210233 >1_22_1377_F3 T22221333311222312201132312022322300 >1_23_585_F3 T30010310310130312122123302013303131 >1_23_809_F3 T13130101101021211013220302223302112 >1_24_138_F3 T33211130100120323002033020123031311 >1_24_206_F3 T33330332002223002020303331321221000 >1_25_143_F3 T23202003031200220301303302012203132 >1_25_1866_F3 T03201321022131101112012330221130311 >1_27_584_F3 T10010330110103213112323303012103101 >1_27_1227_F3 T02003022123001003201002031303302011 >1_27_1350_F3 T13130101101021211013220222221301231 >1_29_477_F3 T13130101101021211013300302223003030 >1_30_882_F3 T20102033000233133320103031311233200 >1_31_221_F3 T03301311201100030300100233220102031 >1_31_1313_F3 T01331131300330122321000101010330201 >1_529_129_F3 T132222301020322102101322221322302.3302.3.3..221..3 cutadapt-1.9.1/tests/data/plus.fastq0000664000175000017500000000024612575761274020201 0ustar marcelmarcel00000000000000@first_sequence some other text SEQUENCE1 +first_sequence some other text :6;;8<=:< @second_sequence and more text SEQUENCE2 +second_sequence and more text 831 ACGTAAAACGTTGCATGCA >2 ACGTGGGACGTTGCATGCA >3b TGGCTGGCCACGTCCCACGTAA >4b TGGCTGGCCACGTTTTACGTCC cutadapt-1.9.1/tests/data/solid5p.fastq0000664000175000017500000000301512575761274020572 0ustar marcelmarcel00000000000000@read1 T1212322332333012001112122203233202221000211 + :58)2";%4A,8>0;9C\'?276>#)49"<,>?/\'!A4$.%+ @read2 T201212322332333200121311212133113001311002032 + 44<@;(<3.37/''=:-9AA<&C2%$$;?A&5!C69:?-;&;65. @read3 T02201212322332333211133003002232323010012320300 + 2!#97*B.0A-@(*","B3><4&16(: @read4 T0302201212322332333002010102312033021011121312131 + 74-:$-;&@>@0581-82'<&-81+%)7;<)6?83!&CB9"9B6307=& @read5 T20302201212322332333221313210102120020302022233110 + ';4!-6?0$45.C#B+$(4+$9)27,(-*=,#4:;"/4++5<,@-784*' @read6 T20302211212322332333031203203013323021010020301321 + +3"85:2=3<")$66*#4".4!.;:C%97@>75-";';*)A67CCC")$* @read7 T21301020302201212322332333203020130202120211322010013211 + ,;0B@A"98!<=!*;5;650;';79!+8,4(2=+98:B@C@:+3*>2+6+2++C0. @read8 T2310321030130120302201212322332333232202123123111113113003200330 + C/$-"=6+1.8?AB!?'#.585@6:47@?>.315A-'9<%">6,+)*,)1-;:(691>?C)4A; @read9 T0002132103320302201212322332333020123133023120320131020333011 + (&?527&:=;6@6@03%95(-0#$:B8::B*4?@&)6>79C>)6C'5-#0:A8+2* @read10 T00322031320033220302201212322332333201130233321321011303133231200 + &53)>2.+9?7%=&21;8!820961%3#0'5C.28347,2(55*1.,>%:(1A'A5=@7&&5?4' @read11 T0302201212322332333.02010102312033021011121312131 + 6=@!85+6((> @read12 T030220121232233233321 + 4&1.?+<-0(!(;://+0@?C @read13 T03022012123223323332 + !&,>"772,,/2/2A1C%5C @read14 T0302201212322332333 + @%$#B$A0B0&((@CBCBFDBDFDDDDD<@C>ADD@B;5:978@CBDDFFDB4B?DB21;84?DDBC9DEBAB;=@<@@B@@@@B>CCBBDE98>>0@7 @SEQ:1:1101:9240:3898#0/1 CCAGCAAGGAAGCCAAGATGGGAAAGGTCATGCGGCATACGCTCGGCGCCAGTTTGAATATTAGACATAATTTATCCTCAAGTAAGGGGCCGAAGCCCCTG + GHGHGHHHHGGGDHHGDCGFEEFHHGDFGEHHGFHHHHHGHEAFDHHGFHHEEFHGHFHHFHGEHFBHHFHHHH@GGGDGDFEEFC@=D?GBGFGF:FB6D @SEQ:1:1101:9207:3899#0/1 adapter start: 64 TTAACTTCTCAGTAACAGATACAAACTCATCACGAACGTCAGAAGCAGCCTTATGGCCGTCAACGCCTAACTTCTTAGACTGCCTTAAGGACGTATACATA + HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHFHHHHHHCFHHFHHFHFFFFFBHHGHHHFFHHFHGGHHDEBFGfirst_sequence SEQUENCE1 >second_sequence SEQUEN CE2 cutadapt-1.9.1/tests/data/anchored.fasta0000664000175000017500000000015312575761274020756 0ustar marcelmarcel00000000000000>read1 FRONTADAPTsequence >read2 blablaFRONTADAPTsequence >read3 NTADAPTsequence >read4 FRINTADAPTsequence cutadapt-1.9.1/tests/data/twoadapters.fasta0000664000175000017500000000040712575761274021532 0ustar marcelmarcel00000000000000>read1 GATCCTCCTGGAGCTGGCTGATACCAGTATACCAGTGCTGATTGTTGAATTTCAGGAATTTCTCAAGCTCGGTAGC >read2 CTCGAGAATTCTGGATCCTCTCTTCTGCTACCTTTGGGATTTGCTTGCTCTTGGTTCTCTAGTTCTTGTAGTGGTG >read3 (no adapter) AATGAAGGTTGTAACCATAACAGGAAGTCATGCGCATTTAGTCGAGCACGTAAGTTCATACGGAAATGGGTAAG cutadapt-1.9.1/tests/data/solid.fastq0000664000175000017500000000517112575761274020332 0ustar marcelmarcel00000000000000@1_13_85_F3 T110020300.0113010210002110102330021 + 7&9<&77)& <7))%4'657-1+9;9,.<8);.;8 @1_13_573_F3 T312311200.3021301101113203302010003 + 6)3%)&&&& .1&(6:<'67..*,:75)'77&&&5 @1_13_1259_F3 T002112130.2012223322111330201230313 + =;<:&:A;A 9<<<,7:<=3=;:<&70<,=: @1_14_177_F3 T31330222020233321121323302013303311 + :8957;;54)'98924905;;)6:7;1:3<88(9: @1_14_238_F3 T01331031200310022122230330201030313 + ?><5=;<<<12>=<;1;;=5);.;14:0>2;:3;7 @1_15_1098_F3 T32333033222233020223032312232220332 + #,##(#5##*#($$'#.##)$&#%)$1##-$&##% @1_16_404_F3 T03310320002130202331112133020103031 + 78;:;;><>9=9;<<2=><<1;58;9<<;>(<;<; @1_16_904_F3 T21230102331022312232132021122111212 + 9>=::6;;99=+/'$+#.#&%$&'(($1*$($.#. @1_16_1315_F3 T03231231112210333010310323302010003 + <9<8A?>?::;6&,%;6/)8<<#/;79(448&*.) @1_16_1595_F3 T22323211312111230022210011213302012 + >,<=<>@6<;?<=>:/=.>&;;8;)17:=&,>1=+ @1_17_1379_F3 T32011212111223230232132311321200123 + /-1179<1;>>8:':7-%/::0&+=<29,7<8(,2 @1_18_1692_F3 T12322233031100211233323300112200210 + .#(###5%)%2)',2&:+#+&5,($/1#&4&))$6 @1_19_171_F3 T10101101220213201111011320201230032 + )6:65/=3*:(8%)%2>&8&%;%0&#;$3$&:$#& @1_22_72_F3 T13303032323221212301322233320210233 + 3/#678<:.=9::6:(<538295;9+;&*;)+',& @1_22_1377_F3 T22221333311222312201132312022322300 + )##0%.$.1*%,)95+%%14%$#8-###9-()#9+ @1_23_585_F3 T30010310310130312122123302013303131 + >55;8><96/18?)<3<58<5:;96=7:1=8=:-< @1_23_809_F3 T13130101101021211013220302223302112 + :7<59@;<<5;/9;=<;7::.)&&&827(+221%( @1_24_138_F3 T33211130100120323002033020123031311 + 6)68/;906#,25/&;<$0+250#2,<)5,9/+7) @1_24_206_F3 T33330332002223002020303331321221000 + ))4(&)9592)#)694(,)292:(=7$.18,()65 @1_25_143_F3 T23202003031200220301303302012203132 + :4;/#&<9;&*;95-7;85&;587#16>%&,9<2& @1_25_1866_F3 T03201321022131101112012330221130311 + =<>9;<@7?(=6,<&?=6=(=<641:?'<1=;':4 @1_27_584_F3 T10010330110103213112323303012103101 + 82'('*.-8+%#2)(-&3.,.2,),+.':&,'(&/ @1_27_1227_F3 T02003022123001003201002031303302011 + 492:;>A:<;34<<=);:<<;9=7<3::<::3=>' @1_27_1350_F3 T13130101101021211013220222221301231 + 95,)<(4./;<938=64=+2/,.4),3':97#33& @1_29_477_F3 T13130101101021211013300302223003030 + 94=55:75=+:/7><968;;#&+$#3&6,#1#4#' @1_30_882_F3 T20102033000233133320103031311233200 + 2(+-:-3<;5##/;:(%&84'#:,?3&&8>-();5 @1_31_221_F3 T03301311201100030300100233220102031 + 89>9>5<139/,&:7969972.274&%:78&&746 @1_31_1313_F3 T01331131300330122321000101010330201 + ;3<7=7::)5*4=&;<7>4;795065;9';896'= @1_529_129_F3 T132222301020322102101322221322302.3302.3.3..221..3 + >>%/((B6-&5A0:6)>;'1)B*38/?(5=%B+ &<-9 % @ )%) ( cutadapt-1.9.1/tests/data/suffix-adapter.fasta0000664000175000017500000000003412575761274022113 0ustar marcelmarcel00000000000000>suffixadapter BACKADAPTER$ cutadapt-1.9.1/tests/data/sra.fastq0000664000175000017500000000102712575761274020001 0ustar marcelmarcel00000000000000@1_13_85_F3 T110020300.0113010210002110102330021 + !7&9<&77)& <7))%4'657-1+9;9,.<8);.;8 @1_13_573_F3 T312311200.3021301101113203302010003 + !6)3%)&&&& .1&(6:<'67..*,:75)'77&&&5 @1_13_1259_F3 T002112130.2012223322111330201230313 + !=;<:&:A;A 9<<<,7:<=3=;:<&70<,=: @1_14_177_F3 T31330222020233321121323302013303311 + !:8957;;54)'98924905;;)6:7;1:3<88(9: @1_14_238_F3 T01331031200310022122230330201030313 + !?><5=;<<<12>=<;1;;=5);.;14:0>2;:3;7 cutadapt-1.9.1/tests/data/anywhere_repeat.fastq0000664000175000017500000000120312575761274022372 0ustar marcelmarcel00000000000000@prefix:1_13_1400/1 CGTCCGAANTAGCTACCACCCTGATTAGACAAAT + )3%)&&&&!.1&(6:<'67..*,:75)'77&&&5 @prefix:1_13_1500/1 CAAGACAAGACCTGCCACATTGCCCTAGTATTAA + <=A:A=57!7<';<6?5;;6:+:=)71>70<,=: @prefix:1_13_1550/1 CAAGACAAGACCTGCCACATTGCCCTAGTCAAGA + <=A:A=57!7<';<6?5;;6:+:=)71>70<,=: @prefix:1_13_1600/1 CAAGATGTCCCCTGCCACATTGCCCTAGTCAAGA + <=A:A=57!7<';<6?5;;6:+:=)71>70<,=: @prefix:1_13_1700/1 CAAGATGTCCCCTGCCACATTGCCCTAGTTTATT + <=A:A=57!7<';<6?5;;6:+:=)71>70<,=: @prefix:1_13_1800/1 GTTCATGTCCCCTGCCACATTGCCCTAGTTTATT + <=A:A=57!7<';<6?5;;6:+:=)71>70<,=: @prefix:1_13_1900/1 ATGGCTGTCCCCTGCCACATTGCCCTAGTCAAGA + <=A:A=57!7<';<6?5;;6:+:=)71>70<,=:cutadapt-1.9.1/tests/data/small.fastq0000664000175000017500000000042312575761274020323 0ustar marcelmarcel00000000000000@prefix:1_13_573/1 CGTCCGAANTAGCTACCACCCTGATTAGACAAAT + )3%)&&&&!.1&(6:<'67..*,:75)'77&&&5 @prefix:1_13_1259/1 AGCCGCTANGACGGGTTGGCCCTTAGACGTATCT + ;<:&:A;A!9<<<,7:<=3=;:<&70<,=: cutadapt-1.9.1/tests/data/tooshort.fa0000664000175000017500000000015412575761274020345 0ustar marcelmarcel00000000000000>read_length0a T >read_length0b T >read_length1 T2 >read_length2 T02 >read_length3 T302 >read_length4 T3302 cutadapt-1.9.1/tests/data/toolong.fa0000664000175000017500000000026212575761274020145 0ustar marcelmarcel00000000000000>read_length6 T023302 >read_length7 T1023302 >read_length8 T11023302 >read_length9 T111023302 >read_length10 T2111023302 >read_length11 T02111023302 >read_length12 T002111023302 cutadapt-1.9.1/tests/data/lengths.fa0000664000175000017500000000107412575761274020132 0ustar marcelmarcel00000000000000>read_length0a T330201030313112312 >read_length0b T1330201030313112312 >read_length1 T21330201030313112312 >read_length2 T021330201030313112312 >read_length3 T3021330201030313112312 >read_length4 T33021330201030313112312 >read_length5 T233021330201030313112312 >read_length6 T0233021330201030313112312 >read_length7 T10233021330201030313112312 >read_length8 T110233021330201030313112312 >read_length9 T1110233021330201030313112312 >read_length10 T21110233021330201030313112312 >read_length11 T021110233021330201030313112312 >read_length12 T0021110233021330201030313112312 cutadapt-1.9.1/tests/data/anchored-back.fasta0000664000175000017500000000015612575761274021657 0ustar marcelmarcel00000000000000>read1 sequenceBACKADAPTER >read2 sequenceBACKADAPTERblabla >read3 sequenceBACKADA >read4 sequenceBECKADAPTER cutadapt-1.9.1/tests/data/small.myownextension0000664000175000017500000000042312575761274022313 0ustar marcelmarcel00000000000000@prefix:1_13_573/1 CGTCCGAANTAGCTACCACCCTGATTAGACAAAT + )3%)&&&&!.1&(6:<'67..*,:75)'77&&&5 @prefix:1_13_1259/1 AGCCGCTANGACGGGTTGGCCCTTAGACGTATCT + ;<:&:A;A!9<<<,7:<=3=;:<&70<,=: cutadapt-1.9.1/tests/data/multiblock.fastq.gz0000664000175000017500000000040612575761274022000 0ustar marcelmarcel00000000000000/Ns((JMˬ2747577rvqvvwt qtwqtv"w 1KKXUS  4̬ltM5́\8 [/NUͫ@aoQSBJB^ҞXW5 ALq,Pb0c@Q-jX bV<m0 jS"]fZfY}ߺpŅuÏےACXy`|LZ9e _fB:cutadapt-1.9.1/tests/testxopen.py0000664000175000017500000000470312575761274017652 0ustar marcelmarcel00000000000000# coding: utf-8 from __future__ import print_function, division, absolute_import import gzip import os import random import sys from nose.tools import raises from cutadapt.xopen import xopen, lzma from .utils import temporary_path base = "tests/data/small.fastq" files = [ base + ext for ext in ['', '.gz', '.bz2' ] ] if lzma is not None: files.append(base + '.xz') def test_context_manager(): major, minor = sys.version_info[0:2] for name in files: if major == 2 and minor == 6: continue # Py26 compression libraries do not support context manager protocol. with xopen(name, 'rt') as f: lines = list(f) assert len(lines) == 12 assert lines[5] == 'AGCCGCTANGACGGGTTGGCCCTTAGACGTATCT\n', name f.close() def test_append(): for ext in ["", ".gz"]: # BZ2 does NOT support append text = "AB" if ext != "": text = text.encode("utf-8") # On Py3, need to send BYTES, not unicode reference = text + text print("Trying ext=%s" % ext) with temporary_path('truncated.fastq' + ext) as path: try: os.unlink(path) except OSError: pass with xopen(path, 'a') as f: f.write(text) with xopen(path, 'a') as f: f.write(text) with xopen(path, 'r') as f: for appended in f: pass try: reference = reference.decode("utf-8") except AttributeError: pass print(appended) print(reference) assert appended == reference def test_xopen_text(): for name in files: f = xopen(name, 'rt') lines = list(f) assert len(lines) == 12 assert lines[5] == 'AGCCGCTANGACGGGTTGGCCCTTAGACGTATCT\n', name f.close() def test_xopen_binary(): for name in files: f = xopen(name, 'rb') lines = list(f) assert len(lines) == 12 assert lines[5] == b'AGCCGCTANGACGGGTTGGCCCTTAGACGTATCT\n', name f.close() def create_truncated_file(path): # Random text text = ''.join(random.choice('ABCDEFGHIJKLMNOPQRSTUVWXYZ') for _ in range(200)) f = xopen(path, 'w') f.write(text) f.close() f = open(path, 'a') f.truncate(os.stat(path).st_size - 10) f.close() # Disable these tests in Python 3.2 and 3.3 if not ((3, 2) <= sys.version_info[:2] <= (3, 3)): @raises(EOFError) def test_truncated_gz(): with temporary_path('truncated.gz') as path: create_truncated_file(path) f = xopen(path, 'r') f.read() f.close() @raises(EOFError) def test_truncated_gz_iter(): with temporary_path('truncated.gz') as path: create_truncated_file(path) f = xopen(path, 'r') for line in f: pass f.close() cutadapt-1.9.1/tests/testadapters.py0000664000175000017500000000516412627537126020321 0ustar marcelmarcel00000000000000# coding: utf-8 from __future__ import print_function, division, absolute_import from nose.tools import raises, assert_raises from cutadapt.seqio import Sequence from cutadapt.adapters import (Adapter, Match, ColorspaceAdapter, FRONT, BACK, parse_braces) def test_issue_52(): adapter = Adapter( sequence='GAACTCCAGTCACNNNNN', where=BACK, max_error_rate=0.1, min_overlap=5, read_wildcards=False, adapter_wildcards=True) read = Sequence(name="abc", sequence='CCCCAGAACTACAGTCCCGGC') am = Match(astart=0, astop=17, rstart=5, rstop=21, matches=15, errors=2, front=None, adapter=adapter, read=read) assert am.wildcards() == 'GGC' """ The result above should actually be 'CGGC' since the correct alignment is this one: adapter GAACTCCAGTCACNNNNN mismatches X X read CCCCAGAACTACAGTC-CCGGC Since we do not keep the alignment, guessing 'GGC' is the best we can currently do. """ def test_issue_80(): # This issue turned out to not be an actual issue with the alignment # algorithm. The following alignment is found because it has more matches # than the 'obvious' one: # # TCGTATGCCGTCTTC # =========X==XX= # TCGTATGCCCTC--C # # This is correct, albeit a little surprising, since an alignment without # indels would have only two errors. adapter = Adapter( sequence="TCGTATGCCGTCTTC", where=BACK, max_error_rate=0.2, min_overlap=3, read_wildcards=False, adapter_wildcards=False) read = Sequence(name="seq2", sequence="TCGTATGCCCTCC") result = adapter.match_to(read) assert result.errors == 3, result assert result.astart == 0, result assert result.astop == 15, result def test_str(): a = Adapter('ACGT', where=BACK, max_error_rate=0.1) str(a) str(a.match_to(Sequence(name='seq', sequence='TTACGT'))) ca = ColorspaceAdapter('0123', where=BACK, max_error_rate=0.1) str(ca) @raises(ValueError) def test_color(): ColorspaceAdapter('0123', where=FRONT, max_error_rate=0.1) def test_parse_braces(): assert parse_braces('') == '' assert parse_braces('A') == 'A' assert parse_braces('A{0}') == '' assert parse_braces('A{1}') == 'A' assert parse_braces('A{2}') == 'AA' assert parse_braces('A{2}C') == 'AAC' assert parse_braces('ACGTN{3}TGACCC') == 'ACGTNNNTGACCC' assert parse_braces('ACGTN{10}TGACCC') == 'ACGTNNNNNNNNNNTGACCC' assert parse_braces('ACGTN{3}TGA{4}CCC') == 'ACGTNNNTGAAAACCC' assert parse_braces('ACGTN{0}TGA{4}CCC') == 'ACGTTGAAAACCC' def test_parse_braces_fail(): for expression in ['{', '}', '{}', '{5', '{1}', 'A{-7}', 'A{', 'A{1', 'N{7', 'AN{7', 'A{4{}', 'A{4}{3}', 'A{b}', 'A{6X}', 'A{X6}']: assert_raises(ValueError, lambda: parse_braces(expression)) cutadapt-1.9.1/tests/testseqio.py0000664000175000017500000002026412605425204017621 0ustar marcelmarcel00000000000000# coding: utf-8 from __future__ import print_function, division, absolute_import import sys import os import shutil from textwrap import dedent from nose.tools import raises from tempfile import mkdtemp from cutadapt.seqio import (Sequence, ColorspaceSequence, FormatError, FastaReader, FastqReader, FastaQualReader, InterleavedSequenceReader, FastaWriter, FastqWriter, InterleavedSequenceWriter, open as openseq) from cutadapt.compat import StringIO # files tests/data/simple.fast{q,a} simple_fastq = [ Sequence("first_sequence", "SEQUENCE1", ":6;;8<=:<"), Sequence("second_sequence", "SEQUENCE2", "83first_sequence\nSEQUENCE1\n>second_sequence\nSEQUENCE2\n") reads = list(FastaReader(fasta)) assert reads == simple_fasta def test_with_comments(self): fasta = StringIO(dedent( """ # a comment # another one >first_sequence SEQUENCE1 >second_sequence SEQUENCE2 """)) reads = list(FastaReader(fasta)) assert reads == simple_fasta @raises(FormatError) def test_wrong_format(self): fasta = StringIO(dedent( """ # a comment # another one unexpected >first_sequence SEQUENCE1 >second_sequence SEQUENCE2 """)) reads = list(FastaReader(fasta)) def test_fastareader_keeplinebreaks(self): with FastaReader("tests/data/simple.fasta", keep_linebreaks=True) as f: reads = list(f) assert reads[0] == simple_fasta[0] assert reads[1].sequence == 'SEQUEN\nCE2' def test_context_manager(self): filename = "tests/data/simple.fasta" with open(filename) as f: assert not f.closed reads = list(openseq(f)) assert not f.closed assert f.closed with FastaReader(filename) as sr: tmp_sr = sr assert not sr._file.closed reads = list(sr) assert not sr._file.closed assert tmp_sr._file is None # Open it a second time with FastaReader(filename) as sr: pass class TestFastqReader: def test_fastqreader(self): with FastqReader("tests/data/simple.fastq") as f: reads = list(f) assert reads == simple_fastq def test_fastqreader_dos(self): with FastqReader("tests/data/dos.fastq") as f: dos_reads = list(f) with FastqReader("tests/data/small.fastq") as f: unix_reads = list(f) assert dos_reads == unix_reads @raises(FormatError) def test_fastq_wrongformat(self): with FastqReader("tests/data/withplus.fastq") as f: reads = list(f) @raises(FormatError) def test_fastq_incomplete(self): fastq = StringIO("@name\nACGT+\n") with FastqReader(fastq) as fq: list(fq) def test_context_manager(self): filename = "tests/data/simple.fastq" with open(filename) as f: assert not f.closed reads = list(openseq(f)) assert not f.closed assert f.closed with FastqReader(filename) as sr: tmp_sr = sr assert not sr._file.closed reads = list(sr) assert not sr._file.closed assert tmp_sr._file is None class TestFastaQualReader: @raises(FormatError) def test_mismatching_read_names(self): fasta = StringIO(">name\nACG") qual = StringIO(">nome\n3 5 7") list(FastaQualReader(fasta, qual)) @raises(FormatError) def test_invalid_quality_value(self): fasta = StringIO(">name\nACG") qual = StringIO(">name\n3 xx 7") list(FastaQualReader(fasta, qual)) class TestSeqioOpen: def test_sequence_reader(self): # test the autodetection with openseq("tests/data/simple.fastq") as f: reads = list(f) assert reads == simple_fastq with openseq("tests/data/simple.fasta") as f: reads = list(f) assert reads == simple_fasta with open("tests/data/simple.fastq") as f: reads = list(openseq(f)) assert reads == simple_fastq # make the name attribute unavailable f = StringIO(open("tests/data/simple.fastq").read()) reads = list(openseq(f)) assert reads == simple_fastq f = StringIO(open("tests/data/simple.fasta").read()) reads = list(openseq(f)) assert reads == simple_fasta class TestInterleavedReader: def test(self): expected = [ (Sequence('read1/1 some text', 'TTATTTGTCTCCAGC', '##HHHHHHHHHHHHH'), Sequence('read1/2 other text', 'GCTGGAGACAAATAA', 'HHHHHHHHHHHHHHH')), (Sequence('read3/1', 'CCAACTTGATATTAATAACA', 'HHHHHHHHHHHHHHHHHHHH'), Sequence('read3/2', 'TGTTATTAATATCAAGTTGG', '#HHHHHHHHHHHHHHHHHHH')) ] reads = list(InterleavedSequenceReader("tests/cut/interleaved.fastq")) for (r1, r2), (e1, e2) in zip(reads, expected): print(r1, r2, e1, e2) assert reads == expected with openseq("tests/cut/interleaved.fastq", interleaved=True) as f: reads = list(f) assert reads == expected @raises(FormatError) def test_missing_partner(self): s = StringIO('@r1\nACG\n+\nHHH') list(InterleavedSequenceReader(s)) @raises(FormatError) def test_incorrectly_paired(self): s = StringIO('@r1/1\nACG\n+\nHHH\n@wrong_name\nTTT\n+\nHHH') list(InterleavedSequenceReader(s)) class TestFastaWriter: def setup(self): self._tmpdir = mkdtemp() self.path = os.path.join(self._tmpdir, 'tmp.fasta') def teardown(self): shutil.rmtree(self._tmpdir) def test(self): with FastaWriter(self.path) as fw: fw.write("name", "CCATA") fw.write("name2", "HELLO") assert fw._file.closed with open(self.path) as t: assert t.read() == '>name\nCCATA\n>name2\nHELLO\n' def test_linelength(self): with FastaWriter(self.path, line_length=3) as fw: fw.write("r1", "ACG") fw.write("r2", "CCAT") fw.write("r3", "TACCAG") assert fw._file.closed with open(self.path) as t: d = t.read() assert d == '>r1\nACG\n>r2\nCCA\nT\n>r3\nTAC\nCAG\n' def test_write_sequence_object(self): with FastaWriter(self.path) as fw: fw.write(Sequence("name", "CCATA")) fw.write(Sequence("name2", "HELLO")) assert fw._file.closed with open(self.path) as t: assert t.read() == '>name\nCCATA\n>name2\nHELLO\n' def test_write_to_file_like_object(self): sio = StringIO() with FastaWriter(sio) as fw: fw.write(Sequence("name", "CCATA")) fw.write(Sequence("name2", "HELLO")) assert sio.getvalue() == '>name\nCCATA\n>name2\nHELLO\n' assert not fw._file.closed def test_write_zero_length_sequence(self): sio = StringIO() with FastaWriter(sio) as fw: fw.write(Sequence("name", "")) assert sio.getvalue() == '>name\n\n', '{0!r}'.format(sio.getvalue()) class TestFastqWriter: def setup(self): self._tmpdir = mkdtemp() self.path = os.path.join(self._tmpdir, 'tmp.fastq') def teardown(self): shutil.rmtree(self._tmpdir) def test(self): with FastqWriter(self.path) as fq: fq.writeseq("name", "CCATA", "!#!#!") fq.writeseq("name2", "HELLO", "&&&!&&") assert fq._file.closed with open(self.path) as t: assert t.read() == '@name\nCCATA\n+\n!#!#!\n@name2\nHELLO\n+\n&&&!&&\n' def test_twoheaders(self): with FastqWriter(self.path) as fq: fq.write(Sequence("name", "CCATA", "!#!#!", name2="name")) fq.write(Sequence("name2", "HELLO", "&&&!&", name2="name2")) assert fq._file.closed with open(self.path) as t: assert t.read() == '@name\nCCATA\n+name\n!#!#!\n@name2\nHELLO\n+name2\n&&&!&\n' def test_write_to_file_like_object(self): sio = StringIO() with FastqWriter(sio) as fq: fq.writeseq("name", "CCATA", "!#!#!") fq.writeseq("name2", "HELLO", "&&&!&&") assert sio.getvalue() == '@name\nCCATA\n+\n!#!#!\n@name2\nHELLO\n+\n&&&!&&\n' class TestInterleavedWriter: def test(self): reads = [ (Sequence('A/1 comment', 'TTA', '##H'), Sequence('A/2 comment', 'GCT', 'HH#')), (Sequence('B/1', 'CC', 'HH'), Sequence('B/2', 'TG', '#H')) ] sio = StringIO() with InterleavedSequenceWriter(sio) as writer: for read1, read2 in reads: writer.write(read1, read2) assert sio.getvalue() == '@A/1 comment\nTTA\n+\n##H\n@A/2 comment\nGCT\n+\nHH#\n@B/1\nCC\n+\nHH\n@B/2\nTG\n+\n#H\n' cutadapt-1.9.1/tests/testfilters.py0000664000175000017500000000252212600000013020124 0ustar marcelmarcel00000000000000# coding: utf-8 """ Tests write output (should it return True or False or write) """ from __future__ import print_function, division, absolute_import from cutadapt.filters import NContentFilter, DISCARD, KEEP, LegacyPairedRedirector, PairedRedirector from cutadapt.seqio import Sequence def test_ncontentfilter(): # third parameter is True if read should be discarded params = [ ('AAA', 0, KEEP), ('AAA', 1, KEEP), ('AAACCTTGGN', 1, KEEP), ('AAACNNNCTTGGN', 0.5, KEEP), ('NNNNNN', 1, DISCARD), ('ANAAAA', 1/6, KEEP), ('ANAAAA', 0, DISCARD) ] for seq, count, expected in params: filter = NContentFilter(count=count) _seq = Sequence('read1', seq, qualities='#'*len(seq)) assert filter(_seq) == expected def test_ncontentfilter_paired(): params = [ ('AAA', 'AAA', 0, KEEP), ('AAAN', 'AAA', 0, DISCARD), ('AAA', 'AANA', 0, DISCARD), ('ANAA', 'AANA', 1, KEEP), ] for seq1, seq2, count, expected in params: filter = NContentFilter(count=count) filter_legacy = LegacyPairedRedirector(None, filter) filter_both = PairedRedirector(None, filter) read1 = Sequence('read1', seq1, qualities='#'*len(seq1)) read2 = Sequence('read1', seq2, qualities='#'*len(seq2)) assert filter_legacy(read1, read2) == filter(read1) # discard entire pair if one of the reads fulfills criteria assert filter_both(read1, read2) == expected cutadapt-1.9.1/tests/utils.py0000664000175000017500000000241012575761274016752 0ustar marcelmarcel00000000000000# coding: utf-8 from __future__ import print_function, division, absolute_import import sys, os from contextlib import contextmanager from cutadapt.scripts import cutadapt @contextmanager def redirect_stderr(): "Send stderr to stdout. Nose doesn't capture stderr, yet." old_stderr = sys.stderr sys.stderr = sys.stdout yield sys.stderr = old_stderr @contextmanager def temporary_path(name): directory = os.path.join(os.path.dirname(__file__), 'testtmp') if not os.path.isdir(directory): os.mkdir(directory) path = os.path.join(directory, name) yield path os.remove(path) def datapath(path): return os.path.join(os.path.dirname(__file__), 'data', path) def cutpath(path): return os.path.join(os.path.dirname(__file__), 'cut', path) def files_equal(path1, path2): return os.system("diff -u {0} {1}".format(path1, path2)) == 0 def run(params, expected, inpath, inpath2=None): if type(params) is str: params = params.split() with temporary_path('tmp.fastaq') as tmp_fastaq: params += ['-o', tmp_fastaq ] # TODO not parallelizable params += [ datapath(inpath) ] if inpath2: params += [ datapath(inpath2) ] assert cutadapt.main(params) is None # TODO redirect standard output assert files_equal(cutpath(expected), tmp_fastaq) # TODO diff log files cutadapt-1.9.1/tests/tests.py0000664000175000017500000002706712624547475016773 0ustar marcelmarcel00000000000000# coding: utf-8 # TODO # test with the --output option # test reading from standard input from __future__ import print_function, division, absolute_import import os import sys from nose.tools import raises from cutadapt.scripts import cutadapt from .utils import run, files_equal, datapath, cutpath, redirect_stderr, temporary_path def test_example(): run('-N -b ADAPTER', 'example.fa', 'example.fa') def test_small(): run('-b TTAGACATATCTCCGTCG', 'small.fastq', 'small.fastq') def test_empty(): '''empty input''' run('-a TTAGACATATCTCCGTCG', 'empty.fastq', 'empty.fastq') def test_newlines(): '''DOS/Windows newlines''' run('-e 0.12 -b TTAGACATATCTCCGTCG', 'dos.fastq', 'dos.fastq') def test_lowercase(): '''lowercase adapter''' run('-b ttagacatatctccgtcg', 'lowercase.fastq', 'small.fastq') def test_rest(): '''-r/--rest-file''' with temporary_path('rest.tmp') as rest_tmp: run(['-b', 'ADAPTER', '-N', '-r', rest_tmp], "rest.fa", "rest.fa") assert files_equal(datapath('rest.txt'), rest_tmp) def test_restfront(): with temporary_path("rest.txt") as path: run(['-g', 'ADAPTER', '-N', '-r', path], "restfront.fa", "rest.fa") assert files_equal(datapath('restfront.txt'), path) def test_discard(): '''--discard''' run("-b TTAGACATATCTCCGTCG --discard", "discard.fastq", "small.fastq") def test_discard_untrimmed(): '''--discard-untrimmed''' run('-b CAAGAT --discard-untrimmed', 'discard-untrimmed.fastq', 'small.fastq') def test_plus(): '''test if sequence name after the "+" is retained''' run("-e 0.12 -b TTAGACATATCTCCGTCG", "plus.fastq", "plus.fastq") def test_extensiontxtgz(): '''automatic recognition of "_sequence.txt.gz" extension''' run("-b TTAGACATATCTCCGTCG", "s_1_sequence.txt", "s_1_sequence.txt.gz") def test_format(): '''the -f/--format parameter''' run("-f fastq -b TTAGACATATCTCCGTCG", "small.fastq", "small.myownextension") def test_minimum_length(): '''-m/--minimum-length''' run("-c -m 5 -a 330201030313112312", "minlen.fa", "lengths.fa") def test_too_short(): '''--too-short-output''' run("-c -m 5 -a 330201030313112312 --too-short-output tooshort.tmp.fa", "minlen.fa", "lengths.fa") assert files_equal(datapath('tooshort.fa'), "tooshort.tmp.fa") os.remove('tooshort.tmp.fa') def test_too_short_no_primer(): '''--too-short-output and --trim-primer''' run("-c -m 5 -a 330201030313112312 --trim-primer --too-short-output tooshort.tmp.fa", "minlen.noprimer.fa", "lengths.fa") assert files_equal(datapath('tooshort.noprimer.fa'), "tooshort.tmp.fa") os.remove('tooshort.tmp.fa') def test_maximum_length(): '''-M/--maximum-length''' run("-c -M 5 -a 330201030313112312", "maxlen.fa", "lengths.fa") def test_too_long(): '''--too-long-output''' run("-c -M 5 --too-long-output toolong.tmp.fa -a 330201030313112312", "maxlen.fa", "lengths.fa") assert files_equal(datapath('toolong.fa'), "toolong.tmp.fa") os.remove('toolong.tmp.fa') def test_length_tag(): '''454 data; -n and --length-tag''' run("-n 3 -e 0.1 --length-tag length= " \ "-b TGAGACACGCAACAGGGGAAAGGCAAGGCACACAGGGGATAGG "\ "-b TCCATCTCATCCCTGCGTGTCCCATCTGTTCCCTCCCTGTCTCA", '454.fa', '454.fa') def test_overlap_a(): '''-O/--overlap with -a (-c omitted on purpose)''' run("-O 10 -a 330201030313112312 -e 0.0 -N", "overlapa.fa", "overlapa.fa") def test_overlap_b(): '''-O/--overlap with -b''' run("-O 10 -b TTAGACATATCTCCGTCG -N", "overlapb.fa", "overlapb.fa") def test_qualtrim(): '''-q with low qualities''' run("-q 10 -a XXXXXX", "lowqual.fastq", "lowqual.fastq") def test_qualbase(): '''-q with low qualities, using ascii(quality+64) encoding''' run("-q 10 --quality-base 64 -a XXXXXX", "illumina64.fastq", "illumina64.fastq") def test_quality_trim_only(): '''only trim qualities, do not remove adapters''' run("-q 10 --quality-base 64", "illumina64.fastq", "illumina64.fastq") def test_twoadapters(): '''two adapters''' run("-a AATTTCAGGAATT -a GTTCTCTAGTTCT", "twoadapters.fasta", "twoadapters.fasta") def test_polya(): '''poly-A tails''' run("-m 24 -O 10 -a AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "polya.fasta", "polya.fasta") def test_polya_brace_notation(): '''poly-A tails''' run("-m 24 -O 10 -a A{35}", "polya.fasta", "polya.fasta") def test_mask_adapter(): '''mask adapter with N (reads maintain the same length)''' run("-b CAAG -n 3 --mask-adapter", "anywhere_repeat.fastq", "anywhere_repeat.fastq") def test_gz_multiblock(): '''compressed gz file with multiple blocks (created by concatenating two .gz files)''' run("-b TTAGACATATCTCCGTCG", "small.fastq", "multiblock.fastq.gz") def test_suffix(): '''-y/--suffix parameter, combined with _F3''' run("-c -e 0.12 -a 1=330201030313112312 -y _my_suffix_{name} --strip-f3", "suffix.fastq", "solid.csfasta", 'solid.qual') def test_read_wildcard(): '''test wildcards in reads''' run("--match-read-wildcards -b ACGTACGT", "wildcard.fa", "wildcard.fa") def test_adapter_wildcard(): '''wildcards in adapter''' for adapter_type, expected in ( ("-a", "wildcard_adapter.fa"), ("-b", "wildcard_adapter_anywhere.fa")): with temporary_path("wildcardtmp.txt") as wildcardtmp: run("--wildcard-file {0} {1} ACGTNNNACGT".format(wildcardtmp, adapter_type), expected, "wildcard_adapter.fa") with open(wildcardtmp) as wct: lines = wct.readlines() lines = [ line.strip() for line in lines ] assert lines == ['AAA 1', 'GGG 2', 'CCC 3b', 'TTT 4b'] def test_wildcard_N(): '''test 'N' wildcard matching with no allowed errors''' run("-e 0 -a GGGGGGG --match-read-wildcards", "wildcardN.fa", "wildcardN.fa") def test_illumina_adapter_wildcard(): run("-a VCCGAMCYUCKHRKDCUBBCNUWNSGHCGU", "illumina.fastq", "illumina.fastq.gz") def test_adapter_front(): '''test adapter in front''' run("--front ADAPTER -N", "examplefront.fa", "example.fa") def test_literal_N(): '''test matching literal 'N's''' run("-N -e 0.2 -a NNNNNNNNNNNNNN", "trimN3.fasta", "trimN3.fasta") def test_literal_N2(): run("-N -O 1 -g NNNNNNNNNNNNNN", "trimN5.fasta", "trimN5.fasta") def test_literal_N_brace_notation(): '''test matching literal 'N's''' run("-N -e 0.2 -a N{14}", "trimN3.fasta", "trimN3.fasta") def test_literal_N2_brace_notation(): run("-N -O 1 -g N{14}", "trimN5.fasta", "trimN5.fasta") def test_anchored_front(): run("-g ^FRONTADAPT -N", "anchored.fasta", "anchored.fasta") def test_anchored_front_ellipsis_notation(): run("-a FRONTADAPT... -N", "anchored.fasta", "anchored.fasta") def test_anchored_back(): run("-a BACKADAPTER$ -N", "anchored-back.fasta", "anchored-back.fasta") def test_anchored_back_no_indels(): run("-a BACKADAPTER$ -N --no-indels", "anchored-back.fasta", "anchored-back.fasta") def test_no_indels(): run('-a TTAGACATAT -g GAGATTGCCA --no-indels', 'no_indels.fasta', 'no_indels.fasta') def test_issue_46(): '''issue 46 - IndexError with --wildcard-file''' with temporary_path("wildcardtmp.txt") as wildcardtmp: run("--anywhere=AACGTN --wildcard-file={0}".format(wildcardtmp), "issue46.fasta", "issue46.fasta") def test_strip_suffix(): run("--strip-suffix _sequence -a XXXXXXX", "stripped.fasta", "simple.fasta") def test_info_file(): # The true adapter sequence in the illumina.fastq.gz data set is # GCCTAACTTCTTAGACTGCCTTAAGGACGT (fourth base is different) # with temporary_path("infotmp.txt") as infotmp: run(["--info-file", infotmp, '-a', 'adapt=GCCGAACTTCTTAGACTGCCTTAAGGACGT'], "illumina.fastq", "illumina.fastq.gz") assert files_equal(cutpath('illumina.info.txt'), infotmp) def test_info_file_times(): with temporary_path("infotmp.txt") as infotmp: run(["--info-file", infotmp, '--times', '2', '-a', 'adapt=GCCGAACTTCTTA', '-a', 'adapt2=GACTGCCTTAAGGACGT'], "illumina5.fastq", "illumina5.fastq") assert files_equal(cutpath('illumina5.info.txt'), infotmp) def test_info_file_fasta(): with temporary_path("infotmp.txt") as infotmp: # Just make sure that it runs run(['--info-file', infotmp, '-a', 'TTAGACATAT', '-g', 'GAGATTGCCA', '--no-indels'], 'no_indels.fasta', 'no_indels.fasta') def test_named_adapter(): run("-a MY_ADAPTER=GCCGAACTTCTTAGACTGCCTTAAGGACGT", "illumina.fastq", "illumina.fastq.gz") def test_adapter_with_U(): run("-a GCCGAACUUCUUAGACUGCCUUAAGGACGU", "illumina.fastq", "illumina.fastq.gz") def test_no_trim(): ''' --no-trim ''' run("--no-trim --discard-untrimmed -a CCCTAGTTAAAC", 'no-trim.fastq', 'small.fastq') def test_bzip2(): '''test bzip2 support''' run('-b TTAGACATATCTCCGTCG', 'small.fastq', 'small.fastq.bz2') try: import lzma def test_xz(): '''test xz support''' run('-b TTAGACATATCTCCGTCG', 'small.fastq', 'small.fastq.xz') except ImportError: pass @raises(SystemExit) def test_qualfile_only(): with redirect_stderr(): cutadapt.main(['file.qual']) @raises(SystemExit) def test_no_args(): with redirect_stderr(): cutadapt.main([]) @raises(SystemExit) def test_two_fastqs(): with redirect_stderr(): cutadapt.main([datapath('paired.1.fastq'), datapath('paired.2.fastq')]) def test_anchored_no_indels(): '''anchored 5' adapter, mismatches only (no indels)''' run('-g ^TTAGACATAT --no-indels -e 0.1', 'anchored_no_indels.fasta', 'anchored_no_indels.fasta') def test_anchored_no_indels_wildcard_read(): '''anchored 5' adapter, mismatches only (no indels), but wildcards in the read count as matches''' run('-g ^TTAGACATAT --match-read-wildcards --no-indels -e 0.1', 'anchored_no_indels_wildcard.fasta', 'anchored_no_indels.fasta') def test_anchored_no_indels_wildcard_adapt(): '''anchored 5' adapter, mismatches only (no indels), but wildcards in the adapter count as matches''' run('-g ^TTAGACANAT --no-indels -e 0.1', 'anchored_no_indels.fasta', 'anchored_no_indels.fasta') def test_unconditional_cut_front(): run('-u 5', 'unconditional-front.fastq', 'small.fastq') def test_unconditional_cut_back(): run('-u -5', 'unconditional-back.fastq', 'small.fastq') def test_unconditional_cut_both(): run('-u -5 -u 5', 'unconditional-both.fastq', 'small.fastq') def test_untrimmed_output(): with temporary_path('untrimmed.tmp.fastq') as tmp: run(['-a', 'TTAGACATATCTCCGTCG', '--untrimmed-output', tmp], 'small.trimmed.fastq', 'small.fastq') assert files_equal(cutpath('small.untrimmed.fastq'), tmp) def test_adapter_file(): run('-a file:' + datapath('adapter.fasta'), 'illumina.fastq', 'illumina.fastq.gz') def test_adapter_file_5p_anchored(): run('-N -g file:' + datapath('prefix-adapter.fasta'), 'anchored.fasta', 'anchored.fasta') def test_adapter_file_3p_anchored(): run('-N -a file:' + datapath('suffix-adapter.fasta'), 'anchored-back.fasta', 'anchored-back.fasta') def test_adapter_file_5p_anchored_no_indels(): run('-N --no-indels -g file:' + datapath('prefix-adapter.fasta'), 'anchored.fasta', 'anchored.fasta') def test_adapter_file_3p_anchored_no_indels(): run('-N --no-indels -a file:' + datapath('suffix-adapter.fasta'), 'anchored-back.fasta', 'anchored-back.fasta') def test_demultiplex(): multiout = os.path.join(os.path.dirname(__file__), 'data', 'tmp-demulti.{name}.fasta') params = ['-a', 'first=AATTTCAGGAATT', '-a', 'second=GTTCTCTAGTTCT', '-o', multiout, datapath('twoadapters.fasta')] assert cutadapt.main(params) is None assert files_equal(cutpath('twoadapters.first.fasta'), multiout.format(name='first')) assert files_equal(cutpath('twoadapters.second.fasta'), multiout.format(name='second')) assert files_equal(cutpath('twoadapters.unknown.fasta'), multiout.format(name='unknown')) os.remove(multiout.format(name='first')) os.remove(multiout.format(name='second')) os.remove(multiout.format(name='unknown')) def test_max_n(): run('--max-n 0', 'maxn0.fasta', 'maxn.fasta') run('--max-n 1', 'maxn1.fasta', 'maxn.fasta') run('--max-n 2', 'maxn2.fasta', 'maxn.fasta') run('--max-n 0.2', 'maxn0.2.fasta', 'maxn.fasta') run('--max-n 0.4', 'maxn0.4.fasta', 'maxn.fasta') cutadapt-1.9.1/tests/testtrim.py0000664000175000017500000000167212600005040017441 0ustar marcelmarcel00000000000000# coding: utf-8 from __future__ import print_function, division, absolute_import from cutadapt.seqio import ColorspaceSequence, Sequence from cutadapt.adapters import Adapter, ColorspaceAdapter, PREFIX, BACK from cutadapt.scripts.cutadapt import AdapterCutter def test_cs_5p(): read = ColorspaceSequence("name", "0123", "DEFG", "T") adapter = ColorspaceAdapter("CG", PREFIX, 0.1) cutter = AdapterCutter([adapter]) trimmed_read = cutter(read) # no assertion here, just make sure the above code runs without # an exception def test_statistics(): read = Sequence('name', 'AAAACCCCAAAA') adapters = [Adapter('CCCC', BACK, 0.1)] cutter = AdapterCutter(adapters, times=3) trimmed_read = cutter(read) # TODO make this a lot simpler trimmed_bp = 0 for adapter in adapters: for d in (adapter.lengths_front, adapter.lengths_back): trimmed_bp += sum(seqlen * count for (seqlen, count) in d.items()) assert trimmed_bp <= len(read), trimmed_bp cutadapt-1.9.1/README.rst0000664000175000017500000000342112575761274015570 0ustar marcelmarcel00000000000000.. image:: https://travis-ci.org/marcelm/cutadapt.svg?branch=master :target: https://travis-ci.org/marcelm/cutadapt .. image:: https://img.shields.io/pypi/v/cutadapt.svg?branch=master :target: https://pypi.python.org/pypi/cutadapt ======== cutadapt ======== Cutadapt finds and removes adapter sequences, primers, poly-A tails and other types of unwanted sequence from your high-throughput sequencing reads. Cleaning your data in this way is often required: Reads from small-RNA sequencing contain the 3’ sequencing adapter because the read is longer than the molecule that is sequenced. Amplicon reads start with a primer sequence. Poly-A tails are useful for pulling out RNA from your sample, but often you don’t want them to be in your reads. Cutadapt helps with these trimming tasks by finding the adapter or primer sequences in an error-tolerant way. It can also modify and filter reads in various ways. Adapter sequences can contain IUPAC wildcard characters. Also, paired-end reads and even colorspace data is supported. If you want, you can also just demultiplex your input data, without removing adapter sequences at all. Cutadapt comes with an extensive suite of automated tests and is available under the terms of the MIT license. If you use cutadapt, please cite `DOI:10.14806/ej.17.1.200 `_ . Links ----- * `Documentation `_ * `Source code `_ * `Report an issue `_ * `Project page on PyPI (Python package index) `_ * `Follow @marcelm_ on Twitter `_ * `Wrapper for the Galaxy platform `_ cutadapt-1.9.1/setup.py0000664000175000017500000000670312575761274015621 0ustar marcelmarcel00000000000000""" Build cutadapt. Cython is run when * no pre-generated C sources are found, * or the pre-generated C sources are out of date, * or when --cython is given on the command line. """ import sys import os.path from distutils.core import setup, Extension from distutils.version import LooseVersion from cutadapt import __version__ MIN_CYTHON_VERSION = '0.17' if sys.version_info < (2, 6): sys.stdout.write("At least Python 2.6 is required.\n") sys.exit(1) def out_of_date(extensions): """ Check whether any pyx source is newer than the corresponding generated C source or whether any C source is missing. """ for extension in extensions: for pyx in extension.sources: path, ext = os.path.splitext(pyx) if ext not in ('.pyx', '.py'): continue if extension.language == 'c++': csource = path + '.cpp' else: csource = path + '.c' # When comparing modification times, allow five seconds slack: # If the installation is being run from pip, modification # times are not preserved and therefore depends on the order in # which files were unpacked. if not os.path.exists(csource) or ( os.path.getmtime(pyx) > os.path.getmtime(csource) + 5): return True return False def no_cythonize(extensions, **_ignore): """ Change file extensions from .pyx to .c or .cpp. Copied from Cython documentation """ for extension in extensions: sources = [] for sfile in extension.sources: path, ext = os.path.splitext(sfile) if ext in ('.pyx', '.py'): if extension.language == 'c++': ext = '.cpp' else: ext = '.c' sfile = path + ext sources.append(sfile) extension.sources[:] = sources return extensions def cythonize_if_necessary(extensions): if '--cython' in sys.argv: sys.argv.remove('--cython') elif out_of_date(extensions): sys.stdout.write('At least one C source file is missing or out of date.\n') else: return no_cythonize(extensions) try: from Cython import __version__ as cyversion except ImportError: sys.stdout.write( "ERROR: Cython is not installed. Install at least Cython version " + str(MIN_CYTHON_VERSION) + " to continue.\n") sys.exit(1) if LooseVersion(cyversion) < LooseVersion(MIN_CYTHON_VERSION): sys.stdout.write( "ERROR: Your Cython is at version '" + str(cyversion) + "', but at least version " + str(MIN_CYTHON_VERSION) + " is required.\n") sys.exit(1) from Cython.Build import cythonize return cythonize(extensions) extensions = [ Extension('cutadapt._align', sources=['cutadapt/_align.pyx']), Extension('cutadapt._qualtrim', sources=['cutadapt/_qualtrim.pyx']), Extension('cutadapt._seqio', sources=['cutadapt/_seqio.pyx']), ] extensions = cythonize_if_necessary(extensions) setup( name = 'cutadapt', version = __version__, author = 'Marcel Martin', author_email = 'marcel.martin@scilifelab.se', url = 'https://cutadapt.readthedocs.org/', description = 'trim adapters from high-throughput sequencing reads', license = 'MIT', ext_modules = extensions, packages = ['cutadapt', 'cutadapt.scripts'], scripts = ['bin/cutadapt'], classifiers = [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Cython", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering :: Bio-Informatics" ] ) cutadapt-1.9.1/PKG-INFO0000664000175000017500000000137012627541606015170 0ustar marcelmarcel00000000000000Metadata-Version: 1.1 Name: cutadapt Version: 1.9.1 Summary: trim adapters from high-throughput sequencing reads Home-page: https://cutadapt.readthedocs.org/ Author: Marcel Martin Author-email: marcel.martin@scilifelab.se License: MIT Description: UNKNOWN Platform: UNKNOWN Classifier: Development Status :: 5 - Production/Stable Classifier: Environment :: Console Classifier: Intended Audience :: Science/Research Classifier: License :: OSI Approved :: MIT License Classifier: Natural Language :: English Classifier: Programming Language :: Cython Classifier: Programming Language :: Python :: 2.6 Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 Classifier: Topic :: Scientific/Engineering :: Bio-Informatics cutadapt-1.9.1/cutadapt/0000775000175000017500000000000012627541606015677 5ustar marcelmarcel00000000000000cutadapt-1.9.1/cutadapt/_align.so0000775000175000017500000202002012623615256017471 0ustar marcelmarcel00000000000000ELF> Q@P@8@#  !!4P: !!$$Ptd,,QtdRtd!!ppGNUui'0*\-  ( -N.KCEqX| KQ % P ze C0w H&pbH") 7@>o7.Z  7A2w .:uucawKna  aZbr8 R" X ZLx PM2 `! @! Pe @! K !__gmon_start___init_fini_ITM_deregisterTMCloneTable_ITM_registerTMCloneTable__cxa_finalize_Jv_RegisterClasses_Py_NoneStruct_PyThreadState_CurrentPyDict_NewPyByteArray_TypePyType_IsSubtypePyExc_TypeErrorPyErr_FormatPyExc_ValueErrorPyObject_GetAttrPyExc_StopIterationPyErr_GivenExceptionMatches_PyObject_GC_NewPyObject_GC_TrackPyObject_GC_UnTrackPyErr_FetchPyMem_FreePyErr_Restore__stack_chk_failPyCFunction_CallPyString_InternFromStringPyString_FromStringPyString_AsStringPyString_FromFormatPyObject_ClearWeakRefsPyObject_GC_DelPyImport_AddModulePyObject_GetAttrStringPyExc_AttributeErrorPyErr_ExceptionMatchesPyErr_ClearPyType_ReadyPyObject_SetAttrStringPyFrame_NewPyTraceBack_HerePyCode_NewPyMem_ReallocPyMem_MallocPyErr_SetStringPyMethod_NewPyInt_FromLongPyDict_SetItemStringPyRun_StringFlagsPyErr_WriteUnraisablePyExc_RuntimeWarningPyErr_WarnExPyDict_NextPyString_Type_PyString_EqPyUnicodeUCS4_ComparePyErr_OccurredPyInt_TypePyFloat_TypePyNumber_AddPyLong_TypePyFPE_counterPyFPE_jbuf_setjmpPyFPE_dummyPyFloat_FromDoublePyExc_FloatingPointError_Py_CheckRecursionLimitPyObject_Call_Py_CheckRecursiveCallPyExc_SystemErrorPyExc_NameErrorPyDict_GetItemPyErr_SetNonePyCFunction_TypePyTuple_NewPyExc_RuntimeErrorPyExc_GeneratorExit_PyObject_CallFunction_SizeTPyTraceBack_TypePyErr_NormalizeExceptionPyExc_BaseExceptionPyObject_SizePyInt_FromSsize_tPyList_NewPyTuple_TypePyList_TypePyObject_GetIterPyNumber_InPlaceMultiplyPyDict_SizePyList_AppendPyObject_SetAttrPyMethod_TypePyNumber_IntPyNumber_LongPyExc_OverflowErrorPyLong_AsUnsignedLongPyDict_SetItemPyNumber_MultiplyPyDict_ItemsPyExc_IndexError_PyByteArray_empty_stringPyExc_NotImplementedErrorPyErr_NoMemoryPyBaseString_TypePyUnicode_Type_PyString_JoinPySequence_GetItemPyIter_NextPyLong_AsLongPyObject_GetItemPyObject_SetItemPyObject_RichCompare_Py_TrueStruct_Py_ZeroStructPyObject_IsTruePyFloat_AsDoublePyString_AsStringAndSizePyBaseObject_TypePyArg_UnpackTuplePyObject_CallObjectPyEval_SaveThreadPyEval_RestoreThreadPy_OptimizeFlagPyGILState_EnsurePyGILState_ReleasePyExc_AssertionErrorinit_alignPyOS_snprintfPy_GetVersionPyString_FromStringAndSizePyObject_GenericGetAttrPyObject_SelfIterPy_InitModule4_64PyModule_GetDictPyExc_ImportErrorPyUnicodeUCS4_DecodeUTF8__pyx_module_is_main_cutadapt___alignPyTuple_PackPyCFunction_NewExPyImport_ImportModulePyExc_KeyErrorPyClass_Typelibpthread.so.0libc.so.6_edata__bss_start_endGLIBC_2.2.5GLIBC_2.4 ui  ii  !T!S ! ! !!(!H!0!!8!X!@!`!`!!h!!p!!!!!!!!!!!!Ȱ!!а!H!ذ!!!X!!`!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ҾAPje5{ 5| AQAQPAQH@HHz H| HL { L{ H | Ht{ H5e{ PPP1H HfL _~ LP~ 11ҾAPjk5{ 5*| AQAQPAQ^H@HH z L z L| HH { HB{ 1H5{ 5S| 5X{ 5zz H HL } L} 11ҾAPh5O{ 5{ AQAQPAQH@HL { Lz HH y Hz 1H5wz 5{ 5z 5({ 5z 5z 5^z 5@z 5bz 5z 7HPH L } L| 11ҾAPh5{ 5z AQAQPAQH@HH-CE H=ts HEH-Y| H-J| HHEH=| H?s H5#Hes Hs H=rq H| HWq H=o H}q H{ Ho H=m Ho H{ \s=v Hm Hm H|{  Hy H=v 1HI H5z H={ L I. Hy H=u 1HI H5y H=V{ Ht I.[ H=y @HI# L%B L9`L5HIMImIFH;&C oI9fHHHB H% H5hAPH819I.E1@IFLP0MvImk1IELP0HVH+LHCHP0=@fDA{fDkfDAA A Av"Av $Ak'Aow*AqbH= y L5y H/H=w ]HIL9`QL4HIMImu IELP0IFH;DA I9HHH@ HCH5AQH81WH=HHH,s HHQHHt]H=HtBHHt5HHQHHHPHR0uAQMXHPHR01SH@ H5H8m2KHXHLhHIEH(u H@LP0HLHIt)H+HCHP0puAQqAQImIELP0edAPHGP0H=v L5v H/uHGP0Hu L%)u H-Jv HIH5Rt LHWhH5t HL=NH+L r Lv H5p H t Hu H=rv HIH5Jt LLImu IELP0L Gr LHv H51p H Rt HSu H= v HIZH5r HLy0Imu IELP0L q Lu H5o H s Ht H=u ,HIH5nr HLImu IELP0H5r LL%iu Ht HHH1LL\HH1HHH+IHmMH5Kt H=u L\UImu IELP0I.u IFLP0Hr H=un 1HIH5Kr H=t HI.u IFLP0Hr H=n 1HIH5r H=Ut HxPI.u IFLP0HItSH5p H=t Hvx)I.JIFLP0;A@A04AAAATI.ATHmuE1HEHP0AH; H8]tH1LL?HHtH=@< 1HH+IHCHP0HAkMAk(Ae-AeA^ A^H5p HLI.u IFLP0ATHHXH7LhHIEH(u H@LP0HL2HIt)H+HCHP0TAPaAPlIFLP0JA(HA(IFLP0>A<AtHHonly single character unicode strings can be converted to Py_UCS4, got length %zdord() expected string of length 1, but %.200s foundord() expected a character, but string of length %zd foundShared Cython type %.200s is not a type objectShared Cython type %.200s has the wrong size, try recompiling__annotations__ must be set to a dict object__kwdefaults__ must be set to a dict object__defaults__ must be set to a tuple objectfunction's dictionary may not be deletedsetting function's dictionary to a non-dict__qualname__ must be set to a string object__name__ must be set to a string objectcutadapt._align.Aligner.min_overlap.__get__if _cython_generator_type is not None: try: Generator = _module.Generator except AttributeError: pass else: Generator.register(_cython_generator_type) if _cython_coroutine_type is not None: try: Coroutine = _module.Coroutine except AttributeError: pass else: Coroutine.register(_cython_coroutine_type) Cython module failed to patch module with custom type%.200s() got an unexpected keyword argument '%.200s'%s() got multiple values for keyword argument '%s'%.200s() keywords must be strings while calling a Python objectNULL result without error in PyObject_Calltoo many values to unpack (expected %zd)can't send non-None value to a just-started generatorgenerator ignored GeneratorExitraise: arg 3 must be a traceback or Noneinstance exception may not have a separate valueraise: exception class must be a subclass of BaseException%.200s() takes %.8s %zd positional argument%.1s (%zd given)cutadapt._align.DPMatrix.__init__free variable '%s' referenced before assignment in enclosing scope__%.4s__ returned non-%.4s (type %.200s)value too large to convert to unsigned charcan't convert negative value to unsigned charneed more than %zd value%.1s to unpackArgument '%.200s' has incorrect type (expected %.200s, got %.200s)cutadapt._align.Aligner.reference.__set__cutadapt._align.DPMatrix.__str__.genexprcutadapt._align.DPMatrix.__str__value too large to convert to intcutadapt._align.DPMatrix.set_entrycutadapt._align.Aligner.min_overlap.__set__cutadapt._align.Aligner.indel_cost.__set__cutadapt._align.compare_prefixescutadapt._align.Aligner.__cinit__cutadapt._align.Aligner.locatecompiletime version %s of module '%.100s' does not match runtime version %sCython module failed to register with collections modulequalified name of the generatorobject being iterated by 'yield from', or Nonesend(arg) -> send 'arg' into generator, return next yielded value or raise StopIteration.throw(typ[,val[,tb]]) -> raise exception in generator, return next yielded value or raise StopIteration.close() -> raise GeneratorExit inside generator.cutadapt._align.__pyx_scope_struct_2_genexprcutadapt._align.__pyx_scope_struct_1_genexprcutadapt._align.__pyx_scope_struct____str__ TODO documentation still uses s1 (reference) and s2 (query). Locate one string within another by computing an optimal semiglobal alignment between string1 and string2. The alignment uses unit costs, which means that mismatches, insertions and deletions are counted as one error. flags is a bitwise 'or' of the allowed flags. To allow skipping of a prefix of string1 at no cost, set the START_WITHIN_SEQ1 flag. To allow skipping of a prefix of string2 at no cost, set the START_WITHIN_SEQ2 flag. If both are set, a prefix of string1 or of string1 is skipped, never both. Similarly, set STOP_WITHIN_SEQ1 and STOP_WITHIN_SEQ2 to allow skipping of suffixes of string1 or string2. Again, when both flags are set, never suffixes in both strings are skipped. If all flags are set, this results in standard semiglobal alignment. The skipped parts are described with two intervals (start1, stop1), (start2, stop2). For example, an optimal semiglobal alignment of SISSI and MISSISSIPPI looks like this: ---SISSI--- MISSISSIPPI start1, stop1 = 0, 5 start2, stop2 = 3, 8 (with zero errors) The aligned parts are string1[start1:stop1] and string2[start2:stop2]. The error rate is: errors / length where length is (stop1 - start1). An optimal alignment fulfills all of these criteria: - its error_rate is at most max_error_rate - Among those alignments with error_rate <= max_error_rate, the alignment contains a maximal number of matches (there is no alignment with more matches). - If there are multiple alignments with the same no. of matches, then one that has minimal no. of errors is chosen. - If there are still multiple candidates, choose the alignment that starts at the leftmost position within the read. The alignment itself is not returned, only the tuple (start1, stop1, start2, stop2, matches, errors), where the first four fields have the meaning as described, matches is the number of matches and errors is the number of errors in the alignment. It is always the case that at least one of start1 and start2 is zero. IUPAC wildcard characters can be allowed in the reference and the query by setting the appropriate flags. If neither flag is set, the full ASCII alphabet is used for comparison. If any of the flags is set, all non-IUPAC characters in the sequences compare as 'not equal'. _cython_0_23_4cutadapt/_align.c%s (%s:%d)cutadapt/_align.pyx_cython_coroutine_type_cython_generator_type_module__builtins__addname '%.200s' is not definedgenerator already executingexactly__init__genexprintlongan integer is requiredbytearrayExpected %.16s, got %.200sbytearray index out of rangecutadapt._align._iupac_tablereferencebytes__del__selfset_entryat leastat mostcutadapt._align.locatequerycutadapt._align._acgt_tablecompare_prefixesref__cinit__throw%d.%d%s__builtin____name__collectionsbackports_abcinit cutadapt._alignname of the generator__qualname__gi_runninggi_yieldfromsendclosecython_function_or_method__reduce____module__func_doc__doc__func_name__self__func_dict__dict__func_globals__globals__func_closure__closure__func_code__code__func_defaults__defaults____kwdefaults____annotations__cutadapt._align.Alignermin_overlapindel_costdpmatrixenable_debug__str__[<\\,\L\\@]8]H]P]xaoafa]aTaffefgkkkkklkk0l8lHo?o6o-o$ot~tutltctZtQtHt0svvvv w,wݔԔzp1Su N%.?;,d`HP@ kp `p` Pp00@HP`px0@P(PPx `` p0H@hP  p P @ `  ( `H p` @ P ` ( `p  @ h 8 X` h@1:X?N(UhVYp[H\0d pgXmy@Pppp0zRx $FJ w?;*3$"D\tEtP0 ( 4 EBAD d GBL AAB,8iAAG L CAG ,$xAAG i CAJ ,TAAG i CAJ 4XAAD H AAH O AAG QtP   4LpdHLA J x p h_AG UA$McXNC$McXNC$$7YY A CLA\ d4dHAd K V J d L ^ B v,<BBA A(D0Y (A ABBG <BBE A(D0 (A BBBG $4A} B K E $\A} B K E $(Ab E K E $AG0 AG ,h|BAD  CBG 7AU J V< T"AZt)Ac<7BDH v ABI N ABG BBB B(D0A8HP 8A0A(B BBBG O 8A0A(B BBBG W 8A0A(B BBBG zXA`BhBpBxBBBPP4tUBAD v GBJ AAB40UBAD v GBJ AAB<X:BBB A(D0'(A BBB4$XBDA w ABG AAB\DG E | DJ B DJ B Dx D o A ppDx D opDx D o 4j\GTXU\stm\GF$ MAU J \ D LHYAz E TLD R J k, AAD AADD BBE B(D0A8E@8A0A(B BBBL @\BBE B(D0A8K} 8A0A(B BBBA  P&D0J B D `BAA D0J  AABJ D  CABF D 8Ds\ pDx D o| `pDx D o4 AAG h DAJ x DAA  )A\ C DD BAA G0  AABC U  AABG << BBD A(G@` (A ABBJ T| p[BAA D0x  AABD   CABH \  AABH 4 x<BAD D0  CABH \ MBB B(A0A8G@8A0A(B BBBD@4l 0LAAD@ AAB P AAF H BBB B(A0A8GJHfAw 8A0A(B BBBE IfAOIfGD, }BAA G0[  AABF   FABK |t }BBB B(D0A8DP 8A0A(B BBBD D 8C0A(B BBBH   8C0A(B BBBI D AAD0 AAE Z FAG O AAG 4< Aa F a G @ H K E \ A ALt( fBBB B(A0A8Dp 8D0A(B BBBK dHT BBB B(A0A8DPh 8A0A(B BBBH  8F0A(B BBBD |,@(BBB B(D0A8DPJ 8A0A(B BBBK D 8C0A(B BBBH X 8C0A(B BBBD L,GBBD B(A0A8Gp, 8D0A(B BBBD <:BBA A(G`  (A ABBH ,< BjAj E D L K E Ydl`BBBB B(A0A8GP1 8A0A(B BBBD  8C0A(B BBBJ DDmAAD0 AAE F AAH j FAG D GAa F v B s E D D D D X H o I AdGBBB B(A0A8G 8A0A(B BBBA IOfAzIfAUIfGnIgG4O3BAA D0D  AABH \,RuBBB A(A0D@ 0D(A BBBA I 0D(A BBBD 0X BBG B(A0A8G 8A0A(B BBBE AdAIfAUIfGLxcBBB B(A0A8Dp 8D0A(B BBBA ldsBBB B(A0A8GAbBw 8A0A(B BBBG IgGlt BBB B(D0A8G` 8A0A(B BBBB uAaAIfADDBBD A(XXo`TXAP (A ABBH LBBB B(A0A8J 8A0A(B BBBH  MBBI B(G0A8Q 8A0A(B BBBF BFFBBABI[]KFIdBFFBBABI[]NAdBFFBBABI_BFFBBABI[iAAKgBFFBBABIb]KFIgEFFBBABI[]KFFFFFFFIgEFFBBABITS  K Pe!!o8X !@B& oXoo*ol!FKVKfKvKKKKKKKKKLL&L6LFLVLfLvLLLLLLLLLMM&M6MFMVMfMvMMMMMMMMMNN&N6NFNVNfNvNNNNNNNNNOO&O6OFOVOfOvOOOOOOOOOPP&P6PFPVPfPvPPPPPPPPPQQ ! Find out whether one string is the prefix of the other one, allowing IUPAC wildcards in ref and/or query if the appropriate flag is set. This is used to find an anchored 5' adapter (type 'FRONT') in the 'no indels' mode. This is very simple as only the number of errors needs to be counted. This function returns a tuple compatible with what Aligner.locate outputs. locate(query) -> (refstart, refstop, querystart, querystop, matches, errors) Find the query within the reference associated with this aligner. The intervals (querystart, querystop) and (refstart, refstop) give the location of the match. That is, the substrings query[querystart:querystop] and self.reference[refstart:refstop] were found to align best to each other, with the given number of matches and the given number of errors. The alignment itself is not returned. Store the dynamic programming matrix while running the locate() method and make it available in the .dpmatrix attribute. Return a representation of the matrix as a string. Set an entry in the dynamic programming matrix. Return a translation table for IUPAC characters. The table maps ASCII-encoded IUPAC nucleotide characters to bytes in which the four least significant bits are used to represent one nucleotide each. Whether two characters x and y match can then be checked with the expression "x & y != 0". Return a translation table that maps A, C, G, T characters to the lower four bits of a byte. Other characters (including possibly IUPAC characters) are mapped to zero. Lowercase versions are also translated, and U is treated the same as T. Minimum overlap must be at least 1/home/marcel/scm/cutadapt/cutadapt/_align.pyx Representation of the dynamic-programming matrix. This used only when debugging is enabled in the Aligner class since the matrix is normally not stored in full. Entries in the matrix may be None, in which case that value was not computed. Insertion/deletion cost must be at leat 1DPMatrix.__str__..genexpr The dynamic programming matrix as a DPMatrix object. This attribute is usually None, unless debugging has been enabled with enable_debug(). Matches cost 0, mismatches cost 1. Only insertion/deletion costs can be changed. DPMatrix.set_entrycompare_prefixescutadapt._alignDPMatrix.__init__wildcard_querymax_error_rateDPMatrix.__str__compare_asciiwildcard_refquery_bytesmin_overlap_iupac_tableMemoryError_acgt_tableValueErrortranslateset_entryreferenceref_bytes__metaclass____qualname__DPMatrix__prepare__matchesgenexpralignerrows__module__locatelengthformatencodethrowrjustranger_ptrqueryq_ptrloweritemsflagscloseascii__test__sendself_rows__main__join__init__costargs{0:2d}zip__str__rowref__doc___ vtrnmjidcYXWVUTSRNMKHGDCBA!H!!X!`!!!!!!!!!!H!!X!`!8!!!X!`!}h qAk8`!`!!|Zpw }}Zwo,}d7}HoD}o|@-HpI}}pO}Pd dcA@j@a(!@!!p0i}dt} }ppW}ppW}cn|cn}WPn}W}`[m}`[m}X}X}X}X} X} X}Z0m ~Z0m~Zl%~ [l@!H!8!!0!!(!! !!!!!! !p!!!!!"! !!!!!!!*!!!!!! ! !#!!!!!!!!!!!!!!x!8! p!!h!!`!!X!!P!̯!H!Ư!@!į!8!¯!0!(! (!خ! !!!K!!߯!!E!!ȭ!!@!!!!`!!ݯ!!!!!!?!!!!Ю!!`!.!ۯ!!! !9!!! !ٯ!!!x!!p!!h!3!`!ׯ!X!x! P!Ȯ!H!!@!!8!! 0!! (!կ! !! !-!!! !'!!! !ӯ!!!!!!!!!x! !h! !!!!!k!!!!f!!a!!X! !!!ѯ!!X! x!!p!H! h!ϯ!`!!X!ح! P!!p80^A&i@Vp q8^A&iU@oPq _A&T0Uo5~`P`E&qPTpT! !"M~qY~@!&|Td~T !m~0T!n|@2!| @!n|z~`!C|P!{|!| !GCC: (Ubuntu 5.2.1-22ubuntu2) 5.2.1 20151010<0T Qtgy0 6EA\w55;D*,D,`QintKlU.l),5$l3909575eG79n./ 5( : 0 88 .@ UH GP *X .=}` v h  ep $Let Jsx DDI QW   J%~ <. / <0 <1 <20 /4e w6 E  2},})7=eL  E   7$f eK4e>& ;  D # 4 3PJ U3I 7eBS 9e#1 :e@e+ j k.K k2  D2  E. K E2  E. * F R G.  G.(  K 0 D L 8  M @  NH OJP I PVX 5 T;` + UAh C VGp 6; Zbx  [  \V G/ ] H@ ^> , aM M dl 6 f = j 0 m q 6 t. PB x _A y / | = } A ~.B 2! CB P T . k (- 0P' 8i v @n H P*0 X J `0? h7 p+*  x; P" lp np o.K o2 o. pC2 8t # 4 e !.0e. ;AeUUU fl. ..1O e.,O e.. e- DJ.c.-O# Dl0 y..F8 ..38` ` buf obj len . .6 e W; e$ ("; 0pB 8- @eN ` HGH X .p -Q <  e  ep PD    QS  e   e 3 ! ' e@  8 1 A pN @ " t  8S ( 07# {88 {@G {H3 P4 {X) `B h p" xc2 MQ 0P { {R3 { {>; { %R - (  E  _?  Z  J  2, ? SI  @ XB  ( ( {0 @ P  A     [  [ J   (  0 6  8 \ @  [H7 =  ! E> "  #  $6L % 0 'j  (9 H )c 6 *n + ` ,{ C - (& . i@ 1    ) 2    % 3  e  e9 4  6 5n 6%e>* 7" 8  99 :ntl ;e <pP =1 > ?  @#7 A2S/ B!';2.1   j R %4 &w6 '?' (e4 *S ($:<&N'eJ(.85)edoc* ( .:< get set>doc5 | r5)Pp?G0 . K2 T.str 9;l E;(R)].K2lS<  $ ZG[.K[2[.4N\t.K2I)-G(#$.K$2$.\;%l&e A '$10,.K2.Pew. C( p.K2.3p  z  7(.K2.3UM&. 2H') 2 R ,S( QG R.K R2B SN. T\ U O V0 .K 2?H!M.")G# +)$(- %R((  .K 2,)ve ..e$).K2.=P2g rL(fC0A8U@B UH)P>%X}%`(%h.'p!(ex4.e|JI/e-01px J$*><= IOeh4_isP,.%L,tL ,&(h0h8@[3eHy_ts8%,;%'D?eCeDe g+F6(;G60JKH8w/I@:KH3LPMX>O`Ph(Qp$,Sx[e]e_F`l8.begHcoS%yj-AGeee+H gPqvk  .K 2% e@ e2'e%eM \C(?0dP8@JRHPr&Xwe`Phmp x2GQ l "1 ( )e@*HQ0  (RpUsnR `* T S! " .K>?o>?  g-e ?/e e== e g-e ?/e 6e pGe ` . K2me ID !) 85e( "e, <e0 Ee4 Me8 9e< IJe@ DH 7P MXc:M  . K2 "= 7Dy88 . K2 E  L! :" #:#.( -:$088/ 0. K02 E1 0M2 :3 #:4.( -:50(9 N U BH P [*e R +[7 BH\G +7^( ,`0 5<a8 i2b@ WQcH sdP 4eX 5f` gh nhp Xiex 85je| rMk l Jm n"oPg #e 'gC =e =e mIh . K2 M 5 > ( (0 _8 @ H ,P nX e` 6d2@7N-#N.    L e' e|N es   i62  . 7!7D 7" #-# To!7DT7"U#-n R!7D7" z !7D "  4I!7DI"J v'e1 $o$v $a%ee%p1  'e{ $o$v $a%ee%p{  }:%%e!$m%%!!r>%% $arg%%& "'%e& "(%e& ")%e& "*%e&!"+%e& !",%e&2!"-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2Me"LNe"O"#:Q."-:R"7:S"A:Te"K:Ue"U:Ve"_:We"i:X"s:Y"Z"[";"\e",]"&^e#$]#-5#-#-,#-e&."s'%tmp&.%tmp&/"s'%tmp &$/%tmp&D/"sN'%tmpQ&V/%tmpd&v/"s'%tmp'%tmp(W5*!/!5<+!!& ,!e!-!.! .!.!@/!."(1!."(2! \0!=\!F\!KN\!PH\)!!\e!!\e! \e!/\e"]7"^"#:`"-:a"7:b"A:c"K:d";"ee",f"&ge#$#-'"s'%tmp(>"1!)"(f 11! f . ,  2!= !7D ". ">* "L "M " "#: "-: "7: "A: ."K: "U: "_: "i: "s: e";" e", "& e#$ #H #$ #- &X2">V &v2"+` "b .&2" } .&2%tmp &2%tmp '%tmp  l C a3!=C !7DC !KC e!LC e!C "D "#:F "-:G ";"H e",I "&J e#$g #-l A4!=A!7DA!FA!KNA"JB"MC"LD"E"#:G."-:H"7:I"A:J"K:K"U:L";"Me",N"&Oe#$#-&`4">&r4%tmp'"2 B1'4!'l"'4"'@'4"2*' l fFZ 4$dZ   6!= ",L l"G l"Jl"}Ll"L"&M"L"0M""#:"-:"7:."A:"K:"U:"_:"i:"s:B"l";" e",!"&"e#$#H#$#-&;6">N&Y6"+X"Z.&k6" u.&}6%tmp&6%tmp'"s'%tmp =D8!="L"&M"L"0M""#:"-:"7:."A:"K:"U:"_:"i:"s:B"l";"e","&e#$#H#$#-&7">P&7"+Z"\.&8" w.&8%tmp&'8%tmp'"s'%tmp Net8$o$v$x  e9!7D 7!, " e"#: "-: e"7: e";" e", "& e#$ #- 9 e89!7D !, " e kKeh9$o$v$x ?C e9!7DC 7!,C e"D e"#:F e"-:G ";"H e",I "&J e#$ #- e:$o$v$x Q :!7D 7" "#: ";" e", "& e#$ #- I4 :!7D " +%e+E,e  # ;!BH# $arg# $kw# "S)$ "%   !;$op1!$op2!!A,!l! P!e&z;%b!4%x!l%a!l'%b"4%a")"S)") :P!e<!EIQ!!@R!<!2S!! T!U!J5U!.!V!%keyX!"X!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SeK$Sd9B7T |KPTvdXB7T |K+ZjdwB7U !KXZvdB7T E~7Q !KzZjdB7U !KZjdB7U @!KZjdC7U !K[lg$C7U  !7T0K9[9f(e7U~@ !@ !@ !@ C !@ !";"e"&e@(;G z ", G "G G@,ps !@y !@s !@Qs !@K!s !@s !@ss x!@D p!@Z h!@' `!@P X!@Z  P!"  I @I H!@DI !@=I !@ EI !@EI !@0EI !@:EI !@N=I !@EI !@j=I !@EI !@EI !@EI !@EI !@EI !@EI !@EI !@EI !@HFI ߯!@RFI ݯ!@\FI ۯ!@h>I ٯ!@FI ׯ!@FI կ!@GI ӯ!@GI ѯ!@ ?I ϯ! uK @ eK ̯! K @%K Ư!@%I į!@%I ¯!@C#I !@% !@ 5 !@)5 !@( !@Q5 ! qL @f aL ! L @< L !@_- L ! L @ L !@B L !@ML x!@7K k!@L f!@%L a!@ FL X!@%K K!@K E!@05K ?!@=NK 9!@QK 3!@r(K -!@K '!@*K !!@K !@/K !@IK !@]&aL !@aL !@L aL !@%!aL ! N @S"N !@#L !@$ خ!@% Ю!@7/& Ȯ! EO @'5O !@(L ! O @<)qO ! O @*O ! O @ +O x!@7,O h!@-!-O X!@=.O H!@K/N 8!@]05O (!@WK15O !@>2qO !@>35O !@ 45O !@M5qO ح!@6O ȭ! P @C7P ! Q @!8P !@99P ! GQ @x>:7Q p! mQ @<;]Q `!@/<P @! Q @1=Q  ! Q X@10>Q ! Q @S ?Q  ! R !@@ R ! AR )@7A1R ! gR @3BWR ! R -@(CC}R `! R "@#DR  !@z7E @!@JF 8!@8G 0!@DH (!@PI  !@MJ !@ K !@jQL !@j1M !@4N !@O !@\P !@MQ !@;R !@S !@T !@U !@%V !@W !@X !@ Y !@Z !@[ !@\ !@] !@B^ x!@_ p!@` h!@YNa `!@aSb X!@"c P!@"d H!@"e @!@"f 8!@(g 0!@">h (!@i  !@j !@$k !@#Bl !@m !@1n !@)o !@1p !@0q !@5r !@9Rs !@;t !@ u !@v !@&w !@_x !@D9y !@"(z !@\L{ !@k| !@} !@.2~ x!@> p!@3 h!@w `!@<7 X!@  P!@ ; H!@  @!@R 8!@ 0!@N (!@$  !@R !@5F !@. !@K7 !@ !@ !@LL !@9 !@l, !@{ !@  !@G !@ !@ N !@(9 !@; !@A !@ !@ !@ !@" x!@3 p!@ h!@# `!@@ X!@'- P!"A9@B H!@B @!@IO 8!@C 0!@PC (!@(  !@* !@- !@* !@(/ !@pC !@C !@C !@C !@C !"C"C"}P"P""P"%F"+"+@- !@- !@X= !"5-"G- ] @N]  !@ <  ! \]b+@(3K] !@ !@ ! ] 5@] !@VR ! ] 8@>| ] `!@yD}  ! &^ @J~^ ! M^b@9<^ !@ ! ^bw@@y^ @!@u+ `! ^ @_^ ! ^ @^  !@-4 ! (_ @&_ !@e `!@bO4 ! 1 z_ @*j_  !@?$e !@84 @! { _ @+_ !@$e !@;4 ! ` @ 3u` ! WD` _@4` ! hj` @|.$Z` ! E` @$` @! ` @$` !@/%4 `! ` @DE+` ! Ea @H,a `! h>a @q;,.a !@v  ,4 @!c7c|*d 4dK H8c ed4cC=4c!c !c%A 4c4c74cF84c24 bec4bc"4c$?)4cU8"[4cM 4c#5'4c '4c4c.1#wc #yc#zc#cI#c1#cX1#c?2#cY #c!#cxB#c#c#cg3#c#c#c#cbDc $6ec%c)#%ef,e `!g&&"mguu#h// hLL g#[h4>4>&3h&5hpp&6g--'6gW2W2#Qg88#Rig88 #gGGTg1A1A?g_"_"EgX0X0BhII hK*K*&7g>>(h g?G?G#\gNN#PhNN h## gL;L;Gg%%'5g66'4gq"q"=g++geOeO#Ng 1g&gT6T6"gKK):gFF#g* gt=t=Jhg R R#Oge;e;"rgAOAO?gAA%gi*i*3h+h  +0g3K3K$5g<<"ngBB#Lg||(h+`g_<_<#]g--"yh@@+g??4h_#_# h((+g55(g/hLL+xh$$+sh+|gglFlF"xg22"oh +g::#g`h%%+>hp#p#+gFFh+h+h hII gee7gh?<?<+:g,g33g33g77$ug$vh;;#Ag!!)mge9e9>h:):)gr@r@.g(g,ug  -g`(`( 1% U$ > : ; I$ >   I : ;  : ; I8 : ;I8 I !I/ : ; &I : ; 7I : ; : ;I8'II : ; I8 ' : ; : ;I : ; : ;I8  : ;  : ; I8 : ;  I: ; (  : ; .: ;'I !: ;I"4: ;I# : ;$: ;I%4: ;I& ' (.: ;' ).?: ; 'I 4*: ; I+.: ;'I , : ;-.: ;'I@B.: ;I/4: ;I01X Y112 3414: ;I54: ;I6BB7B8.: ;'I@B9: ;I:1; 1<B=.1@>?: ;I@4: ;IA UB4: ;I C1D1E1RUX YF UG.1@BHBIB1JK1L.: ;'@BMBN O4: ;IP1X YQB1R.: ;'@BS : ;T.: ;'@U 1V41WBX.1@BY1Z1B[1RUX Y\41 ]41 ^1 _41`B1a.?: ;'@Bb!I/c4: ; I?<d4: ;I?<e!f4: ;I?g.?<n: ; h.?<n: ;i.?<n<+ cutadapt/usr/include/x86_64-linux-gnu/bits/usr/lib/gcc/x86_64-linux-gnu/5/include/usr/include/usr/include/x86_64-linux-gnu/sys/usr/include/python2.7_align.cstring3.hstddef.htypes.hstdio.hlibio.htypes.hsigset.hstdint.hpyport.htime.hobject.hmethodobject.hstructmember.hdescrobject.hunicodeobject.hintobject.hlongobject.hlongintrepr.hfloatobject.hstringobject.hbytearrayobject.htupleobject.hlistobject.hclassobject.htraceback.hframeobject.hpystate.hcode.hsetjmp.hsetjmp.hpydebug.hboolobject.hdictobject.hpyerrors.hceval.hpyfpe.hobjimpl.hpymem.himport.hpythonrun.hwarnings.habstract.hmodsupport.hmoduleobject.h 0T"ut tgJG?YK;K.yO dK JgKJt?G?YM+\i9sK;=.KXfvsK;=.KXKXfvsK;=.KXKXfv iKKKKKKXgXuXjbs;K1L;K.wQz+tKJKZL9uL"XKM[L9uLX=-/7Y; Xq . >!!!!vKJKqJW[K Ju-0tu`LwNyLa6VXu`LwNyLa60Xu]LwMYYvL)3~KKxt;K1KKy< >!KgJnbtKg.JrKg Ju  <vYy<gt CKh;K X.eKKuXuXtx gY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XP505M_M 0" ] 0]  P  0    _  ^ N kwRw/w?wwwwOkwktPtwwww w% Q{ww w5w?ewywYwww%5wMZw w "  " 2 w  w;DPDN~#k/?OQq+?^y~Y~%5MZ  " P" +   <0<VPVV0.V.0R77 0Vo0o~R~0C0CVR.R.Ht0V0::?R?M0MPPPVR V " 0" C VC  0  V  R  0]0]wPw\ 0 =\=07_A 0/\/?0Yo0o_0_QC0CVQ.Q.Ht0\00._.?Q?00P \  0  \  Q  00P 0C0CVT.T.Ht0P:0:?P?0PTM0c0 " 0C  0  03_0Mc_c0 _" C _  _JPPP_P_?YotP__Q\P\??e_Y%5XuPNtPPPP0AwwC0Ctwt0!w:0:?$?e0eywy 00A z zC0Ct zt0 z:0:? z?e0ey zy 00AC0Ctt0 $:0:? ?e0eyy 0S00  0%Q0STTw TPV%QV_VV  VS3 3Q0Q1  MP0P\\ 1" C \  1x2 2xPPu\XXXOXXXQQQQQxQxQ2.YY.=Z)Zf11?V1f__?V_fuPf]]?V]jQ}Q}?UQ?V]?V_?V1T h!T h!%,TVV%5VQQ%,Q7_o__._.?Qt1t1Yv1ttYvt]t]Yv]xQ}tQ}YuQYv]YvYv1P  P  U " U" 5 U5 UUUGUG"U""U  T  S " T" = S= TS"T"RSRTSsTsSTSTS.T.STSYTYS T  S !T!I!SI!a!Ta!j!Sj!!T!%"S%"|"T|""S""T""S  Q " Q" L QL QQQQ\.Q.\YQY\!Q!I!\I!a!Qa!j!\j!"Q""QA  0" L 0L  0",0.0Y0!I!0a!j!0""0A  0" L 0L  0",0.0Y0!I!0a!j!0""0A  0   " 0 ;!0;!I! I!"0""0A  0   z" 0 z;!0;!I! zI!"0""0A  0   1  T" 0 *;!0;!I! I!"0""0U  ",f  p",p  UU  ppSoPo].KPKZ}Z]!I!]a!j!}V.VYV!I!Va!j!V""VPP!;!1!;!4!;!2!;!0!;! |!I!2!;! M|  s  4  2  0   |  q1$#  X  R  1!"1   |!" |!"1!" |  1|""1   u||"" u|""1"" u| U"URUU.UY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~ !0I!a!0j!!0%"6"06";"X;"|"0 x 0x  \) 0w00o\oa0a}P}\"0\0?0H0P(\(0\70H0.0M0Mj\j}0}\0\<0<c\c0\0+Y00P* 0* = \= P 0P c P  0  \  0  \ !0I!a!0j!!0%"|"0 @0@wPw0"0R00.0Y0v 0v  P !0I!a!0j!!0%"|"0 s 0s x  x  V)00" V0(0(0V0?0Hq0q{ {70H0 0  .0x0x} }&0.Y0 0    !0I!a!0j!!0!! %"6"06";"V;"r"0r"|"  s 0s   z)00" z z0(0(0 z0?0Hq0q{ z{70H0 0  z.0x0x} z}&0.Y0 0   z !0I!a!0j!!0!! z%"6"06";" z;"r"0r"|" z s 0s x  x  ^)00" c^0(0(0^0?0Hq0q{ {70H0 0  .0x0x} }&0.Y0 0    !0I!a!0j!!0!! %"6"06";"^;"r"0r"|" % 5 T5 9  !T !  T% 9 QQ  QQ  0 0Cf00Q  TTCXTXf~Q  S SCfSS  P  ]]X  ] ]Cf]  T   !T !  T  QQ  Qw0W00w1W11w~W~~Pv#hW0W1W~jP~P_~TY~PY 070Hs0.0I!a!0 171Hs1.1I!a!1 ~7~Hn~)~I!a!~P|#h~.P%.R70I!a!071I!a!17~I!a!~P#~I!a!P'P',R,7~Hn~nsTjsRNsX X ~Xsp p~   = P  c   000= P 0c  0~  = P  c   00= P 0c  0~ = P  c   0= P 0c  0  ~~P  ~~  c   0c  0':R<SRSc~0:P<DPDSXS0BR8R8M~8BPBS$P$MS}SSP S SRR~P\P\{SSRR~PeSPSS  S  SSSSQPPV<VV)Q)<*<PP""U"&U&&U&4-U""T"#\#?%T?%%\%&T&&T&''\'''T'!(\!(+(T+([(\[()T))\)*T**\*-T--\-4-T""Q"#]#?%Q?%%]%%Q%%]%&Q&&Q&T']T''Q'[(][()Q))])*Q**]*-Q--]-4-Q#=#P=#%S?%%S%&S& -S-4-S"=#P=#5%S?%&S&&P&4-ST##]#%Q?%%]%%Q%%]%&Q&T']T'n'Q'[(][()Q))])*Q**]*+Q+ -Q--]-4-QT##\#%T?%%\%%T%&T&''\''n'T'!(\!(+(T+([(\[()T))\)*T**\*+T+ -T--\-4-TT#%S?%%S%&S&n'S'+S+ -S-4-ST##0##?%%0%%&''0'[(0))0**0--0##a'':'a:'T'$%_%&_T'n'_;)H)_))_**_++_I$%^%@&^T'n'^;)H)^))^**^++^|$%]&@&]T'n']))]**]++]T#%0?%%0%%Ÿ%&0&n'0')0))Ÿ)*0**Ÿ* -0-4-0T#%0?%%0%% z%&0&n'0')0)) z)*0** z*+0+ -0-4-0T#%0?%%0%% J %%T%&0&n'0')0)) 9 )*0**  *+0+ -0-4-0# $][((]);)]H))]).*]**]B++]#$ [(;) H)) )* *+ + - -4- #$0[(;)0H))0)*0*+0+ -0-4-0# $Pk((});)}H))}((_((P))}*);)PV)o)Pk))0).*]**]B++]) *PB+Y+P) *0 ** {*?*Q**0*+QB+U+0U+o+ {)*0*?*P**0**P*B+]B+d+0d+o+P?*a*]+U,]i,,]-4-]?** + - -4- ?**0+ -0-4-0U*a*_+3,}t, -},!,P,3,0,,},,_,,_,,},,_$$I$U@&J&U.$I$p@&J&pW$|$U%%Ua$|$p%%p''P'''_'(_+(>(_>([(**_&''^'[(^))^**^--^''P''P((P**1**5**2**0** |**2** M||$$1++1|$$ &|++ &|++1++ &|$%]&@&]T'n']))]**]$%^&@&^T'n'^))^**^$%_&@&_T'n'_))_**_$$a&*&a$%S&@&ST'n'S))S**S** $%0&@&0T'n'0))0**ȟ$%0&@&0T'n'0))0** z$%0&@&0T'n'0))0** $$T$$ !T'i'Ti'n' !))T$$ST'n'S))S$$Q$$sT'n'Q))Q))sJ%v%|J%%5J%%2J%%0J%% |%% q1$q"#%%X%%R@-h-Uh-{.S{..U.?2S@-P-TP-%.]%..T./]//T/g0]g00T00]00T00]01T1d1]d11T1:2]:2?2Tx-_.V..V//V/g0V01V12V*2:2V-_.S./S/:2S%.).P)._.]00]01Pd1p1\p11P..T,1A1TA1E1 x!*212T..V,1N1V*2:2V..P,141P41E1v*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~IVMMVMN\JTKVOOVOO\;PP0;QR0)S5S0@S[0[8[P8[K[^K[f[0f[[P[[^[[0[[P[K\^\J]0O]_]0_]w]^w]]0]]P]^^^^0^^P^%_0%_5_P5_@_^@_P_0P_[_P[_k_0k_z_^z__P__^_`0ab0b3bP3bLb^Lbgb0gbbPbb^bb0bbPbb^bcPc!c^!c1cPP:P`pЅ^0@g^0gW\R8EHKh&Њgszȋ 0cfшHW6/WAFMng\rĉrґÒ&-8Ò&8<CÒ&˓`p|&<2<Ȗ%*4EPϚP2Ϛ 2pu@Ϛ'_hrݛ!$'Q[^aŜϜҜ՜ 9CFIs}!+.1[ehkϞٞܞߞ CMPS0ˮR.OIP@hvRbvҬܬɥϧG] @14S] @]'quzxd'GйRdGquzxй Rx|,8h۲ 2 0(2 0[`mps $@`йKbXb,x м ,`59@02)(a{¾̾ǿ..3@`YkdP3kBvP08+8@e0@.@.U RUZp p#GJYmKRUZpy;p# RUZp p#[ Swz  T[pMThns  $+ 0$+9TH@bH@@ep=2p02V0=;0h6q  D Dp D @y'25vpP@psKv@psQpspPP@pyDs@Ds@DsX[^pyHX38X(!3c(Xx!3!v3=H( !X 0ux08:= `43k` 43k 3kH`H43kSu@Hu43ku43k?P` 0PAadl %(*`0Aadl?``y-8_-N_yP` 0PAal\ @\fpsv|AQQaP` P` ELS (XM " C   x P'/29P. .= 0f@V%5 p # ptx`v  A  (  (X0Y!I!""U  (-04  0Y!I!""  !"  ""|"""""" (X0Y!I!!%"|"  % =   F J Q   Hp      w` @Px 0T!j! 0@T!j!@T!j!Ns   #:@h0:@h,B P8B P 0@@PP`@@ #9#M#P#T#%@%%%&&p''++ --4- #9#M#P#T#|$@%J%% &F&&&X''))**++ --4-# $`(()@)H)))**++ --4-k(()@)H)))?**+?*a*+U,i,,,,-4-+3,t,,,,$$I$F&K&N&Q&W$|$%%%%&6''`())**--|$$++$% &F&X'p'))**$$$$X'p'))--//-_...0p00P1h1112*2:2-:...0001P112*2:2--..01P1*2:2..220p0101-0H0 101[0^0a0p0./00P1h1112*2.@/00\////g2n2s228OuO2 =@=8O|OO2266p==wJJp==wJJ2222BBXLyL23 3]3BBCCnC|CCCN!N33`;p;@@KK@@KK<55566k78`;QBB0CnCCGDDER>EFH>R>EF>>F F>(?nFFLLnFFLLA4AFF*A4AFFAAFFAB@BQBME}ENNABEBQBME}ENNME}ENNGH?HIHLHOHHH H HJ1JGNTN)H3H6H9HUHbHeHhHHHeI~IMMHHeI~IP PPPP!P;PP@QPQnRR`SSS)TnRR`SSZZZ[^^^^_]w]___`?didFaPa^aa[cc0TMe Q#S.symtab.strtab.shstrtab.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.init_array.fini_array.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_line.debug_str.debug_loc.debug_rangesX8*X@B K 0K Q Pe `e!!!!x!! !@! ! 0S. pSA SW@!f! T! 0T PT pTEH T { T  TE 0Ui* Uh @V V pWQ W  W X % X B X\ @Xpv XL Z  Z  Z_ ZM ZM [7@ `[AZ [n \, \ ] 0^!-!@k ^! !@( _g`!!@ P`  @a|$ c: c7T d l d" Pd) d7 e!!!! iUB iU @j: k l l 0m  m/  PnpM  npg  0o  0o  0o 2  @ojn  oU  pm  pF  pM  qY1  qLf  Q ! !  ;R  q\  0u&  `v9  0w8k  pwp  wp  Px  x)  y  { !  }[,  P<N !^  r  L  @! `! ! ! !!`! . }G 0}8!!P!  К fH!'h!30!? !K!W!c!o!{`!!p!!!(!!!!!! !h!  T S!d!tp!h!p! p !!+ GY!!!! @!H!&X!8x!s8!  ! `j ! m @ PH!W!c!o!( 3!P! @u!' J!p8!p!H!!X!`!!@ /8!;0!G(!S!b !!!!( "t  !0 @-(x!8 @2d!t!!!`!@!! !X!!P!"x!7!M@!Y!!!h!!!!0!!0!F(!R`!^X!l!{!!!!!!!(!!P!&x!7!G!W!k!!!!@!4!nd!! ! ! !0!+!>! o!! !! !!@!5! Z`! !!!`!x!x!@ @!P#!<H!E!R!\!f!p!z! p!!!" !!!!*9!C!M! a !#!!!!!!!8! ! !!!+̯!6Ư!Aį!L¯!W(! jخ!z!K!߯!E!ȭ!@!!`! ݯ! ! !& ?!4 !C Ю!S `!.{ ۯ! ! ! 9! ! ٯ! ! ! ! !!3!!ׯ! !x! -!Ȯ!=!!T!!f!! z!! !կ!! !!! !-!!! !'!!! !ӯ!"!!"!"!("x! :"h! L"!Z"!f"k!s"!"f!"a!"X! "!"ѯ!"X! "!"H! "ϯ!"!#ح! '#!3#!`[# !#!Y# !#!$!1$@!x_$`!9$!6$!,$ !%%!+% !8%!A%@!M%!c%t%%%%%%%%&&*& F&Y&f&s&&&&&&&&& ''0'G'T'@!['u''''''''(( Pe(+(7(S(f(t(((((((()).)@)N)\)s))))))))) *"*.*<*S*k*z*** *****++.+<+`!b+x++++++++!+,,,,;,H,@!T,_,p,},,,,,,,,--!-3- G-Y-h-}--------.. PM!./. I.b.s.....". K...//&/<'0i{S2=U@\±K4" H/cutadapt-1.9.1/cutadapt/qualtrim.py0000664000175000017500000000162612575761274020123 0ustar marcelmarcel00000000000000# coding: utf-8 """ Quality trimming. """ from __future__ import print_function, division, absolute_import import sys if sys.version > '3': xrange = range def quality_trim_index(qualities, cutoff, base=33): """ Find the position at which to trim a low-quality end from a nucleotide sequence. Qualities are assumed to be ASCII-encoded as chr(qual + base). The algorithm is the same as the one used by BWA within the function 'bwa_trim_read': - Subtract the cutoff value from all qualities. - Compute partial sums from all indices to the end of the sequence. - Trim sequence at the index at which the sum is minimal. """ s = 0 max_qual = 0 max_i = len(qualities) for i in reversed(xrange(max_i)): q = ord(qualities[i]) - base s += cutoff - q if s < 0: break if s > max_qual: max_qual = s max_i = i return max_i try: from cutadapt._qualtrim import quality_trim_index except: pass cutadapt-1.9.1/cutadapt/align.py0000664000175000017500000000217112611675445017346 0ustar marcelmarcel00000000000000# coding: utf-8 """ Alignment module. """ from __future__ import print_function, division, absolute_import from cutadapt._align import Aligner, compare_prefixes, locate # flags for global alignment # The interpretation of the first flag is: # An initial portion of seq1 may be skipped at no cost. # This is equivalent to saying that in the alignment, # gaps in the beginning of seq2 are free. # # The other flags have an equivalent meaning. START_WITHIN_SEQ1 = 1 START_WITHIN_SEQ2 = 2 STOP_WITHIN_SEQ1 = 4 STOP_WITHIN_SEQ2 = 8 # Use this to get regular semiglobal alignment # (all gaps in the beginning or end are free) SEMIGLOBAL = START_WITHIN_SEQ1 | START_WITHIN_SEQ2 | STOP_WITHIN_SEQ1 | STOP_WITHIN_SEQ2 def compare_suffixes(s1, s2, wildcard_ref=False, wildcard_query=False): """ Find out whether one string is the suffix of the other one, allowing mismatches. Used to find an anchored 3' adapter when no indels are allowed. """ s1 = s1[::-1] s2 = s2[::-1] _, length, _, _, matches, errors = compare_prefixes(s1, s2, wildcard_ref, wildcard_query) return (len(s1) - length, len(s1), len(s2) - length, len(s2), matches, errors) cutadapt-1.9.1/cutadapt/report.py0000664000175000017500000002370012627537126017570 0ustar marcelmarcel00000000000000# coding: utf-8 """ Routines for printing a report. """ from __future__ import print_function, division, absolute_import import sys from collections import namedtuple from contextlib import contextmanager import textwrap from .adapters import BACK, FRONT, PREFIX, SUFFIX, ANYWHERE from .modifiers import QualityTrimmer, AdapterCutter from .filters import (NoFilter, PairedNoFilter, TooShortReadFilter, TooLongReadFilter, DiscardTrimmedFilter, DiscardUntrimmedFilter, Demultiplexer, NContentFilter) class Statistics: def __init__(self, n, total_bp1, total_bp2): """ n -- total number of reads total_bp1 -- number of bases in first reads total_bp2 -- number of bases in second reads (set to None for single-end data) """ self.n = n self.total_bp = total_bp1 self.total_bp1 = total_bp1 if total_bp2 is None: self.paired = False else: self.paired = True self.total_bp2 = total_bp2 self.total_bp += total_bp2 def collect(self, adapters_pair, time, modifiers, modifiers2, writers): self.time = max(time, 0.01) self.too_short = None self.too_long = None self.written = 0 self.written_bp = [0, 0] self.too_many_n = None # Collect statistics from writers/filters for w in writers: if isinstance(w, (NoFilter, PairedNoFilter, Demultiplexer)) or isinstance(w.filter, (DiscardTrimmedFilter, DiscardUntrimmedFilter)): self.written += w.written if self.n > 0: self.written_fraction = self.written / self.n self.written_bp = self.written_bp[0] + w.written_bp[0], self.written_bp[1] + w.written_bp[1] elif isinstance(w.filter, TooShortReadFilter): self.too_short = w.filtered elif isinstance(w.filter, TooLongReadFilter): self.too_long = w.filtered elif isinstance(w.filter, NContentFilter): self.too_many_n = w.filtered assert self.written is not None # Collect statistics from modifiers self.with_adapters = [0, 0] self.quality_trimmed_bp = [0, 0] self.did_quality_trimming = False for i, modifiers_list in [(0, modifiers), (1, modifiers2)]: for modifier in modifiers_list: if isinstance(modifier, QualityTrimmer): self.quality_trimmed_bp[i] = modifier.trimmed_bases self.did_quality_trimming = True elif isinstance(modifier, AdapterCutter): self.with_adapters[i] += modifier.with_adapters self.with_adapters_fraction = [ (v / self.n if self.n > 0 else 0) for v in self.with_adapters ] self.quality_trimmed = sum(self.quality_trimmed_bp) self.quality_trimmed_fraction = self.quality_trimmed / self.total_bp if self.total_bp > 0 else 0.0 self.total_written_bp = sum(self.written_bp) self.total_written_bp_fraction = self.total_written_bp / self.total_bp if self.total_bp > 0 else 0.0 if self.n > 0: if self.too_short is not None: self.too_short_fraction = self.too_short / self.n if self.too_long is not None: self.too_long_fraction = self.too_long / self.n if self.too_many_n is not None: self.too_many_n_fraction = self.too_many_n / self.n ADAPTER_TYPES = { BACK: "regular 3'", FRONT: "regular 5'", PREFIX: "anchored 5'", SUFFIX: "anchored 3'", ANYWHERE: "variable 5'/3'" } def print_error_ranges(adapter_length, error_rate): print("No. of allowed errors:") prev = 0 for errors in range(1, int(error_rate * adapter_length) + 1): r = int(errors / error_rate) print("{0}-{1} bp: {2};".format(prev, r - 1, errors - 1), end=' ') prev = r if prev == adapter_length: print("{0} bp: {1}".format(adapter_length, int(error_rate * adapter_length))) else: print("{0}-{1} bp: {2}".format(prev, adapter_length, int(error_rate * adapter_length))) print() def print_histogram(d, adapter_length, n, error_rate, errors): """ Print a histogram. Also, print the no. of reads expected to be trimmed by chance (assuming a uniform distribution of nucleotides in the reads). d -- a dictionary mapping lengths of trimmed sequences to their respective frequency adapter_length -- adapter length n -- total no. of reads. """ h = [] for length in sorted(d): # when length surpasses adapter_length, the # probability does not increase anymore estimated = n * 0.25 ** min(length, adapter_length) h.append( (length, d[length], estimated) ) print("length", "count", "expect", "max.err", "error counts", sep="\t") for length, count, estimate in h: max_errors = max(errors[length].keys()) errs = ' '.join(str(errors[length][e]) for e in range(max_errors+1)) print(length, count, "{0:.1F}".format(estimate), int(error_rate*min(length, adapter_length)), errs, sep="\t") print() def print_adjacent_bases(bases, sequence): """ Print a summary of the bases preceding removed adapter sequences. Print a warning if one of the bases is overrepresented and there are at least 20 preceding bases available. Return whether a warning was printed. """ total = sum(bases.values()) if total == 0: return False print('Bases preceding removed adapters:') warnbase = None for base in ['A', 'C', 'G', 'T', '']: b = base if base != '' else 'none/other' fraction = 1.0 * bases[base] / total print(' {0}: {1:.1%}'.format(b, fraction)) if fraction > 0.8 and base != '': warnbase = b if total >= 20 and warnbase is not None: print('WARNING:') print(' The adapter is preceded by "{0}" extremely often.'.format(warnbase)) print(' The provided adapter sequence may be incomplete.') print(' To fix the problem, add "{0}" to the beginning of the adapter sequence.'.format(warnbase)) print() return True print() return False @contextmanager def redirect_standard_output(file): if file is None: yield return old_stdout = sys.stdout sys.stdout = file yield sys.stdout = old_stdout def print_report(stats, adapters_pair): """Print report to standard output.""" if stats.n == 0: print("No reads processed! Either your input file is empty or you used the wrong -f/--format parameter.") return print("Finished in {0:.2F} s ({1:.0F} us/read; {2:.2F} M reads/minute).".format( stats.time, 1E6 * stats.time / stats.n, stats.n / stats.time * 60 / 1E6)) report = "\n=== Summary ===\n\n" if stats.paired: report += textwrap.dedent("""\ Total read pairs processed: {n:13,d} Read 1 with adapter: {with_adapters[0]:13,d} ({with_adapters_fraction[0]:.1%}) Read 2 with adapter: {with_adapters[1]:13,d} ({with_adapters_fraction[1]:.1%}) """) else: report += textwrap.dedent("""\ Total reads processed: {n:13,d} Reads with adapters: {with_adapters[0]:13,d} ({with_adapters_fraction[0]:.1%}) """) if stats.too_short is not None: report += "{pairs_or_reads} that were too short: {too_short:13,d} ({too_short_fraction:.1%})\n" if stats.too_long is not None: report += "{pairs_or_reads} that were too long: {too_long:13,d} ({too_long_fraction:.1%})\n" if stats.too_many_n is not None: report += "{pairs_or_reads} with too many N: {too_many_n:13,d} ({too_many_n_fraction:.1%})\n" report += textwrap.dedent("""\ {pairs_or_reads} written (passing filters): {written:13,d} ({written_fraction:.1%}) Total basepairs processed: {total_bp:13,d} bp """) if stats.paired: report += " Read 1: {total_bp1:13,d} bp\n" report += " Read 2: {total_bp2:13,d} bp\n" if stats.did_quality_trimming: report += "Quality-trimmed: {quality_trimmed:13,d} bp ({quality_trimmed_fraction:.1%})\n" if stats.paired: report += " Read 1: {quality_trimmed_bp[0]:13,d} bp\n" report += " Read 2: {quality_trimmed_bp[1]:13,d} bp\n" report += "Total written (filtered): {total_written_bp:13,d} bp ({total_written_bp_fraction:.1%})\n" if stats.paired: report += " Read 1: {written_bp[0]:13,d} bp\n" report += " Read 2: {written_bp[1]:13,d} bp\n" v = vars(stats) v['pairs_or_reads'] = "Pairs" if stats.paired else "Reads" try: report = report.format(**v) except ValueError: # Python 2.6 does not support the comma format specifier (PEP 378) report = report.replace(",d}", "d}").format(**v) print(report) warning = False for which_in_pair in (0, 1): for adapter in adapters_pair[which_in_pair]: total_front = sum(adapter.lengths_front.values()) total_back = sum(adapter.lengths_back.values()) total = total_front + total_back where = adapter.where assert where == ANYWHERE or (where in (BACK, SUFFIX) and total_front == 0) or (where in (FRONT, PREFIX) and total_back == 0) if stats.paired: extra = 'First read: ' if which_in_pair == 0 else 'Second read: ' else: extra = '' print("=" * 3, extra + "Adapter", adapter.name, "=" * 3) print() print("Sequence: {0}; Type: {1}; Length: {2}; Trimmed: {3} times.". format(adapter.sequence, ADAPTER_TYPES[adapter.where], len(adapter.sequence), total)) if total == 0: print() continue if where == ANYWHERE: print(total_front, "times, it overlapped the 5' end of a read") print(total_back, "times, it overlapped the 3' end or was within the read") print() print_error_ranges(len(adapter), adapter.max_error_rate) print("Overview of removed sequences (5')") print_histogram(adapter.lengths_front, len(adapter), stats.n, adapter.max_error_rate, adapter.errors_front) print() print("Overview of removed sequences (3' or within)") print_histogram(adapter.lengths_back, len(adapter), stats.n, adapter.max_error_rate, adapter.errors_back) elif where in (FRONT, PREFIX): print() print_error_ranges(len(adapter), adapter.max_error_rate) print("Overview of removed sequences") print_histogram(adapter.lengths_front, len(adapter), stats.n, adapter.max_error_rate, adapter.errors_front) else: assert where in (BACK, SUFFIX) print() print_error_ranges(len(adapter), adapter.max_error_rate) warning = warning or print_adjacent_bases(adapter.adjacent_bases, adapter.sequence) print("Overview of removed sequences") print_histogram(adapter.lengths_back, len(adapter), stats.n, adapter.max_error_rate, adapter.errors_back) if warning: print('WARNING:') print(' One or more of your adapter sequences may be incomplete.') print(' Please see the detailed output above.') cutadapt-1.9.1/cutadapt/_align.c0000664000175000017500000165020712611675451017306 0ustar marcelmarcel00000000000000/* Generated by Cython 0.23.4 */ /* BEGIN: Cython Metadata { "distutils": { "depends": [] } } END: Cython Metadata */ #define PY_SSIZE_T_CLEAN #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000) #error Cython requires Python 2.6+ or Python 3.2+. #else #define CYTHON_ABI "0_23_4" #include #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #endif #if !defined(CYTHON_USE_PYLONG_INTERNALS) && CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070000 #define CYTHON_USE_PYLONG_INTERNALS 1 #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) #define Py_OptimizeFlag 0 #endif #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #if PY_MAJOR_VERSION < 3 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #define __Pyx_DefaultClassType PyClass_Type #else #define __Pyx_BUILTIN_MODULE_NAME "builtins" #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #define __Pyx_DefaultClassType PyType_Type #endif #ifndef Py_TPFLAGS_CHECKTYPES #define Py_TPFLAGS_CHECKTYPES 0 #endif #ifndef Py_TPFLAGS_HAVE_INDEX #define Py_TPFLAGS_HAVE_INDEX 0 #endif #ifndef Py_TPFLAGS_HAVE_NEWBUFFER #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #ifndef Py_TPFLAGS_HAVE_FINALIZE #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #else #define CYTHON_PEP393_ENABLED 0 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #endif #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) #else #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains) #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) #endif #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) #else #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) #endif #if PY_MAJOR_VERSION >= 3 #define PyBaseString_Type PyUnicode_Type #define PyStringObject PyUnicodeObject #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) #else #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #define PyNumber_Int PyNumber_Long #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY #ifndef PyUnicode_InternFromString #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) #endif #endif #if PY_VERSION_HEX < 0x030200A4 typedef long Py_hash_t; #define __Pyx_PyInt_FromHash_t PyInt_FromLong #define __Pyx_PyInt_AsHash_t PyInt_AsLong #else #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) #else #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) #endif #if PY_VERSION_HEX >= 0x030500B1 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) #elif CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 typedef struct { unaryfunc am_await; unaryfunc am_aiter; unaryfunc am_anext; } __Pyx_PyAsyncMethodsStruct; #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) #else #define __Pyx_PyType_AsAsync(obj) NULL #endif #ifndef CYTHON_RESTRICT #if defined(__GNUC__) #define CYTHON_RESTRICT __restrict__ #elif defined(_MSC_VER) && _MSC_VER >= 1400 #define CYTHON_RESTRICT __restrict #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_RESTRICT restrict #else #define CYTHON_RESTRICT #endif #endif #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) #ifndef CYTHON_INLINE #if defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #define __PYX_HAVE__cutadapt___align #define __PYX_HAVE_API__cutadapt___align #ifdef _OPENMP #include #endif /* _OPENMP */ #ifdef PYREX_WITHOUT_ASSERTIONS #define CYTHON_WITHOUT_ASSERTIONS #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif #ifndef CYTHON_NCP_UNUSED # if CYTHON_COMPILING_IN_CPYTHON # define CYTHON_NCP_UNUSED # else # define CYTHON_NCP_UNUSED CYTHON_UNUSED # endif #endif typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0 #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #define __Pyx_uchar_cast(c) ((unsigned char)c) #define __Pyx_long_cast(x) ((long)x) #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ (sizeof(type) < sizeof(Py_ssize_t)) ||\ (sizeof(type) > sizeof(Py_ssize_t) &&\ likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX) &&\ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ v == (type)PY_SSIZE_T_MIN))) ||\ (sizeof(type) == sizeof(Py_ssize_t) &&\ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX))) ) #if defined (__cplusplus) && __cplusplus >= 201103L #include #define __Pyx_sst_abs(value) std::abs(value) #elif SIZEOF_INT >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) abs(value) #elif SIZEOF_LONG >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) labs(value) #elif defined (_MSC_VER) && defined (_M_X64) #define __Pyx_sst_abs(value) _abs64(value) #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define __Pyx_sst_abs(value) llabs(value) #elif defined (__GNUC__) #define __Pyx_sst_abs(value) __builtin_llabs(value) #else #define __Pyx_sst_abs(value) ((value<0) ? -value : value) #endif static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) #if PY_MAJOR_VERSION < 3 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; return (size_t)(u_end - u - 1); } #else #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen #endif #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) #define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False)) static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); #if CYTHON_COMPILING_IN_CPYTHON #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; const char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; if (strcmp(default_encoding_c, "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { char ascii_chars[128]; int c; for (c = 0; c < 128; c++) { ascii_chars[c] = c; } __Pyx_sys_getdefaultencoding_not_ascii = 1; ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); if (!ascii_chars_u) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { PyErr_Format( PyExc_ValueError, "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", default_encoding_c); goto bad; } Py_DECREF(ascii_chars_u); Py_DECREF(ascii_chars_b); } Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return -1; } #endif #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) #else #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT static char* __PYX_DEFAULT_STRING_ENCODING; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); return -1; } #endif #endif /* Test for GCC > 2.95 */ #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* !__GNUC__ or GCC < 2.95 */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static PyObject *__pyx_m; static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; static const char *__pyx_f[] = { "cutadapt/_align.pyx", }; /*--- Type declarations ---*/ struct __pyx_obj_8cutadapt_6_align_Aligner; struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct____str__; struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_1_genexpr; struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_2_genexpr; struct __pyx_t_8cutadapt_6_align__Entry; typedef struct __pyx_t_8cutadapt_6_align__Entry __pyx_t_8cutadapt_6_align__Entry; struct __pyx_t_8cutadapt_6_align__Match; typedef struct __pyx_t_8cutadapt_6_align__Match __pyx_t_8cutadapt_6_align__Match; /* "cutadapt/_align.pyx":10 * * # structure for a DP matrix entry * ctypedef struct _Entry: # <<<<<<<<<<<<<< * int cost * int matches # no. of matches in this alignment */ struct __pyx_t_8cutadapt_6_align__Entry { int cost; int matches; int origin; }; /* "cutadapt/_align.pyx":16 * * * ctypedef struct _Match: # <<<<<<<<<<<<<< * int origin * int cost */ struct __pyx_t_8cutadapt_6_align__Match { int origin; int cost; int matches; int ref_stop; int query_stop; }; /* "cutadapt/_align.pyx":118 * * * cdef class Aligner: # <<<<<<<<<<<<<< * """ * TODO documentation still uses s1 (reference) and s2 (query). */ struct __pyx_obj_8cutadapt_6_align_Aligner { PyObject_HEAD int m; __pyx_t_8cutadapt_6_align__Entry *column; double max_error_rate; int flags; int _insertion_cost; int _deletion_cost; int _min_overlap; int wildcard_ref; int wildcard_query; int debug; PyObject *_dpmatrix; PyObject *_reference; PyObject *str_reference; }; /* "cutadapt/_align.pyx":107 * self._rows[i][j] = cost * * def __str__(self): # <<<<<<<<<<<<<< * """ * Return a representation of the matrix as a string. */ struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct____str__ { PyObject_HEAD PyObject *__pyx_v_row; PyObject *__pyx_v_self; }; /* "cutadapt/_align.pyx":111 * Return a representation of the matrix as a string. * """ * rows = [' ' + ' '.join(c.rjust(2) for c in self.query)] # <<<<<<<<<<<<<< * for c, row in zip(' ' + self.reference, self._rows): * r = c + ' ' + ' '.join(' ' if v is None else '{0:2d}'.format(v) for v in row) */ struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_1_genexpr { PyObject_HEAD struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct____str__ *__pyx_outer_scope; PyObject *__pyx_v_c; PyObject *__pyx_t_0; Py_ssize_t __pyx_t_1; PyObject *(*__pyx_t_2)(PyObject *); }; /* "cutadapt/_align.pyx":113 * rows = [' ' + ' '.join(c.rjust(2) for c in self.query)] * for c, row in zip(' ' + self.reference, self._rows): * r = c + ' ' + ' '.join(' ' if v is None else '{0:2d}'.format(v) for v in row) # <<<<<<<<<<<<<< * rows.append(r) * return '\n'.join(rows) */ struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_2_genexpr { PyObject_HEAD struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct____str__ *__pyx_outer_scope; PyObject *__pyx_v_v; PyObject *__pyx_t_0; Py_ssize_t __pyx_t_1; PyObject *(*__pyx_t_2)(PyObject *); }; /* --- Runtime support code (head) --- */ #ifndef CYTHON_REFNANNY #define CYTHON_REFNANNY 0 #endif #if CYTHON_REFNANNY typedef struct { void (*INCREF)(void*, PyObject*, int); void (*DECREF)(void*, PyObject*, int); void (*GOTREF)(void*, PyObject*, int); void (*GIVEREF)(void*, PyObject*, int); void* (*SetupContext)(const char*, int, const char*); void (*FinishContext)(void**); } __Pyx_RefNannyAPIStruct; static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; #ifdef WITH_THREAD #define __Pyx_RefNannySetupContext(name, acquire_gil)\ if (acquire_gil) {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ PyGILState_Release(__pyx_gilstate_save);\ } else {\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ } #else #define __Pyx_RefNannySetupContext(name, acquire_gil)\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) #endif #define __Pyx_RefNannyFinishContext()\ __Pyx_RefNanny->FinishContext(&__pyx_refnanny) #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) #else #define __Pyx_RefNannyDeclarations #define __Pyx_RefNannySetupContext(name, acquire_gil) #define __Pyx_RefNannyFinishContext() #define __Pyx_INCREF(r) Py_INCREF(r) #define __Pyx_DECREF(r) Py_DECREF(r) #define __Pyx_GOTREF(r) #define __Pyx_GIVEREF(r) #define __Pyx_XINCREF(r) Py_XINCREF(r) #define __Pyx_XDECREF(r) Py_XDECREF(r) #define __Pyx_XGOTREF(r) #define __Pyx_XGIVEREF(r) #endif #define __Pyx_XDECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_XDECREF(tmp);\ } while (0) #define __Pyx_DECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_DECREF(tmp);\ } while (0) #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif static PyObject *__Pyx_GetBuiltinName(PyObject *name); #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); #else #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) #endif static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d); typedef struct { PyObject *type; PyObject **method_name; PyCFunction func; PyObject *method; int flag; } __Pyx_CachedCFunction; static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_CallUnboundCMethod0(cfunc, self)\ ((likely((cfunc)->func)) ?\ (likely((cfunc)->flag == METH_NOARGS) ? (*((cfunc)->func))(self, NULL) :\ (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ? ((*(PyCFunctionWithKeywords)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\ ((cfunc)->flag == METH_VARARGS ? (*((cfunc)->func))(self, __pyx_empty_tuple) : __Pyx__CallUnboundCMethod0(cfunc, self)))) :\ __Pyx__CallUnboundCMethod0(cfunc, self)) #else #define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self) #endif static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); static CYTHON_INLINE int __Pyx_IterFinish(void); static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject*); #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyObject_Ord(c)\ (likely(PyUnicode_Check(c)) ? (long)__Pyx_PyUnicode_AsPy_UCS4(c) : __Pyx__PyObject_Ord(c)) #else #define __Pyx_PyObject_Ord(c) __Pyx__PyObject_Ord(c) #endif static long __Pyx__PyObject_Ord(PyObject* c); #define __Pyx_SetItemInt_ByteArray(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_SetItemInt_ByteArray_Fast(o, (Py_ssize_t)i, v, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "bytearray index out of range"), -1)) static CYTHON_INLINE int __Pyx_SetItemInt_ByteArray_Fast(PyObject* string, Py_ssize_t i, unsigned char v, int wraparound, int boundscheck); #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); #else #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL) #endif static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ const char* function_name); #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace); #else #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\ (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2)) #endif #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len)) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); Py_SIZE(list) = len+1; return 0; } return PyList_Append(list, x); } #else #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) #endif #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL) static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_setattro)) return tp->tp_setattro(obj, attr_name, value); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_setattr)) return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value); #endif return PyObject_SetAttr(obj, attr_name, value); } #else #define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n) #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) #endif #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ __Pyx_GetItemInt_Generic(o, to_py_func(i)))) #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck); #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\ (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\ __Pyx_SetItemInt_Generic(o, to_py_func(i), v))) static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v); static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, int wraparound, int boundscheck); static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyString_Join __Pyx_PyBytes_Join #define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v)) #else #define __Pyx_PyString_Join PyUnicode_Join #define __Pyx_PyBaseString_Join PyUnicode_Join #endif #if CYTHON_COMPILING_IN_CPYTHON #if PY_MAJOR_VERSION < 3 #define __Pyx_PyBytes_Join _PyString_Join #else #define __Pyx_PyBytes_Join _PyBytes_Join #endif #else static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values); #endif #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { Py_INCREF(x); PyList_SET_ITEM(list, len, x); Py_SIZE(list) = len+1; return 0; } return PyList_Append(list, x); } #else #define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact); static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); #ifndef __PYX_FORCE_INIT_THREADS #define __PYX_FORCE_INIT_THREADS 0 #endif #include static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); #define __Pyx_CyFunction_USED 1 #include #define __Pyx_CYFUNCTION_STATICMETHOD 0x01 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 #define __Pyx_CYFUNCTION_CCLASS 0x04 #define __Pyx_CyFunction_GetClosure(f)\ (((__pyx_CyFunctionObject *) (f))->func_closure) #define __Pyx_CyFunction_GetClassObj(f)\ (((__pyx_CyFunctionObject *) (f))->func_classobj) #define __Pyx_CyFunction_Defaults(type, f)\ ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) typedef struct { PyCFunctionObject func; #if PY_VERSION_HEX < 0x030500A0 PyObject *func_weakreflist; #endif PyObject *func_dict; PyObject *func_name; PyObject *func_qualname; PyObject *func_doc; PyObject *func_globals; PyObject *func_code; PyObject *func_closure; PyObject *func_classobj; void *defaults; int defaults_pyobjects; int flags; PyObject *defaults_tuple; PyObject *defaults_kwdict; PyObject *(*defaults_getter)(PyObject *); PyObject *func_annotations; } __pyx_CyFunctionObject; static PyTypeObject *__pyx_CyFunctionType = 0; #define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\ __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code) static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *self, PyObject *module, PyObject *globals, PyObject* code); static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, size_t size, int pyobjects); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, PyObject *tuple); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, PyObject *dict); static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, PyObject *dict); static int __pyx_CyFunction_init(void); static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc); static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); typedef struct { int code_line; PyCodeObject* code_object; } __Pyx_CodeObjectCacheEntry; struct __Pyx_CodeObjectCache { int count; int max_count; __Pyx_CodeObjectCacheEntry* entries; }; static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); static PyCodeObject *__pyx_find_code_object(int code_line); static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); static CYTHON_INLINE unsigned char __Pyx_PyInt_As_unsigned_char(PyObject *); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyObject *); typedef struct { PyObject_HEAD __pyx_coroutine_body_t body; PyObject *closure; PyObject *exc_type; PyObject *exc_value; PyObject *exc_traceback; PyObject *gi_weakreflist; PyObject *classobj; PyObject *yieldfrom; PyObject *gi_name; PyObject *gi_qualname; int resume_label; char is_running; } __pyx_CoroutineObject; static __pyx_CoroutineObject *__Pyx__Coroutine_New(PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *closure, PyObject *name, PyObject *qualname); static int __Pyx_Coroutine_clear(PyObject *self); #if 1 || PY_VERSION_HEX < 0x030300B0 static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue); #else #define __Pyx_PyGen_FetchStopIterationValue(pvalue) PyGen_FetchStopIterationValue(pvalue) #endif static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code); static int __Pyx_patch_abc(void); #define __Pyx_Generator_USED static PyTypeObject *__pyx_GeneratorType = 0; #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType) #define __Pyx_Generator_New(body, closure, name, qualname)\ __Pyx__Coroutine_New(__pyx_GeneratorType, body, closure, name, qualname) static PyObject *__Pyx_Generator_Next(PyObject *self); static int __pyx_Generator_init(void); static int __Pyx_check_binary_version(void); static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /* Module declarations from 'cpython.mem' */ /* Module declarations from 'cutadapt._align' */ static PyTypeObject *__pyx_ptype_8cutadapt_6_align_Aligner = 0; static PyTypeObject *__pyx_ptype_8cutadapt_6_align___pyx_scope_struct____str__ = 0; static PyTypeObject *__pyx_ptype_8cutadapt_6_align___pyx_scope_struct_1_genexpr = 0; static PyTypeObject *__pyx_ptype_8cutadapt_6_align___pyx_scope_struct_2_genexpr = 0; static PyObject *__pyx_v_8cutadapt_6_align_ACGT_TABLE = 0; static PyObject *__pyx_v_8cutadapt_6_align_IUPAC_TABLE = 0; #define __Pyx_MODULE_NAME "cutadapt._align" int __pyx_module_is_main_cutadapt___align = 0; /* Implementation of 'cutadapt._align' */ static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_zip; static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_MemoryError; static char __pyx_k_[] = "\000"; static char __pyx_k_A[] = "A"; static char __pyx_k_B[] = "B"; static char __pyx_k_C[] = "C"; static char __pyx_k_D[] = "D"; static char __pyx_k_G[] = "G"; static char __pyx_k_H[] = "H"; static char __pyx_k_K[] = "K"; static char __pyx_k_M[] = "M"; static char __pyx_k_N[] = "N"; static char __pyx_k_R[] = "R"; static char __pyx_k_S[] = "S"; static char __pyx_k_T[] = "T"; static char __pyx_k_U[] = "U"; static char __pyx_k_V[] = "V"; static char __pyx_k_W[] = "W"; static char __pyx_k_X[] = "X"; static char __pyx_k_Y[] = "Y"; static char __pyx_k_c[] = "c"; static char __pyx_k_d[] = "d"; static char __pyx_k_i[] = "i"; static char __pyx_k_j[] = "j"; static char __pyx_k_m[] = "m"; static char __pyx_k_n[] = "n"; static char __pyx_k_r[] = "r"; static char __pyx_k_t[] = "t"; static char __pyx_k_v[] = "v"; static char __pyx_k__5[] = " "; static char __pyx_k__6[] = " "; static char __pyx_k__7[] = " "; static char __pyx_k__8[] = "\n"; static char __pyx_k__19[] = "_"; static char __pyx_k_doc[] = "__doc__"; static char __pyx_k_ref[] = "ref"; static char __pyx_k_row[] = "row"; static char __pyx_k_str[] = "__str__"; static char __pyx_k_zip[] = "zip"; static char __pyx_k_0_2d[] = "{0:2d}"; static char __pyx_k_args[] = "args"; static char __pyx_k_cost[] = "cost"; static char __pyx_k_init[] = "__init__"; static char __pyx_k_join[] = "join"; static char __pyx_k_main[] = "__main__"; static char __pyx_k_rows[] = "_rows"; static char __pyx_k_self[] = "self"; static char __pyx_k_send[] = "send"; static char __pyx_k_test[] = "__test__"; static char __pyx_k_ascii[] = "ascii"; static char __pyx_k_close[] = "close"; static char __pyx_k_flags[] = "flags"; static char __pyx_k_items[] = "items"; static char __pyx_k_lower[] = "lower"; static char __pyx_k_q_ptr[] = "q_ptr"; static char __pyx_k_query[] = "query"; static char __pyx_k_r_ptr[] = "r_ptr"; static char __pyx_k_range[] = "range"; static char __pyx_k_rjust[] = "rjust"; static char __pyx_k_throw[] = "throw"; static char __pyx_k_encode[] = "encode"; static char __pyx_k_format[] = "format"; static char __pyx_k_length[] = "length"; static char __pyx_k_locate[] = "locate"; static char __pyx_k_module[] = "__module__"; static char __pyx_k_rows_2[] = "rows"; static char __pyx_k_aligner[] = "aligner"; static char __pyx_k_genexpr[] = "genexpr"; static char __pyx_k_matches[] = "matches"; static char __pyx_k_prepare[] = "__prepare__"; static char __pyx_k_DPMatrix[] = "DPMatrix"; static char __pyx_k_qualname[] = "__qualname__"; static char __pyx_k_metaclass[] = "__metaclass__"; static char __pyx_k_ref_bytes[] = "ref_bytes"; static char __pyx_k_reference[] = "reference"; static char __pyx_k_set_entry[] = "set_entry"; static char __pyx_k_translate[] = "translate"; static char __pyx_k_ValueError[] = "ValueError"; static char __pyx_k_acgt_table[] = "_acgt_table"; static char __pyx_k_MemoryError[] = "MemoryError"; static char __pyx_k_iupac_table[] = "_iupac_table"; static char __pyx_k_min_overlap[] = "min_overlap"; static char __pyx_k_query_bytes[] = "query_bytes"; static char __pyx_k_wildcard_ref[] = "wildcard_ref"; static char __pyx_k_compare_ascii[] = "compare_ascii"; static char __pyx_k_DPMatrix___str[] = "DPMatrix.__str__"; static char __pyx_k_max_error_rate[] = "max_error_rate"; static char __pyx_k_wildcard_query[] = "wildcard_query"; static char __pyx_k_DPMatrix___init[] = "DPMatrix.__init__"; static char __pyx_k_cutadapt__align[] = "cutadapt._align"; static char __pyx_k_compare_prefixes[] = "compare_prefixes"; static char __pyx_k_DPMatrix_set_entry[] = "DPMatrix.set_entry"; static char __pyx_k_Matches_cost_0_mismatches_cost[] = "\n\t\tMatches cost 0, mismatches cost 1. Only insertion/deletion costs can be\n\t\tchanged.\n\t\t"; static char __pyx_k_The_dynamic_programming_matrix[] = "\n\t\tThe dynamic programming matrix as a DPMatrix object. This attribute is\n\t\tusually None, unless debugging has been enabled with enable_debug().\n\t\t"; static char __pyx_k_DPMatrix___str___locals_genexpr[] = "DPMatrix.__str__..genexpr"; static char __pyx_k_Insertion_deletion_cost_must_be[] = "Insertion/deletion cost must be at leat 1"; static char __pyx_k_Representation_of_the_dynamic_p[] = "\n\tRepresentation of the dynamic-programming matrix.\n\n\tThis used only when debugging is enabled in the Aligner class since the\n\tmatrix is normally not stored in full.\n\n\tEntries in the matrix may be None, in which case that value was not\n\tcomputed.\n\t"; static char __pyx_k_home_marcel_scm_cutadapt_cutada[] = "/home/marcel/scm/cutadapt/cutadapt/_align.pyx"; static char __pyx_k_Minimum_overlap_must_be_at_least[] = "Minimum overlap must be at least 1"; static PyObject *__pyx_kp_b_; static PyObject *__pyx_kp_s_0_2d; static PyObject *__pyx_n_s_A; static PyObject *__pyx_n_s_B; static PyObject *__pyx_n_s_C; static PyObject *__pyx_n_s_D; static PyObject *__pyx_n_s_DPMatrix; static PyObject *__pyx_n_s_DPMatrix___init; static PyObject *__pyx_n_s_DPMatrix___str; static PyObject *__pyx_n_s_DPMatrix___str___locals_genexpr; static PyObject *__pyx_n_s_DPMatrix_set_entry; static PyObject *__pyx_n_s_G; static PyObject *__pyx_n_s_H; static PyObject *__pyx_kp_s_Insertion_deletion_cost_must_be; static PyObject *__pyx_n_s_K; static PyObject *__pyx_n_s_M; static PyObject *__pyx_n_s_MemoryError; static PyObject *__pyx_kp_s_Minimum_overlap_must_be_at_least; static PyObject *__pyx_n_s_N; static PyObject *__pyx_n_s_R; static PyObject *__pyx_kp_s_Representation_of_the_dynamic_p; static PyObject *__pyx_n_s_S; static PyObject *__pyx_n_s_T; static PyObject *__pyx_n_s_U; static PyObject *__pyx_n_s_V; static PyObject *__pyx_n_s_ValueError; static PyObject *__pyx_n_s_W; static PyObject *__pyx_n_s_X; static PyObject *__pyx_n_s_Y; static PyObject *__pyx_n_s__19; static PyObject *__pyx_kp_s__5; static PyObject *__pyx_kp_s__6; static PyObject *__pyx_kp_s__7; static PyObject *__pyx_kp_s__8; static PyObject *__pyx_n_s_acgt_table; static PyObject *__pyx_n_s_aligner; static PyObject *__pyx_n_s_args; static PyObject *__pyx_n_s_ascii; static PyObject *__pyx_n_s_c; static PyObject *__pyx_n_s_close; static PyObject *__pyx_n_s_compare_ascii; static PyObject *__pyx_n_s_compare_prefixes; static PyObject *__pyx_n_s_cost; static PyObject *__pyx_n_s_cutadapt__align; static PyObject *__pyx_n_s_d; static PyObject *__pyx_n_s_doc; static PyObject *__pyx_n_s_encode; static PyObject *__pyx_n_s_flags; static PyObject *__pyx_n_s_format; static PyObject *__pyx_n_s_genexpr; static PyObject *__pyx_kp_s_home_marcel_scm_cutadapt_cutada; static PyObject *__pyx_n_s_i; static PyObject *__pyx_n_s_init; static PyObject *__pyx_n_s_items; static PyObject *__pyx_n_s_iupac_table; static PyObject *__pyx_n_s_j; static PyObject *__pyx_n_s_join; static PyObject *__pyx_n_s_length; static PyObject *__pyx_n_s_locate; static PyObject *__pyx_n_s_lower; static PyObject *__pyx_n_s_m; static PyObject *__pyx_n_s_main; static PyObject *__pyx_n_s_matches; static PyObject *__pyx_n_s_max_error_rate; static PyObject *__pyx_n_s_metaclass; static PyObject *__pyx_n_s_min_overlap; static PyObject *__pyx_n_s_module; static PyObject *__pyx_n_s_n; static PyObject *__pyx_n_s_prepare; static PyObject *__pyx_n_s_q_ptr; static PyObject *__pyx_n_s_qualname; static PyObject *__pyx_n_s_query; static PyObject *__pyx_n_s_query_bytes; static PyObject *__pyx_n_s_r; static PyObject *__pyx_n_s_r_ptr; static PyObject *__pyx_n_s_range; static PyObject *__pyx_n_s_ref; static PyObject *__pyx_n_s_ref_bytes; static PyObject *__pyx_n_s_reference; static PyObject *__pyx_n_s_rjust; static PyObject *__pyx_n_s_row; static PyObject *__pyx_n_s_rows; static PyObject *__pyx_n_s_rows_2; static PyObject *__pyx_n_s_self; static PyObject *__pyx_n_s_send; static PyObject *__pyx_n_s_set_entry; static PyObject *__pyx_n_s_str; static PyObject *__pyx_n_s_t; static PyObject *__pyx_n_s_test; static PyObject *__pyx_n_s_throw; static PyObject *__pyx_n_s_translate; static PyObject *__pyx_n_s_v; static PyObject *__pyx_n_s_wildcard_query; static PyObject *__pyx_n_s_wildcard_ref; static PyObject *__pyx_n_s_zip; static PyObject *__pyx_pf_8cutadapt_6_align__acgt_table(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_8cutadapt_6_align_2_iupac_table(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_8cutadapt_6_align_8DPMatrix___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_query); /* proto */ static PyObject *__pyx_pf_8cutadapt_6_align_8DPMatrix_2set_entry(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_i, int __pyx_v_j, PyObject *__pyx_v_cost); /* proto */ static PyObject *__pyx_pf_8cutadapt_6_align_8DPMatrix_7__str___genexpr(PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_8cutadapt_6_align_8DPMatrix_7__str___3genexpr(PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_8cutadapt_6_align_8DPMatrix_4__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static int __pyx_pf_8cutadapt_6_align_7Aligner___cinit__(struct __pyx_obj_8cutadapt_6_align_Aligner *__pyx_v_self, PyObject *__pyx_v_reference, double __pyx_v_max_error_rate, int __pyx_v_flags, int __pyx_v_wildcard_ref, int __pyx_v_wildcard_query); /* proto */ static PyObject *__pyx_pf_8cutadapt_6_align_7Aligner_11min_overlap___get__(struct __pyx_obj_8cutadapt_6_align_Aligner *__pyx_v_self); /* proto */ static int __pyx_pf_8cutadapt_6_align_7Aligner_11min_overlap_2__set__(struct __pyx_obj_8cutadapt_6_align_Aligner *__pyx_v_self, int __pyx_v_value); /* proto */ static int __pyx_pf_8cutadapt_6_align_7Aligner_10indel_cost___set__(struct __pyx_obj_8cutadapt_6_align_Aligner *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static PyObject *__pyx_pf_8cutadapt_6_align_7Aligner_9reference___get__(struct __pyx_obj_8cutadapt_6_align_Aligner *__pyx_v_self); /* proto */ static int __pyx_pf_8cutadapt_6_align_7Aligner_9reference_2__set__(struct __pyx_obj_8cutadapt_6_align_Aligner *__pyx_v_self, PyObject *__pyx_v_reference); /* proto */ static PyObject *__pyx_pf_8cutadapt_6_align_7Aligner_8dpmatrix___get__(struct __pyx_obj_8cutadapt_6_align_Aligner *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8cutadapt_6_align_7Aligner_2enable_debug(struct __pyx_obj_8cutadapt_6_align_Aligner *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8cutadapt_6_align_7Aligner_4locate(struct __pyx_obj_8cutadapt_6_align_Aligner *__pyx_v_self, PyObject *__pyx_v_query); /* proto */ static void __pyx_pf_8cutadapt_6_align_7Aligner_6__dealloc__(struct __pyx_obj_8cutadapt_6_align_Aligner *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8cutadapt_6_align_4locate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_query, double __pyx_v_max_error_rate, int __pyx_v_flags, int __pyx_v_wildcard_ref, int __pyx_v_wildcard_query, int __pyx_v_min_overlap); /* proto */ static PyObject *__pyx_pf_8cutadapt_6_align_6compare_prefixes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ref, PyObject *__pyx_v_query, int __pyx_v_wildcard_ref, int __pyx_v_wildcard_query); /* proto */ static PyObject *__pyx_tp_new_8cutadapt_6_align_Aligner(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_8cutadapt_6_align___pyx_scope_struct____str__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_8cutadapt_6_align___pyx_scope_struct_1_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_8cutadapt_6_align___pyx_scope_struct_2_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_items = {0, &__pyx_n_s_items, 0, 0, 0}; static PyObject *__pyx_int_0; static PyObject *__pyx_int_1; static PyObject *__pyx_int_2; static PyObject *__pyx_int_4; static PyObject *__pyx_int_8; static PyObject *__pyx_int_256; static PyObject *__pyx_tuple__2; static PyObject *__pyx_tuple__3; static PyObject *__pyx_tuple__4; static PyObject *__pyx_tuple__9; static PyObject *__pyx_tuple__10; static PyObject *__pyx_tuple__11; static PyObject *__pyx_tuple__12; static PyObject *__pyx_tuple__13; static PyObject *__pyx_tuple__14; static PyObject *__pyx_tuple__15; static PyObject *__pyx_tuple__17; static PyObject *__pyx_tuple__20; static PyObject *__pyx_tuple__22; static PyObject *__pyx_tuple__24; static PyObject *__pyx_tuple__26; static PyObject *__pyx_tuple__28; static PyObject *__pyx_codeobj__16; static PyObject *__pyx_codeobj__18; static PyObject *__pyx_codeobj__21; static PyObject *__pyx_codeobj__23; static PyObject *__pyx_codeobj__25; static PyObject *__pyx_codeobj__27; static PyObject *__pyx_codeobj__29; /* "cutadapt/_align.pyx":24 * * * def _acgt_table(): # <<<<<<<<<<<<<< * """ * Return a translation table that maps A, C, G, T characters to the lower */ /* Python wrapper */ static PyObject *__pyx_pw_8cutadapt_6_align_1_acgt_table(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_8cutadapt_6_align__acgt_table[] = "\n\tReturn a translation table that maps A, C, G, T characters to the lower\n\tfour bits of a byte. Other characters (including possibly IUPAC characters)\n\tare mapped to zero.\n\n\tLowercase versions are also translated, and U is treated the same as T.\n\t"; static PyMethodDef __pyx_mdef_8cutadapt_6_align_1_acgt_table = {"_acgt_table", (PyCFunction)__pyx_pw_8cutadapt_6_align_1_acgt_table, METH_NOARGS, __pyx_doc_8cutadapt_6_align__acgt_table}; static PyObject *__pyx_pw_8cutadapt_6_align_1_acgt_table(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_acgt_table (wrapper)", 0); __pyx_r = __pyx_pf_8cutadapt_6_align__acgt_table(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8cutadapt_6_align__acgt_table(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_v_d = NULL; PyObject *__pyx_v_t = NULL; PyObject *__pyx_v_c = NULL; PyObject *__pyx_v_v = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *(*__pyx_t_4)(PyObject *); PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *(*__pyx_t_8)(PyObject *); unsigned char __pyx_t_9; long __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_acgt_table", 0); /* "cutadapt/_align.pyx":32 * Lowercase versions are also translated, and U is treated the same as T. * """ * d = dict(A=1, C=2, G=4, T=8, U=8) # <<<<<<<<<<<<<< * t = bytearray(b'\0') * 256 * for c, v in d.items(): */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_A, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_C, __pyx_int_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_G, __pyx_int_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_T, __pyx_int_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_U, __pyx_int_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_d = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "cutadapt/_align.pyx":33 * """ * d = dict(A=1, C=2, G=4, T=8, U=8) * t = bytearray(b'\0') * 256 # <<<<<<<<<<<<<< * for c, v in d.items(): * t[ord(c)] = v */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyByteArray_Type)), __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyNumber_Multiply(__pyx_t_1, __pyx_int_256); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(PyByteArray_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytearray", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_t = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "cutadapt/_align.pyx":34 * d = dict(A=1, C=2, G=4, T=8, U=8) * t = bytearray(b'\0') * 256 * for c, v in d.items(): # <<<<<<<<<<<<<< * t[ord(c)] = v * t[ord(c.lower())] = v */ __pyx_t_2 = __Pyx_PyDict_Items(__pyx_v_d); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (likely(!__pyx_t_4)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif } } else { __pyx_t_2 = __pyx_t_4(__pyx_t_1); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_2); } if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_5 = PyList_GET_ITEM(sequence, 0); __pyx_t_6 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); #else __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; __pyx_L5_unpacking_failed:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_6); __pyx_t_6 = 0; /* "cutadapt/_align.pyx":35 * t = bytearray(b'\0') * 256 * for c, v in d.items(): * t[ord(c)] = v # <<<<<<<<<<<<<< * t[ord(c.lower())] = v * return bytes(t) */ __pyx_t_9 = __Pyx_PyInt_As_unsigned_char(__pyx_v_v); if (unlikely((__pyx_t_9 == (unsigned char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = __Pyx_PyObject_Ord(__pyx_v_c); if (unlikely(__pyx_t_10 == (long)(Py_UCS4)-1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(__Pyx_SetItemInt_ByteArray(__pyx_v_t, __pyx_t_10, __pyx_t_9, long, 1, __Pyx_PyInt_From_long, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_align.pyx":36 * for c, v in d.items(): * t[ord(c)] = v * t[ord(c.lower())] = v # <<<<<<<<<<<<<< * return bytes(t) * */ __pyx_t_9 = __Pyx_PyInt_As_unsigned_char(__pyx_v_v); if (unlikely((__pyx_t_9 == (unsigned char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_lower); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (__pyx_t_5) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = __Pyx_PyObject_Ord(__pyx_t_2); if (unlikely(__pyx_t_10 == (long)(Py_UCS4)-1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__Pyx_SetItemInt_ByteArray(__pyx_v_t, __pyx_t_10, __pyx_t_9, long, 1, __Pyx_PyInt_From_long, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_align.pyx":34 * d = dict(A=1, C=2, G=4, T=8, U=8) * t = bytearray(b'\0') * 256 * for c, v in d.items(): # <<<<<<<<<<<<<< * t[ord(c)] = v * t[ord(c.lower())] = v */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cutadapt/_align.pyx":37 * t[ord(c)] = v * t[ord(c.lower())] = v * return bytes(t) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_t); __Pyx_GIVEREF(__pyx_v_t); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_t); __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "cutadapt/_align.pyx":24 * * * def _acgt_table(): # <<<<<<<<<<<<<< * """ * Return a translation table that maps A, C, G, T characters to the lower */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("cutadapt._align._acgt_table", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_d); __Pyx_XDECREF(__pyx_v_t); __Pyx_XDECREF(__pyx_v_c); __Pyx_XDECREF(__pyx_v_v); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cutadapt/_align.pyx":40 * * * def _iupac_table(): # <<<<<<<<<<<<<< * """ * Return a translation table for IUPAC characters. */ /* Python wrapper */ static PyObject *__pyx_pw_8cutadapt_6_align_3_iupac_table(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_8cutadapt_6_align_2_iupac_table[] = "\n\tReturn a translation table for IUPAC characters.\n\n\tThe table maps ASCII-encoded IUPAC nucleotide characters to bytes in which\n\tthe four least significant bits are used to represent one nucleotide each.\n\n\tWhether two characters x and y match can then be checked with the\n\texpression \"x & y != 0\".\n\t"; static PyMethodDef __pyx_mdef_8cutadapt_6_align_3_iupac_table = {"_iupac_table", (PyCFunction)__pyx_pw_8cutadapt_6_align_3_iupac_table, METH_NOARGS, __pyx_doc_8cutadapt_6_align_2_iupac_table}; static PyObject *__pyx_pw_8cutadapt_6_align_3_iupac_table(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_iupac_table (wrapper)", 0); __pyx_r = __pyx_pf_8cutadapt_6_align_2_iupac_table(__pyx_self); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8cutadapt_6_align_2_iupac_table(CYTHON_UNUSED PyObject *__pyx_self) { long __pyx_v_A; long __pyx_v_C; long __pyx_v_G; long __pyx_v_T; PyObject *__pyx_v_d = NULL; PyObject *__pyx_v_t = NULL; PyObject *__pyx_v_c = NULL; PyObject *__pyx_v_v = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *(*__pyx_t_4)(PyObject *); PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *(*__pyx_t_8)(PyObject *); unsigned char __pyx_t_9; long __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_iupac_table", 0); /* "cutadapt/_align.pyx":50 * expression "x & y != 0". * """ * A = 1 # <<<<<<<<<<<<<< * C = 2 * G = 4 */ __pyx_v_A = 1; /* "cutadapt/_align.pyx":51 * """ * A = 1 * C = 2 # <<<<<<<<<<<<<< * G = 4 * T = 8 */ __pyx_v_C = 2; /* "cutadapt/_align.pyx":52 * A = 1 * C = 2 * G = 4 # <<<<<<<<<<<<<< * T = 8 * d = dict( */ __pyx_v_G = 4; /* "cutadapt/_align.pyx":53 * C = 2 * G = 4 * T = 8 # <<<<<<<<<<<<<< * d = dict( * X=0, */ __pyx_v_T = 8; /* "cutadapt/_align.pyx":55 * T = 8 * d = dict( * X=0, # <<<<<<<<<<<<<< * A=A, * C=C, */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_X, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_align.pyx":56 * d = dict( * X=0, * A=A, # <<<<<<<<<<<<<< * C=C, * G=G, */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_A); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_A, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cutadapt/_align.pyx":57 * X=0, * A=A, * C=C, # <<<<<<<<<<<<<< * G=G, * T=T, */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_C); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_C, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cutadapt/_align.pyx":58 * A=A, * C=C, * G=G, # <<<<<<<<<<<<<< * T=T, * U=T, */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_G); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_G, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cutadapt/_align.pyx":59 * C=C, * G=G, * T=T, # <<<<<<<<<<<<<< * U=T, * R=A|G, */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_T); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_T, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cutadapt/_align.pyx":60 * G=G, * T=T, * U=T, # <<<<<<<<<<<<<< * R=A|G, * Y=C|T, */ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_T); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_U, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cutadapt/_align.pyx":61 * T=T, * U=T, * R=A|G, # <<<<<<<<<<<<<< * Y=C|T, * S=G|C, */ __pyx_t_2 = __Pyx_PyInt_From_long((__pyx_v_A | __pyx_v_G)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_R, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cutadapt/_align.pyx":62 * U=T, * R=A|G, * Y=C|T, # <<<<<<<<<<<<<< * S=G|C, * W=A|T, */ __pyx_t_2 = __Pyx_PyInt_From_long((__pyx_v_C | __pyx_v_T)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_Y, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cutadapt/_align.pyx":63 * R=A|G, * Y=C|T, * S=G|C, # <<<<<<<<<<<<<< * W=A|T, * K=G|T, */ __pyx_t_2 = __Pyx_PyInt_From_long((__pyx_v_G | __pyx_v_C)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_S, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cutadapt/_align.pyx":64 * Y=C|T, * S=G|C, * W=A|T, # <<<<<<<<<<<<<< * K=G|T, * M=A|C, */ __pyx_t_2 = __Pyx_PyInt_From_long((__pyx_v_A | __pyx_v_T)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_W, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cutadapt/_align.pyx":65 * S=G|C, * W=A|T, * K=G|T, # <<<<<<<<<<<<<< * M=A|C, * B=C|G|T, */ __pyx_t_2 = __Pyx_PyInt_From_long((__pyx_v_G | __pyx_v_T)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_K, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cutadapt/_align.pyx":66 * W=A|T, * K=G|T, * M=A|C, # <<<<<<<<<<<<<< * B=C|G|T, * D=A|G|T, */ __pyx_t_2 = __Pyx_PyInt_From_long((__pyx_v_A | __pyx_v_C)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_M, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cutadapt/_align.pyx":67 * K=G|T, * M=A|C, * B=C|G|T, # <<<<<<<<<<<<<< * D=A|G|T, * H=A|C|T, */ __pyx_t_2 = __Pyx_PyInt_From_long(((__pyx_v_C | __pyx_v_G) | __pyx_v_T)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_B, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cutadapt/_align.pyx":68 * M=A|C, * B=C|G|T, * D=A|G|T, # <<<<<<<<<<<<<< * H=A|C|T, * V=A|C|G, */ __pyx_t_2 = __Pyx_PyInt_From_long(((__pyx_v_A | __pyx_v_G) | __pyx_v_T)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_D, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cutadapt/_align.pyx":69 * B=C|G|T, * D=A|G|T, * H=A|C|T, # <<<<<<<<<<<<<< * V=A|C|G, * N=A|C|G|T */ __pyx_t_2 = __Pyx_PyInt_From_long(((__pyx_v_A | __pyx_v_C) | __pyx_v_T)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_H, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cutadapt/_align.pyx":70 * D=A|G|T, * H=A|C|T, * V=A|C|G, # <<<<<<<<<<<<<< * N=A|C|G|T * ) */ __pyx_t_2 = __Pyx_PyInt_From_long(((__pyx_v_A | __pyx_v_C) | __pyx_v_G)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_V, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cutadapt/_align.pyx":71 * H=A|C|T, * V=A|C|G, * N=A|C|G|T # <<<<<<<<<<<<<< * ) * t = bytearray(b'\0') * 256 */ __pyx_t_2 = __Pyx_PyInt_From_long((((__pyx_v_A | __pyx_v_C) | __pyx_v_G) | __pyx_v_T)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_N, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_d = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "cutadapt/_align.pyx":73 * N=A|C|G|T * ) * t = bytearray(b'\0') * 256 # <<<<<<<<<<<<<< * for c, v in d.items(): * t[ord(c)] = v */ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyByteArray_Type)), __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyNumber_Multiply(__pyx_t_1, __pyx_int_256); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(PyByteArray_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytearray", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_t = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "cutadapt/_align.pyx":74 * ) * t = bytearray(b'\0') * 256 * for c, v in d.items(): # <<<<<<<<<<<<<< * t[ord(c)] = v * t[ord(c.lower())] = v */ __pyx_t_2 = __Pyx_PyDict_Items(__pyx_v_d); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (likely(!__pyx_t_4)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif } } else { __pyx_t_2 = __pyx_t_4(__pyx_t_1); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_2); } if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_5 = PyList_GET_ITEM(sequence, 0); __pyx_t_6 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); #else __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; __pyx_L5_unpacking_failed:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_6); __pyx_t_6 = 0; /* "cutadapt/_align.pyx":75 * t = bytearray(b'\0') * 256 * for c, v in d.items(): * t[ord(c)] = v # <<<<<<<<<<<<<< * t[ord(c.lower())] = v * return bytes(t) */ __pyx_t_9 = __Pyx_PyInt_As_unsigned_char(__pyx_v_v); if (unlikely((__pyx_t_9 == (unsigned char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = __Pyx_PyObject_Ord(__pyx_v_c); if (unlikely(__pyx_t_10 == (long)(Py_UCS4)-1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(__Pyx_SetItemInt_ByteArray(__pyx_v_t, __pyx_t_10, __pyx_t_9, long, 1, __Pyx_PyInt_From_long, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_align.pyx":76 * for c, v in d.items(): * t[ord(c)] = v * t[ord(c.lower())] = v # <<<<<<<<<<<<<< * return bytes(t) * */ __pyx_t_9 = __Pyx_PyInt_As_unsigned_char(__pyx_v_v); if (unlikely((__pyx_t_9 == (unsigned char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_lower); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (__pyx_t_5) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = __Pyx_PyObject_Ord(__pyx_t_2); if (unlikely(__pyx_t_10 == (long)(Py_UCS4)-1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__Pyx_SetItemInt_ByteArray(__pyx_v_t, __pyx_t_10, __pyx_t_9, long, 1, __Pyx_PyInt_From_long, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_align.pyx":74 * ) * t = bytearray(b'\0') * 256 * for c, v in d.items(): # <<<<<<<<<<<<<< * t[ord(c)] = v * t[ord(c.lower())] = v */ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cutadapt/_align.pyx":77 * t[ord(c)] = v * t[ord(c.lower())] = v * return bytes(t) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_t); __Pyx_GIVEREF(__pyx_v_t); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_t); __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "cutadapt/_align.pyx":40 * * * def _iupac_table(): # <<<<<<<<<<<<<< * """ * Return a translation table for IUPAC characters. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("cutadapt._align._iupac_table", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_d); __Pyx_XDECREF(__pyx_v_t); __Pyx_XDECREF(__pyx_v_c); __Pyx_XDECREF(__pyx_v_v); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cutadapt/_align.pyx":94 * computed. * """ * def __init__(self, reference, query): # <<<<<<<<<<<<<< * m = len(reference) * n = len(query) */ /* Python wrapper */ static PyObject *__pyx_pw_8cutadapt_6_align_8DPMatrix_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_8cutadapt_6_align_8DPMatrix_1__init__ = {"__init__", (PyCFunction)__pyx_pw_8cutadapt_6_align_8DPMatrix_1__init__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_8cutadapt_6_align_8DPMatrix_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_reference = 0; PyObject *__pyx_v_query = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_reference,&__pyx_n_s_query,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_reference)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_query)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_self = values[0]; __pyx_v_reference = values[1]; __pyx_v_query = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cutadapt._align.DPMatrix.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8cutadapt_6_align_8DPMatrix___init__(__pyx_self, __pyx_v_self, __pyx_v_reference, __pyx_v_query); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8cutadapt_6_align_8DPMatrix___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_query) { PyObject *__pyx_v_m = NULL; PyObject *__pyx_v_n = NULL; CYTHON_UNUSED PyObject *__pyx_v__ = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *(*__pyx_t_5)(PyObject *); PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "cutadapt/_align.pyx":95 * """ * def __init__(self, reference, query): * m = len(reference) # <<<<<<<<<<<<<< * n = len(query) * self._rows = [ [None] * (n+1) for _ in range(m + 1) ] */ __pyx_t_1 = PyObject_Length(__pyx_v_reference); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_m = __pyx_t_2; __pyx_t_2 = 0; /* "cutadapt/_align.pyx":96 * def __init__(self, reference, query): * m = len(reference) * n = len(query) # <<<<<<<<<<<<<< * self._rows = [ [None] * (n+1) for _ in range(m + 1) ] * self.reference = reference */ __pyx_t_1 = PyObject_Length(__pyx_v_query); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_v_n = __pyx_t_2; __pyx_t_2 = 0; /* "cutadapt/_align.pyx":97 * m = len(reference) * n = len(query) * self._rows = [ [None] * (n+1) for _ in range(m + 1) ] # <<<<<<<<<<<<<< * self.reference = reference * self.query = query */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_m, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_1 = 0; __pyx_t_5 = NULL; } else { __pyx_t_1 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { if (likely(!__pyx_t_5)) { if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); #endif } } else { __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_3); } __Pyx_XDECREF_SET(__pyx_v__, __pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_n, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyList_SET_ITEM(__pyx_t_6, 0, Py_None); { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_temp)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_temp); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = __pyx_temp; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_rows, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cutadapt/_align.pyx":98 * n = len(query) * self._rows = [ [None] * (n+1) for _ in range(m + 1) ] * self.reference = reference # <<<<<<<<<<<<<< * self.query = query * */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_reference, __pyx_v_reference) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_align.pyx":99 * self._rows = [ [None] * (n+1) for _ in range(m + 1) ] * self.reference = reference * self.query = query # <<<<<<<<<<<<<< * * def set_entry(self, int i, int j, cost): */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_query, __pyx_v_query) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_align.pyx":94 * computed. * """ * def __init__(self, reference, query): # <<<<<<<<<<<<<< * m = len(reference) * n = len(query) */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("cutadapt._align.DPMatrix.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_m); __Pyx_XDECREF(__pyx_v_n); __Pyx_XDECREF(__pyx_v__); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cutadapt/_align.pyx":101 * self.query = query * * def set_entry(self, int i, int j, cost): # <<<<<<<<<<<<<< * """ * Set an entry in the dynamic programming matrix. */ /* Python wrapper */ static PyObject *__pyx_pw_8cutadapt_6_align_8DPMatrix_3set_entry(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8cutadapt_6_align_8DPMatrix_2set_entry[] = "\n\t\tSet an entry in the dynamic programming matrix.\n\t\t"; static PyMethodDef __pyx_mdef_8cutadapt_6_align_8DPMatrix_3set_entry = {"set_entry", (PyCFunction)__pyx_pw_8cutadapt_6_align_8DPMatrix_3set_entry, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8cutadapt_6_align_8DPMatrix_2set_entry}; static PyObject *__pyx_pw_8cutadapt_6_align_8DPMatrix_3set_entry(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; int __pyx_v_i; int __pyx_v_j; PyObject *__pyx_v_cost = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_entry (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_i,&__pyx_n_s_j,&__pyx_n_s_cost,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("set_entry", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_j)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("set_entry", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cost)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("set_entry", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_entry") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_self = values[0]; __pyx_v_i = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_j = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_j == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_cost = values[3]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("set_entry", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cutadapt._align.DPMatrix.set_entry", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8cutadapt_6_align_8DPMatrix_2set_entry(__pyx_self, __pyx_v_self, __pyx_v_i, __pyx_v_j, __pyx_v_cost); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8cutadapt_6_align_8DPMatrix_2set_entry(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, int __pyx_v_i, int __pyx_v_j, PyObject *__pyx_v_cost) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_entry", 0); /* "cutadapt/_align.pyx":105 * Set an entry in the dynamic programming matrix. * """ * self._rows[i][j] = cost # <<<<<<<<<<<<<< * * def __str__(self): */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_rows); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__Pyx_SetItemInt(__pyx_t_2, __pyx_v_j, __pyx_v_cost, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cutadapt/_align.pyx":101 * self.query = query * * def set_entry(self, int i, int j, cost): # <<<<<<<<<<<<<< * """ * Set an entry in the dynamic programming matrix. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cutadapt._align.DPMatrix.set_entry", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cutadapt/_align.pyx":107 * self._rows[i][j] = cost * * def __str__(self): # <<<<<<<<<<<<<< * """ * Return a representation of the matrix as a string. */ /* Python wrapper */ static PyObject *__pyx_pw_8cutadapt_6_align_8DPMatrix_5__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static char __pyx_doc_8cutadapt_6_align_8DPMatrix_4__str__[] = "\n\t\tReturn a representation of the matrix as a string.\n\t\t"; static PyMethodDef __pyx_mdef_8cutadapt_6_align_8DPMatrix_5__str__ = {"__str__", (PyCFunction)__pyx_pw_8cutadapt_6_align_8DPMatrix_5__str__, METH_O, __pyx_doc_8cutadapt_6_align_8DPMatrix_4__str__}; static PyObject *__pyx_pw_8cutadapt_6_align_8DPMatrix_5__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); __pyx_r = __pyx_pf_8cutadapt_6_align_8DPMatrix_4__str__(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_8cutadapt_6_align_8DPMatrix_7__str___2generator(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* "cutadapt/_align.pyx":111 * Return a representation of the matrix as a string. * """ * rows = [' ' + ' '.join(c.rjust(2) for c in self.query)] # <<<<<<<<<<<<<< * for c, row in zip(' ' + self.reference, self._rows): * r = c + ' ' + ' '.join(' ' if v is None else '{0:2d}'.format(v) for v in row) */ static PyObject *__pyx_pf_8cutadapt_6_align_8DPMatrix_7__str___genexpr(PyObject *__pyx_self) { struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_1_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_1_genexpr *)__pyx_tp_new_8cutadapt_6_align___pyx_scope_struct_1_genexpr(__pyx_ptype_8cutadapt_6_align___pyx_scope_struct_1_genexpr, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_cur_scope); __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct____str__ *) __pyx_self; __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_8cutadapt_6_align_8DPMatrix_7__str___2generator, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_DPMatrix___str___locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("cutadapt._align.DPMatrix.__str__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_8cutadapt_6_align_8DPMatrix_7__str___2generator(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_1_genexpr *__pyx_cur_scope = ((struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_1_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; Py_ssize_t __pyx_t_3; PyObject *(*__pyx_t_4)(PyObject *); PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L6_resume_from_yield; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self, __pyx_n_s_query); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (likely(!__pyx_t_4)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } } else { __pyx_t_1 = __pyx_t_4(__pyx_t_2); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_1); } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_c); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_c, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_c, __pyx_n_s_rjust); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; __Pyx_XGIVEREF(__pyx_t_2); __pyx_cur_scope->__pyx_t_0 = __pyx_t_2; __pyx_cur_scope->__pyx_t_1 = __pyx_t_3; __pyx_cur_scope->__pyx_t_2 = __pyx_t_4; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L6_resume_from_yield:; __pyx_t_2 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_2); __pyx_t_3 = __pyx_cur_scope->__pyx_t_1; __pyx_t_4 = __pyx_cur_scope->__pyx_t_2; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_8cutadapt_6_align_8DPMatrix_7__str___5generator1(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* "cutadapt/_align.pyx":113 * rows = [' ' + ' '.join(c.rjust(2) for c in self.query)] * for c, row in zip(' ' + self.reference, self._rows): * r = c + ' ' + ' '.join(' ' if v is None else '{0:2d}'.format(v) for v in row) # <<<<<<<<<<<<<< * rows.append(r) * return '\n'.join(rows) */ static PyObject *__pyx_pf_8cutadapt_6_align_8DPMatrix_7__str___3genexpr(PyObject *__pyx_self) { struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_2_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); __pyx_cur_scope = (struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_2_genexpr *)__pyx_tp_new_8cutadapt_6_align___pyx_scope_struct_2_genexpr(__pyx_ptype_8cutadapt_6_align___pyx_scope_struct_2_genexpr, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_cur_scope); __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct____str__ *) __pyx_self; __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_8cutadapt_6_align_8DPMatrix_7__str___5generator1, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_DPMatrix___str___locals_genexpr); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("cutadapt._align.DPMatrix.__str__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_8cutadapt_6_align_8DPMatrix_7__str___5generator1(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_2_genexpr *__pyx_cur_scope = ((struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_2_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *(*__pyx_t_3)(PyObject *); PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L6_resume_from_yield; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_row)) { __Pyx_RaiseClosureNameError("row"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_row)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_row)) { __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_row; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_row); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } for (;;) { if (likely(!__pyx_t_3)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif } } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_4); } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_v); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_v, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = (__pyx_cur_scope->__pyx_v_v == Py_None); if ((__pyx_t_5 != 0)) { __Pyx_INCREF(__pyx_kp_s__5); __pyx_t_4 = __pyx_kp_s__5; } else { __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_2d, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (!__pyx_t_8) { __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_cur_scope->__pyx_v_v); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); } else { __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_v); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_v); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_cur_scope->__pyx_v_v); __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_4 = __pyx_t_6; __pyx_t_6 = 0; } __pyx_r = __pyx_t_4; __pyx_t_4 = 0; __Pyx_XGIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; __pyx_cur_scope->__pyx_t_2 = __pyx_t_3; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L6_resume_from_yield:; __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cutadapt/_align.pyx":107 * self._rows[i][j] = cost * * def __str__(self): # <<<<<<<<<<<<<< * """ * Return a representation of the matrix as a string. */ static PyObject *__pyx_pf_8cutadapt_6_align_8DPMatrix_4__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct____str__ *__pyx_cur_scope; PyObject *__pyx_v_rows = NULL; PyObject *__pyx_v_c = NULL; PyObject *__pyx_v_r = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; Py_ssize_t __pyx_t_4; PyObject *(*__pyx_t_5)(PyObject *); PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *(*__pyx_t_8)(PyObject *); int __pyx_t_9; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); __pyx_cur_scope = (struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct____str__ *)__pyx_tp_new_8cutadapt_6_align___pyx_scope_struct____str__(__pyx_ptype_8cutadapt_6_align___pyx_scope_struct____str__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_cur_scope); __pyx_cur_scope->__pyx_v_self = __pyx_v_self; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self); /* "cutadapt/_align.pyx":111 * Return a representation of the matrix as a string. * """ * rows = [' ' + ' '.join(c.rjust(2) for c in self.query)] # <<<<<<<<<<<<<< * for c, row in zip(' ' + self.reference, self._rows): * r = c + ' ' + ' '.join(' ' if v is None else '{0:2d}'.format(v) for v in row) */ __pyx_t_1 = __pyx_pf_8cutadapt_6_align_8DPMatrix_7__str___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__7, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Add(__pyx_kp_s__6, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; __pyx_v_rows = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "cutadapt/_align.pyx":112 * """ * rows = [' ' + ' '.join(c.rjust(2) for c in self.query)] * for c, row in zip(' ' + self.reference, self._rows): # <<<<<<<<<<<<<< * r = c + ' ' + ' '.join(' ' if v is None else '{0:2d}'.format(v) for v in row) * rows.append(r) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_reference); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyNumber_Add(__pyx_kp_s__7, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_rows); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (likely(!__pyx_t_5)) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); #endif } } else { __pyx_t_2 = __pyx_t_5(__pyx_t_3); if (unlikely(!__pyx_t_2)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_2); } if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { PyObject* sequence = __pyx_t_2; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else Py_ssize_t size = PySequence_Size(sequence); #endif if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); } else { __pyx_t_1 = PyList_GET_ITEM(sequence, 0); __pyx_t_6 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_6); #else __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; index = 0; __pyx_t_1 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; __pyx_L5_unpacking_failed:; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_row); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_row, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; /* "cutadapt/_align.pyx":113 * rows = [' ' + ' '.join(c.rjust(2) for c in self.query)] * for c, row in zip(' ' + self.reference, self._rows): * r = c + ' ' + ' '.join(' ' if v is None else '{0:2d}'.format(v) for v in row) # <<<<<<<<<<<<<< * rows.append(r) * return '\n'.join(rows) */ __pyx_t_2 = PyNumber_Add(__pyx_v_c, __pyx_kp_s__7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __pyx_pf_8cutadapt_6_align_8DPMatrix_7__str___3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__7, __pyx_t_6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_r, __pyx_t_6); __pyx_t_6 = 0; /* "cutadapt/_align.pyx":114 * for c, row in zip(' ' + self.reference, self._rows): * r = c + ' ' + ' '.join(' ' if v is None else '{0:2d}'.format(v) for v in row) * rows.append(r) # <<<<<<<<<<<<<< * return '\n'.join(rows) * */ __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_rows, __pyx_v_r); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_align.pyx":112 * """ * rows = [' ' + ' '.join(c.rjust(2) for c in self.query)] * for c, row in zip(' ' + self.reference, self._rows): # <<<<<<<<<<<<<< * r = c + ' ' + ' '.join(' ' if v is None else '{0:2d}'.format(v) for v in row) * rows.append(r) */ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cutadapt/_align.pyx":115 * r = c + ' ' + ' '.join(' ' if v is None else '{0:2d}'.format(v) for v in row) * rows.append(r) * return '\n'.join(rows) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__8, __pyx_v_rows); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "cutadapt/_align.pyx":107 * self._rows[i][j] = cost * * def __str__(self): # <<<<<<<<<<<<<< * """ * Return a representation of the matrix as a string. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("cutadapt._align.DPMatrix.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_rows); __Pyx_XDECREF(__pyx_v_c); __Pyx_XDECREF(__pyx_v_r); __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cutadapt/_align.pyx":194 * cdef str str_reference * * def __cinit__(self, str reference, double max_error_rate, int flags=SEMIGLOBAL, bint wildcard_ref=False, bint wildcard_query=False): # <<<<<<<<<<<<<< * self.max_error_rate = max_error_rate * self.flags = flags */ /* Python wrapper */ static int __pyx_pw_8cutadapt_6_align_7Aligner_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_8cutadapt_6_align_7Aligner_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_reference = 0; double __pyx_v_max_error_rate; int __pyx_v_flags; int __pyx_v_wildcard_ref; int __pyx_v_wildcard_query; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_reference,&__pyx_n_s_max_error_rate,&__pyx_n_s_flags,&__pyx_n_s_wildcard_ref,&__pyx_n_s_wildcard_query,0}; PyObject* values[5] = {0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_reference)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_max_error_rate)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flags); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_wildcard_ref); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_wildcard_query); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_reference = ((PyObject*)values[0]); __pyx_v_max_error_rate = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_max_error_rate == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L3_error;} if (values[2]) { __pyx_v_flags = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_flags = ((int)15); } if (values[3]) { __pyx_v_wildcard_ref = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_wildcard_ref == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_wildcard_ref = ((int)0); } if (values[4]) { __pyx_v_wildcard_query = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_wildcard_query == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_wildcard_query = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cutadapt._align.Aligner.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_reference), (&PyString_Type), 1, "reference", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_8cutadapt_6_align_7Aligner___cinit__(((struct __pyx_obj_8cutadapt_6_align_Aligner *)__pyx_v_self), __pyx_v_reference, __pyx_v_max_error_rate, __pyx_v_flags, __pyx_v_wildcard_ref, __pyx_v_wildcard_query); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8cutadapt_6_align_7Aligner___cinit__(struct __pyx_obj_8cutadapt_6_align_Aligner *__pyx_v_self, PyObject *__pyx_v_reference, double __pyx_v_max_error_rate, int __pyx_v_flags, int __pyx_v_wildcard_ref, int __pyx_v_wildcard_query) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); /* "cutadapt/_align.pyx":195 * * def __cinit__(self, str reference, double max_error_rate, int flags=SEMIGLOBAL, bint wildcard_ref=False, bint wildcard_query=False): * self.max_error_rate = max_error_rate # <<<<<<<<<<<<<< * self.flags = flags * self.wildcard_ref = wildcard_ref */ __pyx_v_self->max_error_rate = __pyx_v_max_error_rate; /* "cutadapt/_align.pyx":196 * def __cinit__(self, str reference, double max_error_rate, int flags=SEMIGLOBAL, bint wildcard_ref=False, bint wildcard_query=False): * self.max_error_rate = max_error_rate * self.flags = flags # <<<<<<<<<<<<<< * self.wildcard_ref = wildcard_ref * self.wildcard_query = wildcard_query */ __pyx_v_self->flags = __pyx_v_flags; /* "cutadapt/_align.pyx":197 * self.max_error_rate = max_error_rate * self.flags = flags * self.wildcard_ref = wildcard_ref # <<<<<<<<<<<<<< * self.wildcard_query = wildcard_query * self.str_reference = reference */ __pyx_v_self->wildcard_ref = __pyx_v_wildcard_ref; /* "cutadapt/_align.pyx":198 * self.flags = flags * self.wildcard_ref = wildcard_ref * self.wildcard_query = wildcard_query # <<<<<<<<<<<<<< * self.str_reference = reference * self.reference = reference */ __pyx_v_self->wildcard_query = __pyx_v_wildcard_query; /* "cutadapt/_align.pyx":199 * self.wildcard_ref = wildcard_ref * self.wildcard_query = wildcard_query * self.str_reference = reference # <<<<<<<<<<<<<< * self.reference = reference * self._min_overlap = 1 */ __Pyx_INCREF(__pyx_v_reference); __Pyx_GIVEREF(__pyx_v_reference); __Pyx_GOTREF(__pyx_v_self->str_reference); __Pyx_DECREF(__pyx_v_self->str_reference); __pyx_v_self->str_reference = __pyx_v_reference; /* "cutadapt/_align.pyx":200 * self.wildcard_query = wildcard_query * self.str_reference = reference * self.reference = reference # <<<<<<<<<<<<<< * self._min_overlap = 1 * self.debug = False */ if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reference, __pyx_v_reference) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_align.pyx":201 * self.str_reference = reference * self.reference = reference * self._min_overlap = 1 # <<<<<<<<<<<<<< * self.debug = False * self._dpmatrix = None */ __pyx_v_self->_min_overlap = 1; /* "cutadapt/_align.pyx":202 * self.reference = reference * self._min_overlap = 1 * self.debug = False # <<<<<<<<<<<<<< * self._dpmatrix = None * self._insertion_cost = 1 */ __pyx_v_self->debug = 0; /* "cutadapt/_align.pyx":203 * self._min_overlap = 1 * self.debug = False * self._dpmatrix = None # <<<<<<<<<<<<<< * self._insertion_cost = 1 * self._deletion_cost = 1 */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->_dpmatrix); __Pyx_DECREF(__pyx_v_self->_dpmatrix); __pyx_v_self->_dpmatrix = Py_None; /* "cutadapt/_align.pyx":204 * self.debug = False * self._dpmatrix = None * self._insertion_cost = 1 # <<<<<<<<<<<<<< * self._deletion_cost = 1 * */ __pyx_v_self->_insertion_cost = 1; /* "cutadapt/_align.pyx":205 * self._dpmatrix = None * self._insertion_cost = 1 * self._deletion_cost = 1 # <<<<<<<<<<<<<< * * property min_overlap: */ __pyx_v_self->_deletion_cost = 1; /* "cutadapt/_align.pyx":194 * cdef str str_reference * * def __cinit__(self, str reference, double max_error_rate, int flags=SEMIGLOBAL, bint wildcard_ref=False, bint wildcard_query=False): # <<<<<<<<<<<<<< * self.max_error_rate = max_error_rate * self.flags = flags */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_AddTraceback("cutadapt._align.Aligner.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cutadapt/_align.pyx":208 * * property min_overlap: * def __get__(self): # <<<<<<<<<<<<<< * return self._min_overlap * */ /* Python wrapper */ static PyObject *__pyx_pw_8cutadapt_6_align_7Aligner_11min_overlap_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_8cutadapt_6_align_7Aligner_11min_overlap_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_8cutadapt_6_align_7Aligner_11min_overlap___get__(((struct __pyx_obj_8cutadapt_6_align_Aligner *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8cutadapt_6_align_7Aligner_11min_overlap___get__(struct __pyx_obj_8cutadapt_6_align_Aligner *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); /* "cutadapt/_align.pyx":209 * property min_overlap: * def __get__(self): * return self._min_overlap # <<<<<<<<<<<<<< * * def __set__(self, int value): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_min_overlap); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cutadapt/_align.pyx":208 * * property min_overlap: * def __get__(self): # <<<<<<<<<<<<<< * return self._min_overlap * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cutadapt._align.Aligner.min_overlap.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cutadapt/_align.pyx":211 * return self._min_overlap * * def __set__(self, int value): # <<<<<<<<<<<<<< * if value < 1: * raise ValueError('Minimum overlap must be at least 1') */ /* Python wrapper */ static int __pyx_pw_8cutadapt_6_align_7Aligner_11min_overlap_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/ static int __pyx_pw_8cutadapt_6_align_7Aligner_11min_overlap_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) { int __pyx_v_value; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); assert(__pyx_arg_value); { __pyx_v_value = __Pyx_PyInt_As_int(__pyx_arg_value); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; __Pyx_AddTraceback("cutadapt._align.Aligner.min_overlap.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8cutadapt_6_align_7Aligner_11min_overlap_2__set__(((struct __pyx_obj_8cutadapt_6_align_Aligner *)__pyx_v_self), ((int)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8cutadapt_6_align_7Aligner_11min_overlap_2__set__(struct __pyx_obj_8cutadapt_6_align_Aligner *__pyx_v_self, int __pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); /* "cutadapt/_align.pyx":212 * * def __set__(self, int value): * if value < 1: # <<<<<<<<<<<<<< * raise ValueError('Minimum overlap must be at least 1') * self._min_overlap = value */ __pyx_t_1 = ((__pyx_v_value < 1) != 0); if (__pyx_t_1) { /* "cutadapt/_align.pyx":213 * def __set__(self, int value): * if value < 1: * raise ValueError('Minimum overlap must be at least 1') # <<<<<<<<<<<<<< * self._min_overlap = value * */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_align.pyx":212 * * def __set__(self, int value): * if value < 1: # <<<<<<<<<<<<<< * raise ValueError('Minimum overlap must be at least 1') * self._min_overlap = value */ } /* "cutadapt/_align.pyx":214 * if value < 1: * raise ValueError('Minimum overlap must be at least 1') * self._min_overlap = value # <<<<<<<<<<<<<< * * property indel_cost: */ __pyx_v_self->_min_overlap = __pyx_v_value; /* "cutadapt/_align.pyx":211 * return self._min_overlap * * def __set__(self, int value): # <<<<<<<<<<<<<< * if value < 1: * raise ValueError('Minimum overlap must be at least 1') */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cutadapt._align.Aligner.min_overlap.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cutadapt/_align.pyx":221 * changed. * """ * def __set__(self, value): # <<<<<<<<<<<<<< * if value < 1: * raise ValueError('Insertion/deletion cost must be at leat 1') */ /* Python wrapper */ static int __pyx_pw_8cutadapt_6_align_7Aligner_10indel_cost_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_8cutadapt_6_align_7Aligner_10indel_cost_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_8cutadapt_6_align_7Aligner_10indel_cost___set__(((struct __pyx_obj_8cutadapt_6_align_Aligner *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8cutadapt_6_align_7Aligner_10indel_cost___set__(struct __pyx_obj_8cutadapt_6_align_Aligner *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); /* "cutadapt/_align.pyx":222 * """ * def __set__(self, value): * if value < 1: # <<<<<<<<<<<<<< * raise ValueError('Insertion/deletion cost must be at leat 1') * self._insertion_cost = value */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_value, __pyx_int_1, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { /* "cutadapt/_align.pyx":223 * def __set__(self, value): * if value < 1: * raise ValueError('Insertion/deletion cost must be at leat 1') # <<<<<<<<<<<<<< * self._insertion_cost = value * self._deletion_cost = value */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_align.pyx":222 * """ * def __set__(self, value): * if value < 1: # <<<<<<<<<<<<<< * raise ValueError('Insertion/deletion cost must be at leat 1') * self._insertion_cost = value */ } /* "cutadapt/_align.pyx":224 * if value < 1: * raise ValueError('Insertion/deletion cost must be at leat 1') * self._insertion_cost = value # <<<<<<<<<<<<<< * self._deletion_cost = value * */ __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->_insertion_cost = __pyx_t_3; /* "cutadapt/_align.pyx":225 * raise ValueError('Insertion/deletion cost must be at leat 1') * self._insertion_cost = value * self._deletion_cost = value # <<<<<<<<<<<<<< * * property reference: */ __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->_deletion_cost = __pyx_t_3; /* "cutadapt/_align.pyx":221 * changed. * """ * def __set__(self, value): # <<<<<<<<<<<<<< * if value < 1: * raise ValueError('Insertion/deletion cost must be at leat 1') */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cutadapt._align.Aligner.indel_cost.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cutadapt/_align.pyx":228 * * property reference: * def __get__(self): # <<<<<<<<<<<<<< * return self._reference * */ /* Python wrapper */ static PyObject *__pyx_pw_8cutadapt_6_align_7Aligner_9reference_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_8cutadapt_6_align_7Aligner_9reference_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_8cutadapt_6_align_7Aligner_9reference___get__(((struct __pyx_obj_8cutadapt_6_align_Aligner *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8cutadapt_6_align_7Aligner_9reference___get__(struct __pyx_obj_8cutadapt_6_align_Aligner *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); /* "cutadapt/_align.pyx":229 * property reference: * def __get__(self): * return self._reference # <<<<<<<<<<<<<< * * def __set__(self, str reference): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_reference); __pyx_r = __pyx_v_self->_reference; goto __pyx_L0; /* "cutadapt/_align.pyx":228 * * property reference: * def __get__(self): # <<<<<<<<<<<<<< * return self._reference * */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cutadapt/_align.pyx":231 * return self._reference * * def __set__(self, str reference): # <<<<<<<<<<<<<< * mem = <_Entry*> PyMem_Realloc(self.column, (len(reference) + 1) * sizeof(_Entry)) * if not mem: */ /* Python wrapper */ static int __pyx_pw_8cutadapt_6_align_7Aligner_9reference_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reference); /*proto*/ static int __pyx_pw_8cutadapt_6_align_7Aligner_9reference_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_reference) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_reference), (&PyString_Type), 1, "reference", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_8cutadapt_6_align_7Aligner_9reference_2__set__(((struct __pyx_obj_8cutadapt_6_align_Aligner *)__pyx_v_self), ((PyObject*)__pyx_v_reference)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8cutadapt_6_align_7Aligner_9reference_2__set__(struct __pyx_obj_8cutadapt_6_align_Aligner *__pyx_v_self, PyObject *__pyx_v_reference) { __pyx_t_8cutadapt_6_align__Entry *__pyx_v_mem; int __pyx_r; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); /* "cutadapt/_align.pyx":232 * * def __set__(self, str reference): * mem = <_Entry*> PyMem_Realloc(self.column, (len(reference) + 1) * sizeof(_Entry)) # <<<<<<<<<<<<<< * if not mem: * raise MemoryError() */ __pyx_t_1 = PyObject_Length(__pyx_v_reference); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_mem = ((__pyx_t_8cutadapt_6_align__Entry *)PyMem_Realloc(__pyx_v_self->column, ((__pyx_t_1 + 1) * (sizeof(__pyx_t_8cutadapt_6_align__Entry))))); /* "cutadapt/_align.pyx":233 * def __set__(self, str reference): * mem = <_Entry*> PyMem_Realloc(self.column, (len(reference) + 1) * sizeof(_Entry)) * if not mem: # <<<<<<<<<<<<<< * raise MemoryError() * self.column = mem */ __pyx_t_2 = ((!(__pyx_v_mem != 0)) != 0); if (__pyx_t_2) { /* "cutadapt/_align.pyx":234 * mem = <_Entry*> PyMem_Realloc(self.column, (len(reference) + 1) * sizeof(_Entry)) * if not mem: * raise MemoryError() # <<<<<<<<<<<<<< * self.column = mem * self._reference = reference.encode('ascii') */ PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_align.pyx":233 * def __set__(self, str reference): * mem = <_Entry*> PyMem_Realloc(self.column, (len(reference) + 1) * sizeof(_Entry)) * if not mem: # <<<<<<<<<<<<<< * raise MemoryError() * self.column = mem */ } /* "cutadapt/_align.pyx":235 * if not mem: * raise MemoryError() * self.column = mem # <<<<<<<<<<<<<< * self._reference = reference.encode('ascii') * self.m = len(reference) */ __pyx_v_self->column = __pyx_v_mem; /* "cutadapt/_align.pyx":236 * raise MemoryError() * self.column = mem * self._reference = reference.encode('ascii') # <<<<<<<<<<<<<< * self.m = len(reference) * if self.wildcard_ref: */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_reference, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->_reference); __Pyx_DECREF(__pyx_v_self->_reference); __pyx_v_self->_reference = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; /* "cutadapt/_align.pyx":237 * self.column = mem * self._reference = reference.encode('ascii') * self.m = len(reference) # <<<<<<<<<<<<<< * if self.wildcard_ref: * self._reference = self._reference.translate(IUPAC_TABLE) */ __pyx_t_1 = PyObject_Length(__pyx_v_reference); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->m = __pyx_t_1; /* "cutadapt/_align.pyx":238 * self._reference = reference.encode('ascii') * self.m = len(reference) * if self.wildcard_ref: # <<<<<<<<<<<<<< * self._reference = self._reference.translate(IUPAC_TABLE) * elif self.wildcard_query: */ __pyx_t_2 = (__pyx_v_self->wildcard_ref != 0); if (__pyx_t_2) { /* "cutadapt/_align.pyx":239 * self.m = len(reference) * if self.wildcard_ref: * self._reference = self._reference.translate(IUPAC_TABLE) # <<<<<<<<<<<<<< * elif self.wildcard_query: * self._reference = self._reference.translate(ACGT_TABLE) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_reference, __pyx_n_s_translate); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_5) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_8cutadapt_6_align_IUPAC_TABLE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); } else { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(__pyx_v_8cutadapt_6_align_IUPAC_TABLE); __Pyx_GIVEREF(__pyx_v_8cutadapt_6_align_IUPAC_TABLE); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_8cutadapt_6_align_IUPAC_TABLE); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->_reference); __Pyx_DECREF(__pyx_v_self->_reference); __pyx_v_self->_reference = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; /* "cutadapt/_align.pyx":238 * self._reference = reference.encode('ascii') * self.m = len(reference) * if self.wildcard_ref: # <<<<<<<<<<<<<< * self._reference = self._reference.translate(IUPAC_TABLE) * elif self.wildcard_query: */ goto __pyx_L4; } /* "cutadapt/_align.pyx":240 * if self.wildcard_ref: * self._reference = self._reference.translate(IUPAC_TABLE) * elif self.wildcard_query: # <<<<<<<<<<<<<< * self._reference = self._reference.translate(ACGT_TABLE) * self.str_reference = reference */ __pyx_t_2 = (__pyx_v_self->wildcard_query != 0); if (__pyx_t_2) { /* "cutadapt/_align.pyx":241 * self._reference = self._reference.translate(IUPAC_TABLE) * elif self.wildcard_query: * self._reference = self._reference.translate(ACGT_TABLE) # <<<<<<<<<<<<<< * self.str_reference = reference * */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_reference, __pyx_n_s_translate); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_6) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_8cutadapt_6_align_ACGT_TABLE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); } else { __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v_8cutadapt_6_align_ACGT_TABLE); __Pyx_GIVEREF(__pyx_v_8cutadapt_6_align_ACGT_TABLE); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_8cutadapt_6_align_ACGT_TABLE); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->_reference); __Pyx_DECREF(__pyx_v_self->_reference); __pyx_v_self->_reference = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; /* "cutadapt/_align.pyx":240 * if self.wildcard_ref: * self._reference = self._reference.translate(IUPAC_TABLE) * elif self.wildcard_query: # <<<<<<<<<<<<<< * self._reference = self._reference.translate(ACGT_TABLE) * self.str_reference = reference */ } __pyx_L4:; /* "cutadapt/_align.pyx":242 * elif self.wildcard_query: * self._reference = self._reference.translate(ACGT_TABLE) * self.str_reference = reference # <<<<<<<<<<<<<< * * property dpmatrix: */ __Pyx_INCREF(__pyx_v_reference); __Pyx_GIVEREF(__pyx_v_reference); __Pyx_GOTREF(__pyx_v_self->str_reference); __Pyx_DECREF(__pyx_v_self->str_reference); __pyx_v_self->str_reference = __pyx_v_reference; /* "cutadapt/_align.pyx":231 * return self._reference * * def __set__(self, str reference): # <<<<<<<<<<<<<< * mem = <_Entry*> PyMem_Realloc(self.column, (len(reference) + 1) * sizeof(_Entry)) * if not mem: */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("cutadapt._align.Aligner.reference.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cutadapt/_align.pyx":249 * usually None, unless debugging has been enabled with enable_debug(). * """ * def __get__(self): # <<<<<<<<<<<<<< * return self._dpmatrix * */ /* Python wrapper */ static PyObject *__pyx_pw_8cutadapt_6_align_7Aligner_8dpmatrix_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_8cutadapt_6_align_7Aligner_8dpmatrix_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_8cutadapt_6_align_7Aligner_8dpmatrix___get__(((struct __pyx_obj_8cutadapt_6_align_Aligner *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8cutadapt_6_align_7Aligner_8dpmatrix___get__(struct __pyx_obj_8cutadapt_6_align_Aligner *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); /* "cutadapt/_align.pyx":250 * """ * def __get__(self): * return self._dpmatrix # <<<<<<<<<<<<<< * * def enable_debug(self): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_dpmatrix); __pyx_r = __pyx_v_self->_dpmatrix; goto __pyx_L0; /* "cutadapt/_align.pyx":249 * usually None, unless debugging has been enabled with enable_debug(). * """ * def __get__(self): # <<<<<<<<<<<<<< * return self._dpmatrix * */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cutadapt/_align.pyx":252 * return self._dpmatrix * * def enable_debug(self): # <<<<<<<<<<<<<< * """ * Store the dynamic programming matrix while running the locate() method */ /* Python wrapper */ static PyObject *__pyx_pw_8cutadapt_6_align_7Aligner_3enable_debug(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_8cutadapt_6_align_7Aligner_2enable_debug[] = "\n\t\tStore the dynamic programming matrix while running the locate() method\n\t\tand make it available in the .dpmatrix attribute.\n\t\t"; static PyObject *__pyx_pw_8cutadapt_6_align_7Aligner_3enable_debug(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("enable_debug (wrapper)", 0); __pyx_r = __pyx_pf_8cutadapt_6_align_7Aligner_2enable_debug(((struct __pyx_obj_8cutadapt_6_align_Aligner *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8cutadapt_6_align_7Aligner_2enable_debug(struct __pyx_obj_8cutadapt_6_align_Aligner *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("enable_debug", 0); /* "cutadapt/_align.pyx":257 * and make it available in the .dpmatrix attribute. * """ * self.debug = True # <<<<<<<<<<<<<< * * def locate(self, str query): */ __pyx_v_self->debug = 1; /* "cutadapt/_align.pyx":252 * return self._dpmatrix * * def enable_debug(self): # <<<<<<<<<<<<<< * """ * Store the dynamic programming matrix while running the locate() method */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cutadapt/_align.pyx":259 * self.debug = True * * def locate(self, str query): # <<<<<<<<<<<<<< * """ * locate(query) -> (refstart, refstop, querystart, querystop, matches, errors) */ /* Python wrapper */ static PyObject *__pyx_pw_8cutadapt_6_align_7Aligner_5locate(PyObject *__pyx_v_self, PyObject *__pyx_v_query); /*proto*/ static char __pyx_doc_8cutadapt_6_align_7Aligner_4locate[] = "\n\t\tlocate(query) -> (refstart, refstop, querystart, querystop, matches, errors)\n\n\t\tFind the query within the reference associated with this aligner. The\n\t\tintervals (querystart, querystop) and (refstart, refstop) give the\n\t\tlocation of the match.\n\n\t\tThat is, the substrings query[querystart:querystop] and\n\t\tself.reference[refstart:refstop] were found to align best to each other,\n\t\twith the given number of matches and the given number of errors.\n\n\t\tThe alignment itself is not returned.\n\t\t"; static PyObject *__pyx_pw_8cutadapt_6_align_7Aligner_5locate(PyObject *__pyx_v_self, PyObject *__pyx_v_query) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("locate (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_query), (&PyString_Type), 1, "query", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_8cutadapt_6_align_7Aligner_4locate(((struct __pyx_obj_8cutadapt_6_align_Aligner *)__pyx_v_self), ((PyObject*)__pyx_v_query)); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8cutadapt_6_align_7Aligner_4locate(struct __pyx_obj_8cutadapt_6_align_Aligner *__pyx_v_self, PyObject *__pyx_v_query) { char *__pyx_v_s1; PyObject *__pyx_v_query_bytes = 0; char *__pyx_v_s2; int __pyx_v_m; int __pyx_v_n; __pyx_t_8cutadapt_6_align__Entry *__pyx_v_column; double __pyx_v_max_error_rate; int __pyx_v_start_in_ref; int __pyx_v_start_in_query; int __pyx_v_stop_in_ref; int __pyx_v_stop_in_query; int __pyx_v_compare_ascii; int __pyx_v_i; int __pyx_v_j; int __pyx_v_k; int __pyx_v_max_n; int __pyx_v_min_n; __pyx_t_8cutadapt_6_align__Match __pyx_v_best; int __pyx_v_last; int __pyx_v_cost_diag; int __pyx_v_cost_deletion; int __pyx_v_cost_insertion; int __pyx_v_origin; int __pyx_v_cost; int __pyx_v_matches; int __pyx_v_length; int __pyx_v_characters_equal; __pyx_t_8cutadapt_6_align__Entry __pyx_v_tmp_entry; long __pyx_v_first_i; int __pyx_v_start1; int __pyx_v_start2; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations char *__pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; Py_ssize_t __pyx_t_5; __pyx_t_8cutadapt_6_align__Entry *__pyx_t_6; double __pyx_t_7; int __pyx_t_8; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; int __pyx_t_11; int __pyx_t_12; int __pyx_t_13; long __pyx_t_14; long __pyx_t_15; int __pyx_t_16; long __pyx_t_17; PyObject *__pyx_t_18 = NULL; PyObject *__pyx_t_19 = NULL; PyObject *__pyx_t_20 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("locate", 0); /* "cutadapt/_align.pyx":273 * The alignment itself is not returned. * """ * cdef char* s1 = self._reference # <<<<<<<<<<<<<< * cdef bytes query_bytes = query.encode('ascii') * cdef char* s2 = query_bytes */ __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_self->_reference); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_s1 = __pyx_t_1; /* "cutadapt/_align.pyx":274 * """ * cdef char* s1 = self._reference * cdef bytes query_bytes = query.encode('ascii') # <<<<<<<<<<<<<< * cdef char* s2 = query_bytes * cdef int m = self.m */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_query, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_query_bytes = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "cutadapt/_align.pyx":275 * cdef char* s1 = self._reference * cdef bytes query_bytes = query.encode('ascii') * cdef char* s2 = query_bytes # <<<<<<<<<<<<<< * cdef int m = self.m * cdef int n = len(query) */ __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_query_bytes); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_s2 = __pyx_t_1; /* "cutadapt/_align.pyx":276 * cdef bytes query_bytes = query.encode('ascii') * cdef char* s2 = query_bytes * cdef int m = self.m # <<<<<<<<<<<<<< * cdef int n = len(query) * cdef _Entry* column = self.column */ __pyx_t_4 = __pyx_v_self->m; __pyx_v_m = __pyx_t_4; /* "cutadapt/_align.pyx":277 * cdef char* s2 = query_bytes * cdef int m = self.m * cdef int n = len(query) # <<<<<<<<<<<<<< * cdef _Entry* column = self.column * cdef double max_error_rate = self.max_error_rate */ __pyx_t_5 = PyObject_Length(__pyx_v_query); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_5; /* "cutadapt/_align.pyx":278 * cdef int m = self.m * cdef int n = len(query) * cdef _Entry* column = self.column # <<<<<<<<<<<<<< * cdef double max_error_rate = self.max_error_rate * cdef bint start_in_ref = self.flags & START_WITHIN_SEQ1 */ __pyx_t_6 = __pyx_v_self->column; __pyx_v_column = __pyx_t_6; /* "cutadapt/_align.pyx":279 * cdef int n = len(query) * cdef _Entry* column = self.column * cdef double max_error_rate = self.max_error_rate # <<<<<<<<<<<<<< * cdef bint start_in_ref = self.flags & START_WITHIN_SEQ1 * cdef bint start_in_query = self.flags & START_WITHIN_SEQ2 */ __pyx_t_7 = __pyx_v_self->max_error_rate; __pyx_v_max_error_rate = __pyx_t_7; /* "cutadapt/_align.pyx":280 * cdef _Entry* column = self.column * cdef double max_error_rate = self.max_error_rate * cdef bint start_in_ref = self.flags & START_WITHIN_SEQ1 # <<<<<<<<<<<<<< * cdef bint start_in_query = self.flags & START_WITHIN_SEQ2 * cdef bint stop_in_ref = self.flags & STOP_WITHIN_SEQ1 */ __pyx_v_start_in_ref = (__pyx_v_self->flags & 1); /* "cutadapt/_align.pyx":281 * cdef double max_error_rate = self.max_error_rate * cdef bint start_in_ref = self.flags & START_WITHIN_SEQ1 * cdef bint start_in_query = self.flags & START_WITHIN_SEQ2 # <<<<<<<<<<<<<< * cdef bint stop_in_ref = self.flags & STOP_WITHIN_SEQ1 * cdef bint stop_in_query = self.flags & STOP_WITHIN_SEQ2 */ __pyx_v_start_in_query = (__pyx_v_self->flags & 2); /* "cutadapt/_align.pyx":282 * cdef bint start_in_ref = self.flags & START_WITHIN_SEQ1 * cdef bint start_in_query = self.flags & START_WITHIN_SEQ2 * cdef bint stop_in_ref = self.flags & STOP_WITHIN_SEQ1 # <<<<<<<<<<<<<< * cdef bint stop_in_query = self.flags & STOP_WITHIN_SEQ2 * */ __pyx_v_stop_in_ref = (__pyx_v_self->flags & 4); /* "cutadapt/_align.pyx":283 * cdef bint start_in_query = self.flags & START_WITHIN_SEQ2 * cdef bint stop_in_ref = self.flags & STOP_WITHIN_SEQ1 * cdef bint stop_in_query = self.flags & STOP_WITHIN_SEQ2 # <<<<<<<<<<<<<< * * if self.wildcard_query: */ __pyx_v_stop_in_query = (__pyx_v_self->flags & 8); /* "cutadapt/_align.pyx":285 * cdef bint stop_in_query = self.flags & STOP_WITHIN_SEQ2 * * if self.wildcard_query: # <<<<<<<<<<<<<< * query_bytes = query_bytes.translate(IUPAC_TABLE) * s2 = query_bytes */ __pyx_t_8 = (__pyx_v_self->wildcard_query != 0); if (__pyx_t_8) { /* "cutadapt/_align.pyx":286 * * if self.wildcard_query: * query_bytes = query_bytes.translate(IUPAC_TABLE) # <<<<<<<<<<<<<< * s2 = query_bytes * elif self.wildcard_ref: */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_query_bytes, __pyx_n_s_translate); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_9) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_8cutadapt_6_align_IUPAC_TABLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); } else { __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL; __Pyx_INCREF(__pyx_v_8cutadapt_6_align_IUPAC_TABLE); __Pyx_GIVEREF(__pyx_v_8cutadapt_6_align_IUPAC_TABLE); PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_8cutadapt_6_align_IUPAC_TABLE); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_query_bytes, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; /* "cutadapt/_align.pyx":287 * if self.wildcard_query: * query_bytes = query_bytes.translate(IUPAC_TABLE) * s2 = query_bytes # <<<<<<<<<<<<<< * elif self.wildcard_ref: * query_bytes = query_bytes.translate(ACGT_TABLE) */ __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_query_bytes); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_s2 = __pyx_t_1; /* "cutadapt/_align.pyx":285 * cdef bint stop_in_query = self.flags & STOP_WITHIN_SEQ2 * * if self.wildcard_query: # <<<<<<<<<<<<<< * query_bytes = query_bytes.translate(IUPAC_TABLE) * s2 = query_bytes */ goto __pyx_L3; } /* "cutadapt/_align.pyx":288 * query_bytes = query_bytes.translate(IUPAC_TABLE) * s2 = query_bytes * elif self.wildcard_ref: # <<<<<<<<<<<<<< * query_bytes = query_bytes.translate(ACGT_TABLE) * s2 = query_bytes */ __pyx_t_8 = (__pyx_v_self->wildcard_ref != 0); if (__pyx_t_8) { /* "cutadapt/_align.pyx":289 * s2 = query_bytes * elif self.wildcard_ref: * query_bytes = query_bytes.translate(ACGT_TABLE) # <<<<<<<<<<<<<< * s2 = query_bytes * cdef bint compare_ascii = not (self.wildcard_query or self.wildcard_ref) */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_query_bytes, __pyx_n_s_translate); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_10 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (!__pyx_t_10) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_8cutadapt_6_align_ACGT_TABLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); } else { __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); __pyx_t_10 = NULL; __Pyx_INCREF(__pyx_v_8cutadapt_6_align_ACGT_TABLE); __Pyx_GIVEREF(__pyx_v_8cutadapt_6_align_ACGT_TABLE); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_8cutadapt_6_align_ACGT_TABLE); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_query_bytes, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; /* "cutadapt/_align.pyx":290 * elif self.wildcard_ref: * query_bytes = query_bytes.translate(ACGT_TABLE) * s2 = query_bytes # <<<<<<<<<<<<<< * cdef bint compare_ascii = not (self.wildcard_query or self.wildcard_ref) * """ */ __pyx_t_1 = __Pyx_PyObject_AsString(__pyx_v_query_bytes); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_s2 = __pyx_t_1; /* "cutadapt/_align.pyx":288 * query_bytes = query_bytes.translate(IUPAC_TABLE) * s2 = query_bytes * elif self.wildcard_ref: # <<<<<<<<<<<<<< * query_bytes = query_bytes.translate(ACGT_TABLE) * s2 = query_bytes */ } __pyx_L3:; /* "cutadapt/_align.pyx":291 * query_bytes = query_bytes.translate(ACGT_TABLE) * s2 = query_bytes * cdef bint compare_ascii = not (self.wildcard_query or self.wildcard_ref) # <<<<<<<<<<<<<< * """ * DP Matrix: */ __pyx_t_11 = (__pyx_v_self->wildcard_query != 0); if (!__pyx_t_11) { } else { __pyx_t_8 = __pyx_t_11; goto __pyx_L4_bool_binop_done; } __pyx_t_11 = (__pyx_v_self->wildcard_ref != 0); __pyx_t_8 = __pyx_t_11; __pyx_L4_bool_binop_done:; __pyx_v_compare_ascii = (!__pyx_t_8); /* "cutadapt/_align.pyx":305 * * # maximum no. of errors * cdef int k = (max_error_rate * m) # <<<<<<<<<<<<<< * * # Determine largest and smallest column we need to compute */ __pyx_v_k = ((int)(__pyx_v_max_error_rate * __pyx_v_m)); /* "cutadapt/_align.pyx":308 * * # Determine largest and smallest column we need to compute * cdef int max_n = n # <<<<<<<<<<<<<< * cdef int min_n = 0 * if not start_in_query: */ __pyx_v_max_n = __pyx_v_n; /* "cutadapt/_align.pyx":309 * # Determine largest and smallest column we need to compute * cdef int max_n = n * cdef int min_n = 0 # <<<<<<<<<<<<<< * if not start_in_query: * # costs can only get worse after column m */ __pyx_v_min_n = 0; /* "cutadapt/_align.pyx":310 * cdef int max_n = n * cdef int min_n = 0 * if not start_in_query: # <<<<<<<<<<<<<< * # costs can only get worse after column m * max_n = min(n, m + k) */ __pyx_t_8 = ((!(__pyx_v_start_in_query != 0)) != 0); if (__pyx_t_8) { /* "cutadapt/_align.pyx":312 * if not start_in_query: * # costs can only get worse after column m * max_n = min(n, m + k) # <<<<<<<<<<<<<< * if not stop_in_query: * min_n = max(0, n - m - k) */ __pyx_t_4 = (__pyx_v_m + __pyx_v_k); __pyx_t_12 = __pyx_v_n; if (((__pyx_t_4 < __pyx_t_12) != 0)) { __pyx_t_13 = __pyx_t_4; } else { __pyx_t_13 = __pyx_t_12; } __pyx_v_max_n = __pyx_t_13; /* "cutadapt/_align.pyx":310 * cdef int max_n = n * cdef int min_n = 0 * if not start_in_query: # <<<<<<<<<<<<<< * # costs can only get worse after column m * max_n = min(n, m + k) */ } /* "cutadapt/_align.pyx":313 * # costs can only get worse after column m * max_n = min(n, m + k) * if not stop_in_query: # <<<<<<<<<<<<<< * min_n = max(0, n - m - k) * */ __pyx_t_8 = ((!(__pyx_v_stop_in_query != 0)) != 0); if (__pyx_t_8) { /* "cutadapt/_align.pyx":314 * max_n = min(n, m + k) * if not stop_in_query: * min_n = max(0, n - m - k) # <<<<<<<<<<<<<< * * # Fill column min_n. */ __pyx_t_13 = ((__pyx_v_n - __pyx_v_m) - __pyx_v_k); __pyx_t_14 = 0; if (((__pyx_t_13 > __pyx_t_14) != 0)) { __pyx_t_15 = __pyx_t_13; } else { __pyx_t_15 = __pyx_t_14; } __pyx_v_min_n = __pyx_t_15; /* "cutadapt/_align.pyx":313 * # costs can only get worse after column m * max_n = min(n, m + k) * if not stop_in_query: # <<<<<<<<<<<<<< * min_n = max(0, n - m - k) * */ } /* "cutadapt/_align.pyx":326 * # TODO (later) * # fill out columns only until 'last' * if not start_in_ref and not start_in_query: # <<<<<<<<<<<<<< * for i in range(m + 1): * column[i].matches = 0 */ __pyx_t_11 = ((!(__pyx_v_start_in_ref != 0)) != 0); if (__pyx_t_11) { } else { __pyx_t_8 = __pyx_t_11; goto __pyx_L9_bool_binop_done; } __pyx_t_11 = ((!(__pyx_v_start_in_query != 0)) != 0); __pyx_t_8 = __pyx_t_11; __pyx_L9_bool_binop_done:; if (__pyx_t_8) { /* "cutadapt/_align.pyx":327 * # fill out columns only until 'last' * if not start_in_ref and not start_in_query: * for i in range(m + 1): # <<<<<<<<<<<<<< * column[i].matches = 0 * column[i].cost = max(i, min_n) * self._insertion_cost */ __pyx_t_15 = (__pyx_v_m + 1); for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_15; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "cutadapt/_align.pyx":328 * if not start_in_ref and not start_in_query: * for i in range(m + 1): * column[i].matches = 0 # <<<<<<<<<<<<<< * column[i].cost = max(i, min_n) * self._insertion_cost * column[i].origin = 0 */ (__pyx_v_column[__pyx_v_i]).matches = 0; /* "cutadapt/_align.pyx":329 * for i in range(m + 1): * column[i].matches = 0 * column[i].cost = max(i, min_n) * self._insertion_cost # <<<<<<<<<<<<<< * column[i].origin = 0 * elif start_in_ref and not start_in_query: */ __pyx_t_4 = __pyx_v_min_n; __pyx_t_12 = __pyx_v_i; if (((__pyx_t_4 > __pyx_t_12) != 0)) { __pyx_t_16 = __pyx_t_4; } else { __pyx_t_16 = __pyx_t_12; } (__pyx_v_column[__pyx_v_i]).cost = (__pyx_t_16 * __pyx_v_self->_insertion_cost); /* "cutadapt/_align.pyx":330 * column[i].matches = 0 * column[i].cost = max(i, min_n) * self._insertion_cost * column[i].origin = 0 # <<<<<<<<<<<<<< * elif start_in_ref and not start_in_query: * for i in range(m + 1): */ (__pyx_v_column[__pyx_v_i]).origin = 0; } /* "cutadapt/_align.pyx":326 * # TODO (later) * # fill out columns only until 'last' * if not start_in_ref and not start_in_query: # <<<<<<<<<<<<<< * for i in range(m + 1): * column[i].matches = 0 */ goto __pyx_L8; } /* "cutadapt/_align.pyx":331 * column[i].cost = max(i, min_n) * self._insertion_cost * column[i].origin = 0 * elif start_in_ref and not start_in_query: # <<<<<<<<<<<<<< * for i in range(m + 1): * column[i].matches = 0 */ __pyx_t_11 = (__pyx_v_start_in_ref != 0); if (__pyx_t_11) { } else { __pyx_t_8 = __pyx_t_11; goto __pyx_L13_bool_binop_done; } __pyx_t_11 = ((!(__pyx_v_start_in_query != 0)) != 0); __pyx_t_8 = __pyx_t_11; __pyx_L13_bool_binop_done:; if (__pyx_t_8) { /* "cutadapt/_align.pyx":332 * column[i].origin = 0 * elif start_in_ref and not start_in_query: * for i in range(m + 1): # <<<<<<<<<<<<<< * column[i].matches = 0 * column[i].cost = min_n * self._insertion_cost */ __pyx_t_15 = (__pyx_v_m + 1); for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_15; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "cutadapt/_align.pyx":333 * elif start_in_ref and not start_in_query: * for i in range(m + 1): * column[i].matches = 0 # <<<<<<<<<<<<<< * column[i].cost = min_n * self._insertion_cost * column[i].origin = min(0, min_n - i) */ (__pyx_v_column[__pyx_v_i]).matches = 0; /* "cutadapt/_align.pyx":334 * for i in range(m + 1): * column[i].matches = 0 * column[i].cost = min_n * self._insertion_cost # <<<<<<<<<<<<<< * column[i].origin = min(0, min_n - i) * elif not start_in_ref and start_in_query: */ (__pyx_v_column[__pyx_v_i]).cost = (__pyx_v_min_n * __pyx_v_self->_insertion_cost); /* "cutadapt/_align.pyx":335 * column[i].matches = 0 * column[i].cost = min_n * self._insertion_cost * column[i].origin = min(0, min_n - i) # <<<<<<<<<<<<<< * elif not start_in_ref and start_in_query: * for i in range(m + 1): */ __pyx_t_16 = (__pyx_v_min_n - __pyx_v_i); __pyx_t_14 = 0; if (((__pyx_t_16 < __pyx_t_14) != 0)) { __pyx_t_17 = __pyx_t_16; } else { __pyx_t_17 = __pyx_t_14; } (__pyx_v_column[__pyx_v_i]).origin = __pyx_t_17; } /* "cutadapt/_align.pyx":331 * column[i].cost = max(i, min_n) * self._insertion_cost * column[i].origin = 0 * elif start_in_ref and not start_in_query: # <<<<<<<<<<<<<< * for i in range(m + 1): * column[i].matches = 0 */ goto __pyx_L8; } /* "cutadapt/_align.pyx":336 * column[i].cost = min_n * self._insertion_cost * column[i].origin = min(0, min_n - i) * elif not start_in_ref and start_in_query: # <<<<<<<<<<<<<< * for i in range(m + 1): * column[i].matches = 0 */ __pyx_t_11 = ((!(__pyx_v_start_in_ref != 0)) != 0); if (__pyx_t_11) { } else { __pyx_t_8 = __pyx_t_11; goto __pyx_L17_bool_binop_done; } __pyx_t_11 = (__pyx_v_start_in_query != 0); __pyx_t_8 = __pyx_t_11; __pyx_L17_bool_binop_done:; if (__pyx_t_8) { /* "cutadapt/_align.pyx":337 * column[i].origin = min(0, min_n - i) * elif not start_in_ref and start_in_query: * for i in range(m + 1): # <<<<<<<<<<<<<< * column[i].matches = 0 * column[i].cost = i * self._insertion_cost */ __pyx_t_15 = (__pyx_v_m + 1); for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_15; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "cutadapt/_align.pyx":338 * elif not start_in_ref and start_in_query: * for i in range(m + 1): * column[i].matches = 0 # <<<<<<<<<<<<<< * column[i].cost = i * self._insertion_cost * column[i].origin = max(0, min_n - i) */ (__pyx_v_column[__pyx_v_i]).matches = 0; /* "cutadapt/_align.pyx":339 * for i in range(m + 1): * column[i].matches = 0 * column[i].cost = i * self._insertion_cost # <<<<<<<<<<<<<< * column[i].origin = max(0, min_n - i) * else: */ (__pyx_v_column[__pyx_v_i]).cost = (__pyx_v_i * __pyx_v_self->_insertion_cost); /* "cutadapt/_align.pyx":340 * column[i].matches = 0 * column[i].cost = i * self._insertion_cost * column[i].origin = max(0, min_n - i) # <<<<<<<<<<<<<< * else: * for i in range(m + 1): */ __pyx_t_16 = (__pyx_v_min_n - __pyx_v_i); __pyx_t_17 = 0; if (((__pyx_t_16 > __pyx_t_17) != 0)) { __pyx_t_14 = __pyx_t_16; } else { __pyx_t_14 = __pyx_t_17; } (__pyx_v_column[__pyx_v_i]).origin = __pyx_t_14; } /* "cutadapt/_align.pyx":336 * column[i].cost = min_n * self._insertion_cost * column[i].origin = min(0, min_n - i) * elif not start_in_ref and start_in_query: # <<<<<<<<<<<<<< * for i in range(m + 1): * column[i].matches = 0 */ goto __pyx_L8; } /* "cutadapt/_align.pyx":342 * column[i].origin = max(0, min_n - i) * else: * for i in range(m + 1): # <<<<<<<<<<<<<< * column[i].matches = 0 * column[i].cost = min(i, min_n) * self._insertion_cost */ /*else*/ { __pyx_t_15 = (__pyx_v_m + 1); for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_15; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "cutadapt/_align.pyx":343 * else: * for i in range(m + 1): * column[i].matches = 0 # <<<<<<<<<<<<<< * column[i].cost = min(i, min_n) * self._insertion_cost * column[i].origin = min_n - i */ (__pyx_v_column[__pyx_v_i]).matches = 0; /* "cutadapt/_align.pyx":344 * for i in range(m + 1): * column[i].matches = 0 * column[i].cost = min(i, min_n) * self._insertion_cost # <<<<<<<<<<<<<< * column[i].origin = min_n - i * */ __pyx_t_16 = __pyx_v_min_n; __pyx_t_4 = __pyx_v_i; if (((__pyx_t_16 < __pyx_t_4) != 0)) { __pyx_t_12 = __pyx_t_16; } else { __pyx_t_12 = __pyx_t_4; } (__pyx_v_column[__pyx_v_i]).cost = (__pyx_t_12 * __pyx_v_self->_insertion_cost); /* "cutadapt/_align.pyx":345 * column[i].matches = 0 * column[i].cost = min(i, min_n) * self._insertion_cost * column[i].origin = min_n - i # <<<<<<<<<<<<<< * * if self.debug: */ (__pyx_v_column[__pyx_v_i]).origin = (__pyx_v_min_n - __pyx_v_i); } } __pyx_L8:; /* "cutadapt/_align.pyx":347 * column[i].origin = min_n - i * * if self.debug: # <<<<<<<<<<<<<< * self._dpmatrix = DPMatrix(self.str_reference, query) * for i in range(m + 1): */ __pyx_t_8 = (__pyx_v_self->debug != 0); if (__pyx_t_8) { /* "cutadapt/_align.pyx":348 * * if self.debug: * self._dpmatrix = DPMatrix(self.str_reference, query) # <<<<<<<<<<<<<< * for i in range(m + 1): * self._dpmatrix.set_entry(i, min_n, column[i].cost) */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DPMatrix); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = NULL; __pyx_t_5 = 0; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_5 = 1; } } __pyx_t_10 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_9) { __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL; } __Pyx_INCREF(__pyx_v_self->str_reference); __Pyx_GIVEREF(__pyx_v_self->str_reference); PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_5, __pyx_v_self->str_reference); __Pyx_INCREF(__pyx_v_query); __Pyx_GIVEREF(__pyx_v_query); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_5, __pyx_v_query); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_dpmatrix); __Pyx_DECREF(__pyx_v_self->_dpmatrix); __pyx_v_self->_dpmatrix = __pyx_t_3; __pyx_t_3 = 0; /* "cutadapt/_align.pyx":349 * if self.debug: * self._dpmatrix = DPMatrix(self.str_reference, query) * for i in range(m + 1): # <<<<<<<<<<<<<< * self._dpmatrix.set_entry(i, min_n, column[i].cost) * cdef _Match best */ __pyx_t_15 = (__pyx_v_m + 1); for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_15; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "cutadapt/_align.pyx":350 * self._dpmatrix = DPMatrix(self.str_reference, query) * for i in range(m + 1): * self._dpmatrix.set_entry(i, min_n, column[i].cost) # <<<<<<<<<<<<<< * cdef _Match best * best.ref_stop = m */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_dpmatrix, __pyx_n_s_set_entry); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_min_n); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_18 = __Pyx_PyInt_From_int((__pyx_v_column[__pyx_v_i]).cost); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_19 = NULL; __pyx_t_5 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_19)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_19); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_5 = 1; } } __pyx_t_20 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); if (__pyx_t_19) { __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_20, 0, __pyx_t_19); __pyx_t_19 = NULL; } __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_20, 0+__pyx_t_5, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_20, 1+__pyx_t_5, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_20, 2+__pyx_t_5, __pyx_t_18); __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_18 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_20, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } /* "cutadapt/_align.pyx":347 * column[i].origin = min_n - i * * if self.debug: # <<<<<<<<<<<<<< * self._dpmatrix = DPMatrix(self.str_reference, query) * for i in range(m + 1): */ } /* "cutadapt/_align.pyx":352 * self._dpmatrix.set_entry(i, min_n, column[i].cost) * cdef _Match best * best.ref_stop = m # <<<<<<<<<<<<<< * best.query_stop = n * best.cost = m + n */ __pyx_v_best.ref_stop = __pyx_v_m; /* "cutadapt/_align.pyx":353 * cdef _Match best * best.ref_stop = m * best.query_stop = n # <<<<<<<<<<<<<< * best.cost = m + n * best.origin = 0 */ __pyx_v_best.query_stop = __pyx_v_n; /* "cutadapt/_align.pyx":354 * best.ref_stop = m * best.query_stop = n * best.cost = m + n # <<<<<<<<<<<<<< * best.origin = 0 * best.matches = 0 */ __pyx_v_best.cost = (__pyx_v_m + __pyx_v_n); /* "cutadapt/_align.pyx":355 * best.query_stop = n * best.cost = m + n * best.origin = 0 # <<<<<<<<<<<<<< * best.matches = 0 * */ __pyx_v_best.origin = 0; /* "cutadapt/_align.pyx":356 * best.cost = m + n * best.origin = 0 * best.matches = 0 # <<<<<<<<<<<<<< * * # Ukkonen's trick: index of the last cell that is less than k. */ __pyx_v_best.matches = 0; /* "cutadapt/_align.pyx":359 * * # Ukkonen's trick: index of the last cell that is less than k. * cdef int last = min(m, k + 1) # <<<<<<<<<<<<<< * if start_in_ref: * last = m */ __pyx_t_15 = (__pyx_v_k + 1); __pyx_t_13 = __pyx_v_m; if (((__pyx_t_15 < __pyx_t_13) != 0)) { __pyx_t_14 = __pyx_t_15; } else { __pyx_t_14 = __pyx_t_13; } __pyx_v_last = __pyx_t_14; /* "cutadapt/_align.pyx":360 * # Ukkonen's trick: index of the last cell that is less than k. * cdef int last = min(m, k + 1) * if start_in_ref: # <<<<<<<<<<<<<< * last = m * */ __pyx_t_8 = (__pyx_v_start_in_ref != 0); if (__pyx_t_8) { /* "cutadapt/_align.pyx":361 * cdef int last = min(m, k + 1) * if start_in_ref: * last = m # <<<<<<<<<<<<<< * * cdef int cost_diag */ __pyx_v_last = __pyx_v_m; /* "cutadapt/_align.pyx":360 * # Ukkonen's trick: index of the last cell that is less than k. * cdef int last = min(m, k + 1) * if start_in_ref: # <<<<<<<<<<<<<< * last = m * */ } /* "cutadapt/_align.pyx":371 * cdef _Entry tmp_entry * * with nogil: # <<<<<<<<<<<<<< * # iterate over columns * for j in range(min_n + 1, max_n + 1): */ { #ifdef WITH_THREAD PyThreadState *_save; Py_UNBLOCK_THREADS #endif /*try:*/ { /* "cutadapt/_align.pyx":373 * with nogil: * # iterate over columns * for j in range(min_n + 1, max_n + 1): # <<<<<<<<<<<<<< * # remember first entry * tmp_entry = column[0] */ __pyx_t_14 = (__pyx_v_max_n + 1); for (__pyx_t_13 = (__pyx_v_min_n + 1); __pyx_t_13 < __pyx_t_14; __pyx_t_13+=1) { __pyx_v_j = __pyx_t_13; /* "cutadapt/_align.pyx":375 * for j in range(min_n + 1, max_n + 1): * # remember first entry * tmp_entry = column[0] # <<<<<<<<<<<<<< * * # fill in first entry in this column */ __pyx_v_tmp_entry = (__pyx_v_column[0]); /* "cutadapt/_align.pyx":378 * * # fill in first entry in this column * if start_in_query: # <<<<<<<<<<<<<< * column[0].origin = j * else: */ __pyx_t_8 = (__pyx_v_start_in_query != 0); if (__pyx_t_8) { /* "cutadapt/_align.pyx":379 * # fill in first entry in this column * if start_in_query: * column[0].origin = j # <<<<<<<<<<<<<< * else: * column[0].cost = j * self._insertion_cost */ (__pyx_v_column[0]).origin = __pyx_v_j; /* "cutadapt/_align.pyx":378 * * # fill in first entry in this column * if start_in_query: # <<<<<<<<<<<<<< * column[0].origin = j * else: */ goto __pyx_L32; } /* "cutadapt/_align.pyx":381 * column[0].origin = j * else: * column[0].cost = j * self._insertion_cost # <<<<<<<<<<<<<< * for i in range(1, last + 1): * if compare_ascii: */ /*else*/ { (__pyx_v_column[0]).cost = (__pyx_v_j * __pyx_v_self->_insertion_cost); } __pyx_L32:; /* "cutadapt/_align.pyx":382 * else: * column[0].cost = j * self._insertion_cost * for i in range(1, last + 1): # <<<<<<<<<<<<<< * if compare_ascii: * characters_equal = (s1[i-1] == s2[j-1]) */ __pyx_t_15 = (__pyx_v_last + 1); for (__pyx_t_12 = 1; __pyx_t_12 < __pyx_t_15; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "cutadapt/_align.pyx":383 * column[0].cost = j * self._insertion_cost * for i in range(1, last + 1): * if compare_ascii: # <<<<<<<<<<<<<< * characters_equal = (s1[i-1] == s2[j-1]) * else: */ __pyx_t_8 = (__pyx_v_compare_ascii != 0); if (__pyx_t_8) { /* "cutadapt/_align.pyx":384 * for i in range(1, last + 1): * if compare_ascii: * characters_equal = (s1[i-1] == s2[j-1]) # <<<<<<<<<<<<<< * else: * characters_equal = (s1[i-1] & s2[j-1]) != 0 */ __pyx_v_characters_equal = ((__pyx_v_s1[(__pyx_v_i - 1)]) == (__pyx_v_s2[(__pyx_v_j - 1)])); /* "cutadapt/_align.pyx":383 * column[0].cost = j * self._insertion_cost * for i in range(1, last + 1): * if compare_ascii: # <<<<<<<<<<<<<< * characters_equal = (s1[i-1] == s2[j-1]) * else: */ goto __pyx_L35; } /* "cutadapt/_align.pyx":386 * characters_equal = (s1[i-1] == s2[j-1]) * else: * characters_equal = (s1[i-1] & s2[j-1]) != 0 # <<<<<<<<<<<<<< * if characters_equal: * # Characters match: This cannot be an indel. */ /*else*/ { __pyx_v_characters_equal = (((__pyx_v_s1[(__pyx_v_i - 1)]) & (__pyx_v_s2[(__pyx_v_j - 1)])) != 0); } __pyx_L35:; /* "cutadapt/_align.pyx":387 * else: * characters_equal = (s1[i-1] & s2[j-1]) != 0 * if characters_equal: # <<<<<<<<<<<<<< * # Characters match: This cannot be an indel. * cost = tmp_entry.cost */ __pyx_t_8 = (__pyx_v_characters_equal != 0); if (__pyx_t_8) { /* "cutadapt/_align.pyx":389 * if characters_equal: * # Characters match: This cannot be an indel. * cost = tmp_entry.cost # <<<<<<<<<<<<<< * origin = tmp_entry.origin * matches = tmp_entry.matches + 1 */ __pyx_t_16 = __pyx_v_tmp_entry.cost; __pyx_v_cost = __pyx_t_16; /* "cutadapt/_align.pyx":390 * # Characters match: This cannot be an indel. * cost = tmp_entry.cost * origin = tmp_entry.origin # <<<<<<<<<<<<<< * matches = tmp_entry.matches + 1 * else: */ __pyx_t_16 = __pyx_v_tmp_entry.origin; __pyx_v_origin = __pyx_t_16; /* "cutadapt/_align.pyx":391 * cost = tmp_entry.cost * origin = tmp_entry.origin * matches = tmp_entry.matches + 1 # <<<<<<<<<<<<<< * else: * # Characters do not match. */ __pyx_v_matches = (__pyx_v_tmp_entry.matches + 1); /* "cutadapt/_align.pyx":387 * else: * characters_equal = (s1[i-1] & s2[j-1]) != 0 * if characters_equal: # <<<<<<<<<<<<<< * # Characters match: This cannot be an indel. * cost = tmp_entry.cost */ goto __pyx_L36; } /* "cutadapt/_align.pyx":394 * else: * # Characters do not match. * cost_diag = tmp_entry.cost + 1 # <<<<<<<<<<<<<< * cost_deletion = column[i].cost + self._deletion_cost * cost_insertion = column[i-1].cost + self._insertion_cost */ /*else*/ { __pyx_v_cost_diag = (__pyx_v_tmp_entry.cost + 1); /* "cutadapt/_align.pyx":395 * # Characters do not match. * cost_diag = tmp_entry.cost + 1 * cost_deletion = column[i].cost + self._deletion_cost # <<<<<<<<<<<<<< * cost_insertion = column[i-1].cost + self._insertion_cost * */ __pyx_v_cost_deletion = ((__pyx_v_column[__pyx_v_i]).cost + __pyx_v_self->_deletion_cost); /* "cutadapt/_align.pyx":396 * cost_diag = tmp_entry.cost + 1 * cost_deletion = column[i].cost + self._deletion_cost * cost_insertion = column[i-1].cost + self._insertion_cost # <<<<<<<<<<<<<< * * if cost_diag <= cost_deletion and cost_diag <= cost_insertion: */ __pyx_v_cost_insertion = ((__pyx_v_column[(__pyx_v_i - 1)]).cost + __pyx_v_self->_insertion_cost); /* "cutadapt/_align.pyx":398 * cost_insertion = column[i-1].cost + self._insertion_cost * * if cost_diag <= cost_deletion and cost_diag <= cost_insertion: # <<<<<<<<<<<<<< * # MISMATCH * cost = cost_diag */ __pyx_t_11 = ((__pyx_v_cost_diag <= __pyx_v_cost_deletion) != 0); if (__pyx_t_11) { } else { __pyx_t_8 = __pyx_t_11; goto __pyx_L38_bool_binop_done; } __pyx_t_11 = ((__pyx_v_cost_diag <= __pyx_v_cost_insertion) != 0); __pyx_t_8 = __pyx_t_11; __pyx_L38_bool_binop_done:; if (__pyx_t_8) { /* "cutadapt/_align.pyx":400 * if cost_diag <= cost_deletion and cost_diag <= cost_insertion: * # MISMATCH * cost = cost_diag # <<<<<<<<<<<<<< * origin = tmp_entry.origin * matches = tmp_entry.matches */ __pyx_v_cost = __pyx_v_cost_diag; /* "cutadapt/_align.pyx":401 * # MISMATCH * cost = cost_diag * origin = tmp_entry.origin # <<<<<<<<<<<<<< * matches = tmp_entry.matches * elif cost_insertion <= cost_deletion: */ __pyx_t_16 = __pyx_v_tmp_entry.origin; __pyx_v_origin = __pyx_t_16; /* "cutadapt/_align.pyx":402 * cost = cost_diag * origin = tmp_entry.origin * matches = tmp_entry.matches # <<<<<<<<<<<<<< * elif cost_insertion <= cost_deletion: * # INSERTION */ __pyx_t_16 = __pyx_v_tmp_entry.matches; __pyx_v_matches = __pyx_t_16; /* "cutadapt/_align.pyx":398 * cost_insertion = column[i-1].cost + self._insertion_cost * * if cost_diag <= cost_deletion and cost_diag <= cost_insertion: # <<<<<<<<<<<<<< * # MISMATCH * cost = cost_diag */ goto __pyx_L37; } /* "cutadapt/_align.pyx":403 * origin = tmp_entry.origin * matches = tmp_entry.matches * elif cost_insertion <= cost_deletion: # <<<<<<<<<<<<<< * # INSERTION * cost = cost_insertion */ __pyx_t_8 = ((__pyx_v_cost_insertion <= __pyx_v_cost_deletion) != 0); if (__pyx_t_8) { /* "cutadapt/_align.pyx":405 * elif cost_insertion <= cost_deletion: * # INSERTION * cost = cost_insertion # <<<<<<<<<<<<<< * origin = column[i-1].origin * matches = column[i-1].matches */ __pyx_v_cost = __pyx_v_cost_insertion; /* "cutadapt/_align.pyx":406 * # INSERTION * cost = cost_insertion * origin = column[i-1].origin # <<<<<<<<<<<<<< * matches = column[i-1].matches * else: */ __pyx_t_16 = (__pyx_v_column[(__pyx_v_i - 1)]).origin; __pyx_v_origin = __pyx_t_16; /* "cutadapt/_align.pyx":407 * cost = cost_insertion * origin = column[i-1].origin * matches = column[i-1].matches # <<<<<<<<<<<<<< * else: * # DELETION */ __pyx_t_16 = (__pyx_v_column[(__pyx_v_i - 1)]).matches; __pyx_v_matches = __pyx_t_16; /* "cutadapt/_align.pyx":403 * origin = tmp_entry.origin * matches = tmp_entry.matches * elif cost_insertion <= cost_deletion: # <<<<<<<<<<<<<< * # INSERTION * cost = cost_insertion */ goto __pyx_L37; } /* "cutadapt/_align.pyx":410 * else: * # DELETION * cost = cost_deletion # <<<<<<<<<<<<<< * origin = column[i].origin * matches = column[i].matches */ /*else*/ { __pyx_v_cost = __pyx_v_cost_deletion; /* "cutadapt/_align.pyx":411 * # DELETION * cost = cost_deletion * origin = column[i].origin # <<<<<<<<<<<<<< * matches = column[i].matches * */ __pyx_t_16 = (__pyx_v_column[__pyx_v_i]).origin; __pyx_v_origin = __pyx_t_16; /* "cutadapt/_align.pyx":412 * cost = cost_deletion * origin = column[i].origin * matches = column[i].matches # <<<<<<<<<<<<<< * * # remember current cell for next iteration */ __pyx_t_16 = (__pyx_v_column[__pyx_v_i]).matches; __pyx_v_matches = __pyx_t_16; } __pyx_L37:; } __pyx_L36:; /* "cutadapt/_align.pyx":415 * * # remember current cell for next iteration * tmp_entry = column[i] # <<<<<<<<<<<<<< * * column[i].cost = cost */ __pyx_v_tmp_entry = (__pyx_v_column[__pyx_v_i]); /* "cutadapt/_align.pyx":417 * tmp_entry = column[i] * * column[i].cost = cost # <<<<<<<<<<<<<< * column[i].origin = origin * column[i].matches = matches */ (__pyx_v_column[__pyx_v_i]).cost = __pyx_v_cost; /* "cutadapt/_align.pyx":418 * * column[i].cost = cost * column[i].origin = origin # <<<<<<<<<<<<<< * column[i].matches = matches * if self.debug: */ (__pyx_v_column[__pyx_v_i]).origin = __pyx_v_origin; /* "cutadapt/_align.pyx":419 * column[i].cost = cost * column[i].origin = origin * column[i].matches = matches # <<<<<<<<<<<<<< * if self.debug: * with gil: */ (__pyx_v_column[__pyx_v_i]).matches = __pyx_v_matches; } /* "cutadapt/_align.pyx":420 * column[i].origin = origin * column[i].matches = matches * if self.debug: # <<<<<<<<<<<<<< * with gil: * for i in range(last + 1): */ __pyx_t_8 = (__pyx_v_self->debug != 0); if (__pyx_t_8) { /* "cutadapt/_align.pyx":421 * column[i].matches = matches * if self.debug: * with gil: # <<<<<<<<<<<<<< * for i in range(last + 1): * self._dpmatrix.set_entry(i, j, column[i].cost) */ { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); #endif /*try:*/ { /* "cutadapt/_align.pyx":422 * if self.debug: * with gil: * for i in range(last + 1): # <<<<<<<<<<<<<< * self._dpmatrix.set_entry(i, j, column[i].cost) * while last >= 0 and column[last].cost > k: */ __pyx_t_15 = (__pyx_v_last + 1); for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_15; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; /* "cutadapt/_align.pyx":423 * with gil: * for i in range(last + 1): * self._dpmatrix.set_entry(i, j, column[i].cost) # <<<<<<<<<<<<<< * while last >= 0 and column[last].cost > k: * last -= 1 */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_dpmatrix, __pyx_n_s_set_entry); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L44_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_20 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L44_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_v_j); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L44_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_v_column[__pyx_v_i]).cost); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L44_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; __pyx_t_5 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_5 = 1; } } __pyx_t_19 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L44_error;} __Pyx_GOTREF(__pyx_t_19); if (__pyx_t_10) { __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_10); __pyx_t_10 = NULL; } __Pyx_GIVEREF(__pyx_t_20); PyTuple_SET_ITEM(__pyx_t_19, 0+__pyx_t_5, __pyx_t_20); __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_19, 1+__pyx_t_5, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_19, 2+__pyx_t_5, __pyx_t_9); __pyx_t_20 = 0; __pyx_t_18 = 0; __pyx_t_9 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_19, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L44_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } } /* "cutadapt/_align.pyx":421 * column[i].matches = matches * if self.debug: * with gil: # <<<<<<<<<<<<<< * for i in range(last + 1): * self._dpmatrix.set_entry(i, j, column[i].cost) */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif goto __pyx_L45; } __pyx_L44_error: { #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif goto __pyx_L28_error; } __pyx_L45:; } } /* "cutadapt/_align.pyx":420 * column[i].origin = origin * column[i].matches = matches * if self.debug: # <<<<<<<<<<<<<< * with gil: * for i in range(last + 1): */ } /* "cutadapt/_align.pyx":424 * for i in range(last + 1): * self._dpmatrix.set_entry(i, j, column[i].cost) * while last >= 0 and column[last].cost > k: # <<<<<<<<<<<<<< * last -= 1 * # last can be -1 here, but will be incremented next. */ while (1) { __pyx_t_11 = ((__pyx_v_last >= 0) != 0); if (__pyx_t_11) { } else { __pyx_t_8 = __pyx_t_11; goto __pyx_L50_bool_binop_done; } __pyx_t_11 = (((__pyx_v_column[__pyx_v_last]).cost > __pyx_v_k) != 0); __pyx_t_8 = __pyx_t_11; __pyx_L50_bool_binop_done:; if (!__pyx_t_8) break; /* "cutadapt/_align.pyx":425 * self._dpmatrix.set_entry(i, j, column[i].cost) * while last >= 0 and column[last].cost > k: * last -= 1 # <<<<<<<<<<<<<< * # last can be -1 here, but will be incremented next. * # TODO if last is -1, can we stop searching? */ __pyx_v_last = (__pyx_v_last - 1); } /* "cutadapt/_align.pyx":428 * # last can be -1 here, but will be incremented next. * # TODO if last is -1, can we stop searching? * if last < m: # <<<<<<<<<<<<<< * last += 1 * elif stop_in_query: */ __pyx_t_8 = ((__pyx_v_last < __pyx_v_m) != 0); if (__pyx_t_8) { /* "cutadapt/_align.pyx":429 * # TODO if last is -1, can we stop searching? * if last < m: * last += 1 # <<<<<<<<<<<<<< * elif stop_in_query: * # Found a match. If requested, find best match in last row. */ __pyx_v_last = (__pyx_v_last + 1); /* "cutadapt/_align.pyx":428 * # last can be -1 here, but will be incremented next. * # TODO if last is -1, can we stop searching? * if last < m: # <<<<<<<<<<<<<< * last += 1 * elif stop_in_query: */ goto __pyx_L52; } /* "cutadapt/_align.pyx":430 * if last < m: * last += 1 * elif stop_in_query: # <<<<<<<<<<<<<< * # Found a match. If requested, find best match in last row. * # length of the aligned part of the reference */ __pyx_t_8 = (__pyx_v_stop_in_query != 0); if (__pyx_t_8) { /* "cutadapt/_align.pyx":433 * # Found a match. If requested, find best match in last row. * # length of the aligned part of the reference * length = m + min(column[m].origin, 0) # <<<<<<<<<<<<<< * cost = column[m].cost * matches = column[m].matches */ __pyx_t_15 = 0; __pyx_t_12 = (__pyx_v_column[__pyx_v_m]).origin; if (((__pyx_t_15 < __pyx_t_12) != 0)) { __pyx_t_17 = __pyx_t_15; } else { __pyx_t_17 = __pyx_t_12; } __pyx_v_length = (__pyx_v_m + __pyx_t_17); /* "cutadapt/_align.pyx":434 * # length of the aligned part of the reference * length = m + min(column[m].origin, 0) * cost = column[m].cost # <<<<<<<<<<<<<< * matches = column[m].matches * if length >= self._min_overlap and cost <= length * max_error_rate and (matches > best.matches or (matches == best.matches and cost < best.cost)): */ __pyx_t_12 = (__pyx_v_column[__pyx_v_m]).cost; __pyx_v_cost = __pyx_t_12; /* "cutadapt/_align.pyx":435 * length = m + min(column[m].origin, 0) * cost = column[m].cost * matches = column[m].matches # <<<<<<<<<<<<<< * if length >= self._min_overlap and cost <= length * max_error_rate and (matches > best.matches or (matches == best.matches and cost < best.cost)): * # update */ __pyx_t_12 = (__pyx_v_column[__pyx_v_m]).matches; __pyx_v_matches = __pyx_t_12; /* "cutadapt/_align.pyx":436 * cost = column[m].cost * matches = column[m].matches * if length >= self._min_overlap and cost <= length * max_error_rate and (matches > best.matches or (matches == best.matches and cost < best.cost)): # <<<<<<<<<<<<<< * # update * best.matches = matches */ __pyx_t_11 = ((__pyx_v_length >= __pyx_v_self->_min_overlap) != 0); if (__pyx_t_11) { } else { __pyx_t_8 = __pyx_t_11; goto __pyx_L54_bool_binop_done; } __pyx_t_11 = ((__pyx_v_cost <= (__pyx_v_length * __pyx_v_max_error_rate)) != 0); if (__pyx_t_11) { } else { __pyx_t_8 = __pyx_t_11; goto __pyx_L54_bool_binop_done; } __pyx_t_11 = ((__pyx_v_matches > __pyx_v_best.matches) != 0); if (!__pyx_t_11) { } else { __pyx_t_8 = __pyx_t_11; goto __pyx_L54_bool_binop_done; } __pyx_t_11 = ((__pyx_v_matches == __pyx_v_best.matches) != 0); if (__pyx_t_11) { } else { __pyx_t_8 = __pyx_t_11; goto __pyx_L54_bool_binop_done; } __pyx_t_11 = ((__pyx_v_cost < __pyx_v_best.cost) != 0); __pyx_t_8 = __pyx_t_11; __pyx_L54_bool_binop_done:; if (__pyx_t_8) { /* "cutadapt/_align.pyx":438 * if length >= self._min_overlap and cost <= length * max_error_rate and (matches > best.matches or (matches == best.matches and cost < best.cost)): * # update * best.matches = matches # <<<<<<<<<<<<<< * best.cost = cost * best.origin = column[m].origin */ __pyx_v_best.matches = __pyx_v_matches; /* "cutadapt/_align.pyx":439 * # update * best.matches = matches * best.cost = cost # <<<<<<<<<<<<<< * best.origin = column[m].origin * best.ref_stop = m */ __pyx_v_best.cost = __pyx_v_cost; /* "cutadapt/_align.pyx":440 * best.matches = matches * best.cost = cost * best.origin = column[m].origin # <<<<<<<<<<<<<< * best.ref_stop = m * best.query_stop = j */ __pyx_t_12 = (__pyx_v_column[__pyx_v_m]).origin; __pyx_v_best.origin = __pyx_t_12; /* "cutadapt/_align.pyx":441 * best.cost = cost * best.origin = column[m].origin * best.ref_stop = m # <<<<<<<<<<<<<< * best.query_stop = j * if cost == 0 and matches == m: */ __pyx_v_best.ref_stop = __pyx_v_m; /* "cutadapt/_align.pyx":442 * best.origin = column[m].origin * best.ref_stop = m * best.query_stop = j # <<<<<<<<<<<<<< * if cost == 0 and matches == m: * # exact match, stop early */ __pyx_v_best.query_stop = __pyx_v_j; /* "cutadapt/_align.pyx":443 * best.ref_stop = m * best.query_stop = j * if cost == 0 and matches == m: # <<<<<<<<<<<<<< * # exact match, stop early * break */ __pyx_t_11 = ((__pyx_v_cost == 0) != 0); if (__pyx_t_11) { } else { __pyx_t_8 = __pyx_t_11; goto __pyx_L60_bool_binop_done; } __pyx_t_11 = ((__pyx_v_matches == __pyx_v_m) != 0); __pyx_t_8 = __pyx_t_11; __pyx_L60_bool_binop_done:; if (__pyx_t_8) { /* "cutadapt/_align.pyx":445 * if cost == 0 and matches == m: * # exact match, stop early * break # <<<<<<<<<<<<<< * # column finished * */ goto __pyx_L31_break; /* "cutadapt/_align.pyx":443 * best.ref_stop = m * best.query_stop = j * if cost == 0 and matches == m: # <<<<<<<<<<<<<< * # exact match, stop early * break */ } /* "cutadapt/_align.pyx":436 * cost = column[m].cost * matches = column[m].matches * if length >= self._min_overlap and cost <= length * max_error_rate and (matches > best.matches or (matches == best.matches and cost < best.cost)): # <<<<<<<<<<<<<< * # update * best.matches = matches */ } /* "cutadapt/_align.pyx":430 * if last < m: * last += 1 * elif stop_in_query: # <<<<<<<<<<<<<< * # Found a match. If requested, find best match in last row. * # length of the aligned part of the reference */ } __pyx_L52:; } __pyx_L31_break:; } /* "cutadapt/_align.pyx":371 * cdef _Entry tmp_entry * * with nogil: # <<<<<<<<<<<<<< * # iterate over columns * for j in range(min_n + 1, max_n + 1): */ /*finally:*/ { /*normal exit:*/{ #ifdef WITH_THREAD Py_BLOCK_THREADS #endif goto __pyx_L29; } __pyx_L28_error: { #ifdef WITH_THREAD Py_BLOCK_THREADS #endif goto __pyx_L1_error; } __pyx_L29:; } } /* "cutadapt/_align.pyx":448 * # column finished * * if max_n == n: # <<<<<<<<<<<<<< * first_i = 0 if stop_in_ref else m * # search in last column # TODO last? */ __pyx_t_8 = ((__pyx_v_max_n == __pyx_v_n) != 0); if (__pyx_t_8) { /* "cutadapt/_align.pyx":449 * * if max_n == n: * first_i = 0 if stop_in_ref else m # <<<<<<<<<<<<<< * # search in last column # TODO last? * for i in range(first_i, m+1): */ if ((__pyx_v_stop_in_ref != 0)) { __pyx_t_14 = 0; } else { __pyx_t_14 = __pyx_v_m; } __pyx_v_first_i = __pyx_t_14; /* "cutadapt/_align.pyx":451 * first_i = 0 if stop_in_ref else m * # search in last column # TODO last? * for i in range(first_i, m+1): # <<<<<<<<<<<<<< * length = i + min(column[i].origin, 0) * cost = column[i].cost */ __pyx_t_14 = (__pyx_v_m + 1); for (__pyx_t_13 = __pyx_v_first_i; __pyx_t_13 < __pyx_t_14; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; /* "cutadapt/_align.pyx":452 * # search in last column # TODO last? * for i in range(first_i, m+1): * length = i + min(column[i].origin, 0) # <<<<<<<<<<<<<< * cost = column[i].cost * matches = column[i].matches */ __pyx_t_17 = 0; __pyx_t_12 = (__pyx_v_column[__pyx_v_i]).origin; if (((__pyx_t_17 < __pyx_t_12) != 0)) { __pyx_t_15 = __pyx_t_17; } else { __pyx_t_15 = __pyx_t_12; } __pyx_v_length = (__pyx_v_i + __pyx_t_15); /* "cutadapt/_align.pyx":453 * for i in range(first_i, m+1): * length = i + min(column[i].origin, 0) * cost = column[i].cost # <<<<<<<<<<<<<< * matches = column[i].matches * if length >= self._min_overlap and cost <= length * max_error_rate and (matches > best.matches or (matches == best.matches and cost < best.cost)): */ __pyx_t_12 = (__pyx_v_column[__pyx_v_i]).cost; __pyx_v_cost = __pyx_t_12; /* "cutadapt/_align.pyx":454 * length = i + min(column[i].origin, 0) * cost = column[i].cost * matches = column[i].matches # <<<<<<<<<<<<<< * if length >= self._min_overlap and cost <= length * max_error_rate and (matches > best.matches or (matches == best.matches and cost < best.cost)): * # update best */ __pyx_t_12 = (__pyx_v_column[__pyx_v_i]).matches; __pyx_v_matches = __pyx_t_12; /* "cutadapt/_align.pyx":455 * cost = column[i].cost * matches = column[i].matches * if length >= self._min_overlap and cost <= length * max_error_rate and (matches > best.matches or (matches == best.matches and cost < best.cost)): # <<<<<<<<<<<<<< * # update best * best.matches = matches */ __pyx_t_11 = ((__pyx_v_length >= __pyx_v_self->_min_overlap) != 0); if (__pyx_t_11) { } else { __pyx_t_8 = __pyx_t_11; goto __pyx_L66_bool_binop_done; } __pyx_t_11 = ((__pyx_v_cost <= (__pyx_v_length * __pyx_v_max_error_rate)) != 0); if (__pyx_t_11) { } else { __pyx_t_8 = __pyx_t_11; goto __pyx_L66_bool_binop_done; } __pyx_t_11 = ((__pyx_v_matches > __pyx_v_best.matches) != 0); if (!__pyx_t_11) { } else { __pyx_t_8 = __pyx_t_11; goto __pyx_L66_bool_binop_done; } __pyx_t_11 = ((__pyx_v_matches == __pyx_v_best.matches) != 0); if (__pyx_t_11) { } else { __pyx_t_8 = __pyx_t_11; goto __pyx_L66_bool_binop_done; } __pyx_t_11 = ((__pyx_v_cost < __pyx_v_best.cost) != 0); __pyx_t_8 = __pyx_t_11; __pyx_L66_bool_binop_done:; if (__pyx_t_8) { /* "cutadapt/_align.pyx":457 * if length >= self._min_overlap and cost <= length * max_error_rate and (matches > best.matches or (matches == best.matches and cost < best.cost)): * # update best * best.matches = matches # <<<<<<<<<<<<<< * best.cost = cost * best.origin = column[i].origin */ __pyx_v_best.matches = __pyx_v_matches; /* "cutadapt/_align.pyx":458 * # update best * best.matches = matches * best.cost = cost # <<<<<<<<<<<<<< * best.origin = column[i].origin * best.ref_stop = i */ __pyx_v_best.cost = __pyx_v_cost; /* "cutadapt/_align.pyx":459 * best.matches = matches * best.cost = cost * best.origin = column[i].origin # <<<<<<<<<<<<<< * best.ref_stop = i * best.query_stop = n */ __pyx_t_12 = (__pyx_v_column[__pyx_v_i]).origin; __pyx_v_best.origin = __pyx_t_12; /* "cutadapt/_align.pyx":460 * best.cost = cost * best.origin = column[i].origin * best.ref_stop = i # <<<<<<<<<<<<<< * best.query_stop = n * if best.cost == m + n: */ __pyx_v_best.ref_stop = __pyx_v_i; /* "cutadapt/_align.pyx":461 * best.origin = column[i].origin * best.ref_stop = i * best.query_stop = n # <<<<<<<<<<<<<< * if best.cost == m + n: * # best.cost was initialized with this value. */ __pyx_v_best.query_stop = __pyx_v_n; /* "cutadapt/_align.pyx":455 * cost = column[i].cost * matches = column[i].matches * if length >= self._min_overlap and cost <= length * max_error_rate and (matches > best.matches or (matches == best.matches and cost < best.cost)): # <<<<<<<<<<<<<< * # update best * best.matches = matches */ } } /* "cutadapt/_align.pyx":448 * # column finished * * if max_n == n: # <<<<<<<<<<<<<< * first_i = 0 if stop_in_ref else m * # search in last column # TODO last? */ } /* "cutadapt/_align.pyx":462 * best.ref_stop = i * best.query_stop = n * if best.cost == m + n: # <<<<<<<<<<<<<< * # best.cost was initialized with this value. * # If it is unchanged, no alignment was found that has */ __pyx_t_8 = ((__pyx_v_best.cost == (__pyx_v_m + __pyx_v_n)) != 0); if (__pyx_t_8) { /* "cutadapt/_align.pyx":466 * # If it is unchanged, no alignment was found that has * # an error rate within the allowed range. * return None # <<<<<<<<<<<<<< * * cdef int start1, start2 */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; /* "cutadapt/_align.pyx":462 * best.ref_stop = i * best.query_stop = n * if best.cost == m + n: # <<<<<<<<<<<<<< * # best.cost was initialized with this value. * # If it is unchanged, no alignment was found that has */ } /* "cutadapt/_align.pyx":469 * * cdef int start1, start2 * if best.origin >= 0: # <<<<<<<<<<<<<< * start1 = 0 * start2 = best.origin */ __pyx_t_8 = ((__pyx_v_best.origin >= 0) != 0); if (__pyx_t_8) { /* "cutadapt/_align.pyx":470 * cdef int start1, start2 * if best.origin >= 0: * start1 = 0 # <<<<<<<<<<<<<< * start2 = best.origin * else: */ __pyx_v_start1 = 0; /* "cutadapt/_align.pyx":471 * if best.origin >= 0: * start1 = 0 * start2 = best.origin # <<<<<<<<<<<<<< * else: * start1 = -best.origin */ __pyx_t_13 = __pyx_v_best.origin; __pyx_v_start2 = __pyx_t_13; /* "cutadapt/_align.pyx":469 * * cdef int start1, start2 * if best.origin >= 0: # <<<<<<<<<<<<<< * start1 = 0 * start2 = best.origin */ goto __pyx_L72; } /* "cutadapt/_align.pyx":473 * start2 = best.origin * else: * start1 = -best.origin # <<<<<<<<<<<<<< * start2 = 0 * */ /*else*/ { __pyx_v_start1 = (-__pyx_v_best.origin); /* "cutadapt/_align.pyx":474 * else: * start1 = -best.origin * start2 = 0 # <<<<<<<<<<<<<< * * assert best.ref_stop - start1 > 0 # Do not return empty alignments. */ __pyx_v_start2 = 0; } __pyx_L72:; /* "cutadapt/_align.pyx":476 * start2 = 0 * * assert best.ref_stop - start1 > 0 # Do not return empty alignments. # <<<<<<<<<<<<<< * return (start1, best.ref_stop, start2, best.query_stop, best.matches, best.cost) * */ #ifndef CYTHON_WITHOUT_ASSERTIONS if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!(((__pyx_v_best.ref_stop - __pyx_v_start1) > 0) != 0))) { PyErr_SetNone(PyExc_AssertionError); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif /* "cutadapt/_align.pyx":477 * * assert best.ref_stop - start1 > 0 # Do not return empty alignments. * return (start1, best.ref_stop, start2, best.query_stop, best.matches, best.cost) # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_start1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_best.ref_stop); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_19 = __Pyx_PyInt_From_int(__pyx_v_start2); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_best.query_stop); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_v_best.matches); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_20 = __Pyx_PyInt_From_int(__pyx_v_best.cost); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_20); __pyx_t_10 = PyTuple_New(6); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_19); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_20); PyTuple_SET_ITEM(__pyx_t_10, 5, __pyx_t_20); __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_19 = 0; __pyx_t_9 = 0; __pyx_t_18 = 0; __pyx_t_20 = 0; __pyx_r = __pyx_t_10; __pyx_t_10 = 0; goto __pyx_L0; /* "cutadapt/_align.pyx":259 * self.debug = True * * def locate(self, str query): # <<<<<<<<<<<<<< * """ * locate(query) -> (refstart, refstop, querystart, querystop, matches, errors) */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_18); __Pyx_XDECREF(__pyx_t_19); __Pyx_XDECREF(__pyx_t_20); __Pyx_AddTraceback("cutadapt._align.Aligner.locate", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_query_bytes); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cutadapt/_align.pyx":479 * return (start1, best.ref_stop, start2, best.query_stop, best.matches, best.cost) * * def __dealloc__(self): # <<<<<<<<<<<<<< * PyMem_Free(self.column) * */ /* Python wrapper */ static void __pyx_pw_8cutadapt_6_align_7Aligner_7__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_8cutadapt_6_align_7Aligner_7__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_8cutadapt_6_align_7Aligner_6__dealloc__(((struct __pyx_obj_8cutadapt_6_align_Aligner *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); } static void __pyx_pf_8cutadapt_6_align_7Aligner_6__dealloc__(struct __pyx_obj_8cutadapt_6_align_Aligner *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); /* "cutadapt/_align.pyx":480 * * def __dealloc__(self): * PyMem_Free(self.column) # <<<<<<<<<<<<<< * * */ PyMem_Free(__pyx_v_self->column); /* "cutadapt/_align.pyx":479 * return (start1, best.ref_stop, start2, best.query_stop, best.matches, best.cost) * * def __dealloc__(self): # <<<<<<<<<<<<<< * PyMem_Free(self.column) * */ /* function exit code */ __Pyx_RefNannyFinishContext(); } /* "cutadapt/_align.pyx":483 * * * def locate(str reference, str query, double max_error_rate, int flags=SEMIGLOBAL, bint wildcard_ref=False, bint wildcard_query=False, int min_overlap=1): # <<<<<<<<<<<<<< * aligner = Aligner(reference, max_error_rate, flags, wildcard_ref, wildcard_query) * aligner.min_overlap = min_overlap */ /* Python wrapper */ static PyObject *__pyx_pw_8cutadapt_6_align_5locate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_8cutadapt_6_align_5locate = {"locate", (PyCFunction)__pyx_pw_8cutadapt_6_align_5locate, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_8cutadapt_6_align_5locate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_reference = 0; PyObject *__pyx_v_query = 0; double __pyx_v_max_error_rate; int __pyx_v_flags; int __pyx_v_wildcard_ref; int __pyx_v_wildcard_query; int __pyx_v_min_overlap; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("locate (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_reference,&__pyx_n_s_query,&__pyx_n_s_max_error_rate,&__pyx_n_s_flags,&__pyx_n_s_wildcard_ref,&__pyx_n_s_wildcard_query,&__pyx_n_s_min_overlap,0}; PyObject* values[7] = {0,0,0,0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_reference)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_query)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("locate", 0, 3, 7, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_max_error_rate)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("locate", 0, 3, 7, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_flags); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_wildcard_ref); if (value) { values[4] = value; kw_args--; } } case 5: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_wildcard_query); if (value) { values[5] = value; kw_args--; } } case 6: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_min_overlap); if (value) { values[6] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "locate") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6); case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_reference = ((PyObject*)values[0]); __pyx_v_query = ((PyObject*)values[1]); __pyx_v_max_error_rate = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_max_error_rate == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L3_error;} if (values[3]) { __pyx_v_flags = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_flags = ((int)15); } if (values[4]) { __pyx_v_wildcard_ref = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_wildcard_ref == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_wildcard_ref = ((int)0); } if (values[5]) { __pyx_v_wildcard_query = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_wildcard_query == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_wildcard_query = ((int)0); } if (values[6]) { __pyx_v_min_overlap = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_min_overlap == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_min_overlap = ((int)1); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("locate", 0, 3, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cutadapt._align.locate", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_reference), (&PyString_Type), 1, "reference", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_query), (&PyString_Type), 1, "query", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_8cutadapt_6_align_4locate(__pyx_self, __pyx_v_reference, __pyx_v_query, __pyx_v_max_error_rate, __pyx_v_flags, __pyx_v_wildcard_ref, __pyx_v_wildcard_query, __pyx_v_min_overlap); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8cutadapt_6_align_4locate(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_query, double __pyx_v_max_error_rate, int __pyx_v_flags, int __pyx_v_wildcard_ref, int __pyx_v_wildcard_query, int __pyx_v_min_overlap) { struct __pyx_obj_8cutadapt_6_align_Aligner *__pyx_v_aligner = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("locate", 0); /* "cutadapt/_align.pyx":484 * * def locate(str reference, str query, double max_error_rate, int flags=SEMIGLOBAL, bint wildcard_ref=False, bint wildcard_query=False, int min_overlap=1): * aligner = Aligner(reference, max_error_rate, flags, wildcard_ref, wildcard_query) # <<<<<<<<<<<<<< * aligner.min_overlap = min_overlap * return aligner.locate(query) */ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_max_error_rate); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_wildcard_ref); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_wildcard_query); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_reference); __Pyx_GIVEREF(__pyx_v_reference); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_reference); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_t_4); __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_8cutadapt_6_align_Aligner), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_aligner = ((struct __pyx_obj_8cutadapt_6_align_Aligner *)__pyx_t_4); __pyx_t_4 = 0; /* "cutadapt/_align.pyx":485 * def locate(str reference, str query, double max_error_rate, int flags=SEMIGLOBAL, bint wildcard_ref=False, bint wildcard_query=False, int min_overlap=1): * aligner = Aligner(reference, max_error_rate, flags, wildcard_ref, wildcard_query) * aligner.min_overlap = min_overlap # <<<<<<<<<<<<<< * return aligner.locate(query) * */ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_min_overlap); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_aligner), __pyx_n_s_min_overlap, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cutadapt/_align.pyx":486 * aligner = Aligner(reference, max_error_rate, flags, wildcard_ref, wildcard_query) * aligner.min_overlap = min_overlap * return aligner.locate(query) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_aligner), __pyx_n_s_locate); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (!__pyx_t_3) { __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_query); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); } else { __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_v_query); __Pyx_GIVEREF(__pyx_v_query); PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_query); __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; /* "cutadapt/_align.pyx":483 * * * def locate(str reference, str query, double max_error_rate, int flags=SEMIGLOBAL, bint wildcard_ref=False, bint wildcard_query=False, int min_overlap=1): # <<<<<<<<<<<<<< * aligner = Aligner(reference, max_error_rate, flags, wildcard_ref, wildcard_query) * aligner.min_overlap = min_overlap */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("cutadapt._align.locate", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_aligner); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cutadapt/_align.pyx":489 * * * def compare_prefixes(str ref, str query, bint wildcard_ref=False, bint wildcard_query=False): # <<<<<<<<<<<<<< * """ * Find out whether one string is the prefix of the other one, allowing */ /* Python wrapper */ static PyObject *__pyx_pw_8cutadapt_6_align_7compare_prefixes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8cutadapt_6_align_6compare_prefixes[] = "\n\tFind out whether one string is the prefix of the other one, allowing\n\tIUPAC wildcards in ref and/or query if the appropriate flag is set.\n\n\tThis is used to find an anchored 5' adapter (type 'FRONT') in the 'no indels' mode.\n\tThis is very simple as only the number of errors needs to be counted.\n\n\tThis function returns a tuple compatible with what Aligner.locate outputs.\n\t"; static PyMethodDef __pyx_mdef_8cutadapt_6_align_7compare_prefixes = {"compare_prefixes", (PyCFunction)__pyx_pw_8cutadapt_6_align_7compare_prefixes, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8cutadapt_6_align_6compare_prefixes}; static PyObject *__pyx_pw_8cutadapt_6_align_7compare_prefixes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_ref = 0; PyObject *__pyx_v_query = 0; int __pyx_v_wildcard_ref; int __pyx_v_wildcard_query; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("compare_prefixes (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ref,&__pyx_n_s_query,&__pyx_n_s_wildcard_ref,&__pyx_n_s_wildcard_query,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ref)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_query)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("compare_prefixes", 0, 2, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_wildcard_ref); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_wildcard_query); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compare_prefixes") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_ref = ((PyObject*)values[0]); __pyx_v_query = ((PyObject*)values[1]); if (values[2]) { __pyx_v_wildcard_ref = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_wildcard_ref == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_wildcard_ref = ((int)0); } if (values[3]) { __pyx_v_wildcard_query = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_wildcard_query == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_wildcard_query = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("compare_prefixes", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cutadapt._align.compare_prefixes", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ref), (&PyString_Type), 1, "ref", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_query), (&PyString_Type), 1, "query", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_8cutadapt_6_align_6compare_prefixes(__pyx_self, __pyx_v_ref, __pyx_v_query, __pyx_v_wildcard_ref, __pyx_v_wildcard_query); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8cutadapt_6_align_6compare_prefixes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ref, PyObject *__pyx_v_query, int __pyx_v_wildcard_ref, int __pyx_v_wildcard_query) { int __pyx_v_m; int __pyx_v_n; PyObject *__pyx_v_query_bytes = 0; PyObject *__pyx_v_ref_bytes = 0; char *__pyx_v_r_ptr; char *__pyx_v_q_ptr; int __pyx_v_length; int __pyx_v_i; int __pyx_v_matches; int __pyx_v_compare_ascii; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; char *__pyx_t_10; PyObject *__pyx_t_11 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("compare_prefixes", 0); /* "cutadapt/_align.pyx":499 * This function returns a tuple compatible with what Aligner.locate outputs. * """ * cdef int m = len(ref) # <<<<<<<<<<<<<< * cdef int n = len(query) * cdef bytes query_bytes = query.encode('ascii') */ __pyx_t_1 = PyObject_Length(__pyx_v_ref); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_m = __pyx_t_1; /* "cutadapt/_align.pyx":500 * """ * cdef int m = len(ref) * cdef int n = len(query) # <<<<<<<<<<<<<< * cdef bytes query_bytes = query.encode('ascii') * cdef bytes ref_bytes = ref.encode('ascii') */ __pyx_t_1 = PyObject_Length(__pyx_v_query); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; /* "cutadapt/_align.pyx":501 * cdef int m = len(ref) * cdef int n = len(query) * cdef bytes query_bytes = query.encode('ascii') # <<<<<<<<<<<<<< * cdef bytes ref_bytes = ref.encode('ascii') * cdef char* r_ptr */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_query, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_query_bytes = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* "cutadapt/_align.pyx":502 * cdef int n = len(query) * cdef bytes query_bytes = query.encode('ascii') * cdef bytes ref_bytes = ref.encode('ascii') # <<<<<<<<<<<<<< * cdef char* r_ptr * cdef char* q_ptr */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ref, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ref_bytes = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "cutadapt/_align.pyx":505 * cdef char* r_ptr * cdef char* q_ptr * cdef int length = min(m, n) # <<<<<<<<<<<<<< * cdef int i, matches = 0 * cdef bint compare_ascii = False */ __pyx_t_4 = __pyx_v_n; __pyx_t_5 = __pyx_v_m; if (((__pyx_t_4 < __pyx_t_5) != 0)) { __pyx_t_6 = __pyx_t_4; } else { __pyx_t_6 = __pyx_t_5; } __pyx_v_length = __pyx_t_6; /* "cutadapt/_align.pyx":506 * cdef char* q_ptr * cdef int length = min(m, n) * cdef int i, matches = 0 # <<<<<<<<<<<<<< * cdef bint compare_ascii = False * */ __pyx_v_matches = 0; /* "cutadapt/_align.pyx":507 * cdef int length = min(m, n) * cdef int i, matches = 0 * cdef bint compare_ascii = False # <<<<<<<<<<<<<< * * if wildcard_ref: */ __pyx_v_compare_ascii = 0; /* "cutadapt/_align.pyx":509 * cdef bint compare_ascii = False * * if wildcard_ref: # <<<<<<<<<<<<<< * ref_bytes = ref_bytes.translate(IUPAC_TABLE) * elif wildcard_query: */ __pyx_t_7 = (__pyx_v_wildcard_ref != 0); if (__pyx_t_7) { /* "cutadapt/_align.pyx":510 * * if wildcard_ref: * ref_bytes = ref_bytes.translate(IUPAC_TABLE) # <<<<<<<<<<<<<< * elif wildcard_query: * ref_bytes = ref_bytes.translate(ACGT_TABLE) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ref_bytes, __pyx_n_s_translate); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_8) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_8cutadapt_6_align_IUPAC_TABLE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); } else { __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_INCREF(__pyx_v_8cutadapt_6_align_IUPAC_TABLE); __Pyx_GIVEREF(__pyx_v_8cutadapt_6_align_IUPAC_TABLE); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_8cutadapt_6_align_IUPAC_TABLE); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_ref_bytes, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; /* "cutadapt/_align.pyx":509 * cdef bint compare_ascii = False * * if wildcard_ref: # <<<<<<<<<<<<<< * ref_bytes = ref_bytes.translate(IUPAC_TABLE) * elif wildcard_query: */ goto __pyx_L3; } /* "cutadapt/_align.pyx":511 * if wildcard_ref: * ref_bytes = ref_bytes.translate(IUPAC_TABLE) * elif wildcard_query: # <<<<<<<<<<<<<< * ref_bytes = ref_bytes.translate(ACGT_TABLE) * else: */ __pyx_t_7 = (__pyx_v_wildcard_query != 0); if (__pyx_t_7) { /* "cutadapt/_align.pyx":512 * ref_bytes = ref_bytes.translate(IUPAC_TABLE) * elif wildcard_query: * ref_bytes = ref_bytes.translate(ACGT_TABLE) # <<<<<<<<<<<<<< * else: * compare_ascii = True */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ref_bytes, __pyx_n_s_translate); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_9) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_8cutadapt_6_align_ACGT_TABLE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); } else { __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9); __pyx_t_9 = NULL; __Pyx_INCREF(__pyx_v_8cutadapt_6_align_ACGT_TABLE); __Pyx_GIVEREF(__pyx_v_8cutadapt_6_align_ACGT_TABLE); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_8cutadapt_6_align_ACGT_TABLE); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_ref_bytes, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; /* "cutadapt/_align.pyx":511 * if wildcard_ref: * ref_bytes = ref_bytes.translate(IUPAC_TABLE) * elif wildcard_query: # <<<<<<<<<<<<<< * ref_bytes = ref_bytes.translate(ACGT_TABLE) * else: */ goto __pyx_L3; } /* "cutadapt/_align.pyx":514 * ref_bytes = ref_bytes.translate(ACGT_TABLE) * else: * compare_ascii = True # <<<<<<<<<<<<<< * if wildcard_query: * query_bytes = query_bytes.translate(IUPAC_TABLE) */ /*else*/ { __pyx_v_compare_ascii = 1; } __pyx_L3:; /* "cutadapt/_align.pyx":515 * else: * compare_ascii = True * if wildcard_query: # <<<<<<<<<<<<<< * query_bytes = query_bytes.translate(IUPAC_TABLE) * elif wildcard_ref: */ __pyx_t_7 = (__pyx_v_wildcard_query != 0); if (__pyx_t_7) { /* "cutadapt/_align.pyx":516 * compare_ascii = True * if wildcard_query: * query_bytes = query_bytes.translate(IUPAC_TABLE) # <<<<<<<<<<<<<< * elif wildcard_ref: * query_bytes = query_bytes.translate(ACGT_TABLE) */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_query_bytes, __pyx_n_s_translate); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_8) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_8cutadapt_6_align_IUPAC_TABLE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); } else { __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_INCREF(__pyx_v_8cutadapt_6_align_IUPAC_TABLE); __Pyx_GIVEREF(__pyx_v_8cutadapt_6_align_IUPAC_TABLE); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_8cutadapt_6_align_IUPAC_TABLE); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_query_bytes, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; /* "cutadapt/_align.pyx":515 * else: * compare_ascii = True * if wildcard_query: # <<<<<<<<<<<<<< * query_bytes = query_bytes.translate(IUPAC_TABLE) * elif wildcard_ref: */ goto __pyx_L4; } /* "cutadapt/_align.pyx":517 * if wildcard_query: * query_bytes = query_bytes.translate(IUPAC_TABLE) * elif wildcard_ref: # <<<<<<<<<<<<<< * query_bytes = query_bytes.translate(ACGT_TABLE) * */ __pyx_t_7 = (__pyx_v_wildcard_ref != 0); if (__pyx_t_7) { /* "cutadapt/_align.pyx":518 * query_bytes = query_bytes.translate(IUPAC_TABLE) * elif wildcard_ref: * query_bytes = query_bytes.translate(ACGT_TABLE) # <<<<<<<<<<<<<< * * if compare_ascii: */ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_query_bytes, __pyx_n_s_translate); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } if (!__pyx_t_9) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_8cutadapt_6_align_ACGT_TABLE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); } else { __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9); __pyx_t_9 = NULL; __Pyx_INCREF(__pyx_v_8cutadapt_6_align_ACGT_TABLE); __Pyx_GIVEREF(__pyx_v_8cutadapt_6_align_ACGT_TABLE); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_8cutadapt_6_align_ACGT_TABLE); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_query_bytes, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; /* "cutadapt/_align.pyx":517 * if wildcard_query: * query_bytes = query_bytes.translate(IUPAC_TABLE) * elif wildcard_ref: # <<<<<<<<<<<<<< * query_bytes = query_bytes.translate(ACGT_TABLE) * */ } __pyx_L4:; /* "cutadapt/_align.pyx":520 * query_bytes = query_bytes.translate(ACGT_TABLE) * * if compare_ascii: # <<<<<<<<<<<<<< * for i in range(length): * if ref[i] == query[i]: */ __pyx_t_7 = (__pyx_v_compare_ascii != 0); if (__pyx_t_7) { /* "cutadapt/_align.pyx":521 * * if compare_ascii: * for i in range(length): # <<<<<<<<<<<<<< * if ref[i] == query[i]: * matches += 1 */ __pyx_t_6 = __pyx_v_length; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_6; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "cutadapt/_align.pyx":522 * if compare_ascii: * for i in range(length): * if ref[i] == query[i]: # <<<<<<<<<<<<<< * matches += 1 * else: */ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_ref, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_query, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_7) { /* "cutadapt/_align.pyx":523 * for i in range(length): * if ref[i] == query[i]: * matches += 1 # <<<<<<<<<<<<<< * else: * r_ptr = ref_bytes */ __pyx_v_matches = (__pyx_v_matches + 1); /* "cutadapt/_align.pyx":522 * if compare_ascii: * for i in range(length): * if ref[i] == query[i]: # <<<<<<<<<<<<<< * matches += 1 * else: */ } } /* "cutadapt/_align.pyx":520 * query_bytes = query_bytes.translate(ACGT_TABLE) * * if compare_ascii: # <<<<<<<<<<<<<< * for i in range(length): * if ref[i] == query[i]: */ goto __pyx_L5; } /* "cutadapt/_align.pyx":525 * matches += 1 * else: * r_ptr = ref_bytes # <<<<<<<<<<<<<< * q_ptr = query_bytes * for i in range(length): */ /*else*/ { __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_ref_bytes); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_r_ptr = __pyx_t_10; /* "cutadapt/_align.pyx":526 * else: * r_ptr = ref_bytes * q_ptr = query_bytes # <<<<<<<<<<<<<< * for i in range(length): * if (r_ptr[i] & q_ptr[i]) != 0: */ __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_query_bytes); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_q_ptr = __pyx_t_10; /* "cutadapt/_align.pyx":527 * r_ptr = ref_bytes * q_ptr = query_bytes * for i in range(length): # <<<<<<<<<<<<<< * if (r_ptr[i] & q_ptr[i]) != 0: * matches += 1 */ __pyx_t_6 = __pyx_v_length; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_6; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; /* "cutadapt/_align.pyx":528 * q_ptr = query_bytes * for i in range(length): * if (r_ptr[i] & q_ptr[i]) != 0: # <<<<<<<<<<<<<< * matches += 1 * */ __pyx_t_7 = ((((__pyx_v_r_ptr[__pyx_v_i]) & (__pyx_v_q_ptr[__pyx_v_i])) != 0) != 0); if (__pyx_t_7) { /* "cutadapt/_align.pyx":529 * for i in range(length): * if (r_ptr[i] & q_ptr[i]) != 0: * matches += 1 # <<<<<<<<<<<<<< * * # length - matches = no. of errors */ __pyx_v_matches = (__pyx_v_matches + 1); /* "cutadapt/_align.pyx":528 * q_ptr = query_bytes * for i in range(length): * if (r_ptr[i] & q_ptr[i]) != 0: # <<<<<<<<<<<<<< * matches += 1 * */ } } } __pyx_L5:; /* "cutadapt/_align.pyx":532 * * # length - matches = no. of errors * return (0, length, 0, length, matches, length - matches) # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_length); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_length); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_matches); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_v_length - __pyx_v_matches)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = PyTuple_New(6); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_int_0); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_8); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_int_0); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_11, 4, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 5, __pyx_t_9); __pyx_t_8 = 0; __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_9 = 0; __pyx_r = __pyx_t_11; __pyx_t_11 = 0; goto __pyx_L0; /* "cutadapt/_align.pyx":489 * * * def compare_prefixes(str ref, str query, bint wildcard_ref=False, bint wildcard_query=False): # <<<<<<<<<<<<<< * """ * Find out whether one string is the prefix of the other one, allowing */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("cutadapt._align.compare_prefixes", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_query_bytes); __Pyx_XDECREF(__pyx_v_ref_bytes); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_tp_new_8cutadapt_6_align_Aligner(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_8cutadapt_6_align_Aligner *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_8cutadapt_6_align_Aligner *)o); p->_dpmatrix = Py_None; Py_INCREF(Py_None); p->_reference = ((PyObject*)Py_None); Py_INCREF(Py_None); p->str_reference = ((PyObject*)Py_None); Py_INCREF(Py_None); if (unlikely(__pyx_pw_8cutadapt_6_align_7Aligner_1__cinit__(o, a, k) < 0)) { Py_DECREF(o); o = 0; } return o; } static void __pyx_tp_dealloc_8cutadapt_6_align_Aligner(PyObject *o) { struct __pyx_obj_8cutadapt_6_align_Aligner *p = (struct __pyx_obj_8cutadapt_6_align_Aligner *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_8cutadapt_6_align_7Aligner_7__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } Py_CLEAR(p->_dpmatrix); Py_CLEAR(p->_reference); Py_CLEAR(p->str_reference); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_8cutadapt_6_align_Aligner(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_8cutadapt_6_align_Aligner *p = (struct __pyx_obj_8cutadapt_6_align_Aligner *)o; if (p->_dpmatrix) { e = (*v)(p->_dpmatrix, a); if (e) return e; } return 0; } static int __pyx_tp_clear_8cutadapt_6_align_Aligner(PyObject *o) { PyObject* tmp; struct __pyx_obj_8cutadapt_6_align_Aligner *p = (struct __pyx_obj_8cutadapt_6_align_Aligner *)o; tmp = ((PyObject*)p->_dpmatrix); p->_dpmatrix = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_getprop_8cutadapt_6_align_7Aligner_min_overlap(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_8cutadapt_6_align_7Aligner_11min_overlap_1__get__(o); } static int __pyx_setprop_8cutadapt_6_align_7Aligner_min_overlap(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_8cutadapt_6_align_7Aligner_11min_overlap_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static int __pyx_setprop_8cutadapt_6_align_7Aligner_indel_cost(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_8cutadapt_6_align_7Aligner_10indel_cost_1__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_8cutadapt_6_align_7Aligner_reference(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_8cutadapt_6_align_7Aligner_9reference_1__get__(o); } static int __pyx_setprop_8cutadapt_6_align_7Aligner_reference(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_8cutadapt_6_align_7Aligner_9reference_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } static PyObject *__pyx_getprop_8cutadapt_6_align_7Aligner_dpmatrix(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_8cutadapt_6_align_7Aligner_8dpmatrix_1__get__(o); } static PyMethodDef __pyx_methods_8cutadapt_6_align_Aligner[] = { {"enable_debug", (PyCFunction)__pyx_pw_8cutadapt_6_align_7Aligner_3enable_debug, METH_NOARGS, __pyx_doc_8cutadapt_6_align_7Aligner_2enable_debug}, {"locate", (PyCFunction)__pyx_pw_8cutadapt_6_align_7Aligner_5locate, METH_O, __pyx_doc_8cutadapt_6_align_7Aligner_4locate}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_8cutadapt_6_align_Aligner[] = { {(char *)"min_overlap", __pyx_getprop_8cutadapt_6_align_7Aligner_min_overlap, __pyx_setprop_8cutadapt_6_align_7Aligner_min_overlap, 0, 0}, {(char *)"indel_cost", 0, __pyx_setprop_8cutadapt_6_align_7Aligner_indel_cost, __pyx_k_Matches_cost_0_mismatches_cost, 0}, {(char *)"reference", __pyx_getprop_8cutadapt_6_align_7Aligner_reference, __pyx_setprop_8cutadapt_6_align_7Aligner_reference, 0, 0}, {(char *)"dpmatrix", __pyx_getprop_8cutadapt_6_align_7Aligner_dpmatrix, 0, __pyx_k_The_dynamic_programming_matrix, 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_type_8cutadapt_6_align_Aligner = { PyVarObject_HEAD_INIT(0, 0) "cutadapt._align.Aligner", /*tp_name*/ sizeof(struct __pyx_obj_8cutadapt_6_align_Aligner), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_8cutadapt_6_align_Aligner, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "\n\tTODO documentation still uses s1 (reference) and s2 (query).\n\n\tLocate one string within another by computing an optimal semiglobal\n\talignment between string1 and string2.\n\n\tThe alignment uses unit costs, which means that mismatches, insertions and deletions are\n\tcounted as one error.\n\n\tflags is a bitwise 'or' of the allowed flags.\n\tTo allow skipping of a prefix of string1 at no cost, set the\n\tSTART_WITHIN_SEQ1 flag.\n\tTo allow skipping of a prefix of string2 at no cost, set the\n\tSTART_WITHIN_SEQ2 flag.\n\tIf both are set, a prefix of string1 or of string1 is skipped,\n\tnever both.\n\tSimilarly, set STOP_WITHIN_SEQ1 and STOP_WITHIN_SEQ2 to\n\tallow skipping of suffixes of string1 or string2. Again, when both\n\tflags are set, never suffixes in both strings are skipped.\n\tIf all flags are set, this results in standard semiglobal alignment.\n\n\tThe skipped parts are described with two intervals (start1, stop1),\n\t(start2, stop2).\n\n\tFor example, an optimal semiglobal alignment of SISSI and MISSISSIPPI looks like this:\n\n\t---SISSI---\n\tMISSISSIPPI\n\n\tstart1, stop1 = 0, 5\n\tstart2, stop2 = 3, 8\n\t(with zero errors)\n\n\tThe aligned parts are string1[start1:stop1] and string2[start2:stop2].\n\n\tThe error rate is: errors / length where length is (stop1 - start1).\n\n\tAn optimal alignment fulfills all of these criteria:\n\n\t- its error_rate is at most max_error_rate\n\t- Among those alignments with error_rate <= max_error_rate, the alignment contains\n\t a maximal number of matches (there is no alignment with more matches).\n\t- If there are multiple alignments with the same no. of matches, then one that\n\t has minimal no. of errors is chosen.\n\t- If there are still multiple candidates, choose the alignment that starts at the\n\t leftmost position within the read.\n\n\tThe alignment itself is not returned, only the tuple\n\t(start1, stop1, start2, stop2, matches, errors), where the first four fields have the\n\tmeaning as described, matches is the number of matches and errors is the number of\n\terrors in the alignment.\n\n\tIt is always the case that at least one of start1 and start2 is zero.\n\n\tIUPAC wildcard characters can be allowed in the reference and the query\n\tby setting the appropriate flags.\n\n\tIf neither flag is set, the full ASCII alphabet is used for comparison.\n\tIf any of the flags is set, all non-IUPAC characters in the sequences\n\tcompare as 'not equal'.\n\t", /*tp_doc*/ __pyx_tp_traverse_8cutadapt_6_align_Aligner, /*tp_traverse*/ __pyx_tp_clear_8cutadapt_6_align_Aligner, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_8cutadapt_6_align_Aligner, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_8cutadapt_6_align_Aligner, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_8cutadapt_6_align_Aligner, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct____str__ *__pyx_freelist_8cutadapt_6_align___pyx_scope_struct____str__[8]; static int __pyx_freecount_8cutadapt_6_align___pyx_scope_struct____str__ = 0; static PyObject *__pyx_tp_new_8cutadapt_6_align___pyx_scope_struct____str__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_8cutadapt_6_align___pyx_scope_struct____str__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct____str__)))) { o = (PyObject*)__pyx_freelist_8cutadapt_6_align___pyx_scope_struct____str__[--__pyx_freecount_8cutadapt_6_align___pyx_scope_struct____str__]; memset(o, 0, sizeof(struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct____str__)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_8cutadapt_6_align___pyx_scope_struct____str__(PyObject *o) { struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct____str__ *p = (struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct____str__ *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_row); Py_CLEAR(p->__pyx_v_self); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_8cutadapt_6_align___pyx_scope_struct____str__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct____str__)))) { __pyx_freelist_8cutadapt_6_align___pyx_scope_struct____str__[__pyx_freecount_8cutadapt_6_align___pyx_scope_struct____str__++] = ((struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct____str__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_8cutadapt_6_align___pyx_scope_struct____str__(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct____str__ *p = (struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct____str__ *)o; if (p->__pyx_v_row) { e = (*v)(p->__pyx_v_row, a); if (e) return e; } if (p->__pyx_v_self) { e = (*v)(p->__pyx_v_self, a); if (e) return e; } return 0; } static int __pyx_tp_clear_8cutadapt_6_align___pyx_scope_struct____str__(PyObject *o) { PyObject* tmp; struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct____str__ *p = (struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct____str__ *)o; tmp = ((PyObject*)p->__pyx_v_row); p->__pyx_v_row = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_8cutadapt_6_align___pyx_scope_struct____str__ = { PyVarObject_HEAD_INIT(0, 0) "cutadapt._align.__pyx_scope_struct____str__", /*tp_name*/ sizeof(struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct____str__), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_8cutadapt_6_align___pyx_scope_struct____str__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_8cutadapt_6_align___pyx_scope_struct____str__, /*tp_traverse*/ __pyx_tp_clear_8cutadapt_6_align___pyx_scope_struct____str__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_8cutadapt_6_align___pyx_scope_struct____str__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_1_genexpr *__pyx_freelist_8cutadapt_6_align___pyx_scope_struct_1_genexpr[8]; static int __pyx_freecount_8cutadapt_6_align___pyx_scope_struct_1_genexpr = 0; static PyObject *__pyx_tp_new_8cutadapt_6_align___pyx_scope_struct_1_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_8cutadapt_6_align___pyx_scope_struct_1_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_1_genexpr)))) { o = (PyObject*)__pyx_freelist_8cutadapt_6_align___pyx_scope_struct_1_genexpr[--__pyx_freecount_8cutadapt_6_align___pyx_scope_struct_1_genexpr]; memset(o, 0, sizeof(struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_1_genexpr)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_8cutadapt_6_align___pyx_scope_struct_1_genexpr(PyObject *o) { struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_1_genexpr *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_outer_scope); Py_CLEAR(p->__pyx_v_c); Py_CLEAR(p->__pyx_t_0); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_8cutadapt_6_align___pyx_scope_struct_1_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_1_genexpr)))) { __pyx_freelist_8cutadapt_6_align___pyx_scope_struct_1_genexpr[__pyx_freecount_8cutadapt_6_align___pyx_scope_struct_1_genexpr++] = ((struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_1_genexpr *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_8cutadapt_6_align___pyx_scope_struct_1_genexpr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_1_genexpr *)o; if (p->__pyx_outer_scope) { e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e; } if (p->__pyx_v_c) { e = (*v)(p->__pyx_v_c, a); if (e) return e; } if (p->__pyx_t_0) { e = (*v)(p->__pyx_t_0, a); if (e) return e; } return 0; } static int __pyx_tp_clear_8cutadapt_6_align___pyx_scope_struct_1_genexpr(PyObject *o) { PyObject* tmp; struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_1_genexpr *)o; tmp = ((PyObject*)p->__pyx_outer_scope); p->__pyx_outer_scope = ((struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct____str__ *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_c); p->__pyx_v_c = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_t_0); p->__pyx_t_0 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_8cutadapt_6_align___pyx_scope_struct_1_genexpr = { PyVarObject_HEAD_INIT(0, 0) "cutadapt._align.__pyx_scope_struct_1_genexpr", /*tp_name*/ sizeof(struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_1_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_8cutadapt_6_align___pyx_scope_struct_1_genexpr, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_8cutadapt_6_align___pyx_scope_struct_1_genexpr, /*tp_traverse*/ __pyx_tp_clear_8cutadapt_6_align___pyx_scope_struct_1_genexpr, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_8cutadapt_6_align___pyx_scope_struct_1_genexpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_2_genexpr *__pyx_freelist_8cutadapt_6_align___pyx_scope_struct_2_genexpr[8]; static int __pyx_freecount_8cutadapt_6_align___pyx_scope_struct_2_genexpr = 0; static PyObject *__pyx_tp_new_8cutadapt_6_align___pyx_scope_struct_2_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_8cutadapt_6_align___pyx_scope_struct_2_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_2_genexpr)))) { o = (PyObject*)__pyx_freelist_8cutadapt_6_align___pyx_scope_struct_2_genexpr[--__pyx_freecount_8cutadapt_6_align___pyx_scope_struct_2_genexpr]; memset(o, 0, sizeof(struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_2_genexpr)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_8cutadapt_6_align___pyx_scope_struct_2_genexpr(PyObject *o) { struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_2_genexpr *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_outer_scope); Py_CLEAR(p->__pyx_v_v); Py_CLEAR(p->__pyx_t_0); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_8cutadapt_6_align___pyx_scope_struct_2_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_2_genexpr)))) { __pyx_freelist_8cutadapt_6_align___pyx_scope_struct_2_genexpr[__pyx_freecount_8cutadapt_6_align___pyx_scope_struct_2_genexpr++] = ((struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_2_genexpr *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_8cutadapt_6_align___pyx_scope_struct_2_genexpr(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_2_genexpr *)o; if (p->__pyx_outer_scope) { e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e; } if (p->__pyx_v_v) { e = (*v)(p->__pyx_v_v, a); if (e) return e; } if (p->__pyx_t_0) { e = (*v)(p->__pyx_t_0, a); if (e) return e; } return 0; } static int __pyx_tp_clear_8cutadapt_6_align___pyx_scope_struct_2_genexpr(PyObject *o) { PyObject* tmp; struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_2_genexpr *)o; tmp = ((PyObject*)p->__pyx_outer_scope); p->__pyx_outer_scope = ((struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct____str__ *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_v); p->__pyx_v_v = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_t_0); p->__pyx_t_0 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_8cutadapt_6_align___pyx_scope_struct_2_genexpr = { PyVarObject_HEAD_INIT(0, 0) "cutadapt._align.__pyx_scope_struct_2_genexpr", /*tp_name*/ sizeof(struct __pyx_obj_8cutadapt_6_align___pyx_scope_struct_2_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_8cutadapt_6_align___pyx_scope_struct_2_genexpr, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_8cutadapt_6_align___pyx_scope_struct_2_genexpr, /*tp_traverse*/ __pyx_tp_clear_8cutadapt_6_align___pyx_scope_struct_2_genexpr, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_8cutadapt_6_align___pyx_scope_struct_2_genexpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static PyMethodDef __pyx_methods[] = { {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef __pyx_moduledef = { #if PY_VERSION_HEX < 0x03020000 { PyObject_HEAD_INIT(NULL) NULL, 0, NULL }, #else PyModuleDef_HEAD_INIT, #endif "_align", 0, /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_b_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 0, 0}, {&__pyx_kp_s_0_2d, __pyx_k_0_2d, sizeof(__pyx_k_0_2d), 0, 0, 1, 0}, {&__pyx_n_s_A, __pyx_k_A, sizeof(__pyx_k_A), 0, 0, 1, 1}, {&__pyx_n_s_B, __pyx_k_B, sizeof(__pyx_k_B), 0, 0, 1, 1}, {&__pyx_n_s_C, __pyx_k_C, sizeof(__pyx_k_C), 0, 0, 1, 1}, {&__pyx_n_s_D, __pyx_k_D, sizeof(__pyx_k_D), 0, 0, 1, 1}, {&__pyx_n_s_DPMatrix, __pyx_k_DPMatrix, sizeof(__pyx_k_DPMatrix), 0, 0, 1, 1}, {&__pyx_n_s_DPMatrix___init, __pyx_k_DPMatrix___init, sizeof(__pyx_k_DPMatrix___init), 0, 0, 1, 1}, {&__pyx_n_s_DPMatrix___str, __pyx_k_DPMatrix___str, sizeof(__pyx_k_DPMatrix___str), 0, 0, 1, 1}, {&__pyx_n_s_DPMatrix___str___locals_genexpr, __pyx_k_DPMatrix___str___locals_genexpr, sizeof(__pyx_k_DPMatrix___str___locals_genexpr), 0, 0, 1, 1}, {&__pyx_n_s_DPMatrix_set_entry, __pyx_k_DPMatrix_set_entry, sizeof(__pyx_k_DPMatrix_set_entry), 0, 0, 1, 1}, {&__pyx_n_s_G, __pyx_k_G, sizeof(__pyx_k_G), 0, 0, 1, 1}, {&__pyx_n_s_H, __pyx_k_H, sizeof(__pyx_k_H), 0, 0, 1, 1}, {&__pyx_kp_s_Insertion_deletion_cost_must_be, __pyx_k_Insertion_deletion_cost_must_be, sizeof(__pyx_k_Insertion_deletion_cost_must_be), 0, 0, 1, 0}, {&__pyx_n_s_K, __pyx_k_K, sizeof(__pyx_k_K), 0, 0, 1, 1}, {&__pyx_n_s_M, __pyx_k_M, sizeof(__pyx_k_M), 0, 0, 1, 1}, {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1}, {&__pyx_kp_s_Minimum_overlap_must_be_at_least, __pyx_k_Minimum_overlap_must_be_at_least, sizeof(__pyx_k_Minimum_overlap_must_be_at_least), 0, 0, 1, 0}, {&__pyx_n_s_N, __pyx_k_N, sizeof(__pyx_k_N), 0, 0, 1, 1}, {&__pyx_n_s_R, __pyx_k_R, sizeof(__pyx_k_R), 0, 0, 1, 1}, {&__pyx_kp_s_Representation_of_the_dynamic_p, __pyx_k_Representation_of_the_dynamic_p, sizeof(__pyx_k_Representation_of_the_dynamic_p), 0, 0, 1, 0}, {&__pyx_n_s_S, __pyx_k_S, sizeof(__pyx_k_S), 0, 0, 1, 1}, {&__pyx_n_s_T, __pyx_k_T, sizeof(__pyx_k_T), 0, 0, 1, 1}, {&__pyx_n_s_U, __pyx_k_U, sizeof(__pyx_k_U), 0, 0, 1, 1}, {&__pyx_n_s_V, __pyx_k_V, sizeof(__pyx_k_V), 0, 0, 1, 1}, {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, {&__pyx_n_s_W, __pyx_k_W, sizeof(__pyx_k_W), 0, 0, 1, 1}, {&__pyx_n_s_X, __pyx_k_X, sizeof(__pyx_k_X), 0, 0, 1, 1}, {&__pyx_n_s_Y, __pyx_k_Y, sizeof(__pyx_k_Y), 0, 0, 1, 1}, {&__pyx_n_s__19, __pyx_k__19, sizeof(__pyx_k__19), 0, 0, 1, 1}, {&__pyx_kp_s__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 0, 1, 0}, {&__pyx_kp_s__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 0, 1, 0}, {&__pyx_kp_s__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 0, 1, 0}, {&__pyx_kp_s__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 0, 1, 0}, {&__pyx_n_s_acgt_table, __pyx_k_acgt_table, sizeof(__pyx_k_acgt_table), 0, 0, 1, 1}, {&__pyx_n_s_aligner, __pyx_k_aligner, sizeof(__pyx_k_aligner), 0, 0, 1, 1}, {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1}, {&__pyx_n_s_ascii, __pyx_k_ascii, sizeof(__pyx_k_ascii), 0, 0, 1, 1}, {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1}, {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1}, {&__pyx_n_s_compare_ascii, __pyx_k_compare_ascii, sizeof(__pyx_k_compare_ascii), 0, 0, 1, 1}, {&__pyx_n_s_compare_prefixes, __pyx_k_compare_prefixes, sizeof(__pyx_k_compare_prefixes), 0, 0, 1, 1}, {&__pyx_n_s_cost, __pyx_k_cost, sizeof(__pyx_k_cost), 0, 0, 1, 1}, {&__pyx_n_s_cutadapt__align, __pyx_k_cutadapt__align, sizeof(__pyx_k_cutadapt__align), 0, 0, 1, 1}, {&__pyx_n_s_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 1, 1}, {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1}, {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1}, {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1}, {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1}, {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1}, {&__pyx_kp_s_home_marcel_scm_cutadapt_cutada, __pyx_k_home_marcel_scm_cutadapt_cutada, sizeof(__pyx_k_home_marcel_scm_cutadapt_cutada), 0, 0, 1, 0}, {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1}, {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1}, {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1}, {&__pyx_n_s_iupac_table, __pyx_k_iupac_table, sizeof(__pyx_k_iupac_table), 0, 0, 1, 1}, {&__pyx_n_s_j, __pyx_k_j, sizeof(__pyx_k_j), 0, 0, 1, 1}, {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1}, {&__pyx_n_s_length, __pyx_k_length, sizeof(__pyx_k_length), 0, 0, 1, 1}, {&__pyx_n_s_locate, __pyx_k_locate, sizeof(__pyx_k_locate), 0, 0, 1, 1}, {&__pyx_n_s_lower, __pyx_k_lower, sizeof(__pyx_k_lower), 0, 0, 1, 1}, {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_matches, __pyx_k_matches, sizeof(__pyx_k_matches), 0, 0, 1, 1}, {&__pyx_n_s_max_error_rate, __pyx_k_max_error_rate, sizeof(__pyx_k_max_error_rate), 0, 0, 1, 1}, {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1}, {&__pyx_n_s_min_overlap, __pyx_k_min_overlap, sizeof(__pyx_k_min_overlap), 0, 0, 1, 1}, {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1}, {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1}, {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1}, {&__pyx_n_s_q_ptr, __pyx_k_q_ptr, sizeof(__pyx_k_q_ptr), 0, 0, 1, 1}, {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1}, {&__pyx_n_s_query, __pyx_k_query, sizeof(__pyx_k_query), 0, 0, 1, 1}, {&__pyx_n_s_query_bytes, __pyx_k_query_bytes, sizeof(__pyx_k_query_bytes), 0, 0, 1, 1}, {&__pyx_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1}, {&__pyx_n_s_r_ptr, __pyx_k_r_ptr, sizeof(__pyx_k_r_ptr), 0, 0, 1, 1}, {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, {&__pyx_n_s_ref, __pyx_k_ref, sizeof(__pyx_k_ref), 0, 0, 1, 1}, {&__pyx_n_s_ref_bytes, __pyx_k_ref_bytes, sizeof(__pyx_k_ref_bytes), 0, 0, 1, 1}, {&__pyx_n_s_reference, __pyx_k_reference, sizeof(__pyx_k_reference), 0, 0, 1, 1}, {&__pyx_n_s_rjust, __pyx_k_rjust, sizeof(__pyx_k_rjust), 0, 0, 1, 1}, {&__pyx_n_s_row, __pyx_k_row, sizeof(__pyx_k_row), 0, 0, 1, 1}, {&__pyx_n_s_rows, __pyx_k_rows, sizeof(__pyx_k_rows), 0, 0, 1, 1}, {&__pyx_n_s_rows_2, __pyx_k_rows_2, sizeof(__pyx_k_rows_2), 0, 0, 1, 1}, {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1}, {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1}, {&__pyx_n_s_set_entry, __pyx_k_set_entry, sizeof(__pyx_k_set_entry), 0, 0, 1, 1}, {&__pyx_n_s_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1}, {&__pyx_n_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 1}, {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1}, {&__pyx_n_s_translate, __pyx_k_translate, sizeof(__pyx_k_translate), 0, 0, 1, 1}, {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1}, {&__pyx_n_s_wildcard_query, __pyx_k_wildcard_query, sizeof(__pyx_k_wildcard_query), 0, 0, 1, 1}, {&__pyx_n_s_wildcard_ref, __pyx_k_wildcard_ref, sizeof(__pyx_k_wildcard_ref), 0, 0, 1, 1}, {&__pyx_n_s_zip, __pyx_k_zip, sizeof(__pyx_k_zip), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "cutadapt/_align.pyx":33 * """ * d = dict(A=1, C=2, G=4, T=8, U=8) * t = bytearray(b'\0') * 256 # <<<<<<<<<<<<<< * for c, v in d.items(): * t[ord(c)] = v */ __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_b_); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__2); __Pyx_GIVEREF(__pyx_tuple__2); /* "cutadapt/_align.pyx":73 * N=A|C|G|T * ) * t = bytearray(b'\0') * 256 # <<<<<<<<<<<<<< * for c, v in d.items(): * t[ord(c)] = v */ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_b_); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__3); __Pyx_GIVEREF(__pyx_tuple__3); /* "cutadapt/_align.pyx":111 * Return a representation of the matrix as a string. * """ * rows = [' ' + ' '.join(c.rjust(2) for c in self.query)] # <<<<<<<<<<<<<< * for c, row in zip(' ' + self.reference, self._rows): * r = c + ' ' + ' '.join(' ' if v is None else '{0:2d}'.format(v) for v in row) */ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_int_2); if (unlikely(!__pyx_tuple__4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); /* "cutadapt/_align.pyx":213 * def __set__(self, int value): * if value < 1: * raise ValueError('Minimum overlap must be at least 1') # <<<<<<<<<<<<<< * self._min_overlap = value * */ __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_Minimum_overlap_must_be_at_least); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); /* "cutadapt/_align.pyx":223 * def __set__(self, value): * if value < 1: * raise ValueError('Insertion/deletion cost must be at leat 1') # <<<<<<<<<<<<<< * self._insertion_cost = value * self._deletion_cost = value */ __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_Insertion_deletion_cost_must_be); if (unlikely(!__pyx_tuple__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); /* "cutadapt/_align.pyx":236 * raise MemoryError() * self.column = mem * self._reference = reference.encode('ascii') # <<<<<<<<<<<<<< * self.m = len(reference) * if self.wildcard_ref: */ __pyx_tuple__11 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11); /* "cutadapt/_align.pyx":274 * """ * cdef char* s1 = self._reference * cdef bytes query_bytes = query.encode('ascii') # <<<<<<<<<<<<<< * cdef char* s2 = query_bytes * cdef int m = self.m */ __pyx_tuple__12 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__12); __Pyx_GIVEREF(__pyx_tuple__12); /* "cutadapt/_align.pyx":501 * cdef int m = len(ref) * cdef int n = len(query) * cdef bytes query_bytes = query.encode('ascii') # <<<<<<<<<<<<<< * cdef bytes ref_bytes = ref.encode('ascii') * cdef char* r_ptr */ __pyx_tuple__13 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__13); __Pyx_GIVEREF(__pyx_tuple__13); /* "cutadapt/_align.pyx":502 * cdef int n = len(query) * cdef bytes query_bytes = query.encode('ascii') * cdef bytes ref_bytes = ref.encode('ascii') # <<<<<<<<<<<<<< * cdef char* r_ptr * cdef char* q_ptr */ __pyx_tuple__14 = PyTuple_Pack(1, __pyx_n_s_ascii); if (unlikely(!__pyx_tuple__14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); /* "cutadapt/_align.pyx":24 * * * def _acgt_table(): # <<<<<<<<<<<<<< * """ * Return a translation table that maps A, C, G, T characters to the lower */ __pyx_tuple__15 = PyTuple_Pack(4, __pyx_n_s_d, __pyx_n_s_t, __pyx_n_s_c, __pyx_n_s_v); if (unlikely(!__pyx_tuple__15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__15); __Pyx_GIVEREF(__pyx_tuple__15); __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(0, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_marcel_scm_cutadapt_cutada, __pyx_n_s_acgt_table, 24, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_align.pyx":40 * * * def _iupac_table(): # <<<<<<<<<<<<<< * """ * Return a translation table for IUPAC characters. */ __pyx_tuple__17 = PyTuple_Pack(8, __pyx_n_s_A, __pyx_n_s_C, __pyx_n_s_G, __pyx_n_s_T, __pyx_n_s_d, __pyx_n_s_t, __pyx_n_s_c, __pyx_n_s_v); if (unlikely(!__pyx_tuple__17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__17); __Pyx_GIVEREF(__pyx_tuple__17); __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(0, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__17, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_marcel_scm_cutadapt_cutada, __pyx_n_s_iupac_table, 40, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_align.pyx":94 * computed. * """ * def __init__(self, reference, query): # <<<<<<<<<<<<<< * m = len(reference) * n = len(query) */ __pyx_tuple__20 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_reference, __pyx_n_s_query, __pyx_n_s_m, __pyx_n_s_n, __pyx_n_s__19); if (unlikely(!__pyx_tuple__20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__20); __Pyx_GIVEREF(__pyx_tuple__20); __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_marcel_scm_cutadapt_cutada, __pyx_n_s_init, 94, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_align.pyx":101 * self.query = query * * def set_entry(self, int i, int j, cost): # <<<<<<<<<<<<<< * """ * Set an entry in the dynamic programming matrix. */ __pyx_tuple__22 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_cost); if (unlikely(!__pyx_tuple__22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__22); __Pyx_GIVEREF(__pyx_tuple__22); __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_marcel_scm_cutadapt_cutada, __pyx_n_s_set_entry, 101, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_align.pyx":107 * self._rows[i][j] = cost * * def __str__(self): # <<<<<<<<<<<<<< * """ * Return a representation of the matrix as a string. */ __pyx_tuple__24 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_rows_2, __pyx_n_s_c, __pyx_n_s_row, __pyx_n_s_r, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__24); __Pyx_GIVEREF(__pyx_tuple__24); __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(1, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__24, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_marcel_scm_cutadapt_cutada, __pyx_n_s_str, 107, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_align.pyx":483 * * * def locate(str reference, str query, double max_error_rate, int flags=SEMIGLOBAL, bint wildcard_ref=False, bint wildcard_query=False, int min_overlap=1): # <<<<<<<<<<<<<< * aligner = Aligner(reference, max_error_rate, flags, wildcard_ref, wildcard_query) * aligner.min_overlap = min_overlap */ __pyx_tuple__26 = PyTuple_Pack(8, __pyx_n_s_reference, __pyx_n_s_query, __pyx_n_s_max_error_rate, __pyx_n_s_flags, __pyx_n_s_wildcard_ref, __pyx_n_s_wildcard_query, __pyx_n_s_min_overlap, __pyx_n_s_aligner); if (unlikely(!__pyx_tuple__26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__26); __Pyx_GIVEREF(__pyx_tuple__26); __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(7, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_marcel_scm_cutadapt_cutada, __pyx_n_s_locate, 483, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_align.pyx":489 * * * def compare_prefixes(str ref, str query, bint wildcard_ref=False, bint wildcard_query=False): # <<<<<<<<<<<<<< * """ * Find out whether one string is the prefix of the other one, allowing */ __pyx_tuple__28 = PyTuple_Pack(14, __pyx_n_s_ref, __pyx_n_s_query, __pyx_n_s_wildcard_ref, __pyx_n_s_wildcard_query, __pyx_n_s_m, __pyx_n_s_n, __pyx_n_s_query_bytes, __pyx_n_s_ref_bytes, __pyx_n_s_r_ptr, __pyx_n_s_q_ptr, __pyx_n_s_length, __pyx_n_s_i, __pyx_n_s_matches, __pyx_n_s_compare_ascii); if (unlikely(!__pyx_tuple__28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__28); __Pyx_GIVEREF(__pyx_tuple__28); __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(4, 0, 14, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_marcel_scm_cutadapt_cutada, __pyx_n_s_compare_prefixes, 489, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_InitGlobals(void) { __pyx_umethod_PyDict_Type_items.type = (PyObject*)&PyDict_Type; if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_256 = PyInt_FromLong(256); if (unlikely(!__pyx_int_256)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } #if PY_MAJOR_VERSION < 3 PyMODINIT_FUNC init_align(void); /*proto*/ PyMODINIT_FUNC init_align(void) #else PyMODINIT_FUNC PyInit__align(void); /*proto*/ PyMODINIT_FUNC PyInit__align(void) #endif { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit__align(void)", 0); if (__Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #ifdef __Pyx_CyFunction_USED if (__pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Coroutine_USED if (__pyx_Coroutine_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_StopAsyncIteration_USED if (__pyx_StopAsyncIteration_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4("_align", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_INCREF(__pyx_d); __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); #endif if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; /*--- Initialize various global constants etc. ---*/ if (__Pyx_InitGlobals() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (__pyx_module_is_main_cutadapt___align) { if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!PyDict_GetItemString(modules, "cutadapt._align")) { if (unlikely(PyDict_SetItemString(modules, "cutadapt._align", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif /*--- Builtin init code ---*/ if (__Pyx_InitCachedBuiltins() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Constants init code ---*/ if (__Pyx_InitCachedConstants() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Global init code ---*/ __pyx_v_8cutadapt_6_align_ACGT_TABLE = ((PyObject*)Py_None); Py_INCREF(Py_None); __pyx_v_8cutadapt_6_align_IUPAC_TABLE = ((PyObject*)Py_None); Py_INCREF(Py_None); /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ if (PyType_Ready(&__pyx_type_8cutadapt_6_align_Aligner) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_8cutadapt_6_align_Aligner.tp_print = 0; if (PyObject_SetAttrString(__pyx_m, "Aligner", (PyObject *)&__pyx_type_8cutadapt_6_align_Aligner) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_8cutadapt_6_align_Aligner = &__pyx_type_8cutadapt_6_align_Aligner; if (PyType_Ready(&__pyx_type_8cutadapt_6_align___pyx_scope_struct____str__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_8cutadapt_6_align___pyx_scope_struct____str__.tp_print = 0; __pyx_ptype_8cutadapt_6_align___pyx_scope_struct____str__ = &__pyx_type_8cutadapt_6_align___pyx_scope_struct____str__; if (PyType_Ready(&__pyx_type_8cutadapt_6_align___pyx_scope_struct_1_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_8cutadapt_6_align___pyx_scope_struct_1_genexpr.tp_print = 0; __pyx_ptype_8cutadapt_6_align___pyx_scope_struct_1_genexpr = &__pyx_type_8cutadapt_6_align___pyx_scope_struct_1_genexpr; if (PyType_Ready(&__pyx_type_8cutadapt_6_align___pyx_scope_struct_2_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_8cutadapt_6_align___pyx_scope_struct_2_genexpr.tp_print = 0; __pyx_ptype_8cutadapt_6_align___pyx_scope_struct_2_genexpr = &__pyx_type_8cutadapt_6_align___pyx_scope_struct_2_genexpr; /*--- Type import code ---*/ /*--- Variable import code ---*/ /*--- Function import code ---*/ /*--- Execution code ---*/ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) if (__Pyx_patch_abc() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /* "cutadapt/_align.pyx":24 * * * def _acgt_table(): # <<<<<<<<<<<<<< * """ * Return a translation table that maps A, C, G, T characters to the lower */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8cutadapt_6_align_1_acgt_table, NULL, __pyx_n_s_cutadapt__align); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_acgt_table, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cutadapt/_align.pyx":40 * * * def _iupac_table(): # <<<<<<<<<<<<<< * """ * Return a translation table for IUPAC characters. */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8cutadapt_6_align_3_iupac_table, NULL, __pyx_n_s_cutadapt__align); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_iupac_table, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cutadapt/_align.pyx":80 * * * cdef bytes ACGT_TABLE = _acgt_table() # <<<<<<<<<<<<<< * cdef bytes IUPAC_TABLE = _iupac_table() * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_acgt_table); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XGOTREF(__pyx_v_8cutadapt_6_align_ACGT_TABLE); __Pyx_DECREF_SET(__pyx_v_8cutadapt_6_align_ACGT_TABLE, ((PyObject*)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "cutadapt/_align.pyx":81 * * cdef bytes ACGT_TABLE = _acgt_table() * cdef bytes IUPAC_TABLE = _iupac_table() # <<<<<<<<<<<<<< * * */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_iupac_table); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XGOTREF(__pyx_v_8cutadapt_6_align_IUPAC_TABLE); __Pyx_DECREF_SET(__pyx_v_8cutadapt_6_align_IUPAC_TABLE, ((PyObject*)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "cutadapt/_align.pyx":84 * * * class DPMatrix: # <<<<<<<<<<<<<< * """ * Representation of the dynamic-programming matrix. */ __pyx_t_1 = __Pyx_Py3MetaclassPrepare((PyObject *) NULL, __pyx_empty_tuple, __pyx_n_s_DPMatrix, __pyx_n_s_DPMatrix, (PyObject *) NULL, __pyx_n_s_cutadapt__align, __pyx_kp_s_Representation_of_the_dynamic_p); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); /* "cutadapt/_align.pyx":94 * computed. * """ * def __init__(self, reference, query): # <<<<<<<<<<<<<< * m = len(reference) * n = len(query) */ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8cutadapt_6_align_8DPMatrix_1__init__, 0, __pyx_n_s_DPMatrix___init, NULL, __pyx_n_s_cutadapt__align, __pyx_d, ((PyObject *)__pyx_codeobj__21)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cutadapt/_align.pyx":101 * self.query = query * * def set_entry(self, int i, int j, cost): # <<<<<<<<<<<<<< * """ * Set an entry in the dynamic programming matrix. */ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8cutadapt_6_align_8DPMatrix_3set_entry, 0, __pyx_n_s_DPMatrix_set_entry, NULL, __pyx_n_s_cutadapt__align, __pyx_d, ((PyObject *)__pyx_codeobj__23)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_set_entry, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cutadapt/_align.pyx":107 * self._rows[i][j] = cost * * def __str__(self): # <<<<<<<<<<<<<< * """ * Return a representation of the matrix as a string. */ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8cutadapt_6_align_8DPMatrix_5__str__, 0, __pyx_n_s_DPMatrix___str, NULL, __pyx_n_s_cutadapt__align, __pyx_d, ((PyObject *)__pyx_codeobj__25)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_str, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cutadapt/_align.pyx":84 * * * class DPMatrix: # <<<<<<<<<<<<<< * """ * Representation of the dynamic-programming matrix. */ __pyx_t_2 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_DPMatrix, __pyx_empty_tuple, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_DPMatrix, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cutadapt/_align.pyx":483 * * * def locate(str reference, str query, double max_error_rate, int flags=SEMIGLOBAL, bint wildcard_ref=False, bint wildcard_query=False, int min_overlap=1): # <<<<<<<<<<<<<< * aligner = Aligner(reference, max_error_rate, flags, wildcard_ref, wildcard_query) * aligner.min_overlap = min_overlap */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8cutadapt_6_align_5locate, NULL, __pyx_n_s_cutadapt__align); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_locate, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cutadapt/_align.pyx":489 * * * def compare_prefixes(str ref, str query, bint wildcard_ref=False, bint wildcard_query=False): # <<<<<<<<<<<<<< * """ * Find out whether one string is the prefix of the other one, allowing */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8cutadapt_6_align_7compare_prefixes, NULL, __pyx_n_s_cutadapt__align); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_compare_prefixes, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cutadapt/_align.pyx":1 * from cpython.mem cimport PyMem_Malloc, PyMem_Free, PyMem_Realloc # <<<<<<<<<<<<<< * * DEF START_WITHIN_SEQ1 = 1 */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /*--- Wrapped vars code ---*/ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); if (__pyx_m) { if (__pyx_d) { __Pyx_AddTraceback("init cutadapt._align", __pyx_clineno, __pyx_lineno, __pyx_filename); } Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init cutadapt._align"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if PY_MAJOR_VERSION < 3 return; #else return __pyx_m; #endif } /* --- Runtime support code --- */ #if CYTHON_REFNANNY static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { PyObject *m = NULL, *p = NULL; void *r = NULL; m = PyImport_ImportModule((char *)modname); if (!m) goto end; p = PyObject_GetAttrString(m, (char *)"RefNannyAPI"); if (!p) goto end; r = PyLong_AsVoidPtr(p); end: Py_XDECREF(p); Py_XDECREF(m); return (__Pyx_RefNannyAPIStruct *)r; } #endif static PyObject *__Pyx_GetBuiltinName(PyObject *name) { PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name); if (unlikely(!result)) { PyErr_Format(PyExc_NameError, #if PY_MAJOR_VERSION >= 3 "name '%U' is not defined", name); #else "name '%.200s' is not defined", PyString_AS_STRING(name)); #endif } return result; } #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *result; ternaryfunc call = func->ob_type->tp_call; if (unlikely(!call)) return PyObject_Call(func, arg, kw); if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; result = (*call)(func, arg, kw); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { PyObject *method; method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); if (unlikely(!method)) return -1; target->method = method; #if CYTHON_COMPILING_IN_CPYTHON #if PY_MAJOR_VERSION >= 3 if (likely(PyObject_TypeCheck(method, &PyMethodDescr_Type))) #endif { PyMethodDescrObject *descr = (PyMethodDescrObject*) method; target->func = descr->d_method->ml_meth; target->flag = descr->d_method->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_O | METH_NOARGS); } #endif return 0; } static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { PyObject *args, *result = NULL; if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; #if CYTHON_COMPILING_IN_CPYTHON args = PyTuple_New(1); if (unlikely(!args)) goto bad; Py_INCREF(self); PyTuple_SET_ITEM(args, 0, self); #else args = PyTuple_Pack(1, self); if (unlikely(!args)) goto bad; #endif result = __Pyx_PyObject_Call(cfunc->method, args, NULL); Py_DECREF(args); bad: return result; } static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) { if (PY_MAJOR_VERSION >= 3) return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_items, d); else return PyDict_Items(d); } static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { PyErr_Format(PyExc_ValueError, "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); } static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { PyErr_Format(PyExc_ValueError, "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", index, (index == 1) ? "" : "s"); } static CYTHON_INLINE int __Pyx_IterFinish(void) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); PyObject* exc_type = tstate->curexc_type; if (unlikely(exc_type)) { if (likely(exc_type == PyExc_StopIteration) || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) { PyObject *exc_value, *exc_tb; exc_value = tstate->curexc_value; exc_tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; Py_DECREF(exc_type); Py_XDECREF(exc_value); Py_XDECREF(exc_tb); return 0; } else { return -1; } } return 0; #else if (unlikely(PyErr_Occurred())) { if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { PyErr_Clear(); return 0; } else { return -1; } } return 0; #endif } static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { if (unlikely(retval)) { Py_DECREF(retval); __Pyx_RaiseTooManyValuesError(expected); return -1; } else { return __Pyx_IterFinish(); } return 0; } static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject* x) { Py_ssize_t length; #if CYTHON_PEP393_ENABLED length = PyUnicode_GET_LENGTH(x); if (likely(length == 1)) { return PyUnicode_READ_CHAR(x, 0); } #else length = PyUnicode_GET_SIZE(x); if (likely(length == 1)) { return PyUnicode_AS_UNICODE(x)[0]; } #if Py_UNICODE_SIZE == 2 else if (PyUnicode_GET_SIZE(x) == 2) { Py_UCS4 high_val = PyUnicode_AS_UNICODE(x)[0]; if (high_val >= 0xD800 && high_val <= 0xDBFF) { Py_UCS4 low_val = PyUnicode_AS_UNICODE(x)[1]; if (low_val >= 0xDC00 && low_val <= 0xDFFF) { return 0x10000 + (((high_val & ((1<<10)-1)) << 10) | (low_val & ((1<<10)-1))); } } } #endif #endif PyErr_Format(PyExc_ValueError, "only single character unicode strings can be converted to Py_UCS4, " "got length %" CYTHON_FORMAT_SSIZE_T "d", length); return (Py_UCS4)-1; } static long __Pyx__PyObject_Ord(PyObject* c) { Py_ssize_t size; if (PyBytes_Check(c)) { size = PyBytes_GET_SIZE(c); if (likely(size == 1)) { return (unsigned char) PyBytes_AS_STRING(c)[0]; } #if PY_MAJOR_VERSION < 3 } else if (PyUnicode_Check(c)) { return (long)__Pyx_PyUnicode_AsPy_UCS4(c); #endif #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) } else if (PyByteArray_Check(c)) { size = PyByteArray_GET_SIZE(c); if (likely(size == 1)) { return (unsigned char) PyByteArray_AS_STRING(c)[0]; } #endif } else { PyErr_Format(PyExc_TypeError, "ord() expected string of length 1, but %.200s found", c->ob_type->tp_name); return (long)(Py_UCS4)-1; } PyErr_Format(PyExc_TypeError, "ord() expected a character, but string of length %zd found", size); return (long)(Py_UCS4)-1; } static CYTHON_INLINE int __Pyx_SetItemInt_ByteArray_Fast(PyObject* string, Py_ssize_t i, unsigned char v, int wraparound, int boundscheck) { Py_ssize_t length; if (wraparound | boundscheck) { length = PyByteArray_GET_SIZE(string); if (wraparound & unlikely(i < 0)) i += length; if ((!boundscheck) || likely((0 <= i) & (i < length))) { PyByteArray_AS_STRING(string)[i] = (char) v; return 0; } else { PyErr_SetString(PyExc_IndexError, "bytearray index out of range"); return -1; } } else { PyByteArray_AS_STRING(string)[i] = (char) v; return 0; } } #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { PyObject *self, *result; PyCFunction cfunc; cfunc = PyCFunction_GET_FUNCTION(func); self = PyCFunction_GET_SELF(func); if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; result = cfunc(self, arg); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *result; PyObject *args = PyTuple_New(1); if (unlikely(!args)) return NULL; Py_INCREF(arg); PyTuple_SET_ITEM(args, 0, arg); result = __Pyx_PyObject_Call(func, args, NULL); Py_DECREF(args); return result; } static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { #ifdef __Pyx_CyFunction_USED if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) { #else if (likely(PyCFunction_Check(func))) { #endif if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { return __Pyx_PyObject_CallMethO(func, arg); } } return __Pyx__PyObject_CallOneArg(func, arg); } #else static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *result; PyObject *args = PyTuple_Pack(1, arg); if (unlikely(!args)) return NULL; result = __Pyx_PyObject_Call(func, args, NULL); Py_DECREF(args); return result; } #endif #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { #ifdef __Pyx_CyFunction_USED if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) { #else if (likely(PyCFunction_Check(func))) { #endif if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) { return __Pyx_PyObject_CallMethO(func, NULL); } } return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL); } #endif static void __Pyx_RaiseArgtupleInvalid( const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found) { Py_ssize_t num_expected; const char *more_or_less; if (num_found < num_min) { num_expected = num_min; more_or_less = "at least"; } else { num_expected = num_max; more_or_less = "at most"; } if (exact) { more_or_less = "exactly"; } PyErr_Format(PyExc_TypeError, "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", func_name, more_or_less, num_expected, (num_expected == 1) ? "" : "s", num_found); } static void __Pyx_RaiseDoubleKeywordsError( const char* func_name, PyObject* kw_name) { PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION >= 3 "%s() got multiple values for keyword argument '%U'", func_name, kw_name); #else "%s() got multiple values for keyword argument '%s'", func_name, PyString_AsString(kw_name)); #endif } static int __Pyx_ParseOptionalKeywords( PyObject *kwds, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name) { PyObject *key = 0, *value = 0; Py_ssize_t pos = 0; PyObject*** name; PyObject*** first_kw_arg = argnames + num_pos_args; while (PyDict_Next(kwds, &pos, &key, &value)) { name = first_kw_arg; while (*name && (**name != key)) name++; if (*name) { values[name-argnames] = value; continue; } name = first_kw_arg; #if PY_MAJOR_VERSION < 3 if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { while (*name) { if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) && _PyString_Eq(**name, key)) { values[name-argnames] = value; break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { if ((**argname == key) || ( (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) && _PyString_Eq(**argname, key))) { goto arg_passed_twice; } argname++; } } } else #endif if (likely(PyUnicode_Check(key))) { while (*name) { int cmp = (**name == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : #endif PyUnicode_Compare(**name, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) { values[name-argnames] = value; break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { int cmp = (**argname == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : #endif PyUnicode_Compare(**argname, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) goto arg_passed_twice; argname++; } } } else goto invalid_keyword_type; if (kwds2) { if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; } else { goto invalid_keyword; } } return 0; arg_passed_twice: __Pyx_RaiseDoubleKeywordsError(function_name, key); goto bad; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); goto bad; invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif bad: return -1; } #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) { #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { const long b = intval; long x; long a = PyInt_AS_LONG(op1); x = (long)((unsigned long)a + b); if (likely((x^a) >= 0 || (x^b) >= 0)) return PyInt_FromLong(x); return PyLong_Type.tp_as_number->nb_add(op1, op2); } #endif #if CYTHON_USE_PYLONG_INTERNALS && PY_MAJOR_VERSION >= 3 if (likely(PyLong_CheckExact(op1))) { const long b = intval; long a, x; const PY_LONG_LONG llb = intval; PY_LONG_LONG lla, llx; const digit* digits = ((PyLongObject*)op1)->ob_digit; const Py_ssize_t size = Py_SIZE(op1); if (likely(__Pyx_sst_abs(size) <= 1)) { a = likely(size) ? digits[0] : 0; if (size == -1) a = -a; } else { switch (size) { case -2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } case 2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } case -3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } case 3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } case -4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } case 4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } default: return PyLong_Type.tp_as_number->nb_add(op1, op2); } } x = a + b; return PyLong_FromLong(x); long_long: llx = lla + llb; return PyLong_FromLongLong(llx); } #endif if (PyFloat_CheckExact(op1)) { const long b = intval; double a = PyFloat_AS_DOUBLE(op1); double result; PyFPE_START_PROTECT("add", return NULL) result = ((double)a) + (double)b; PyFPE_END_PROTECT(result) return PyFloat_FromDouble(result); } return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2); } #endif static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (!j) return NULL; r = PyObject_GetItem(o, j); Py_DECREF(j); return r; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; } } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else return NULL; } } return m->sq_item(o, i); } } #else if (is_list || PySequence_Check(o)) { return PySequence_GetItem(o, i); } #endif return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); } static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { int r; if (!j) return -1; r = PyObject_SetItem(o, j, v); Py_DECREF(j); return r; } static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o)); if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) { PyObject* old = PyList_GET_ITEM(o, n); Py_INCREF(v); PyList_SET_ITEM(o, n, v); Py_DECREF(old); return 1; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_ass_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else return -1; } } return m->sq_ass_item(o, i, v); } } #else #if CYTHON_COMPILING_IN_PYPY if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) { #else if (is_list || PySequence_Check(o)) { #endif return PySequence_SetItem(o, i, v); } #endif return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v); } static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) { PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); } #if !CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) { return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL); } #endif static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) { PyErr_Format(PyExc_TypeError, "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", name, type->tp_name, Py_TYPE(obj)->tp_name); } static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (none_allowed && obj == Py_None) return 1; else if (exact) { if (likely(Py_TYPE(obj) == type)) return 1; #if PY_MAJOR_VERSION == 2 else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; #endif } else { if (likely(PyObject_TypeCheck(obj, type))) return 1; } __Pyx_RaiseArgumentTypeInvalid(name, obj, type); return 0; } static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); tmp_type = tstate->curexc_type; tmp_value = tstate->curexc_value; tmp_tb = tstate->curexc_traceback; tstate->curexc_type = type; tstate->curexc_value = value; tstate->curexc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_Restore(type, value, tb); #endif } static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(type, value, tb); #endif } #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { Py_XINCREF(type); if (!value || value == Py_None) value = NULL; else Py_INCREF(value); if (!tb || tb == Py_None) tb = NULL; else { Py_INCREF(tb); if (!PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto raise_error; } } if (PyType_Check(type)) { #if CYTHON_COMPILING_IN_PYPY if (!value) { Py_INCREF(Py_None); value = Py_None; } #endif PyErr_NormalizeException(&type, &value, &tb); } else { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto raise_error; } value = type; type = (PyObject*) Py_TYPE(type); Py_INCREF(type); if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto raise_error; } } __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { PyObject* owned_instance = NULL; if (tb == Py_None) { tb = 0; } else if (tb && !PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto bad; } if (value == Py_None) value = 0; if (PyExceptionInstance_Check(type)) { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto bad; } value = type; type = (PyObject*) Py_TYPE(value); } else if (PyExceptionClass_Check(type)) { PyObject *instance_class = NULL; if (value && PyExceptionInstance_Check(value)) { instance_class = (PyObject*) Py_TYPE(value); if (instance_class != type) { int is_subclass = PyObject_IsSubclass(instance_class, type); if (!is_subclass) { instance_class = NULL; } else if (unlikely(is_subclass == -1)) { goto bad; } else { type = instance_class; } } } if (!instance_class) { PyObject *args; if (!value) args = PyTuple_New(0); else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; } else args = PyTuple_Pack(1, value); if (!args) goto bad; owned_instance = PyObject_Call(type, args, NULL); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } #if PY_VERSION_HEX >= 0x03030000 if (cause) { #else if (cause && cause != Py_None) { #endif PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { #if CYTHON_COMPILING_IN_PYPY PyObject *tmp_type, *tmp_value, *tmp_tb; PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); Py_INCREF(tb); PyErr_Restore(tmp_type, tmp_value, tb); Py_XDECREF(tmp_tb); #else PyThreadState *tstate = PyThreadState_GET(); PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } #endif } bad: Py_XDECREF(owned_instance); return; } #endif static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { PyObject *result; #if CYTHON_COMPILING_IN_CPYTHON result = PyDict_GetItem(__pyx_d, name); if (likely(result)) { Py_INCREF(result); } else { #else result = PyObject_GetItem(__pyx_d, name); if (!result) { PyErr_Clear(); #endif result = __Pyx_GetBuiltinName(name); } return result; } static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { PyObject* fake_module; PyTypeObject* cached_type = NULL; fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI); if (!fake_module) return NULL; Py_INCREF(fake_module); cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name); if (cached_type) { if (!PyType_Check((PyObject*)cached_type)) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s is not a type object", type->tp_name); goto bad; } if (cached_type->tp_basicsize != type->tp_basicsize) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s has the wrong size, try recompiling", type->tp_name); goto bad; } } else { if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; PyErr_Clear(); if (PyType_Ready(type) < 0) goto bad; if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0) goto bad; Py_INCREF(type); cached_type = type; } done: Py_DECREF(fake_module); return cached_type; bad: Py_XDECREF(cached_type); cached_type = NULL; goto done; } static PyObject * __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) { if (unlikely(op->func_doc == NULL)) { if (op->func.m_ml->ml_doc) { #if PY_MAJOR_VERSION >= 3 op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc); #else op->func_doc = PyString_FromString(op->func.m_ml->ml_doc); #endif if (unlikely(op->func_doc == NULL)) return NULL; } else { Py_INCREF(Py_None); return Py_None; } } Py_INCREF(op->func_doc); return op->func_doc; } static int __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp = op->func_doc; if (value == NULL) { value = Py_None; } Py_INCREF(value); op->func_doc = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op) { if (unlikely(op->func_name == NULL)) { #if PY_MAJOR_VERSION >= 3 op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name); #else op->func_name = PyString_InternFromString(op->func.m_ml->ml_name); #endif if (unlikely(op->func_name == NULL)) return NULL; } Py_INCREF(op->func_name); return op->func_name; } static int __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) { #else if (unlikely(value == NULL || !PyString_Check(value))) { #endif PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; } tmp = op->func_name; Py_INCREF(value); op->func_name = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op) { Py_INCREF(op->func_qualname); return op->func_qualname; } static int __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) { #else if (unlikely(value == NULL || !PyString_Check(value))) { #endif PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; } tmp = op->func_qualname; Py_INCREF(value); op->func_qualname = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure) { PyObject *self; self = m->func_closure; if (self == NULL) self = Py_None; Py_INCREF(self); return self; } static PyObject * __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op) { if (unlikely(op->func_dict == NULL)) { op->func_dict = PyDict_New(); if (unlikely(op->func_dict == NULL)) return NULL; } Py_INCREF(op->func_dict); return op->func_dict; } static int __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; if (unlikely(value == NULL)) { PyErr_SetString(PyExc_TypeError, "function's dictionary may not be deleted"); return -1; } if (unlikely(!PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "setting function's dictionary to a non-dict"); return -1; } tmp = op->func_dict; Py_INCREF(value); op->func_dict = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op) { Py_INCREF(op->func_globals); return op->func_globals; } static PyObject * __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op) { Py_INCREF(Py_None); return Py_None; } static PyObject * __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op) { PyObject* result = (op->func_code) ? op->func_code : Py_None; Py_INCREF(result); return result; } static int __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { int result = 0; PyObject *res = op->defaults_getter((PyObject *) op); if (unlikely(!res)) return -1; #if CYTHON_COMPILING_IN_CPYTHON op->defaults_tuple = PyTuple_GET_ITEM(res, 0); Py_INCREF(op->defaults_tuple); op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); Py_INCREF(op->defaults_kwdict); #else op->defaults_tuple = PySequence_ITEM(res, 0); if (unlikely(!op->defaults_tuple)) result = -1; else { op->defaults_kwdict = PySequence_ITEM(res, 1); if (unlikely(!op->defaults_kwdict)) result = -1; } #endif Py_DECREF(res); return result; } static int __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) { PyObject* tmp; if (!value) { value = Py_None; } else if (value != Py_None && !PyTuple_Check(value)) { PyErr_SetString(PyExc_TypeError, "__defaults__ must be set to a tuple object"); return -1; } Py_INCREF(value); tmp = op->defaults_tuple; op->defaults_tuple = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) { PyObject* result = op->defaults_tuple; if (unlikely(!result)) { if (op->defaults_getter) { if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; result = op->defaults_tuple; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) { PyObject* tmp; if (!value) { value = Py_None; } else if (value != Py_None && !PyDict_Check(value)) { PyErr_SetString(PyExc_TypeError, "__kwdefaults__ must be set to a dict object"); return -1; } Py_INCREF(value); tmp = op->defaults_kwdict; op->defaults_kwdict = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) { PyObject* result = op->defaults_kwdict; if (unlikely(!result)) { if (op->defaults_getter) { if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; result = op->defaults_kwdict; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) { PyObject* tmp; if (!value || value == Py_None) { value = NULL; } else if (!PyDict_Check(value)) { PyErr_SetString(PyExc_TypeError, "__annotations__ must be set to a dict object"); return -1; } Py_XINCREF(value); tmp = op->func_annotations; op->func_annotations = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) { PyObject* result = op->func_annotations; if (unlikely(!result)) { result = PyDict_New(); if (unlikely(!result)) return NULL; op->func_annotations = result; } Py_INCREF(result); return result; } static PyGetSetDef __pyx_CyFunction_getsets[] = { {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0}, {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, {0, 0, 0, 0, 0} }; static PyMemberDef __pyx_CyFunction_members[] = { {(char *) "__module__", T_OBJECT, offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0}, {0, 0, 0, 0, 0} }; static PyObject * __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromString(m->func.m_ml->ml_name); #else return PyString_FromString(m->func.m_ml->ml_name); #endif } static PyMethodDef __pyx_CyFunction_methods[] = { {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, {0, 0, 0, 0} }; #if PY_VERSION_HEX < 0x030500A0 #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) #else #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist) #endif static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type); if (op == NULL) return NULL; op->flags = flags; __Pyx_CyFunction_weakreflist(op) = NULL; op->func.m_ml = ml; op->func.m_self = (PyObject *) op; Py_XINCREF(closure); op->func_closure = closure; Py_XINCREF(module); op->func.m_module = module; op->func_dict = NULL; op->func_name = NULL; Py_INCREF(qualname); op->func_qualname = qualname; op->func_doc = NULL; op->func_classobj = NULL; op->func_globals = globals; Py_INCREF(op->func_globals); Py_XINCREF(code); op->func_code = code; op->defaults_pyobjects = 0; op->defaults = NULL; op->defaults_tuple = NULL; op->defaults_kwdict = NULL; op->defaults_getter = NULL; op->func_annotations = NULL; PyObject_GC_Track(op); return (PyObject *) op; } static int __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) { Py_CLEAR(m->func_closure); Py_CLEAR(m->func.m_module); Py_CLEAR(m->func_dict); Py_CLEAR(m->func_name); Py_CLEAR(m->func_qualname); Py_CLEAR(m->func_doc); Py_CLEAR(m->func_globals); Py_CLEAR(m->func_code); Py_CLEAR(m->func_classobj); Py_CLEAR(m->defaults_tuple); Py_CLEAR(m->defaults_kwdict); Py_CLEAR(m->func_annotations); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_XDECREF(pydefaults[i]); PyMem_Free(m->defaults); m->defaults = NULL; } return 0; } static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) { PyObject_GC_UnTrack(m); if (__Pyx_CyFunction_weakreflist(m) != NULL) PyObject_ClearWeakRefs((PyObject *) m); __Pyx_CyFunction_clear(m); PyObject_GC_Del(m); } static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) { Py_VISIT(m->func_closure); Py_VISIT(m->func.m_module); Py_VISIT(m->func_dict); Py_VISIT(m->func_name); Py_VISIT(m->func_qualname); Py_VISIT(m->func_doc); Py_VISIT(m->func_globals); Py_VISIT(m->func_code); Py_VISIT(m->func_classobj); Py_VISIT(m->defaults_tuple); Py_VISIT(m->defaults_kwdict); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_VISIT(pydefaults[i]); } return 0; } static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) { Py_INCREF(func); return func; } if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) { if (type == NULL) type = (PyObject *)(Py_TYPE(obj)); return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type))); } if (obj == Py_None) obj = NULL; return __Pyx_PyMethod_New(func, obj, type); } static PyObject* __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromFormat("", op->func_qualname, (void *)op); #else return PyString_FromFormat("", PyString_AsString(op->func_qualname), (void *)op); #endif } #if CYTHON_COMPILING_IN_PYPY static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyCFunctionObject* f = (PyCFunctionObject*)func; PyCFunction meth = f->m_ml->ml_meth; PyObject *self = f->m_self; Py_ssize_t size; switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { case METH_VARARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) return (*meth)(self, arg); break; case METH_VARARGS | METH_KEYWORDS: return (*(PyCFunctionWithKeywords)meth)(self, arg, kw); case METH_NOARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { size = PyTuple_GET_SIZE(arg); if (likely(size == 0)) return (*meth)(self, NULL); PyErr_Format(PyExc_TypeError, "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", f->m_ml->ml_name, size); return NULL; } break; case METH_O: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { size = PyTuple_GET_SIZE(arg); if (likely(size == 1)) { PyObject *result, *arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; result = (*meth)(self, arg0); Py_DECREF(arg0); return result; } PyErr_Format(PyExc_TypeError, "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", f->m_ml->ml_name, size); return NULL; } break; default: PyErr_SetString(PyExc_SystemError, "Bad call flags in " "__Pyx_CyFunction_Call. METH_OLDARGS is no " "longer supported!"); return NULL; } PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", f->m_ml->ml_name); return NULL; } #else static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { return PyCFunction_Call(func, arg, kw); } #endif static PyTypeObject __pyx_CyFunctionType_type = { PyVarObject_HEAD_INIT(0, 0) "cython_function_or_method", sizeof(__pyx_CyFunctionObject), 0, (destructor) __Pyx_CyFunction_dealloc, 0, 0, 0, #if PY_MAJOR_VERSION < 3 0, #else 0, #endif (reprfunc) __Pyx_CyFunction_repr, 0, 0, 0, 0, __Pyx_CyFunction_Call, 0, 0, 0, 0, Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, 0, (traverseproc) __Pyx_CyFunction_traverse, (inquiry) __Pyx_CyFunction_clear, 0, #if PY_VERSION_HEX < 0x030500A0 offsetof(__pyx_CyFunctionObject, func_weakreflist), #else offsetof(PyCFunctionObject, m_weakreflist), #endif 0, 0, __pyx_CyFunction_methods, __pyx_CyFunction_members, __pyx_CyFunction_getsets, 0, 0, __Pyx_CyFunction_descr_get, 0, offsetof(__pyx_CyFunctionObject, func_dict), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, #if PY_VERSION_HEX >= 0x030400a1 0, #endif }; static int __pyx_CyFunction_init(void) { #if !CYTHON_COMPILING_IN_PYPY __pyx_CyFunctionType_type.tp_call = PyCFunction_Call; #endif __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); if (__pyx_CyFunctionType == NULL) { return -1; } return 0; } static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults = PyMem_Malloc(size); if (!m->defaults) return PyErr_NoMemory(); memset(m->defaults, 0, size); m->defaults_pyobjects = pyobjects; return m->defaults; } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_tuple = tuple; Py_INCREF(tuple); } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_kwdict = dict; Py_INCREF(dict); } static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->func_annotations = dict; Py_INCREF(dict); } static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases); for (i=0; i < nbases; i++) { PyTypeObject *tmptype; PyObject *tmp = PyTuple_GET_ITEM(bases, i); tmptype = Py_TYPE(tmp); #if PY_MAJOR_VERSION < 3 if (tmptype == &PyClass_Type) continue; #endif if (!metaclass) { metaclass = tmptype; continue; } if (PyType_IsSubtype(metaclass, tmptype)) continue; if (PyType_IsSubtype(tmptype, metaclass)) { metaclass = tmptype; continue; } PyErr_SetString(PyExc_TypeError, "metaclass conflict: " "the metaclass of a derived class " "must be a (non-strict) subclass " "of the metaclasses of all its bases"); return NULL; } if (!metaclass) { #if PY_MAJOR_VERSION < 3 metaclass = &PyClass_Type; #else metaclass = &PyType_Type; #endif } Py_INCREF((PyObject*) metaclass); return (PyObject*) metaclass; } static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { PyObject *ns; if (metaclass) { PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare); if (prep) { PyObject *pargs = PyTuple_Pack(2, name, bases); if (unlikely(!pargs)) { Py_DECREF(prep); return NULL; } ns = PyObject_Call(prep, pargs, mkw); Py_DECREF(prep); Py_DECREF(pargs); } else { if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError))) return NULL; PyErr_Clear(); ns = PyDict_New(); } } else { ns = PyDict_New(); } if (unlikely(!ns)) return NULL; if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad; if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad; if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad; return ns; bad: Py_DECREF(ns); return NULL; } static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass) { PyObject *result, *margs; PyObject *owned_metaclass = NULL; if (allow_py2_metaclass) { owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass); if (owned_metaclass) { metaclass = owned_metaclass; } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { PyErr_Clear(); } else { return NULL; } } if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); Py_XDECREF(owned_metaclass); if (unlikely(!metaclass)) return NULL; owned_metaclass = metaclass; } margs = PyTuple_Pack(3, name, bases, dict); if (unlikely(!margs)) { result = NULL; } else { result = PyObject_Call(metaclass, margs, mkw); Py_DECREF(margs); } Py_XDECREF(owned_metaclass); return result; } static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { int start = 0, mid = 0, end = count - 1; if (end >= 0 && code_line > entries[end].code_line) { return count; } while (start < end) { mid = start + (end - start) / 2; if (code_line < entries[mid].code_line) { end = mid; } else if (code_line > entries[mid].code_line) { start = mid + 1; } else { return mid; } } if (code_line <= entries[mid].code_line) { return mid; } else { return mid + 1; } } static PyCodeObject *__pyx_find_code_object(int code_line) { PyCodeObject* code_object; int pos; if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { return NULL; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { return NULL; } code_object = __pyx_code_cache.entries[pos].code_object; Py_INCREF(code_object); return code_object; } static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { int pos, i; __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; if (unlikely(!code_line)) { return; } if (unlikely(!entries)) { entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); if (likely(entries)) { __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = 64; __pyx_code_cache.count = 1; entries[0].code_line = code_line; entries[0].code_object = code_object; Py_INCREF(code_object); } return; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { PyCodeObject* tmp = entries[pos].code_object; entries[pos].code_object = code_object; Py_DECREF(tmp); return; } if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = new_max; } for (i=__pyx_code_cache.count; i>pos; i--) { entries[i] = entries[i-1]; } entries[pos].code_line = code_line; entries[pos].code_object = code_object; __pyx_code_cache.count++; Py_INCREF(code_object); } #include "compile.h" #include "frameobject.h" #include "traceback.h" static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyObject *py_srcfile = 0; PyObject *py_funcname = 0; #if PY_MAJOR_VERSION < 3 py_srcfile = PyString_FromString(filename); #else py_srcfile = PyUnicode_FromString(filename); #endif if (!py_srcfile) goto bad; if (c_line) { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #else py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #endif } else { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromString(funcname); #else py_funcname = PyUnicode_FromString(funcname); #endif } if (!py_funcname) goto bad; py_code = __Pyx_PyCode_New( 0, 0, 0, 0, 0, __pyx_empty_bytes, /*PyObject *code,*/ __pyx_empty_tuple, /*PyObject *consts,*/ __pyx_empty_tuple, /*PyObject *names,*/ __pyx_empty_tuple, /*PyObject *varnames,*/ __pyx_empty_tuple, /*PyObject *freevars,*/ __pyx_empty_tuple, /*PyObject *cellvars,*/ py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ py_line, __pyx_empty_bytes /*PyObject *lnotab*/ ); Py_DECREF(py_srcfile); Py_DECREF(py_funcname); return py_code; bad: Py_XDECREF(py_srcfile); Py_XDECREF(py_funcname); return NULL; } static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; py_code = __pyx_find_code_object(c_line ? c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? c_line : py_line, py_code); } py_frame = PyFrame_New( PyThreadState_GET(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ __pyx_d, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = py_line; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ {\ func_type value = func_value;\ if (sizeof(target_type) < sizeof(func_type)) {\ if (unlikely(value != (func_type) (target_type) value)) {\ func_type zero = 0;\ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ return (target_type) -1;\ if (is_unsigned && unlikely(value < zero))\ goto raise_neg_overflow;\ else\ goto raise_overflow;\ }\ }\ return (target_type) value;\ } static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { const int neg_one = (int) -1, const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(int) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (int) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (int) 0; case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) case 2: if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 3: if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 4: if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (int) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(int) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (int) 0; case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, -(sdigit) digits[0]) case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) case -2: if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 2: if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -3: if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 3: if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -4: if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 4: if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; } #endif if (sizeof(int) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else int val; PyObject *v = __Pyx_PyNumber_Int(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (int) -1; } } else { int val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (int) -1; val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to int"); return (int) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { const long neg_one = (long) -1, const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(long) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); } } static CYTHON_INLINE unsigned char __Pyx_PyInt_As_unsigned_char(PyObject *x) { const unsigned char neg_one = (unsigned char) -1, const_zero = (unsigned char) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(unsigned char) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(unsigned char, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (unsigned char) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (unsigned char) 0; case 1: __PYX_VERIFY_RETURN_INT(unsigned char, digit, digits[0]) case 2: if (8 * sizeof(unsigned char) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned char) >= 2 * PyLong_SHIFT) { return (unsigned char) (((((unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])); } } break; case 3: if (8 * sizeof(unsigned char) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned char) >= 3 * PyLong_SHIFT) { return (unsigned char) (((((((unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])); } } break; case 4: if (8 * sizeof(unsigned char) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned char) >= 4 * PyLong_SHIFT) { return (unsigned char) (((((((((unsigned char)digits[3]) << PyLong_SHIFT) | (unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (unsigned char) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(unsigned char) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(unsigned char, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(unsigned char) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(unsigned char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (unsigned char) 0; case -1: __PYX_VERIFY_RETURN_INT(unsigned char, sdigit, -(sdigit) digits[0]) case 1: __PYX_VERIFY_RETURN_INT(unsigned char, digit, +digits[0]) case -2: if (8 * sizeof(unsigned char) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned char) - 1 > 2 * PyLong_SHIFT) { return (unsigned char) (((unsigned char)-1)*(((((unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); } } break; case 2: if (8 * sizeof(unsigned char) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned char) - 1 > 2 * PyLong_SHIFT) { return (unsigned char) ((((((unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); } } break; case -3: if (8 * sizeof(unsigned char) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned char) - 1 > 3 * PyLong_SHIFT) { return (unsigned char) (((unsigned char)-1)*(((((((unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); } } break; case 3: if (8 * sizeof(unsigned char) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned char) - 1 > 3 * PyLong_SHIFT) { return (unsigned char) ((((((((unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); } } break; case -4: if (8 * sizeof(unsigned char) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned char) - 1 > 4 * PyLong_SHIFT) { return (unsigned char) (((unsigned char)-1)*(((((((((unsigned char)digits[3]) << PyLong_SHIFT) | (unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); } } break; case 4: if (8 * sizeof(unsigned char) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(unsigned char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(unsigned char) - 1 > 4 * PyLong_SHIFT) { return (unsigned char) ((((((((((unsigned char)digits[3]) << PyLong_SHIFT) | (unsigned char)digits[2]) << PyLong_SHIFT) | (unsigned char)digits[1]) << PyLong_SHIFT) | (unsigned char)digits[0]))); } } break; } #endif if (sizeof(unsigned char) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(unsigned char, long, PyLong_AsLong(x)) } else if (sizeof(unsigned char) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(unsigned char, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else unsigned char val; PyObject *v = __Pyx_PyNumber_Int(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (unsigned char) -1; } } else { unsigned char val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (unsigned char) -1; val = __Pyx_PyInt_As_unsigned_char(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to unsigned char"); return (unsigned char) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to unsigned char"); return (unsigned char) -1; } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { const int neg_one = (int) -1, const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(int) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(int) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(int), little, !is_unsigned); } } static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { const long neg_one = (long) -1, const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(long) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (long) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (long) 0; case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) case 2: if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 3: if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 4: if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (long) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(long) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (long) 0; case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, -(sdigit) digits[0]) case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) case -2: if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 2: if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -3: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 3: if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -4: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 4: if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; } #endif if (sizeof(long) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else long val; PyObject *v = __Pyx_PyNumber_Int(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (long) -1; } } else { long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (long) -1; val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to long"); return (long) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = *type; tstate->exc_value = *value; tstate->exc_traceback = *tb; #else PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); PyErr_SetExcInfo(*type, *value, *tb); #endif *type = tmp_type; *value = tmp_value; *tb = tmp_tb; } static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { PyObject *method, *result = NULL; method = __Pyx_PyObject_GetAttrStr(obj, method_name); if (unlikely(!method)) goto bad; #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyMethod_Check(method))) { PyObject *self = PyMethod_GET_SELF(method); if (likely(self)) { PyObject *args; PyObject *function = PyMethod_GET_FUNCTION(method); args = PyTuple_New(2); if (unlikely(!args)) goto bad; Py_INCREF(self); PyTuple_SET_ITEM(args, 0, self); Py_INCREF(arg); PyTuple_SET_ITEM(args, 1, arg); Py_INCREF(function); Py_DECREF(method); method = NULL; result = __Pyx_PyObject_Call(function, args, NULL); Py_DECREF(args); Py_DECREF(function); return result; } } #endif result = __Pyx_PyObject_CallOneArg(method, arg); bad: Py_XDECREF(method); return result; } #include #include static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value); static PyObject *__Pyx_Coroutine_Close(PyObject *self); static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args); #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom) #if 1 || PY_VERSION_HEX < 0x030300B0 static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue) { PyObject *et, *ev, *tb; PyObject *value = NULL; __Pyx_ErrFetch(&et, &ev, &tb); if (!et) { Py_XDECREF(tb); Py_XDECREF(ev); Py_INCREF(Py_None); *pvalue = Py_None; return 0; } if (likely(et == PyExc_StopIteration)) { #if PY_VERSION_HEX >= 0x030300A0 if (ev && Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) { value = ((PyStopIterationObject *)ev)->value; Py_INCREF(value); Py_DECREF(ev); Py_XDECREF(tb); Py_DECREF(et); *pvalue = value; return 0; } #endif if (!ev || !PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) { if (!ev) { Py_INCREF(Py_None); ev = Py_None; } else if (PyTuple_Check(ev)) { if (PyTuple_GET_SIZE(ev) >= 1) { PyObject *value; #if CYTHON_COMPILING_IN_CPYTHON value = PySequence_ITEM(ev, 0); #else value = PyTuple_GET_ITEM(ev, 0); Py_INCREF(value); #endif Py_DECREF(ev); ev = value; } else { Py_INCREF(Py_None); Py_DECREF(ev); ev = Py_None; } } Py_XDECREF(tb); Py_DECREF(et); *pvalue = ev; return 0; } } else if (!PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) { __Pyx_ErrRestore(et, ev, tb); return -1; } PyErr_NormalizeException(&et, &ev, &tb); if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) { __Pyx_ErrRestore(et, ev, tb); return -1; } Py_XDECREF(tb); Py_DECREF(et); #if PY_VERSION_HEX >= 0x030300A0 value = ((PyStopIterationObject *)ev)->value; Py_INCREF(value); Py_DECREF(ev); #else { PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args); Py_DECREF(ev); if (likely(args)) { value = PySequence_GetItem(args, 0); Py_DECREF(args); } if (unlikely(!value)) { __Pyx_ErrRestore(NULL, NULL, NULL); Py_INCREF(Py_None); value = Py_None; } } #endif *pvalue = value; return 0; } #endif static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__pyx_CoroutineObject *self) { PyObject *exc_type = self->exc_type; PyObject *exc_value = self->exc_value; PyObject *exc_traceback = self->exc_traceback; self->exc_type = NULL; self->exc_value = NULL; self->exc_traceback = NULL; Py_XDECREF(exc_type); Py_XDECREF(exc_value); Py_XDECREF(exc_traceback); } static CYTHON_INLINE int __Pyx_Coroutine_CheckRunning(__pyx_CoroutineObject *gen) { if (unlikely(gen->is_running)) { PyErr_SetString(PyExc_ValueError, "generator already executing"); return 1; } return 0; } static CYTHON_INLINE PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value) { PyObject *retval; assert(!self->is_running); if (unlikely(self->resume_label == 0)) { if (unlikely(value && value != Py_None)) { PyErr_SetString(PyExc_TypeError, "can't send non-None value to a " "just-started generator"); return NULL; } } if (unlikely(self->resume_label == -1)) { PyErr_SetNone(PyExc_StopIteration); return NULL; } if (value) { #if CYTHON_COMPILING_IN_PYPY #else if (self->exc_traceback) { PyThreadState *tstate = PyThreadState_GET(); PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback; PyFrameObject *f = tb->tb_frame; Py_XINCREF(tstate->frame); assert(f->f_back == NULL); f->f_back = tstate->frame; } #endif __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value, &self->exc_traceback); } else { __Pyx_Coroutine_ExceptionClear(self); } self->is_running = 1; retval = self->body((PyObject *) self, value); self->is_running = 0; if (retval) { __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value, &self->exc_traceback); #if CYTHON_COMPILING_IN_PYPY #else if (self->exc_traceback) { PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback; PyFrameObject *f = tb->tb_frame; Py_CLEAR(f->f_back); } #endif } else { __Pyx_Coroutine_ExceptionClear(self); } return retval; } static CYTHON_INLINE PyObject *__Pyx_Coroutine_MethodReturn(PyObject *retval) { if (unlikely(!retval && !PyErr_Occurred())) { PyErr_SetNone(PyExc_StopIteration); } return retval; } static CYTHON_INLINE PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) { PyObject *ret; PyObject *val = NULL; __Pyx_Coroutine_Undelegate(gen); __Pyx_PyGen_FetchStopIterationValue(&val); ret = __Pyx_Coroutine_SendEx(gen, val); Py_XDECREF(val); return ret; } static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) { PyObject *retval; __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; PyObject *yf = gen->yieldfrom; if (unlikely(__Pyx_Coroutine_CheckRunning(gen))) return NULL; if (yf) { PyObject *ret; gen->is_running = 1; #ifdef __Pyx_Generator_USED if (__Pyx_Generator_CheckExact(yf)) { ret = __Pyx_Coroutine_Send(yf, value); } else #endif #ifdef __Pyx_Coroutine_USED if (__Pyx_Coroutine_CheckExact(yf)) { ret = __Pyx_Coroutine_Send(yf, value); } else #endif { if (value == Py_None) ret = PyIter_Next(yf); else ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value); } gen->is_running = 0; if (likely(ret)) { return ret; } retval = __Pyx_Coroutine_FinishDelegation(gen); } else { retval = __Pyx_Coroutine_SendEx(gen, value); } return __Pyx_Coroutine_MethodReturn(retval); } static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) { PyObject *retval = NULL; int err = 0; #ifdef __Pyx_Generator_USED if (__Pyx_Generator_CheckExact(yf)) { retval = __Pyx_Coroutine_Close(yf); if (!retval) return -1; } else #endif #ifdef __Pyx_Coroutine_USED if (__Pyx_Coroutine_CheckExact(yf)) { retval = __Pyx_Coroutine_Close(yf); if (!retval) return -1; } else #endif { PyObject *meth; gen->is_running = 1; meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close); if (unlikely(!meth)) { if (!PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_WriteUnraisable(yf); } PyErr_Clear(); } else { retval = PyObject_CallFunction(meth, NULL); Py_DECREF(meth); if (!retval) err = -1; } gen->is_running = 0; } Py_XDECREF(retval); return err; } static PyObject *__Pyx_Generator_Next(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; PyObject *yf = gen->yieldfrom; if (unlikely(__Pyx_Coroutine_CheckRunning(gen))) return NULL; if (yf) { PyObject *ret; gen->is_running = 1; ret = Py_TYPE(yf)->tp_iternext(yf); gen->is_running = 0; if (likely(ret)) { return ret; } return __Pyx_Coroutine_FinishDelegation(gen); } return __Pyx_Coroutine_SendEx(gen, Py_None); } static PyObject *__Pyx_Coroutine_Close(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; PyObject *retval, *raised_exception; PyObject *yf = gen->yieldfrom; int err = 0; if (unlikely(__Pyx_Coroutine_CheckRunning(gen))) return NULL; if (yf) { Py_INCREF(yf); err = __Pyx_Coroutine_CloseIter(gen, yf); __Pyx_Coroutine_Undelegate(gen); Py_DECREF(yf); } if (err == 0) PyErr_SetNone(PyExc_GeneratorExit); retval = __Pyx_Coroutine_SendEx(gen, NULL); if (retval) { Py_DECREF(retval); PyErr_SetString(PyExc_RuntimeError, "generator ignored GeneratorExit"); return NULL; } raised_exception = PyErr_Occurred(); if (!raised_exception || raised_exception == PyExc_StopIteration || raised_exception == PyExc_GeneratorExit || PyErr_GivenExceptionMatches(raised_exception, PyExc_GeneratorExit) || PyErr_GivenExceptionMatches(raised_exception, PyExc_StopIteration)) { if (raised_exception) PyErr_Clear(); Py_INCREF(Py_None); return Py_None; } return NULL; } static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; PyObject *typ; PyObject *tb = NULL; PyObject *val = NULL; PyObject *yf = gen->yieldfrom; if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb)) return NULL; if (unlikely(__Pyx_Coroutine_CheckRunning(gen))) return NULL; if (yf) { PyObject *ret; Py_INCREF(yf); if (PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit)) { int err = __Pyx_Coroutine_CloseIter(gen, yf); Py_DECREF(yf); __Pyx_Coroutine_Undelegate(gen); if (err < 0) return __Pyx_Coroutine_MethodReturn(__Pyx_Coroutine_SendEx(gen, NULL)); goto throw_here; } gen->is_running = 1; #ifdef __Pyx_Generator_USED if (__Pyx_Generator_CheckExact(yf)) { ret = __Pyx_Coroutine_Throw(yf, args); } else #endif #ifdef __Pyx_Coroutine_USED if (__Pyx_Coroutine_CheckExact(yf)) { ret = __Pyx_Coroutine_Throw(yf, args); } else #endif { PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw); if (unlikely(!meth)) { Py_DECREF(yf); if (!PyErr_ExceptionMatches(PyExc_AttributeError)) { gen->is_running = 0; return NULL; } PyErr_Clear(); __Pyx_Coroutine_Undelegate(gen); gen->is_running = 0; goto throw_here; } ret = PyObject_CallObject(meth, args); Py_DECREF(meth); } gen->is_running = 0; Py_DECREF(yf); if (!ret) { ret = __Pyx_Coroutine_FinishDelegation(gen); } return __Pyx_Coroutine_MethodReturn(ret); } throw_here: __Pyx_Raise(typ, val, tb, NULL); return __Pyx_Coroutine_MethodReturn(__Pyx_Coroutine_SendEx(gen, NULL)); } static int __Pyx_Coroutine_traverse(PyObject *self, visitproc visit, void *arg) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; Py_VISIT(gen->closure); Py_VISIT(gen->classobj); Py_VISIT(gen->yieldfrom); Py_VISIT(gen->exc_type); Py_VISIT(gen->exc_value); Py_VISIT(gen->exc_traceback); return 0; } static int __Pyx_Coroutine_clear(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; Py_CLEAR(gen->closure); Py_CLEAR(gen->classobj); Py_CLEAR(gen->yieldfrom); Py_CLEAR(gen->exc_type); Py_CLEAR(gen->exc_value); Py_CLEAR(gen->exc_traceback); Py_CLEAR(gen->gi_name); Py_CLEAR(gen->gi_qualname); return 0; } static void __Pyx_Coroutine_dealloc(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; PyObject_GC_UnTrack(gen); if (gen->gi_weakreflist != NULL) PyObject_ClearWeakRefs(self); if (gen->resume_label > 0) { PyObject_GC_Track(self); #if PY_VERSION_HEX >= 0x030400a1 if (PyObject_CallFinalizerFromDealloc(self)) #else Py_TYPE(gen)->tp_del(self); if (self->ob_refcnt > 0) #endif { return; } PyObject_GC_UnTrack(self); } __Pyx_Coroutine_clear(self); PyObject_GC_Del(gen); } static void __Pyx_Coroutine_del(PyObject *self) { PyObject *res; PyObject *error_type, *error_value, *error_traceback; __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; if (gen->resume_label <= 0) return ; #if PY_VERSION_HEX < 0x030400a1 assert(self->ob_refcnt == 0); self->ob_refcnt = 1; #endif __Pyx_ErrFetch(&error_type, &error_value, &error_traceback); res = __Pyx_Coroutine_Close(self); if (res == NULL) PyErr_WriteUnraisable(self); else Py_DECREF(res); __Pyx_ErrRestore(error_type, error_value, error_traceback); #if PY_VERSION_HEX < 0x030400a1 assert(self->ob_refcnt > 0); if (--self->ob_refcnt == 0) { return; } { Py_ssize_t refcnt = self->ob_refcnt; _Py_NewReference(self); self->ob_refcnt = refcnt; } #if CYTHON_COMPILING_IN_CPYTHON assert(PyType_IS_GC(self->ob_type) && _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED); _Py_DEC_REFTOTAL; #endif #ifdef COUNT_ALLOCS --Py_TYPE(self)->tp_frees; --Py_TYPE(self)->tp_allocs; #endif #endif } static PyObject * __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self) { Py_INCREF(self->gi_name); return self->gi_name; } static int __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) { #else if (unlikely(value == NULL || !PyString_Check(value))) { #endif PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; } tmp = self->gi_name; Py_INCREF(value); self->gi_name = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self) { Py_INCREF(self->gi_qualname); return self->gi_qualname; } static int __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) { #else if (unlikely(value == NULL || !PyString_Check(value))) { #endif PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; } tmp = self->gi_qualname; Py_INCREF(value); self->gi_qualname = value; Py_XDECREF(tmp); return 0; } static __pyx_CoroutineObject *__Pyx__Coroutine_New(PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *closure, PyObject *name, PyObject *qualname) { __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type); if (gen == NULL) return NULL; gen->body = body; gen->closure = closure; Py_XINCREF(closure); gen->is_running = 0; gen->resume_label = 0; gen->classobj = NULL; gen->yieldfrom = NULL; gen->exc_type = NULL; gen->exc_value = NULL; gen->exc_traceback = NULL; gen->gi_weakreflist = NULL; Py_XINCREF(qualname); gen->gi_qualname = qualname; Py_XINCREF(name); gen->gi_name = name; PyObject_GC_Track(gen); return gen; } static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) { #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) int result; PyObject *globals, *result_obj; globals = PyDict_New(); if (unlikely(!globals)) goto ignore; result = PyDict_SetItemString(globals, "_cython_coroutine_type", #ifdef __Pyx_Coroutine_USED (PyObject*)__pyx_CoroutineType); #else Py_None); #endif if (unlikely(result < 0)) goto ignore; result = PyDict_SetItemString(globals, "_cython_generator_type", #ifdef __Pyx_Generator_USED (PyObject*)__pyx_GeneratorType); #else Py_None); #endif if (unlikely(result < 0)) goto ignore; if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore; if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore; result_obj = PyRun_String(py_code, Py_file_input, globals, globals); if (unlikely(!result_obj)) goto ignore; Py_DECREF(result_obj); Py_DECREF(globals); return module; ignore: Py_XDECREF(globals); PyErr_WriteUnraisable(module); if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) { Py_DECREF(module); module = NULL; } #else py_code++; #endif return module; } #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) static PyObject* __Pyx_patch_abc_module(PyObject *module); static PyObject* __Pyx_patch_abc_module(PyObject *module) { module = __Pyx_Coroutine_patch_module( module, "" "if _cython_generator_type is not None:\n" " try: Generator = _module.Generator\n" " except AttributeError: pass\n" " else: Generator.register(_cython_generator_type)\n" "if _cython_coroutine_type is not None:\n" " try: Coroutine = _module.Coroutine\n" " except AttributeError: pass\n" " else: Coroutine.register(_cython_coroutine_type)\n" ); return module; } #endif static int __Pyx_patch_abc(void) { #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) static int abc_patched = 0; if (!abc_patched) { PyObject *module; module = PyImport_ImportModule((PY_VERSION_HEX >= 0x03030000) ? "collections.abc" : "collections"); if (!module) { PyErr_WriteUnraisable(NULL); if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, ((PY_VERSION_HEX >= 0x03030000) ? "Cython module failed to register with collections.abc module" : "Cython module failed to register with collections module"), 1) < 0)) { return -1; } } else { module = __Pyx_patch_abc_module(module); abc_patched = 1; if (unlikely(!module)) return -1; Py_DECREF(module); } module = PyImport_ImportModule("backports_abc"); if (module) { module = __Pyx_patch_abc_module(module); Py_XDECREF(module); } if (!module) { PyErr_Clear(); } } #else if (0) __Pyx_Coroutine_patch_module(NULL, NULL); #endif return 0; } static PyMethodDef __pyx_Generator_methods[] = { {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O, (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")}, {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS, (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")}, {"close", (PyCFunction) __Pyx_Coroutine_Close, METH_NOARGS, (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")}, {0, 0, 0, 0} }; static PyMemberDef __pyx_Generator_memberlist[] = { {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL}, {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY, (char*) PyDoc_STR("object being iterated by 'yield from', or None")}, {0, 0, 0, 0, 0} }; static PyGetSetDef __pyx_Generator_getsets[] = { {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name, (char*) PyDoc_STR("name of the generator"), 0}, {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname, (char*) PyDoc_STR("qualified name of the generator"), 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_GeneratorType_type = { PyVarObject_HEAD_INIT(0, 0) "generator", sizeof(__pyx_CoroutineObject), 0, (destructor) __Pyx_Coroutine_dealloc, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, 0, (traverseproc) __Pyx_Coroutine_traverse, 0, 0, offsetof(__pyx_CoroutineObject, gi_weakreflist), 0, (iternextfunc) __Pyx_Generator_Next, __pyx_Generator_methods, __pyx_Generator_memberlist, __pyx_Generator_getsets, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, #if PY_VERSION_HEX >= 0x030400a1 0, #else __Pyx_Coroutine_del, #endif 0, #if PY_VERSION_HEX >= 0x030400a1 __Pyx_Coroutine_del, #endif }; static int __pyx_Generator_init(void) { __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr; __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter; __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type); if (unlikely(!__pyx_GeneratorType)) { return -1; } return 0; } static int __Pyx_check_binary_version(void) { char ctversion[4], rtversion[4]; PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION); PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion()); if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) { char message[200]; PyOS_snprintf(message, sizeof(message), "compiletime version %s of module '%.100s' " "does not match runtime version %s", ctversion, __Pyx_MODULE_NAME, rtversion); return PyErr_WarnEx(NULL, message, 1); } return 0; } static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION < 3 if (t->is_unicode) { *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); } else if (t->intern) { *t->p = PyString_InternFromString(t->s); } else { *t->p = PyString_FromStringAndSize(t->s, t->n - 1); } #else if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; ++t; } return 0; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); } static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if CYTHON_COMPILING_IN_CPYTHON && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { #if PY_VERSION_HEX < 0x03030000 char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif *length = PyBytes_GET_SIZE(defenc); return defenc_c; #else if (__Pyx_PyUnicode_READY(o) == -1) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (PyUnicode_IS_ASCII(o)) { *length = PyUnicode_GET_LENGTH(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else return PyUnicode_AsUTF8AndSize(o, length); #endif #endif } else #endif #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) if (PyByteArray_Check(o)) { *length = PyByteArray_GET_SIZE(o); return PyByteArray_AS_STRING(o); } else #endif { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (unlikely(r < 0)) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (PyInt_Check(x) || PyLong_Check(x)) #else if (PyLong_Check(x)) #endif return __Pyx_NewRef(x); m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = PyNumber_Int(x); } else if (m && m->nb_long) { name = "long"; res = PyNumber_Long(x); } #else if (m && m->nb_int) { name = "int"; res = PyNumber_Long(x); } #endif if (res) { #if PY_MAJOR_VERSION < 3 if (!PyInt_Check(res) && !PyLong_Check(res)) { #else if (!PyLong_Check(res)) { #endif PyErr_Format(PyExc_TypeError, "__%.4s__ returned non-%.4s (type %.200s)", name, name, Py_TYPE(res)->tp_name); Py_DECREF(res); return NULL; } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject *x; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(b))) { if (sizeof(Py_ssize_t) >= sizeof(long)) return PyInt_AS_LONG(b); else return PyInt_AsSsize_t(x); } #endif if (likely(PyLong_CheckExact(b))) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)b)->ob_digit; const Py_ssize_t size = Py_SIZE(b); if (likely(__Pyx_sst_abs(size) <= 1)) { ival = likely(size) ? digits[0] : 0; if (size == -1) ival = -ival; return ival; } else { switch (size) { case 2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; } } #endif return PyLong_AsSsize_t(b); } x = PyNumber_Index(b); if (!x) return -1; ival = PyInt_AsSsize_t(x); Py_DECREF(x); return ival; } static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { return PyInt_FromSize_t(ival); } #endif /* Py_PYTHON_H */ cutadapt-1.9.1/cutadapt/_seqio.c0000664000175000017500000131315412627541353017331 0ustar marcelmarcel00000000000000/* Generated by Cython 0.23.3 */ /* BEGIN: Cython Metadata { "distutils": {} } END: Cython Metadata */ #define PY_SSIZE_T_CLEAN #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000) #error Cython requires Python 2.6+ or Python 3.2+. #else #define CYTHON_ABI "0_23_3" #include #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #endif #if !defined(CYTHON_USE_PYLONG_INTERNALS) && CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070000 #define CYTHON_USE_PYLONG_INTERNALS 1 #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) #define Py_OptimizeFlag 0 #endif #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #if PY_MAJOR_VERSION < 3 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #define __Pyx_DefaultClassType PyClass_Type #else #define __Pyx_BUILTIN_MODULE_NAME "builtins" #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #define __Pyx_DefaultClassType PyType_Type #endif #ifndef Py_TPFLAGS_CHECKTYPES #define Py_TPFLAGS_CHECKTYPES 0 #endif #ifndef Py_TPFLAGS_HAVE_INDEX #define Py_TPFLAGS_HAVE_INDEX 0 #endif #ifndef Py_TPFLAGS_HAVE_NEWBUFFER #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #ifndef Py_TPFLAGS_HAVE_FINALIZE #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #else #define CYTHON_PEP393_ENABLED 0 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #endif #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) #else #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains) #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) #endif #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) #else #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) #endif #if PY_MAJOR_VERSION >= 3 #define PyBaseString_Type PyUnicode_Type #define PyStringObject PyUnicodeObject #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) #else #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #define PyNumber_Int PyNumber_Long #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY #ifndef PyUnicode_InternFromString #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) #endif #endif #if PY_VERSION_HEX < 0x030200A4 typedef long Py_hash_t; #define __Pyx_PyInt_FromHash_t PyInt_FromLong #define __Pyx_PyInt_AsHash_t PyInt_AsLong #else #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) #else #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) #endif #if PY_VERSION_HEX >= 0x030500B1 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) #elif CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 typedef struct { unaryfunc am_await; unaryfunc am_aiter; unaryfunc am_anext; } __Pyx_PyAsyncMethodsStruct; #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) #else #define __Pyx_PyType_AsAsync(obj) NULL #endif #ifndef CYTHON_RESTRICT #if defined(__GNUC__) #define CYTHON_RESTRICT __restrict__ #elif defined(_MSC_VER) && _MSC_VER >= 1400 #define CYTHON_RESTRICT __restrict #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_RESTRICT restrict #else #define CYTHON_RESTRICT #endif #endif #define __Pyx_void_to_None(void_result) (void_result, Py_INCREF(Py_None), Py_None) #ifndef CYTHON_INLINE #if defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #endif #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #define __PYX_HAVE__cutadapt___seqio #define __PYX_HAVE_API__cutadapt___seqio #ifdef _OPENMP #include #endif /* _OPENMP */ #ifdef PYREX_WITHOUT_ASSERTIONS #define CYTHON_WITHOUT_ASSERTIONS #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif #ifndef CYTHON_NCP_UNUSED # if CYTHON_COMPILING_IN_CPYTHON # define CYTHON_NCP_UNUSED # else # define CYTHON_NCP_UNUSED CYTHON_UNUSED # endif #endif typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0 #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #define __Pyx_uchar_cast(c) ((unsigned char)c) #define __Pyx_long_cast(x) ((long)x) #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ (sizeof(type) < sizeof(Py_ssize_t)) ||\ (sizeof(type) > sizeof(Py_ssize_t) &&\ likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX) &&\ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ v == (type)PY_SSIZE_T_MIN))) ||\ (sizeof(type) == sizeof(Py_ssize_t) &&\ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX))) ) #if defined (__cplusplus) && __cplusplus >= 201103L #include #define __Pyx_sst_abs(value) std::abs(value) #elif SIZEOF_INT >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) abs(value) #elif SIZEOF_LONG >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) labs(value) #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define __Pyx_sst_abs(value) llabs(value) #elif defined (_MSC_VER) && defined (_M_X64) #define __Pyx_sst_abs(value) _abs64(value) #elif defined (__GNUC__) #define __Pyx_sst_abs(value) __builtin_llabs(value) #else #define __Pyx_sst_abs(value) ((value<0) ? -value : value) #endif static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) #if PY_MAJOR_VERSION < 3 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; return (size_t)(u_end - u - 1); } #else #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen #endif #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) #define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False)) static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); #if CYTHON_COMPILING_IN_CPYTHON #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; const char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; if (strcmp(default_encoding_c, "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { char ascii_chars[128]; int c; for (c = 0; c < 128; c++) { ascii_chars[c] = c; } __Pyx_sys_getdefaultencoding_not_ascii = 1; ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); if (!ascii_chars_u) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { PyErr_Format( PyExc_ValueError, "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", default_encoding_c); goto bad; } Py_DECREF(ascii_chars_u); Py_DECREF(ascii_chars_b); } Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return -1; } #endif #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) #else #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT static char* __PYX_DEFAULT_STRING_ENCODING; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); return -1; } #endif #endif /* Test for GCC > 2.95 */ #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* !__GNUC__ or GCC < 2.95 */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static PyObject *__pyx_m; static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; static const char *__pyx_f[] = { "cutadapt/_seqio.pyx", }; /*--- Type declarations ---*/ struct __pyx_obj_8cutadapt_6_seqio_Sequence; struct __pyx_obj_8cutadapt_6_seqio___pyx_scope_struct____iter__; struct __pyx_defaults; typedef struct __pyx_defaults __pyx_defaults; struct __pyx_defaults { PyObject *__pyx_arg_sequence_class; }; /* "cutadapt/_seqio.pyx":25 * * * cdef class Sequence(object): # <<<<<<<<<<<<<< * """ * A record in a FASTQ file. Also used for FASTA (then the qualities attribute */ struct __pyx_obj_8cutadapt_6_seqio_Sequence { PyObject_HEAD PyObject *name; PyObject *sequence; PyObject *qualities; PyObject *name2; PyObject *match; }; /* "cutadapt/_seqio.pyx":106 * self.delivers_qualities = True * * def __iter__(self): # <<<<<<<<<<<<<< * """ * Yield Sequence objects */ struct __pyx_obj_8cutadapt_6_seqio___pyx_scope_struct____iter__ { PyObject_HEAD int __pyx_v_i; PyObject *__pyx_v_it; PyObject *__pyx_v_line; PyObject *__pyx_v_name; PyObject *__pyx_v_name2; PyObject *__pyx_v_qualities; PyObject *__pyx_v_self; PyObject *__pyx_v_sequence; PyObject *__pyx_v_sequence_class; int __pyx_v_strip; PyObject *__pyx_t_0; Py_ssize_t __pyx_t_1; PyObject *(*__pyx_t_2)(PyObject *); }; /* --- Runtime support code (head) --- */ #ifndef CYTHON_REFNANNY #define CYTHON_REFNANNY 0 #endif #if CYTHON_REFNANNY typedef struct { void (*INCREF)(void*, PyObject*, int); void (*DECREF)(void*, PyObject*, int); void (*GOTREF)(void*, PyObject*, int); void (*GIVEREF)(void*, PyObject*, int); void* (*SetupContext)(const char*, int, const char*); void (*FinishContext)(void**); } __Pyx_RefNannyAPIStruct; static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; #ifdef WITH_THREAD #define __Pyx_RefNannySetupContext(name, acquire_gil)\ if (acquire_gil) {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ PyGILState_Release(__pyx_gilstate_save);\ } else {\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ } #else #define __Pyx_RefNannySetupContext(name, acquire_gil)\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) #endif #define __Pyx_RefNannyFinishContext()\ __Pyx_RefNanny->FinishContext(&__pyx_refnanny) #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) #else #define __Pyx_RefNannyDeclarations #define __Pyx_RefNannySetupContext(name, acquire_gil) #define __Pyx_RefNannyFinishContext() #define __Pyx_INCREF(r) Py_INCREF(r) #define __Pyx_DECREF(r) Py_DECREF(r) #define __Pyx_GOTREF(r) #define __Pyx_GIVEREF(r) #define __Pyx_XINCREF(r) Py_XINCREF(r) #define __Pyx_XDECREF(r) Py_XDECREF(r) #define __Pyx_XGOTREF(r) #define __Pyx_XGIVEREF(r) #endif #define __Pyx_XDECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_XDECREF(tmp);\ } while (0) #define __Pyx_DECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_DECREF(tmp);\ } while (0) #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif static PyObject *__Pyx_GetBuiltinName(PyObject *name); static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ const char* function_name); static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace); #else #define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace)\ (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2)) #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** py_start, PyObject** py_stop, PyObject** py_slice, int has_cstart, int has_cstop, int wraparound); static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact); static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); #else #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) #endif #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); #else #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL) #endif #if CYTHON_COMPILING_IN_CPYTHON #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL) static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_setattro)) return tp->tp_setattro(obj, attr_name, value); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_setattr)) return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value); #endif return PyObject_SetAttr(obj, attr_name, value); } #else #define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n) #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) #endif #define __Pyx_PyIter_Next(obj) __Pyx_PyIter_Next2(obj, NULL) static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject *, PyObject *); #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ __Pyx_GetItemInt_Generic(o, to_py_func(i)))) #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck); #include static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals #else #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals #endif static int __Pyx_PyBytes_SingleTailmatch(PyObject* self, PyObject* arg, Py_ssize_t start, Py_ssize_t end, int direction); static int __Pyx_PyBytes_Tailmatch(PyObject* self, PyObject* substr, Py_ssize_t start, Py_ssize_t end, int direction); static int __Pyx_PyUnicode_Tailmatch(PyObject* s, PyObject* substr, Py_ssize_t start, Py_ssize_t end, int direction); static CYTHON_INLINE int __Pyx_PyStr_Tailmatch(PyObject* self, PyObject* arg, Py_ssize_t start, Py_ssize_t end, int direction); static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname); static CYTHON_INLINE long __Pyx_mod_long(long, long); static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc); static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); #define __Pyx_CyFunction_USED 1 #include #define __Pyx_CYFUNCTION_STATICMETHOD 0x01 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 #define __Pyx_CYFUNCTION_CCLASS 0x04 #define __Pyx_CyFunction_GetClosure(f)\ (((__pyx_CyFunctionObject *) (f))->func_closure) #define __Pyx_CyFunction_GetClassObj(f)\ (((__pyx_CyFunctionObject *) (f))->func_classobj) #define __Pyx_CyFunction_Defaults(type, f)\ ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\ ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) typedef struct { PyCFunctionObject func; #if PY_VERSION_HEX < 0x030500A0 PyObject *func_weakreflist; #endif PyObject *func_dict; PyObject *func_name; PyObject *func_qualname; PyObject *func_doc; PyObject *func_globals; PyObject *func_code; PyObject *func_closure; PyObject *func_classobj; void *defaults; int defaults_pyobjects; int flags; PyObject *defaults_tuple; PyObject *defaults_kwdict; PyObject *(*defaults_getter)(PyObject *); PyObject *func_annotations; } __pyx_CyFunctionObject; static PyTypeObject *__pyx_CyFunctionType = 0; #define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\ __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code) static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *self, PyObject *module, PyObject *globals, PyObject* code); static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, size_t size, int pyobjects); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, PyObject *tuple); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, PyObject *dict); static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, PyObject *dict); static int __pyx_CyFunction_init(void); typedef struct { int code_line; PyCodeObject* code_object; } __Pyx_CodeObjectCacheEntry; struct __Pyx_CodeObjectCache { int count; int max_count; __Pyx_CodeObjectCacheEntry* entries; }; static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); static PyCodeObject *__pyx_find_code_object(int code_line); static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyObject *); typedef struct { PyObject_HEAD __pyx_coroutine_body_t body; PyObject *closure; PyObject *exc_type; PyObject *exc_value; PyObject *exc_traceback; PyObject *gi_weakreflist; PyObject *classobj; PyObject *yieldfrom; PyObject *gi_name; PyObject *gi_qualname; int resume_label; char is_running; } __pyx_CoroutineObject; static __pyx_CoroutineObject *__Pyx__Coroutine_New(PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *closure, PyObject *name, PyObject *qualname); static int __Pyx_Coroutine_clear(PyObject *self); #if 1 || PY_VERSION_HEX < 0x030300B0 static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue); #else #define __Pyx_PyGen_FetchStopIterationValue(pvalue) PyGen_FetchStopIterationValue(pvalue) #endif static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code); static int __Pyx_patch_abc(void); #define __Pyx_Generator_USED static PyTypeObject *__pyx_GeneratorType = 0; #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType) #define __Pyx_Generator_New(body, closure, name, qualname)\ __Pyx__Coroutine_New(__pyx_GeneratorType, body, closure, name, qualname) static PyObject *__Pyx_Generator_Next(PyObject *self); static int __pyx_Generator_init(void); static int __Pyx_check_binary_version(void); static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /* Module declarations from 'cutadapt._seqio' */ static PyTypeObject *__pyx_ptype_8cutadapt_6_seqio_Sequence = 0; static PyTypeObject *__pyx_ptype_8cutadapt_6_seqio___pyx_scope_struct____iter__ = 0; #define __Pyx_MODULE_NAME "cutadapt._seqio" int __pyx_module_is_main_cutadapt___seqio = 0; /* Implementation of 'cutadapt._seqio' */ static PyObject *__pyx_builtin_Exception; static PyObject *__pyx_builtin_object; static PyObject *__pyx_builtin_NotImplementedError; static PyObject *__pyx_builtin_ValueError; static char __pyx_k_[] = "..."; static char __pyx_k_i[] = "i"; static char __pyx_k_n[] = "n"; static char __pyx_k_s[] = "s"; static char __pyx_k__2[] = ""; static char __pyx_k__3[] = "@"; static char __pyx_k__4[] = "\r\n"; static char __pyx_k__5[] = "+\n"; static char __pyx_k__6[] = "+"; static char __pyx_k_it[] = "it"; static char __pyx_k_doc[] = "__doc__"; static char __pyx_k_args[] = "args"; static char __pyx_k_exit[] = "__exit__"; static char __pyx_k_file[] = "file"; static char __pyx_k_init[] = "__init__"; static char __pyx_k_iter[] = "__iter__"; static char __pyx_k_line[] = "line"; static char __pyx_k_main[] = "__main__"; static char __pyx_k_name[] = "name"; static char __pyx_k_self[] = "self"; static char __pyx_k_send[] = "send"; static char __pyx_k_test[] = "__test__"; static char __pyx_k_class[] = "__class__"; static char __pyx_k_close[] = "close"; static char __pyx_k_enter[] = "__enter__"; static char __pyx_k_match[] = "match"; static char __pyx_k_name2[] = "name2"; static char __pyx_k_strip[] = "strip"; static char __pyx_k_throw[] = "throw"; static char __pyx_k_xopen[] = "xopen"; static char __pyx_k_file_2[] = "_file"; static char __pyx_k_format[] = "format"; static char __pyx_k_import[] = "__import__"; static char __pyx_k_module[] = "__module__"; static char __pyx_k_object[] = "object"; static char __pyx_k_rstrip[] = "rstrip"; static char __pyx_k_prepare[] = "__prepare__"; static char __pyx_k_shorten[] = "_shorten"; static char __pyx_k_qualname[] = "__qualname__"; static char __pyx_k_sequence[] = "sequence"; static char __pyx_k_Exception[] = "Exception"; static char __pyx_k_metaclass[] = "__metaclass__"; static char __pyx_k_qualities[] = "qualities"; static char __pyx_k_ValueError[] = "ValueError"; static char __pyx_k_FastqReader[] = "FastqReader"; static char __pyx_k_FormatError[] = "FormatError"; static char __pyx_k_close_on_exit[] = "_close_on_exit"; static char __pyx_k_qualities_0_r[] = ", qualities={0!r}"; static char __pyx_k_sequence_class[] = "sequence_class"; static char __pyx_k_cutadapt__seqio[] = "cutadapt._seqio"; static char __pyx_k_FastqReader_close[] = "FastqReader.close"; static char __pyx_k_FastqReader___exit[] = "FastqReader.__exit__"; static char __pyx_k_FastqReader___init[] = "FastqReader.__init__"; static char __pyx_k_FastqReader___iter[] = "FastqReader.__iter__"; static char __pyx_k_delivers_qualities[] = "delivers_qualities"; static char __pyx_k_FastqReader___enter[] = "FastqReader.__enter__"; static char __pyx_k_NotImplementedError[] = "NotImplementedError"; static char __pyx_k_FASTQ_file_ended_prematurely[] = "FASTQ file ended prematurely"; static char __pyx_k_Sequence_name_0_r_sequence_1_r[] = ""; static char __pyx_k_At_line_0_Sequence_descriptions[] = "At line {0}: Sequence descriptions in the FASTQ file don't match ({1!r} != {2!r}).\nThe second sequence description must be either empty or equal to the first description."; static char __pyx_k_Raised_when_an_input_file_FASTA[] = "\n\tRaised when an input file (FASTA or FASTQ) is malformatted.\n\t"; static char __pyx_k_Reader_for_FASTQ_files_Does_not[] = "\n\tReader for FASTQ files. Does not support multi-line FASTQ files.\n\t"; static char __pyx_k_home_marcel_scm_cutadapt_cutada[] = "/home/marcel/scm/cutadapt/cutadapt/_seqio.pyx"; static char __pyx_k_I_O_operation_on_closed_FastqRea[] = "I/O operation on closed FastqReader"; static char __pyx_k_In_read_named_0_r_length_of_qual[] = "In read named {0!r}: length of quality sequence ({1}) and length of read ({2}) do not match"; static char __pyx_k_Line_0_in_FASTQ_file_is_expected[] = "Line {0} in FASTQ file is expected to start with '@', but found {1!r}"; static char __pyx_k_Line_0_in_FASTQ_file_is_expected_2[] = "Line {0} in FASTQ file is expected to start with '+', but found {1!r}"; static PyObject *__pyx_kp_s_; static PyObject *__pyx_kp_s_At_line_0_Sequence_descriptions; static PyObject *__pyx_n_s_Exception; static PyObject *__pyx_kp_s_FASTQ_file_ended_prematurely; static PyObject *__pyx_n_s_FastqReader; static PyObject *__pyx_n_s_FastqReader___enter; static PyObject *__pyx_n_s_FastqReader___exit; static PyObject *__pyx_n_s_FastqReader___init; static PyObject *__pyx_n_s_FastqReader___iter; static PyObject *__pyx_n_s_FastqReader_close; static PyObject *__pyx_n_s_FormatError; static PyObject *__pyx_kp_s_I_O_operation_on_closed_FastqRea; static PyObject *__pyx_kp_s_In_read_named_0_r_length_of_qual; static PyObject *__pyx_kp_s_Line_0_in_FASTQ_file_is_expected; static PyObject *__pyx_kp_s_Line_0_in_FASTQ_file_is_expected_2; static PyObject *__pyx_n_s_NotImplementedError; static PyObject *__pyx_kp_s_Raised_when_an_input_file_FASTA; static PyObject *__pyx_kp_s_Reader_for_FASTQ_files_Does_not; static PyObject *__pyx_kp_s_Sequence_name_0_r_sequence_1_r; static PyObject *__pyx_n_s_ValueError; static PyObject *__pyx_kp_s__2; static PyObject *__pyx_kp_s__3; static PyObject *__pyx_kp_s__4; static PyObject *__pyx_kp_s__5; static PyObject *__pyx_kp_s__6; static PyObject *__pyx_n_s_args; static PyObject *__pyx_n_s_class; static PyObject *__pyx_n_s_close; static PyObject *__pyx_n_s_close_on_exit; static PyObject *__pyx_n_s_cutadapt__seqio; static PyObject *__pyx_n_s_delivers_qualities; static PyObject *__pyx_n_s_doc; static PyObject *__pyx_n_s_enter; static PyObject *__pyx_n_s_exit; static PyObject *__pyx_n_s_file; static PyObject *__pyx_n_s_file_2; static PyObject *__pyx_n_s_format; static PyObject *__pyx_kp_s_home_marcel_scm_cutadapt_cutada; static PyObject *__pyx_n_s_i; static PyObject *__pyx_n_s_import; static PyObject *__pyx_n_s_init; static PyObject *__pyx_n_s_it; static PyObject *__pyx_n_s_iter; static PyObject *__pyx_n_s_line; static PyObject *__pyx_n_s_main; static PyObject *__pyx_n_s_match; static PyObject *__pyx_n_s_metaclass; static PyObject *__pyx_n_s_module; static PyObject *__pyx_n_s_n; static PyObject *__pyx_n_s_name; static PyObject *__pyx_n_s_name2; static PyObject *__pyx_n_s_object; static PyObject *__pyx_n_s_prepare; static PyObject *__pyx_n_s_qualities; static PyObject *__pyx_kp_s_qualities_0_r; static PyObject *__pyx_n_s_qualname; static PyObject *__pyx_n_s_rstrip; static PyObject *__pyx_n_s_s; static PyObject *__pyx_n_s_self; static PyObject *__pyx_n_s_send; static PyObject *__pyx_n_s_sequence; static PyObject *__pyx_n_s_sequence_class; static PyObject *__pyx_n_s_shorten; static PyObject *__pyx_n_s_strip; static PyObject *__pyx_n_s_test; static PyObject *__pyx_n_s_throw; static PyObject *__pyx_n_s_xopen; static PyObject *__pyx_pf_8cutadapt_6_seqio__shorten(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s, PyObject *__pyx_v_n); /* proto */ static int __pyx_pf_8cutadapt_6_seqio_8Sequence___init__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_sequence, PyObject *__pyx_v_qualities, PyObject *__pyx_v_name2, PyObject *__pyx_v_match); /* proto */ static PyObject *__pyx_pf_8cutadapt_6_seqio_8Sequence_2__getitem__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self, PyObject *__pyx_v_key); /* proto */ static PyObject *__pyx_pf_8cutadapt_6_seqio_8Sequence_4__repr__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self); /* proto */ static Py_ssize_t __pyx_pf_8cutadapt_6_seqio_8Sequence_6__len__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8cutadapt_6_seqio_8Sequence_8__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /* proto */ static PyObject *__pyx_pf_8cutadapt_6_seqio_8Sequence_10__reduce__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8cutadapt_6_seqio_8Sequence_4name___get__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self); /* proto */ static int __pyx_pf_8cutadapt_6_seqio_8Sequence_4name_2__set__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_8cutadapt_6_seqio_8Sequence_4name_4__del__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8cutadapt_6_seqio_8Sequence_8sequence___get__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self); /* proto */ static int __pyx_pf_8cutadapt_6_seqio_8Sequence_8sequence_2__set__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_8cutadapt_6_seqio_8Sequence_8sequence_4__del__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8cutadapt_6_seqio_8Sequence_9qualities___get__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self); /* proto */ static int __pyx_pf_8cutadapt_6_seqio_8Sequence_9qualities_2__set__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_8cutadapt_6_seqio_8Sequence_9qualities_4__del__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8cutadapt_6_seqio_8Sequence_5name2___get__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self); /* proto */ static int __pyx_pf_8cutadapt_6_seqio_8Sequence_5name2_2__set__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_8cutadapt_6_seqio_8Sequence_5name2_4__del__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8cutadapt_6_seqio_8Sequence_5match___get__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self); /* proto */ static int __pyx_pf_8cutadapt_6_seqio_8Sequence_5match_2__set__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_8cutadapt_6_seqio_8Sequence_5match_4__del__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8cutadapt_6_seqio_11FastqReader_11__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_8cutadapt_6_seqio_11FastqReader___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_file, PyObject *__pyx_v_sequence_class); /* proto */ static PyObject *__pyx_pf_8cutadapt_6_seqio_11FastqReader_2__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8cutadapt_6_seqio_11FastqReader_5close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8cutadapt_6_seqio_11FastqReader_7__enter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_8cutadapt_6_seqio_11FastqReader_9__exit__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args); /* proto */ static PyObject *__pyx_tp_new_8cutadapt_6_seqio_Sequence(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_8cutadapt_6_seqio___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_int_3; static PyObject *__pyx_int_100; static PyObject *__pyx_tuple__7; static PyObject *__pyx_tuple__8; static PyObject *__pyx_tuple__9; static PyObject *__pyx_tuple__10; static PyObject *__pyx_tuple__12; static PyObject *__pyx_tuple__14; static PyObject *__pyx_tuple__16; static PyObject *__pyx_tuple__18; static PyObject *__pyx_tuple__20; static PyObject *__pyx_codeobj__11; static PyObject *__pyx_codeobj__13; static PyObject *__pyx_codeobj__15; static PyObject *__pyx_codeobj__17; static PyObject *__pyx_codeobj__19; static PyObject *__pyx_codeobj__21; /* "cutadapt/_seqio.pyx":16 * * * def _shorten(s, n=100): # <<<<<<<<<<<<<< * """Shorten string s to at most n characters, appending "..." if necessary.""" * if s is None: */ /* Python wrapper */ static PyObject *__pyx_pw_8cutadapt_6_seqio_1_shorten(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8cutadapt_6_seqio__shorten[] = "Shorten string s to at most n characters, appending \"...\" if necessary."; static PyMethodDef __pyx_mdef_8cutadapt_6_seqio_1_shorten = {"_shorten", (PyCFunction)__pyx_pw_8cutadapt_6_seqio_1_shorten, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8cutadapt_6_seqio__shorten}; static PyObject *__pyx_pw_8cutadapt_6_seqio_1_shorten(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_s = 0; PyObject *__pyx_v_n = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_shorten (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_s,&__pyx_n_s_n,0}; PyObject* values[2] = {0,0}; values[1] = ((PyObject *)__pyx_int_100); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_s)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_n); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_shorten") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_s = values[0]; __pyx_v_n = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_shorten", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cutadapt._seqio._shorten", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8cutadapt_6_seqio__shorten(__pyx_self, __pyx_v_s, __pyx_v_n); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8cutadapt_6_seqio__shorten(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s, PyObject *__pyx_v_n) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; Py_ssize_t __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_shorten", 0); __Pyx_INCREF(__pyx_v_s); /* "cutadapt/_seqio.pyx":18 * def _shorten(s, n=100): * """Shorten string s to at most n characters, appending "..." if necessary.""" * if s is None: # <<<<<<<<<<<<<< * return None * if len(s) > n: */ __pyx_t_1 = (__pyx_v_s == Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "cutadapt/_seqio.pyx":19 * """Shorten string s to at most n characters, appending "..." if necessary.""" * if s is None: * return None # <<<<<<<<<<<<<< * if len(s) > n: * s = s[:n-3] + '...' */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(Py_None); __pyx_r = Py_None; goto __pyx_L0; /* "cutadapt/_seqio.pyx":18 * def _shorten(s, n=100): * """Shorten string s to at most n characters, appending "..." if necessary.""" * if s is None: # <<<<<<<<<<<<<< * return None * if len(s) > n: */ } /* "cutadapt/_seqio.pyx":20 * if s is None: * return None * if len(s) > n: # <<<<<<<<<<<<<< * s = s[:n-3] + '...' * return s */ __pyx_t_3 = PyObject_Length(__pyx_v_s); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_v_n, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { /* "cutadapt/_seqio.pyx":21 * return None * if len(s) > n: * s = s[:n-3] + '...' # <<<<<<<<<<<<<< * return s * */ __pyx_t_5 = __Pyx_PyInt_SubtractObjC(__pyx_v_n, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_s, 0, 0, NULL, &__pyx_t_5, NULL, 0, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_kp_s_); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_s, __pyx_t_5); __pyx_t_5 = 0; /* "cutadapt/_seqio.pyx":20 * if s is None: * return None * if len(s) > n: # <<<<<<<<<<<<<< * s = s[:n-3] + '...' * return s */ } /* "cutadapt/_seqio.pyx":22 * if len(s) > n: * s = s[:n-3] + '...' * return s # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_s); __pyx_r = __pyx_v_s; goto __pyx_L0; /* "cutadapt/_seqio.pyx":16 * * * def _shorten(s, n=100): # <<<<<<<<<<<<<< * """Shorten string s to at most n characters, appending "..." if necessary.""" * if s is None: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("cutadapt._seqio._shorten", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_s); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cutadapt/_seqio.pyx":41 * public object match * * def __init__(self, str name, str sequence, str qualities=None, str name2='', # <<<<<<<<<<<<<< * match=None): * """Set qualities to None if there are no quality values""" */ /* Python wrapper */ static int __pyx_pw_8cutadapt_6_seqio_8Sequence_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8cutadapt_6_seqio_8Sequence___init__[] = "Set qualities to None if there are no quality values"; #if CYTHON_COMPILING_IN_CPYTHON struct wrapperbase __pyx_wrapperbase_8cutadapt_6_seqio_8Sequence___init__; #endif static int __pyx_pw_8cutadapt_6_seqio_8Sequence_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_name = 0; PyObject *__pyx_v_sequence = 0; PyObject *__pyx_v_qualities = 0; PyObject *__pyx_v_name2 = 0; PyObject *__pyx_v_match = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_sequence,&__pyx_n_s_qualities,&__pyx_n_s_name2,&__pyx_n_s_match,0}; PyObject* values[5] = {0,0,0,0,0}; values[2] = ((PyObject*)Py_None); values[3] = ((PyObject*)__pyx_kp_s__2); /* "cutadapt/_seqio.pyx":42 * * def __init__(self, str name, str sequence, str qualities=None, str name2='', * match=None): # <<<<<<<<<<<<<< * """Set qualities to None if there are no quality values""" * self.name = name */ values[4] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sequence)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 5, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_qualities); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name2); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_match); if (value) { values[4] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_name = ((PyObject*)values[0]); __pyx_v_sequence = ((PyObject*)values[1]); __pyx_v_qualities = ((PyObject*)values[2]); __pyx_v_name2 = ((PyObject*)values[3]); __pyx_v_match = values[4]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cutadapt._seqio.Sequence.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sequence), (&PyString_Type), 1, "sequence", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qualities), (&PyString_Type), 1, "qualities", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name2), (&PyString_Type), 1, "name2", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_8cutadapt_6_seqio_8Sequence___init__(((struct __pyx_obj_8cutadapt_6_seqio_Sequence *)__pyx_v_self), __pyx_v_name, __pyx_v_sequence, __pyx_v_qualities, __pyx_v_name2, __pyx_v_match); /* "cutadapt/_seqio.pyx":41 * public object match * * def __init__(self, str name, str sequence, str qualities=None, str name2='', # <<<<<<<<<<<<<< * match=None): * """Set qualities to None if there are no quality values""" */ /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8cutadapt_6_seqio_8Sequence___init__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_sequence, PyObject *__pyx_v_qualities, PyObject *__pyx_v_name2, PyObject *__pyx_v_match) { PyObject *__pyx_v_rname = NULL; int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; int __pyx_t_3; Py_ssize_t __pyx_t_4; Py_ssize_t __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); /* "cutadapt/_seqio.pyx":44 * match=None): * """Set qualities to None if there are no quality values""" * self.name = name # <<<<<<<<<<<<<< * self.sequence = sequence * self.qualities = qualities */ __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = __pyx_v_name; /* "cutadapt/_seqio.pyx":45 * """Set qualities to None if there are no quality values""" * self.name = name * self.sequence = sequence # <<<<<<<<<<<<<< * self.qualities = qualities * self.name2 = name2 */ __Pyx_INCREF(__pyx_v_sequence); __Pyx_GIVEREF(__pyx_v_sequence); __Pyx_GOTREF(__pyx_v_self->sequence); __Pyx_DECREF(__pyx_v_self->sequence); __pyx_v_self->sequence = __pyx_v_sequence; /* "cutadapt/_seqio.pyx":46 * self.name = name * self.sequence = sequence * self.qualities = qualities # <<<<<<<<<<<<<< * self.name2 = name2 * self.match = match */ __Pyx_INCREF(__pyx_v_qualities); __Pyx_GIVEREF(__pyx_v_qualities); __Pyx_GOTREF(__pyx_v_self->qualities); __Pyx_DECREF(__pyx_v_self->qualities); __pyx_v_self->qualities = __pyx_v_qualities; /* "cutadapt/_seqio.pyx":47 * self.sequence = sequence * self.qualities = qualities * self.name2 = name2 # <<<<<<<<<<<<<< * self.match = match * if qualities is not None and len(qualities) != len(sequence): */ __Pyx_INCREF(__pyx_v_name2); __Pyx_GIVEREF(__pyx_v_name2); __Pyx_GOTREF(__pyx_v_self->name2); __Pyx_DECREF(__pyx_v_self->name2); __pyx_v_self->name2 = __pyx_v_name2; /* "cutadapt/_seqio.pyx":48 * self.qualities = qualities * self.name2 = name2 * self.match = match # <<<<<<<<<<<<<< * if qualities is not None and len(qualities) != len(sequence): * rname = _shorten(name) */ __Pyx_INCREF(__pyx_v_match); __Pyx_GIVEREF(__pyx_v_match); __Pyx_GOTREF(__pyx_v_self->match); __Pyx_DECREF(__pyx_v_self->match); __pyx_v_self->match = __pyx_v_match; /* "cutadapt/_seqio.pyx":49 * self.name2 = name2 * self.match = match * if qualities is not None and len(qualities) != len(sequence): # <<<<<<<<<<<<<< * rname = _shorten(name) * raise FormatError("In read named {0!r}: length of quality sequence ({1}) and length of read ({2}) do not match".format( */ __pyx_t_2 = (__pyx_v_qualities != ((PyObject*)Py_None)); __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_4 = PyObject_Length(__pyx_v_qualities); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = PyObject_Length(__pyx_v_sequence); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((__pyx_t_4 != __pyx_t_5) != 0); __pyx_t_1 = __pyx_t_3; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "cutadapt/_seqio.pyx":50 * self.match = match * if qualities is not None and len(qualities) != len(sequence): * rname = _shorten(name) # <<<<<<<<<<<<<< * raise FormatError("In read named {0!r}: length of quality sequence ({1}) and length of read ({2}) do not match".format( * rname, len(qualities), len(sequence))) */ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_shorten); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (!__pyx_t_8) { __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_name); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); } else { __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_name); __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_rname = __pyx_t_6; __pyx_t_6 = 0; /* "cutadapt/_seqio.pyx":51 * if qualities is not None and len(qualities) != len(sequence): * rname = _shorten(name) * raise FormatError("In read named {0!r}: length of quality sequence ({1}) and length of read ({2}) do not match".format( # <<<<<<<<<<<<<< * rname, len(qualities), len(sequence))) * */ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_FormatError); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_In_read_named_0_r_length_of_qual, __pyx_n_s_format); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); /* "cutadapt/_seqio.pyx":52 * rname = _shorten(name) * raise FormatError("In read named {0!r}: length of quality sequence ({1}) and length of read ({2}) do not match".format( * rname, len(qualities), len(sequence))) # <<<<<<<<<<<<<< * * def __getitem__(self, key): */ __pyx_t_5 = PyObject_Length(__pyx_v_qualities); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_5 = PyObject_Length(__pyx_v_sequence); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_11 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_12 = NULL; __pyx_t_5 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_8))) { __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_12)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_8, function); __pyx_t_5 = 1; } } __pyx_t_13 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); if (__pyx_t_12) { __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL; } __Pyx_INCREF(__pyx_v_rname); __Pyx_GIVEREF(__pyx_v_rname); PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_5, __pyx_v_rname); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_5, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_13, 2+__pyx_t_5, __pyx_t_11); __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_13, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (!__pyx_t_8) { __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_9); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_6); } else { __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_8); __pyx_t_8 = NULL; __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_t_9); __pyx_t_9 = 0; __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_13, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_seqio.pyx":49 * self.name2 = name2 * self.match = match * if qualities is not None and len(qualities) != len(sequence): # <<<<<<<<<<<<<< * rname = _shorten(name) * raise FormatError("In read named {0!r}: length of quality sequence ({1}) and length of read ({2}) do not match".format( */ } /* "cutadapt/_seqio.pyx":41 * public object match * * def __init__(self, str name, str sequence, str qualities=None, str name2='', # <<<<<<<<<<<<<< * match=None): * """Set qualities to None if there are no quality values""" */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("cutadapt._seqio.Sequence.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_XDECREF(__pyx_v_rname); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cutadapt/_seqio.pyx":54 * rname, len(qualities), len(sequence))) * * def __getitem__(self, key): # <<<<<<<<<<<<<< * """slicing""" * return self.__class__( */ /* Python wrapper */ static PyObject *__pyx_pw_8cutadapt_6_seqio_8Sequence_3__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/ static char __pyx_doc_8cutadapt_6_seqio_8Sequence_2__getitem__[] = "slicing"; #if CYTHON_COMPILING_IN_CPYTHON struct wrapperbase __pyx_wrapperbase_8cutadapt_6_seqio_8Sequence_2__getitem__; #endif static PyObject *__pyx_pw_8cutadapt_6_seqio_8Sequence_3__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); __pyx_r = __pyx_pf_8cutadapt_6_seqio_8Sequence_2__getitem__(((struct __pyx_obj_8cutadapt_6_seqio_Sequence *)__pyx_v_self), ((PyObject *)__pyx_v_key)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8cutadapt_6_seqio_8Sequence_2__getitem__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self, PyObject *__pyx_v_key) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_t_5; PyObject *__pyx_t_6 = NULL; Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); /* "cutadapt/_seqio.pyx":56 * def __getitem__(self, key): * """slicing""" * return self.__class__( # <<<<<<<<<<<<<< * self.name, * self.sequence[key], */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); /* "cutadapt/_seqio.pyx":58 * return self.__class__( * self.name, * self.sequence[key], # <<<<<<<<<<<<<< * self.qualities[key] if self.qualities is not None else None, * self.name2, */ __pyx_t_3 = PyObject_GetItem(__pyx_v_self->sequence, __pyx_v_key); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); /* "cutadapt/_seqio.pyx":59 * self.name, * self.sequence[key], * self.qualities[key] if self.qualities is not None else None, # <<<<<<<<<<<<<< * self.name2, * self.match) */ __pyx_t_5 = (__pyx_v_self->qualities != ((PyObject*)Py_None)); if ((__pyx_t_5 != 0)) { __pyx_t_6 = PyObject_GetItem(__pyx_v_self->qualities, __pyx_v_key); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = __pyx_t_6; __pyx_t_6 = 0; } else { __Pyx_INCREF(Py_None); __pyx_t_4 = Py_None; } /* "cutadapt/_seqio.pyx":61 * self.qualities[key] if self.qualities is not None else None, * self.name2, * self.match) # <<<<<<<<<<<<<< * * def __repr__(self): */ __pyx_t_6 = NULL; __pyx_t_7 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_7 = 1; } } __pyx_t_8 = PyTuple_New(5+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_INCREF(__pyx_v_self->name); __Pyx_GIVEREF(__pyx_v_self->name); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_self->name); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_4); __Pyx_INCREF(__pyx_v_self->name2); __Pyx_GIVEREF(__pyx_v_self->name2); PyTuple_SET_ITEM(__pyx_t_8, 3+__pyx_t_7, __pyx_v_self->name2); __Pyx_INCREF(__pyx_v_self->match); __Pyx_GIVEREF(__pyx_v_self->match); PyTuple_SET_ITEM(__pyx_t_8, 4+__pyx_t_7, __pyx_v_self->match); __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; /* "cutadapt/_seqio.pyx":54 * rname, len(qualities), len(sequence))) * * def __getitem__(self, key): # <<<<<<<<<<<<<< * """slicing""" * return self.__class__( */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("cutadapt._seqio.Sequence.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cutadapt/_seqio.pyx":63 * self.match) * * def __repr__(self): # <<<<<<<<<<<<<< * qstr = '' * if self.qualities is not None: */ /* Python wrapper */ static PyObject *__pyx_pw_8cutadapt_6_seqio_8Sequence_5__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_8cutadapt_6_seqio_8Sequence_5__repr__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_8cutadapt_6_seqio_8Sequence_4__repr__(((struct __pyx_obj_8cutadapt_6_seqio_Sequence *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8cutadapt_6_seqio_8Sequence_4__repr__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self) { PyObject *__pyx_v_qstr = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; Py_ssize_t __pyx_t_10; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); /* "cutadapt/_seqio.pyx":64 * * def __repr__(self): * qstr = '' # <<<<<<<<<<<<<< * if self.qualities is not None: * qstr = ', qualities={0!r}'.format(_shorten(self.qualities)) */ __Pyx_INCREF(__pyx_kp_s__2); __pyx_v_qstr = __pyx_kp_s__2; /* "cutadapt/_seqio.pyx":65 * def __repr__(self): * qstr = '' * if self.qualities is not None: # <<<<<<<<<<<<<< * qstr = ', qualities={0!r}'.format(_shorten(self.qualities)) * return ''.format(_shorten(self.name), _shorten(self.sequence), qstr) */ __pyx_t_1 = (__pyx_v_self->qualities != ((PyObject*)Py_None)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "cutadapt/_seqio.pyx":66 * qstr = '' * if self.qualities is not None: * qstr = ', qualities={0!r}'.format(_shorten(self.qualities)) # <<<<<<<<<<<<<< * return ''.format(_shorten(self.name), _shorten(self.sequence), qstr) * */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_qualities_0_r, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_shorten); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (!__pyx_t_7) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_self->qualities); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); } else { __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL; __Pyx_INCREF(__pyx_v_self->qualities); __Pyx_GIVEREF(__pyx_v_self->qualities); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_self->qualities); __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_6) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else { __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_qstr, __pyx_t_3); __pyx_t_3 = 0; /* "cutadapt/_seqio.pyx":65 * def __repr__(self): * qstr = '' * if self.qualities is not None: # <<<<<<<<<<<<<< * qstr = ', qualities={0!r}'.format(_shorten(self.qualities)) * return ''.format(_shorten(self.name), _shorten(self.sequence), qstr) */ } /* "cutadapt/_seqio.pyx":67 * if self.qualities is not None: * qstr = ', qualities={0!r}'.format(_shorten(self.qualities)) * return ''.format(_shorten(self.name), _shorten(self.sequence), qstr) # <<<<<<<<<<<<<< * * def __len__(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Sequence_name_0_r_sequence_1_r, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_shorten); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } if (!__pyx_t_6) { __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_self->name); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); } else { __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v_self->name); __Pyx_GIVEREF(__pyx_v_self->name); PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_self->name); __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_shorten); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } if (!__pyx_t_6) { __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_self->sequence); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); } else { __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v_self->sequence); __Pyx_GIVEREF(__pyx_v_self->sequence); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_self->sequence); __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; __pyx_t_10 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); __pyx_t_10 = 1; } } __pyx_t_9 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_10, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_10, __pyx_t_5); __Pyx_INCREF(__pyx_v_qstr); __Pyx_GIVEREF(__pyx_v_qstr); PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_10, __pyx_v_qstr); __pyx_t_8 = 0; __pyx_t_5 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; /* "cutadapt/_seqio.pyx":63 * self.match) * * def __repr__(self): # <<<<<<<<<<<<<< * qstr = '' * if self.qualities is not None: */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("cutadapt._seqio.Sequence.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_qstr); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cutadapt/_seqio.pyx":69 * return ''.format(_shorten(self.name), _shorten(self.sequence), qstr) * * def __len__(self): # <<<<<<<<<<<<<< * return len(self.sequence) * */ /* Python wrapper */ static Py_ssize_t __pyx_pw_8cutadapt_6_seqio_8Sequence_7__len__(PyObject *__pyx_v_self); /*proto*/ static Py_ssize_t __pyx_pw_8cutadapt_6_seqio_8Sequence_7__len__(PyObject *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_r = __pyx_pf_8cutadapt_6_seqio_8Sequence_6__len__(((struct __pyx_obj_8cutadapt_6_seqio_Sequence *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static Py_ssize_t __pyx_pf_8cutadapt_6_seqio_8Sequence_6__len__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__len__", 0); /* "cutadapt/_seqio.pyx":70 * * def __len__(self): * return len(self.sequence) # <<<<<<<<<<<<<< * * def __richcmp__(self, other, int op): */ __pyx_t_1 = __pyx_v_self->sequence; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; /* "cutadapt/_seqio.pyx":69 * return ''.format(_shorten(self.name), _shorten(self.sequence), qstr) * * def __len__(self): # <<<<<<<<<<<<<< * return len(self.sequence) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cutadapt._seqio.Sequence.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cutadapt/_seqio.pyx":72 * return len(self.sequence) * * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<< * if 2 <= op <= 3: * eq = self.name == other.name and \ */ /* Python wrapper */ static PyObject *__pyx_pw_8cutadapt_6_seqio_8Sequence_9__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op); /*proto*/ static PyObject *__pyx_pw_8cutadapt_6_seqio_8Sequence_9__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0); __pyx_r = __pyx_pf_8cutadapt_6_seqio_8Sequence_8__richcmp__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((int)__pyx_v_op)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8cutadapt_6_seqio_8Sequence_8__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_v_op) { PyObject *__pyx_v_eq = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__richcmp__", 0); /* "cutadapt/_seqio.pyx":73 * * def __richcmp__(self, other, int op): * if 2 <= op <= 3: # <<<<<<<<<<<<<< * eq = self.name == other.name and \ * self.sequence == other.sequence and \ */ __pyx_t_1 = (2 <= __pyx_v_op); if (__pyx_t_1) { __pyx_t_1 = (__pyx_v_op <= 3); } __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "cutadapt/_seqio.pyx":74 * def __richcmp__(self, other, int op): * if 2 <= op <= 3: * eq = self.name == other.name and \ # <<<<<<<<<<<<<< * self.sequence == other.sequence and \ * self.qualities == other.qualities */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { __Pyx_INCREF(__pyx_t_6); __pyx_t_3 = __pyx_t_6; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L4_bool_binop_done; } /* "cutadapt/_seqio.pyx":75 * if 2 <= op <= 3: * eq = self.name == other.name and \ * self.sequence == other.sequence and \ # <<<<<<<<<<<<<< * self.qualities == other.qualities * if op == 2: */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_sequence); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_sequence); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { __Pyx_INCREF(__pyx_t_4); __pyx_t_3 = __pyx_t_4; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4_bool_binop_done; } /* "cutadapt/_seqio.pyx":76 * eq = self.name == other.name and \ * self.sequence == other.sequence and \ * self.qualities == other.qualities # <<<<<<<<<<<<<< * if op == 2: * return eq */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_qualities); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_qualities); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_INCREF(__pyx_t_6); __pyx_t_3 = __pyx_t_6; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_L4_bool_binop_done:; __pyx_v_eq = __pyx_t_3; __pyx_t_3 = 0; /* "cutadapt/_seqio.pyx":77 * self.sequence == other.sequence and \ * self.qualities == other.qualities * if op == 2: # <<<<<<<<<<<<<< * return eq * else: */ __pyx_t_2 = ((__pyx_v_op == 2) != 0); if (__pyx_t_2) { /* "cutadapt/_seqio.pyx":78 * self.qualities == other.qualities * if op == 2: * return eq # <<<<<<<<<<<<<< * else: * return not eq */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_eq); __pyx_r = __pyx_v_eq; goto __pyx_L0; /* "cutadapt/_seqio.pyx":77 * self.sequence == other.sequence and \ * self.qualities == other.qualities * if op == 2: # <<<<<<<<<<<<<< * return eq * else: */ } /* "cutadapt/_seqio.pyx":80 * return eq * else: * return not eq # <<<<<<<<<<<<<< * else: * raise NotImplementedError() */ /*else*/ { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_eq); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyBool_FromLong((!__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; } /* "cutadapt/_seqio.pyx":73 * * def __richcmp__(self, other, int op): * if 2 <= op <= 3: # <<<<<<<<<<<<<< * eq = self.name == other.name and \ * self.sequence == other.sequence and \ */ } /* "cutadapt/_seqio.pyx":82 * return not eq * else: * raise NotImplementedError() # <<<<<<<<<<<<<< * * def __reduce__(self): */ /*else*/ { __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_builtin_NotImplementedError); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } /* "cutadapt/_seqio.pyx":72 * return len(self.sequence) * * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<< * if 2 <= op <= 3: * eq = self.name == other.name and \ */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("cutadapt._seqio.Sequence.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_eq); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cutadapt/_seqio.pyx":84 * raise NotImplementedError() * * def __reduce__(self): # <<<<<<<<<<<<<< * return (Sequence, (self.name, self.sequence, self.qualities, self.name2)) * */ /* Python wrapper */ static PyObject *__pyx_pw_8cutadapt_6_seqio_8Sequence_11__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_8cutadapt_6_seqio_8Sequence_11__reduce__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce__ (wrapper)", 0); __pyx_r = __pyx_pf_8cutadapt_6_seqio_8Sequence_10__reduce__(((struct __pyx_obj_8cutadapt_6_seqio_Sequence *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8cutadapt_6_seqio_8Sequence_10__reduce__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__reduce__", 0); /* "cutadapt/_seqio.pyx":85 * * def __reduce__(self): * return (Sequence, (self.name, self.sequence, self.qualities, self.name2)) # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->name); __Pyx_GIVEREF(__pyx_v_self->name); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name); __Pyx_INCREF(__pyx_v_self->sequence); __Pyx_GIVEREF(__pyx_v_self->sequence); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->sequence); __Pyx_INCREF(__pyx_v_self->qualities); __Pyx_GIVEREF(__pyx_v_self->qualities); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->qualities); __Pyx_INCREF(__pyx_v_self->name2); __Pyx_GIVEREF(__pyx_v_self->name2); PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->name2); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_ptype_8cutadapt_6_seqio_Sequence)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_8cutadapt_6_seqio_Sequence)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_8cutadapt_6_seqio_Sequence)); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* "cutadapt/_seqio.pyx":84 * raise NotImplementedError() * * def __reduce__(self): # <<<<<<<<<<<<<< * return (Sequence, (self.name, self.sequence, self.qualities, self.name2)) * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cutadapt._seqio.Sequence.__reduce__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cutadapt/_seqio.pyx":35 * """ * cdef: * public str name # <<<<<<<<<<<<<< * public str sequence * public str qualities */ /* Python wrapper */ static PyObject *__pyx_pw_8cutadapt_6_seqio_8Sequence_4name_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_8cutadapt_6_seqio_8Sequence_4name_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_8cutadapt_6_seqio_8Sequence_4name___get__(((struct __pyx_obj_8cutadapt_6_seqio_Sequence *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8cutadapt_6_seqio_8Sequence_4name___get__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->name); __pyx_r = __pyx_v_self->name; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_8cutadapt_6_seqio_8Sequence_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_8cutadapt_6_seqio_8Sequence_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_8cutadapt_6_seqio_8Sequence_4name_2__set__(((struct __pyx_obj_8cutadapt_6_seqio_Sequence *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8cutadapt_6_seqio_8Sequence_4name_2__set__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(PyString_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cutadapt._seqio.Sequence.name.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_8cutadapt_6_seqio_8Sequence_4name_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_8cutadapt_6_seqio_8Sequence_4name_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_8cutadapt_6_seqio_8Sequence_4name_4__del__(((struct __pyx_obj_8cutadapt_6_seqio_Sequence *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8cutadapt_6_seqio_8Sequence_4name_4__del__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = ((PyObject*)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cutadapt/_seqio.pyx":36 * cdef: * public str name * public str sequence # <<<<<<<<<<<<<< * public str qualities * public str name2 */ /* Python wrapper */ static PyObject *__pyx_pw_8cutadapt_6_seqio_8Sequence_8sequence_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_8cutadapt_6_seqio_8Sequence_8sequence_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_8cutadapt_6_seqio_8Sequence_8sequence___get__(((struct __pyx_obj_8cutadapt_6_seqio_Sequence *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8cutadapt_6_seqio_8Sequence_8sequence___get__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->sequence); __pyx_r = __pyx_v_self->sequence; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_8cutadapt_6_seqio_8Sequence_8sequence_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_8cutadapt_6_seqio_8Sequence_8sequence_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_8cutadapt_6_seqio_8Sequence_8sequence_2__set__(((struct __pyx_obj_8cutadapt_6_seqio_Sequence *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8cutadapt_6_seqio_8Sequence_8sequence_2__set__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(PyString_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->sequence); __Pyx_DECREF(__pyx_v_self->sequence); __pyx_v_self->sequence = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cutadapt._seqio.Sequence.sequence.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_8cutadapt_6_seqio_8Sequence_8sequence_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_8cutadapt_6_seqio_8Sequence_8sequence_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_8cutadapt_6_seqio_8Sequence_8sequence_4__del__(((struct __pyx_obj_8cutadapt_6_seqio_Sequence *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8cutadapt_6_seqio_8Sequence_8sequence_4__del__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->sequence); __Pyx_DECREF(__pyx_v_self->sequence); __pyx_v_self->sequence = ((PyObject*)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cutadapt/_seqio.pyx":37 * public str name * public str sequence * public str qualities # <<<<<<<<<<<<<< * public str name2 * public object match */ /* Python wrapper */ static PyObject *__pyx_pw_8cutadapt_6_seqio_8Sequence_9qualities_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_8cutadapt_6_seqio_8Sequence_9qualities_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_8cutadapt_6_seqio_8Sequence_9qualities___get__(((struct __pyx_obj_8cutadapt_6_seqio_Sequence *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8cutadapt_6_seqio_8Sequence_9qualities___get__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->qualities); __pyx_r = __pyx_v_self->qualities; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_8cutadapt_6_seqio_8Sequence_9qualities_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_8cutadapt_6_seqio_8Sequence_9qualities_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_8cutadapt_6_seqio_8Sequence_9qualities_2__set__(((struct __pyx_obj_8cutadapt_6_seqio_Sequence *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8cutadapt_6_seqio_8Sequence_9qualities_2__set__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(PyString_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->qualities); __Pyx_DECREF(__pyx_v_self->qualities); __pyx_v_self->qualities = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cutadapt._seqio.Sequence.qualities.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_8cutadapt_6_seqio_8Sequence_9qualities_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_8cutadapt_6_seqio_8Sequence_9qualities_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_8cutadapt_6_seqio_8Sequence_9qualities_4__del__(((struct __pyx_obj_8cutadapt_6_seqio_Sequence *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8cutadapt_6_seqio_8Sequence_9qualities_4__del__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->qualities); __Pyx_DECREF(__pyx_v_self->qualities); __pyx_v_self->qualities = ((PyObject*)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cutadapt/_seqio.pyx":38 * public str sequence * public str qualities * public str name2 # <<<<<<<<<<<<<< * public object match * */ /* Python wrapper */ static PyObject *__pyx_pw_8cutadapt_6_seqio_8Sequence_5name2_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_8cutadapt_6_seqio_8Sequence_5name2_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_8cutadapt_6_seqio_8Sequence_5name2___get__(((struct __pyx_obj_8cutadapt_6_seqio_Sequence *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8cutadapt_6_seqio_8Sequence_5name2___get__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->name2); __pyx_r = __pyx_v_self->name2; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_8cutadapt_6_seqio_8Sequence_5name2_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_8cutadapt_6_seqio_8Sequence_5name2_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_8cutadapt_6_seqio_8Sequence_5name2_2__set__(((struct __pyx_obj_8cutadapt_6_seqio_Sequence *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8cutadapt_6_seqio_8Sequence_5name2_2__set__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(PyString_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->name2); __Pyx_DECREF(__pyx_v_self->name2); __pyx_v_self->name2 = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cutadapt._seqio.Sequence.name2.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_8cutadapt_6_seqio_8Sequence_5name2_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_8cutadapt_6_seqio_8Sequence_5name2_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_8cutadapt_6_seqio_8Sequence_5name2_4__del__(((struct __pyx_obj_8cutadapt_6_seqio_Sequence *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8cutadapt_6_seqio_8Sequence_5name2_4__del__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->name2); __Pyx_DECREF(__pyx_v_self->name2); __pyx_v_self->name2 = ((PyObject*)Py_None); /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cutadapt/_seqio.pyx":39 * public str qualities * public str name2 * public object match # <<<<<<<<<<<<<< * * def __init__(self, str name, str sequence, str qualities=None, str name2='', */ /* Python wrapper */ static PyObject *__pyx_pw_8cutadapt_6_seqio_8Sequence_5match_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_8cutadapt_6_seqio_8Sequence_5match_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_8cutadapt_6_seqio_8Sequence_5match___get__(((struct __pyx_obj_8cutadapt_6_seqio_Sequence *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8cutadapt_6_seqio_8Sequence_5match___get__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->match); __pyx_r = __pyx_v_self->match; goto __pyx_L0; /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_8cutadapt_6_seqio_8Sequence_5match_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ static int __pyx_pw_8cutadapt_6_seqio_8Sequence_5match_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_8cutadapt_6_seqio_8Sequence_5match_2__set__(((struct __pyx_obj_8cutadapt_6_seqio_Sequence *)__pyx_v_self), ((PyObject *)__pyx_v_value)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8cutadapt_6_seqio_8Sequence_5match_2__set__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->match); __Pyx_DECREF(__pyx_v_self->match); __pyx_v_self->match = __pyx_v_value; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static int __pyx_pw_8cutadapt_6_seqio_8Sequence_5match_5__del__(PyObject *__pyx_v_self); /*proto*/ static int __pyx_pw_8cutadapt_6_seqio_8Sequence_5match_5__del__(PyObject *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_8cutadapt_6_seqio_8Sequence_5match_4__del__(((struct __pyx_obj_8cutadapt_6_seqio_Sequence *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_8cutadapt_6_seqio_8Sequence_5match_4__del__(struct __pyx_obj_8cutadapt_6_seqio_Sequence *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__", 0); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->match); __Pyx_DECREF(__pyx_v_self->match); __pyx_v_self->match = Py_None; /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cutadapt/_seqio.pyx":94 * _close_on_exit = False * * def __init__(self, file, sequence_class=Sequence): # <<<<<<<<<<<<<< * """ * file is a filename or a file-like object. */ static PyObject *__pyx_pf_8cutadapt_6_seqio_11FastqReader_11__defaults__(CYTHON_UNUSED PyObject *__pyx_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__defaults__", 0); __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_sequence_class); __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_sequence_class); PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_sequence_class); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("cutadapt._seqio.FastqReader.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* Python wrapper */ static PyObject *__pyx_pw_8cutadapt_6_seqio_11FastqReader_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8cutadapt_6_seqio_11FastqReader___init__[] = "\n\t\tfile is a filename or a file-like object.\n\t\tIf file is a filename, then .gz files are supported.\n\t\t"; static PyMethodDef __pyx_mdef_8cutadapt_6_seqio_11FastqReader_1__init__ = {"__init__", (PyCFunction)__pyx_pw_8cutadapt_6_seqio_11FastqReader_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8cutadapt_6_seqio_11FastqReader___init__}; static PyObject *__pyx_pw_8cutadapt_6_seqio_11FastqReader_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; PyObject *__pyx_v_file = 0; PyObject *__pyx_v_sequence_class = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_file,&__pyx_n_s_sequence_class,0}; PyObject* values[3] = {0,0,0}; __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self); values[2] = __pyx_dynamic_args->__pyx_arg_sequence_class; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_file)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sequence_class); if (value) { values[2] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_self = values[0]; __pyx_v_file = values[1]; __pyx_v_sequence_class = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cutadapt._seqio.FastqReader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8cutadapt_6_seqio_11FastqReader___init__(__pyx_self, __pyx_v_self, __pyx_v_file, __pyx_v_sequence_class); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8cutadapt_6_seqio_11FastqReader___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_file, PyObject *__pyx_v_sequence_class) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); __Pyx_INCREF(__pyx_v_file); /* "cutadapt/_seqio.pyx":99 * If file is a filename, then .gz files are supported. * """ * if isinstance(file, basestring): # <<<<<<<<<<<<<< * file = xopen(file) * self._close_on_exit = True */ __pyx_t_1 = __Pyx_PyBaseString_Check(__pyx_v_file); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "cutadapt/_seqio.pyx":100 * """ * if isinstance(file, basestring): * file = xopen(file) # <<<<<<<<<<<<<< * self._close_on_exit = True * self._file = file */ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_xopen); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } if (!__pyx_t_5) { __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_file); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); } else { __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(__pyx_v_file); __Pyx_GIVEREF(__pyx_v_file); PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_file); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_file, __pyx_t_3); __pyx_t_3 = 0; /* "cutadapt/_seqio.pyx":101 * if isinstance(file, basestring): * file = xopen(file) * self._close_on_exit = True # <<<<<<<<<<<<<< * self._file = file * self.sequence_class = sequence_class */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_close_on_exit, Py_True) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_seqio.pyx":99 * If file is a filename, then .gz files are supported. * """ * if isinstance(file, basestring): # <<<<<<<<<<<<<< * file = xopen(file) * self._close_on_exit = True */ } /* "cutadapt/_seqio.pyx":102 * file = xopen(file) * self._close_on_exit = True * self._file = file # <<<<<<<<<<<<<< * self.sequence_class = sequence_class * self.delivers_qualities = True */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_file_2, __pyx_v_file) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_seqio.pyx":103 * self._close_on_exit = True * self._file = file * self.sequence_class = sequence_class # <<<<<<<<<<<<<< * self.delivers_qualities = True * */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_sequence_class, __pyx_v_sequence_class) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_seqio.pyx":104 * self._file = file * self.sequence_class = sequence_class * self.delivers_qualities = True # <<<<<<<<<<<<<< * * def __iter__(self): */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_delivers_qualities, Py_True) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_seqio.pyx":94 * _close_on_exit = False * * def __init__(self, file, sequence_class=Sequence): # <<<<<<<<<<<<<< * """ * file is a filename or a file-like object. */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("cutadapt._seqio.FastqReader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_file); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_8cutadapt_6_seqio_11FastqReader_4generator(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* "cutadapt/_seqio.pyx":106 * self.delivers_qualities = True * * def __iter__(self): # <<<<<<<<<<<<<< * """ * Yield Sequence objects */ /* Python wrapper */ static PyObject *__pyx_pw_8cutadapt_6_seqio_11FastqReader_3__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static char __pyx_doc_8cutadapt_6_seqio_11FastqReader_2__iter__[] = "\n\t\tYield Sequence objects\n\t\t"; static PyMethodDef __pyx_mdef_8cutadapt_6_seqio_11FastqReader_3__iter__ = {"__iter__", (PyCFunction)__pyx_pw_8cutadapt_6_seqio_11FastqReader_3__iter__, METH_O, __pyx_doc_8cutadapt_6_seqio_11FastqReader_2__iter__}; static PyObject *__pyx_pw_8cutadapt_6_seqio_11FastqReader_3__iter__(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); __pyx_r = __pyx_pf_8cutadapt_6_seqio_11FastqReader_2__iter__(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8cutadapt_6_seqio_11FastqReader_2__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { struct __pyx_obj_8cutadapt_6_seqio___pyx_scope_struct____iter__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__iter__", 0); __pyx_cur_scope = (struct __pyx_obj_8cutadapt_6_seqio___pyx_scope_struct____iter__ *)__pyx_tp_new_8cutadapt_6_seqio___pyx_scope_struct____iter__(__pyx_ptype_8cutadapt_6_seqio___pyx_scope_struct____iter__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_cur_scope); __pyx_cur_scope->__pyx_v_self = __pyx_v_self; __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self); { __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_8cutadapt_6_seqio_11FastqReader_4generator, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_FastqReader___iter); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("cutadapt._seqio.FastqReader.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_8cutadapt_6_seqio_11FastqReader_4generator(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_8cutadapt_6_seqio___pyx_scope_struct____iter__ *__pyx_cur_scope = ((struct __pyx_obj_8cutadapt_6_seqio___pyx_scope_struct____iter__ *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; Py_ssize_t __pyx_t_10; PyObject *__pyx_t_11 = NULL; int __pyx_t_12; PyObject *(*__pyx_t_13)(PyObject *); Py_ssize_t __pyx_t_14; PyObject *__pyx_t_15 = NULL; Py_ssize_t __pyx_t_16; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; case 1: goto __pyx_L19_resume_from_yield; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_seqio.pyx":110 * Yield Sequence objects * """ * cdef int i = 0 # <<<<<<<<<<<<<< * cdef int strip * cdef str line, name, qualities, sequence, name2 */ __pyx_cur_scope->__pyx_v_i = 0; /* "cutadapt/_seqio.pyx":113 * cdef int strip * cdef str line, name, qualities, sequence, name2 * sequence_class = self.sequence_class # <<<<<<<<<<<<<< * * it = iter(self._file) */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_sequence_class); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_sequence_class = __pyx_t_1; __pyx_t_1 = 0; /* "cutadapt/_seqio.pyx":115 * sequence_class = self.sequence_class * * it = iter(self._file) # <<<<<<<<<<<<<< * line = next(it) * if not (line and line[0] == '@'): */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_file_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); __pyx_cur_scope->__pyx_v_it = __pyx_t_2; __pyx_t_2 = 0; /* "cutadapt/_seqio.pyx":116 * * it = iter(self._file) * line = next(it) # <<<<<<<<<<<<<< * if not (line and line[0] == '@'): * raise FormatError("Line {0} in FASTQ file is expected to start with '@', but found {1!r}".format(i+1, line[:10])) */ __pyx_t_2 = __Pyx_PyIter_Next(__pyx_cur_scope->__pyx_v_it); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GIVEREF(__pyx_t_2); __pyx_cur_scope->__pyx_v_line = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "cutadapt/_seqio.pyx":117 * it = iter(self._file) * line = next(it) * if not (line and line[0] == '@'): # <<<<<<<<<<<<<< * raise FormatError("Line {0} in FASTQ file is expected to start with '@', but found {1!r}".format(i+1, line[:10])) * strip = -2 if line.endswith('\r\n') else -1 */ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_line); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_4) { } else { __pyx_t_3 = __pyx_t_4; goto __pyx_L5_bool_binop_done; } __pyx_t_2 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_line, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__3, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __pyx_t_4; __pyx_L5_bool_binop_done:; __pyx_t_4 = ((!__pyx_t_3) != 0); if (__pyx_t_4) { /* "cutadapt/_seqio.pyx":118 * line = next(it) * if not (line and line[0] == '@'): * raise FormatError("Line {0} in FASTQ file is expected to start with '@', but found {1!r}".format(i+1, line[:10])) # <<<<<<<<<<<<<< * strip = -2 if line.endswith('\r\n') else -1 * name = line[1:strip] */ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_FormatError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Line_0_in_FASTQ_file_is_expected, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyInt_From_long((__pyx_cur_scope->__pyx_v_i + 1)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if (unlikely(__pyx_cur_scope->__pyx_v_line == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_8 = PySequence_GetSlice(__pyx_cur_scope->__pyx_v_line, 0, 10); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = NULL; __pyx_t_10 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_10 = 1; } } __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); if (__pyx_t_9) { __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL; } __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_8); __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } if (!__pyx_t_6) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); } else { __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_seqio.pyx":117 * it = iter(self._file) * line = next(it) * if not (line and line[0] == '@'): # <<<<<<<<<<<<<< * raise FormatError("Line {0} in FASTQ file is expected to start with '@', but found {1!r}".format(i+1, line[:10])) * strip = -2 if line.endswith('\r\n') else -1 */ } /* "cutadapt/_seqio.pyx":119 * if not (line and line[0] == '@'): * raise FormatError("Line {0} in FASTQ file is expected to start with '@', but found {1!r}".format(i+1, line[:10])) * strip = -2 if line.endswith('\r\n') else -1 # <<<<<<<<<<<<<< * name = line[1:strip] * */ if (unlikely(__pyx_cur_scope->__pyx_v_line == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "endswith"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_4 = __Pyx_PyStr_Tailmatch(__pyx_cur_scope->__pyx_v_line, __pyx_kp_s__4, 0, PY_SSIZE_T_MAX, 1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if ((__pyx_t_4 != 0)) { __pyx_t_12 = -2; } else { __pyx_t_12 = -1; } __pyx_cur_scope->__pyx_v_strip = __pyx_t_12; /* "cutadapt/_seqio.pyx":120 * raise FormatError("Line {0} in FASTQ file is expected to start with '@', but found {1!r}".format(i+1, line[:10])) * strip = -2 if line.endswith('\r\n') else -1 * name = line[1:strip] # <<<<<<<<<<<<<< * * i = 1 */ if (unlikely(__pyx_cur_scope->__pyx_v_line == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = PySequence_GetSlice(__pyx_cur_scope->__pyx_v_line, 1, __pyx_cur_scope->__pyx_v_strip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_cur_scope->__pyx_v_name = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* "cutadapt/_seqio.pyx":122 * name = line[1:strip] * * i = 1 # <<<<<<<<<<<<<< * for line in it: * if i == 0: */ __pyx_cur_scope->__pyx_v_i = 1; /* "cutadapt/_seqio.pyx":123 * * i = 1 * for line in it: # <<<<<<<<<<<<<< * if i == 0: * if not (line and line[0] == '@'): */ if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_it)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_it)) { __pyx_t_2 = __pyx_cur_scope->__pyx_v_it; __Pyx_INCREF(__pyx_t_2); __pyx_t_10 = 0; __pyx_t_13 = NULL; } else { __pyx_t_10 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_it); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_13 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } for (;;) { if (likely(!__pyx_t_13)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); #endif } } else { __pyx_t_1 = __pyx_t_13(__pyx_t_2); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_1); } if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_line); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_line, ((PyObject*)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "cutadapt/_seqio.pyx":124 * i = 1 * for line in it: * if i == 0: # <<<<<<<<<<<<<< * if not (line and line[0] == '@'): * raise FormatError("Line {0} in FASTQ file is expected to start with '@', but found {1!r}".format(i+1, line[:10])) */ switch (__pyx_cur_scope->__pyx_v_i) { case 0: /* "cutadapt/_seqio.pyx":125 * for line in it: * if i == 0: * if not (line and line[0] == '@'): # <<<<<<<<<<<<<< * raise FormatError("Line {0} in FASTQ file is expected to start with '@', but found {1!r}".format(i+1, line[:10])) * name = line[1:strip] */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_line); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_3) { } else { __pyx_t_4 = __pyx_t_3; goto __pyx_L10_bool_binop_done; } __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_line, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__3, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __pyx_t_3; __pyx_L10_bool_binop_done:; __pyx_t_3 = ((!__pyx_t_4) != 0); if (__pyx_t_3) { /* "cutadapt/_seqio.pyx":126 * if i == 0: * if not (line and line[0] == '@'): * raise FormatError("Line {0} in FASTQ file is expected to start with '@', but found {1!r}".format(i+1, line[:10])) # <<<<<<<<<<<<<< * name = line[1:strip] * elif i == 1: */ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_FormatError); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Line_0_in_FASTQ_file_is_expected, __pyx_n_s_format); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = __Pyx_PyInt_From_long((__pyx_cur_scope->__pyx_v_i + 1)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (unlikely(__pyx_cur_scope->__pyx_v_line == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_7 = PySequence_GetSlice(__pyx_cur_scope->__pyx_v_line, 0, 10); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_14 = 1; } } __pyx_t_15 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); if (__pyx_t_9) { __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_9); __pyx_t_9 = NULL; } __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_14, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_14, __pyx_t_7); __pyx_t_8 = 0; __pyx_t_7 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_15, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_11))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_11); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_11, function); } } if (!__pyx_t_6) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_15, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_seqio.pyx":125 * for line in it: * if i == 0: * if not (line and line[0] == '@'): # <<<<<<<<<<<<<< * raise FormatError("Line {0} in FASTQ file is expected to start with '@', but found {1!r}".format(i+1, line[:10])) * name = line[1:strip] */ } /* "cutadapt/_seqio.pyx":127 * if not (line and line[0] == '@'): * raise FormatError("Line {0} in FASTQ file is expected to start with '@', but found {1!r}".format(i+1, line[:10])) * name = line[1:strip] # <<<<<<<<<<<<<< * elif i == 1: * sequence = line[:strip] */ if (unlikely(__pyx_cur_scope->__pyx_v_line == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PySequence_GetSlice(__pyx_cur_scope->__pyx_v_line, 1, __pyx_cur_scope->__pyx_v_strip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_name); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_name, ((PyObject*)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "cutadapt/_seqio.pyx":124 * i = 1 * for line in it: * if i == 0: # <<<<<<<<<<<<<< * if not (line and line[0] == '@'): * raise FormatError("Line {0} in FASTQ file is expected to start with '@', but found {1!r}".format(i+1, line[:10])) */ break; /* "cutadapt/_seqio.pyx":128 * raise FormatError("Line {0} in FASTQ file is expected to start with '@', but found {1!r}".format(i+1, line[:10])) * name = line[1:strip] * elif i == 1: # <<<<<<<<<<<<<< * sequence = line[:strip] * elif i == 2: */ case 1: /* "cutadapt/_seqio.pyx":129 * name = line[1:strip] * elif i == 1: * sequence = line[:strip] # <<<<<<<<<<<<<< * elif i == 2: * if line == '+\n': # check most common case first */ if (unlikely(__pyx_cur_scope->__pyx_v_line == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PySequence_GetSlice(__pyx_cur_scope->__pyx_v_line, 0, __pyx_cur_scope->__pyx_v_strip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_sequence); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_sequence, ((PyObject*)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "cutadapt/_seqio.pyx":128 * raise FormatError("Line {0} in FASTQ file is expected to start with '@', but found {1!r}".format(i+1, line[:10])) * name = line[1:strip] * elif i == 1: # <<<<<<<<<<<<<< * sequence = line[:strip] * elif i == 2: */ break; /* "cutadapt/_seqio.pyx":130 * elif i == 1: * sequence = line[:strip] * elif i == 2: # <<<<<<<<<<<<<< * if line == '+\n': # check most common case first * name2 = '' */ case 2: /* "cutadapt/_seqio.pyx":131 * sequence = line[:strip] * elif i == 2: * if line == '+\n': # check most common case first # <<<<<<<<<<<<<< * name2 = '' * else: */ __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_cur_scope->__pyx_v_line, __pyx_kp_s__5, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { /* "cutadapt/_seqio.pyx":132 * elif i == 2: * if line == '+\n': # check most common case first * name2 = '' # <<<<<<<<<<<<<< * else: * line = line[:strip] */ __Pyx_INCREF(__pyx_kp_s__2); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_name2); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_name2, __pyx_kp_s__2); __Pyx_GIVEREF(__pyx_kp_s__2); /* "cutadapt/_seqio.pyx":131 * sequence = line[:strip] * elif i == 2: * if line == '+\n': # check most common case first # <<<<<<<<<<<<<< * name2 = '' * else: */ goto __pyx_L12; } /* "cutadapt/_seqio.pyx":134 * name2 = '' * else: * line = line[:strip] # <<<<<<<<<<<<<< * if not (line and line[0] == '+'): * raise FormatError("Line {0} in FASTQ file is expected to start with '+', but found {1!r}".format(i+1, line[:10])) */ /*else*/ { if (unlikely(__pyx_cur_scope->__pyx_v_line == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PySequence_GetSlice(__pyx_cur_scope->__pyx_v_line, 0, __pyx_cur_scope->__pyx_v_strip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_line); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_line, ((PyObject*)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "cutadapt/_seqio.pyx":135 * else: * line = line[:strip] * if not (line and line[0] == '+'): # <<<<<<<<<<<<<< * raise FormatError("Line {0} in FASTQ file is expected to start with '+', but found {1!r}".format(i+1, line[:10])) * if len(line) > 1: */ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_line); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_3) { } else { __pyx_t_4 = __pyx_t_3; goto __pyx_L14_bool_binop_done; } __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_line, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__6, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __pyx_t_3; __pyx_L14_bool_binop_done:; __pyx_t_3 = ((!__pyx_t_4) != 0); if (__pyx_t_3) { /* "cutadapt/_seqio.pyx":136 * line = line[:strip] * if not (line and line[0] == '+'): * raise FormatError("Line {0} in FASTQ file is expected to start with '+', but found {1!r}".format(i+1, line[:10])) # <<<<<<<<<<<<<< * if len(line) > 1: * if not line[1:] == name: */ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_FormatError); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Line_0_in_FASTQ_file_is_expected_2, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyInt_From_long((__pyx_cur_scope->__pyx_v_i + 1)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = PySequence_GetSlice(__pyx_cur_scope->__pyx_v_line, 0, 10); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_14 = 1; } } __pyx_t_9 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_14, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_14, __pyx_t_7); __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_11))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_11); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_11, function); } } if (!__pyx_t_5) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_15); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_15); __pyx_t_15 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_seqio.pyx":135 * else: * line = line[:strip] * if not (line and line[0] == '+'): # <<<<<<<<<<<<<< * raise FormatError("Line {0} in FASTQ file is expected to start with '+', but found {1!r}".format(i+1, line[:10])) * if len(line) > 1: */ } /* "cutadapt/_seqio.pyx":137 * if not (line and line[0] == '+'): * raise FormatError("Line {0} in FASTQ file is expected to start with '+', but found {1!r}".format(i+1, line[:10])) * if len(line) > 1: # <<<<<<<<<<<<<< * if not line[1:] == name: * raise FormatError( */ __pyx_t_14 = PyObject_Length(__pyx_cur_scope->__pyx_v_line); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((__pyx_t_14 > 1) != 0); if (__pyx_t_3) { /* "cutadapt/_seqio.pyx":138 * raise FormatError("Line {0} in FASTQ file is expected to start with '+', but found {1!r}".format(i+1, line[:10])) * if len(line) > 1: * if not line[1:] == name: # <<<<<<<<<<<<<< * raise FormatError( * "At line {0}: Sequence descriptions in the FASTQ file don't match " */ __pyx_t_1 = PySequence_GetSlice(__pyx_cur_scope->__pyx_v_line, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_cur_scope->__pyx_v_name, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0); if (__pyx_t_4) { /* "cutadapt/_seqio.pyx":139 * if len(line) > 1: * if not line[1:] == name: * raise FormatError( # <<<<<<<<<<<<<< * "At line {0}: Sequence descriptions in the FASTQ file don't match " * "({1!r} != {2!r}).\n" */ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_FormatError); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); /* "cutadapt/_seqio.pyx":143 * "({1!r} != {2!r}).\n" * "The second sequence description must be either empty " * "or equal to the first description.".format(i+1, # <<<<<<<<<<<<<< * name, line[1:])) * name2 = name */ __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_At_line_0_Sequence_descriptions, __pyx_n_s_format); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_5 = __Pyx_PyInt_From_long((__pyx_cur_scope->__pyx_v_i + 1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); /* "cutadapt/_seqio.pyx":144 * "The second sequence description must be either empty " * "or equal to the first description.".format(i+1, * name, line[1:])) # <<<<<<<<<<<<<< * name2 = name * else: */ __pyx_t_7 = PySequence_GetSlice(__pyx_cur_scope->__pyx_v_line, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = NULL; __pyx_t_14 = 0; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_15))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_15); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_15, function); __pyx_t_14 = 1; } } __pyx_t_8 = PyTuple_New(3+__pyx_t_14); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_14, __pyx_t_5); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_name); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_14, __pyx_cur_scope->__pyx_v_name); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_14, __pyx_t_7); __pyx_t_5 = 0; __pyx_t_7 = 0; __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_15 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_11))) { __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_11); if (likely(__pyx_t_15)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11); __Pyx_INCREF(__pyx_t_15); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_11, function); } } if (!__pyx_t_15) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_1); } else { __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_15); __pyx_t_15 = NULL; __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_9); __pyx_t_9 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_seqio.pyx":138 * raise FormatError("Line {0} in FASTQ file is expected to start with '+', but found {1!r}".format(i+1, line[:10])) * if len(line) > 1: * if not line[1:] == name: # <<<<<<<<<<<<<< * raise FormatError( * "At line {0}: Sequence descriptions in the FASTQ file don't match " */ } /* "cutadapt/_seqio.pyx":145 * "or equal to the first description.".format(i+1, * name, line[1:])) * name2 = name # <<<<<<<<<<<<<< * else: * name2 = '' */ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_name); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_name2); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_name2, __pyx_cur_scope->__pyx_v_name); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_name); /* "cutadapt/_seqio.pyx":137 * if not (line and line[0] == '+'): * raise FormatError("Line {0} in FASTQ file is expected to start with '+', but found {1!r}".format(i+1, line[:10])) * if len(line) > 1: # <<<<<<<<<<<<<< * if not line[1:] == name: * raise FormatError( */ goto __pyx_L16; } /* "cutadapt/_seqio.pyx":147 * name2 = name * else: * name2 = '' # <<<<<<<<<<<<<< * elif i == 3: * if len(line) == len(sequence) - strip: */ /*else*/ { __Pyx_INCREF(__pyx_kp_s__2); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_name2); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_name2, __pyx_kp_s__2); __Pyx_GIVEREF(__pyx_kp_s__2); } __pyx_L16:; } __pyx_L12:; /* "cutadapt/_seqio.pyx":130 * elif i == 1: * sequence = line[:strip] * elif i == 2: # <<<<<<<<<<<<<< * if line == '+\n': # check most common case first * name2 = '' */ break; /* "cutadapt/_seqio.pyx":148 * else: * name2 = '' * elif i == 3: # <<<<<<<<<<<<<< * if len(line) == len(sequence) - strip: * qualities = line[:strip] */ case 3: /* "cutadapt/_seqio.pyx":149 * name2 = '' * elif i == 3: * if len(line) == len(sequence) - strip: # <<<<<<<<<<<<<< * qualities = line[:strip] * else: */ __pyx_t_14 = PyObject_Length(__pyx_cur_scope->__pyx_v_line); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__pyx_cur_scope->__pyx_v_sequence)) { __Pyx_RaiseUnboundLocalError("sequence"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_16 = PyObject_Length(__pyx_cur_scope->__pyx_v_sequence); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((__pyx_t_14 == (__pyx_t_16 - __pyx_cur_scope->__pyx_v_strip)) != 0); if (__pyx_t_4) { /* "cutadapt/_seqio.pyx":150 * elif i == 3: * if len(line) == len(sequence) - strip: * qualities = line[:strip] # <<<<<<<<<<<<<< * else: * qualities = line.rstrip('\r\n') */ if (unlikely(__pyx_cur_scope->__pyx_v_line == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = PySequence_GetSlice(__pyx_cur_scope->__pyx_v_line, 0, __pyx_cur_scope->__pyx_v_strip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_qualities); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_qualities, ((PyObject*)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "cutadapt/_seqio.pyx":149 * name2 = '' * elif i == 3: * if len(line) == len(sequence) - strip: # <<<<<<<<<<<<<< * qualities = line[:strip] * else: */ goto __pyx_L18; } /* "cutadapt/_seqio.pyx":152 * qualities = line[:strip] * else: * qualities = line.rstrip('\r\n') # <<<<<<<<<<<<<< * yield sequence_class(name, sequence, qualities, name2=name2) * i = (i + 1) % 4 */ /*else*/ { __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_line, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(PyString_CheckExact(__pyx_t_11))||((__pyx_t_11) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_11)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_qualities); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_qualities, ((PyObject*)__pyx_t_11)); __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; } __pyx_L18:; /* "cutadapt/_seqio.pyx":153 * else: * qualities = line.rstrip('\r\n') * yield sequence_class(name, sequence, qualities, name2=name2) # <<<<<<<<<<<<<< * i = (i + 1) % 4 * if i != 0: */ if (unlikely(!__pyx_cur_scope->__pyx_v_sequence)) { __Pyx_RaiseUnboundLocalError("sequence"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_name); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_cur_scope->__pyx_v_name); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_sequence); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_sequence); PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_cur_scope->__pyx_v_sequence); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_qualities); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_qualities); PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_cur_scope->__pyx_v_qualities); __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (unlikely(!__pyx_cur_scope->__pyx_v_name2)) { __Pyx_RaiseUnboundLocalError("name2"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_name2, __pyx_cur_scope->__pyx_v_name2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_v_sequence_class, __pyx_t_11, __pyx_t_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_8; __pyx_t_8 = 0; __Pyx_XGIVEREF(__pyx_t_2); __pyx_cur_scope->__pyx_t_0 = __pyx_t_2; __pyx_cur_scope->__pyx_t_1 = __pyx_t_10; __pyx_cur_scope->__pyx_t_2 = __pyx_t_13; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L19_resume_from_yield:; __pyx_t_2 = __pyx_cur_scope->__pyx_t_0; __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_2); __pyx_t_10 = __pyx_cur_scope->__pyx_t_1; __pyx_t_13 = __pyx_cur_scope->__pyx_t_2; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_seqio.pyx":148 * else: * name2 = '' * elif i == 3: # <<<<<<<<<<<<<< * if len(line) == len(sequence) - strip: * qualities = line[:strip] */ break; default: break; } /* "cutadapt/_seqio.pyx":154 * qualities = line.rstrip('\r\n') * yield sequence_class(name, sequence, qualities, name2=name2) * i = (i + 1) % 4 # <<<<<<<<<<<<<< * if i != 0: * raise FormatError("FASTQ file ended prematurely") */ __pyx_cur_scope->__pyx_v_i = __Pyx_mod_long((__pyx_cur_scope->__pyx_v_i + 1), 4); /* "cutadapt/_seqio.pyx":123 * * i = 1 * for line in it: # <<<<<<<<<<<<<< * if i == 0: * if not (line and line[0] == '@'): */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cutadapt/_seqio.pyx":155 * yield sequence_class(name, sequence, qualities, name2=name2) * i = (i + 1) % 4 * if i != 0: # <<<<<<<<<<<<<< * raise FormatError("FASTQ file ended prematurely") * */ __pyx_t_4 = ((__pyx_cur_scope->__pyx_v_i != 0) != 0); if (__pyx_t_4) { /* "cutadapt/_seqio.pyx":156 * i = (i + 1) % 4 * if i != 0: * raise FormatError("FASTQ file ended prematurely") # <<<<<<<<<<<<<< * * def close(self): */ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_FormatError); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_seqio.pyx":155 * yield sequence_class(name, sequence, qualities, name2=name2) * i = (i + 1) % 4 * if i != 0: # <<<<<<<<<<<<<< * raise FormatError("FASTQ file ended prematurely") * */ } /* "cutadapt/_seqio.pyx":106 * self.delivers_qualities = True * * def __iter__(self): # <<<<<<<<<<<<<< * """ * Yield Sequence objects */ /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_15); __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_r = 0; __pyx_generator->resume_label = -1; __Pyx_Coroutine_clear((PyObject*)__pyx_generator); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cutadapt/_seqio.pyx":158 * raise FormatError("FASTQ file ended prematurely") * * def close(self): # <<<<<<<<<<<<<< * if self._close_on_exit and self._file is not None: * self._file.close() */ /* Python wrapper */ static PyObject *__pyx_pw_8cutadapt_6_seqio_11FastqReader_6close(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_8cutadapt_6_seqio_11FastqReader_6close = {"close", (PyCFunction)__pyx_pw_8cutadapt_6_seqio_11FastqReader_6close, METH_O, 0}; static PyObject *__pyx_pw_8cutadapt_6_seqio_11FastqReader_6close(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("close (wrapper)", 0); __pyx_r = __pyx_pf_8cutadapt_6_seqio_11FastqReader_5close(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8cutadapt_6_seqio_11FastqReader_5close(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("close", 0); /* "cutadapt/_seqio.pyx":159 * * def close(self): * if self._close_on_exit and self._file is not None: # <<<<<<<<<<<<<< * self._file.close() * self._file = None */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_close_on_exit); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_file_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = (__pyx_t_2 != Py_None); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = (__pyx_t_3 != 0); __pyx_t_1 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { /* "cutadapt/_seqio.pyx":160 * def close(self): * if self._close_on_exit and self._file is not None: * self._file.close() # <<<<<<<<<<<<<< * self._file = None * */ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_file_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_close); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } if (__pyx_t_5) { __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cutadapt/_seqio.pyx":161 * if self._close_on_exit and self._file is not None: * self._file.close() * self._file = None # <<<<<<<<<<<<<< * * def __enter__(self): */ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_file_2, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_seqio.pyx":159 * * def close(self): * if self._close_on_exit and self._file is not None: # <<<<<<<<<<<<<< * self._file.close() * self._file = None */ } /* "cutadapt/_seqio.pyx":158 * raise FormatError("FASTQ file ended prematurely") * * def close(self): # <<<<<<<<<<<<<< * if self._close_on_exit and self._file is not None: * self._file.close() */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("cutadapt._seqio.FastqReader.close", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cutadapt/_seqio.pyx":163 * self._file = None * * def __enter__(self): # <<<<<<<<<<<<<< * if self._file is None: * raise ValueError("I/O operation on closed FastqReader") */ /* Python wrapper */ static PyObject *__pyx_pw_8cutadapt_6_seqio_11FastqReader_8__enter__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/ static PyMethodDef __pyx_mdef_8cutadapt_6_seqio_11FastqReader_8__enter__ = {"__enter__", (PyCFunction)__pyx_pw_8cutadapt_6_seqio_11FastqReader_8__enter__, METH_O, 0}; static PyObject *__pyx_pw_8cutadapt_6_seqio_11FastqReader_8__enter__(PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0); __pyx_r = __pyx_pf_8cutadapt_6_seqio_11FastqReader_7__enter__(__pyx_self, ((PyObject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8cutadapt_6_seqio_11FastqReader_7__enter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; int __pyx_t_2; int __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__enter__", 0); /* "cutadapt/_seqio.pyx":164 * * def __enter__(self): * if self._file is None: # <<<<<<<<<<<<<< * raise ValueError("I/O operation on closed FastqReader") * return self */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_file_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_t_1 == Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { /* "cutadapt/_seqio.pyx":165 * def __enter__(self): * if self._file is None: * raise ValueError("I/O operation on closed FastqReader") # <<<<<<<<<<<<<< * return self * */ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_seqio.pyx":164 * * def __enter__(self): * if self._file is None: # <<<<<<<<<<<<<< * raise ValueError("I/O operation on closed FastqReader") * return self */ } /* "cutadapt/_seqio.pyx":166 * if self._file is None: * raise ValueError("I/O operation on closed FastqReader") * return self # <<<<<<<<<<<<<< * * def __exit__(self, *args): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self); __pyx_r = __pyx_v_self; goto __pyx_L0; /* "cutadapt/_seqio.pyx":163 * self._file = None * * def __enter__(self): # <<<<<<<<<<<<<< * if self._file is None: * raise ValueError("I/O operation on closed FastqReader") */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cutadapt._seqio.FastqReader.__enter__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } /* "cutadapt/_seqio.pyx":168 * return self * * def __exit__(self, *args): # <<<<<<<<<<<<<< * self.close() */ /* Python wrapper */ static PyObject *__pyx_pw_8cutadapt_6_seqio_11FastqReader_10__exit__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyMethodDef __pyx_mdef_8cutadapt_6_seqio_11FastqReader_10__exit__ = {"__exit__", (PyCFunction)__pyx_pw_8cutadapt_6_seqio_11FastqReader_10__exit__, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_8cutadapt_6_seqio_11FastqReader_10__exit__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_self = 0; CYTHON_UNUSED PyObject *__pyx_v_args = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0); if (PyTuple_GET_SIZE(__pyx_args) > 1) { __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args)); if (unlikely(!__pyx_v_args)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_v_args); } else { __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple); } { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { default: case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "__exit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } __pyx_v_self = values[0]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__exit__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_AddTraceback("cutadapt._seqio.FastqReader.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_8cutadapt_6_seqio_11FastqReader_9__exit__(__pyx_self, __pyx_v_self, __pyx_v_args); /* function exit code */ __Pyx_XDECREF(__pyx_v_args); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8cutadapt_6_seqio_11FastqReader_9__exit__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__exit__", 0); /* "cutadapt/_seqio.pyx":169 * * def __exit__(self, *args): * self.close() # <<<<<<<<<<<<<< */ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } if (__pyx_t_3) { __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cutadapt/_seqio.pyx":168 * return self * * def __exit__(self, *args): # <<<<<<<<<<<<<< * self.close() */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("cutadapt._seqio.FastqReader.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_tp_new_8cutadapt_6_seqio_Sequence(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_8cutadapt_6_seqio_Sequence *p; PyObject *o; if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); } else { o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } if (unlikely(!o)) return 0; p = ((struct __pyx_obj_8cutadapt_6_seqio_Sequence *)o); p->name = ((PyObject*)Py_None); Py_INCREF(Py_None); p->sequence = ((PyObject*)Py_None); Py_INCREF(Py_None); p->qualities = ((PyObject*)Py_None); Py_INCREF(Py_None); p->name2 = ((PyObject*)Py_None); Py_INCREF(Py_None); p->match = Py_None; Py_INCREF(Py_None); return o; } static void __pyx_tp_dealloc_8cutadapt_6_seqio_Sequence(PyObject *o) { struct __pyx_obj_8cutadapt_6_seqio_Sequence *p = (struct __pyx_obj_8cutadapt_6_seqio_Sequence *)o; #if PY_VERSION_HEX >= 0x030400a1 if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { if (PyObject_CallFinalizerFromDealloc(o)) return; } #endif PyObject_GC_UnTrack(o); Py_CLEAR(p->name); Py_CLEAR(p->sequence); Py_CLEAR(p->qualities); Py_CLEAR(p->name2); Py_CLEAR(p->match); (*Py_TYPE(o)->tp_free)(o); } static int __pyx_tp_traverse_8cutadapt_6_seqio_Sequence(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_8cutadapt_6_seqio_Sequence *p = (struct __pyx_obj_8cutadapt_6_seqio_Sequence *)o; if (p->match) { e = (*v)(p->match, a); if (e) return e; } return 0; } static int __pyx_tp_clear_8cutadapt_6_seqio_Sequence(PyObject *o) { PyObject* tmp; struct __pyx_obj_8cutadapt_6_seqio_Sequence *p = (struct __pyx_obj_8cutadapt_6_seqio_Sequence *)o; tmp = ((PyObject*)p->match); p->match = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyObject *__pyx_sq_item_8cutadapt_6_seqio_Sequence(PyObject *o, Py_ssize_t i) { PyObject *r; PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); Py_DECREF(x); return r; } static PyObject *__pyx_getprop_8cutadapt_6_seqio_8Sequence_name(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_8cutadapt_6_seqio_8Sequence_4name_1__get__(o); } static int __pyx_setprop_8cutadapt_6_seqio_8Sequence_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_8cutadapt_6_seqio_8Sequence_4name_3__set__(o, v); } else { return __pyx_pw_8cutadapt_6_seqio_8Sequence_4name_5__del__(o); } } static PyObject *__pyx_getprop_8cutadapt_6_seqio_8Sequence_sequence(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_8cutadapt_6_seqio_8Sequence_8sequence_1__get__(o); } static int __pyx_setprop_8cutadapt_6_seqio_8Sequence_sequence(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_8cutadapt_6_seqio_8Sequence_8sequence_3__set__(o, v); } else { return __pyx_pw_8cutadapt_6_seqio_8Sequence_8sequence_5__del__(o); } } static PyObject *__pyx_getprop_8cutadapt_6_seqio_8Sequence_qualities(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_8cutadapt_6_seqio_8Sequence_9qualities_1__get__(o); } static int __pyx_setprop_8cutadapt_6_seqio_8Sequence_qualities(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_8cutadapt_6_seqio_8Sequence_9qualities_3__set__(o, v); } else { return __pyx_pw_8cutadapt_6_seqio_8Sequence_9qualities_5__del__(o); } } static PyObject *__pyx_getprop_8cutadapt_6_seqio_8Sequence_name2(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_8cutadapt_6_seqio_8Sequence_5name2_1__get__(o); } static int __pyx_setprop_8cutadapt_6_seqio_8Sequence_name2(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_8cutadapt_6_seqio_8Sequence_5name2_3__set__(o, v); } else { return __pyx_pw_8cutadapt_6_seqio_8Sequence_5name2_5__del__(o); } } static PyObject *__pyx_getprop_8cutadapt_6_seqio_8Sequence_match(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_8cutadapt_6_seqio_8Sequence_5match_1__get__(o); } static int __pyx_setprop_8cutadapt_6_seqio_8Sequence_match(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { return __pyx_pw_8cutadapt_6_seqio_8Sequence_5match_3__set__(o, v); } else { return __pyx_pw_8cutadapt_6_seqio_8Sequence_5match_5__del__(o); } } static PyMethodDef __pyx_methods_8cutadapt_6_seqio_Sequence[] = { {"__reduce__", (PyCFunction)__pyx_pw_8cutadapt_6_seqio_8Sequence_11__reduce__, METH_NOARGS, 0}, {0, 0, 0, 0} }; static struct PyGetSetDef __pyx_getsets_8cutadapt_6_seqio_Sequence[] = { {(char *)"name", __pyx_getprop_8cutadapt_6_seqio_8Sequence_name, __pyx_setprop_8cutadapt_6_seqio_8Sequence_name, 0, 0}, {(char *)"sequence", __pyx_getprop_8cutadapt_6_seqio_8Sequence_sequence, __pyx_setprop_8cutadapt_6_seqio_8Sequence_sequence, 0, 0}, {(char *)"qualities", __pyx_getprop_8cutadapt_6_seqio_8Sequence_qualities, __pyx_setprop_8cutadapt_6_seqio_8Sequence_qualities, 0, 0}, {(char *)"name2", __pyx_getprop_8cutadapt_6_seqio_8Sequence_name2, __pyx_setprop_8cutadapt_6_seqio_8Sequence_name2, 0, 0}, {(char *)"match", __pyx_getprop_8cutadapt_6_seqio_8Sequence_match, __pyx_setprop_8cutadapt_6_seqio_8Sequence_match, 0, 0}, {0, 0, 0, 0, 0} }; static PySequenceMethods __pyx_tp_as_sequence_Sequence = { __pyx_pw_8cutadapt_6_seqio_8Sequence_7__len__, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ __pyx_sq_item_8cutadapt_6_seqio_Sequence, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ 0, /*sq_contains*/ 0, /*sq_inplace_concat*/ 0, /*sq_inplace_repeat*/ }; static PyMappingMethods __pyx_tp_as_mapping_Sequence = { __pyx_pw_8cutadapt_6_seqio_8Sequence_7__len__, /*mp_length*/ __pyx_pw_8cutadapt_6_seqio_8Sequence_3__getitem__, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; static PyTypeObject __pyx_type_8cutadapt_6_seqio_Sequence = { PyVarObject_HEAD_INIT(0, 0) "cutadapt._seqio.Sequence", /*tp_name*/ sizeof(struct __pyx_obj_8cutadapt_6_seqio_Sequence), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_8cutadapt_6_seqio_Sequence, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif __pyx_pw_8cutadapt_6_seqio_8Sequence_5__repr__, /*tp_repr*/ 0, /*tp_as_number*/ &__pyx_tp_as_sequence_Sequence, /*tp_as_sequence*/ &__pyx_tp_as_mapping_Sequence, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ "\n\tA record in a FASTQ file. Also used for FASTA (then the qualities attribute\n\tis None). qualities is a string and it contains the qualities encoded as\n\tascii(qual+33).\n\n\tIf an adapter has been matched to the sequence, the 'match' attribute is\n\tset to the corresponding Match instance.\n\t", /*tp_doc*/ __pyx_tp_traverse_8cutadapt_6_seqio_Sequence, /*tp_traverse*/ __pyx_tp_clear_8cutadapt_6_seqio_Sequence, /*tp_clear*/ __pyx_pw_8cutadapt_6_seqio_8Sequence_9__richcmp__, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ __pyx_methods_8cutadapt_6_seqio_Sequence, /*tp_methods*/ 0, /*tp_members*/ __pyx_getsets_8cutadapt_6_seqio_Sequence, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ __pyx_pw_8cutadapt_6_seqio_8Sequence_1__init__, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_8cutadapt_6_seqio_Sequence, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static struct __pyx_obj_8cutadapt_6_seqio___pyx_scope_struct____iter__ *__pyx_freelist_8cutadapt_6_seqio___pyx_scope_struct____iter__[8]; static int __pyx_freecount_8cutadapt_6_seqio___pyx_scope_struct____iter__ = 0; static PyObject *__pyx_tp_new_8cutadapt_6_seqio___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_8cutadapt_6_seqio___pyx_scope_struct____iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_8cutadapt_6_seqio___pyx_scope_struct____iter__)))) { o = (PyObject*)__pyx_freelist_8cutadapt_6_seqio___pyx_scope_struct____iter__[--__pyx_freecount_8cutadapt_6_seqio___pyx_scope_struct____iter__]; memset(o, 0, sizeof(struct __pyx_obj_8cutadapt_6_seqio___pyx_scope_struct____iter__)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } return o; } static void __pyx_tp_dealloc_8cutadapt_6_seqio___pyx_scope_struct____iter__(PyObject *o) { struct __pyx_obj_8cutadapt_6_seqio___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8cutadapt_6_seqio___pyx_scope_struct____iter__ *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_it); Py_CLEAR(p->__pyx_v_line); Py_CLEAR(p->__pyx_v_name); Py_CLEAR(p->__pyx_v_name2); Py_CLEAR(p->__pyx_v_qualities); Py_CLEAR(p->__pyx_v_self); Py_CLEAR(p->__pyx_v_sequence); Py_CLEAR(p->__pyx_v_sequence_class); Py_CLEAR(p->__pyx_t_0); if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_8cutadapt_6_seqio___pyx_scope_struct____iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_8cutadapt_6_seqio___pyx_scope_struct____iter__)))) { __pyx_freelist_8cutadapt_6_seqio___pyx_scope_struct____iter__[__pyx_freecount_8cutadapt_6_seqio___pyx_scope_struct____iter__++] = ((struct __pyx_obj_8cutadapt_6_seqio___pyx_scope_struct____iter__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } static int __pyx_tp_traverse_8cutadapt_6_seqio___pyx_scope_struct____iter__(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_8cutadapt_6_seqio___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8cutadapt_6_seqio___pyx_scope_struct____iter__ *)o; if (p->__pyx_v_it) { e = (*v)(p->__pyx_v_it, a); if (e) return e; } if (p->__pyx_v_self) { e = (*v)(p->__pyx_v_self, a); if (e) return e; } if (p->__pyx_v_sequence_class) { e = (*v)(p->__pyx_v_sequence_class, a); if (e) return e; } if (p->__pyx_t_0) { e = (*v)(p->__pyx_t_0, a); if (e) return e; } return 0; } static int __pyx_tp_clear_8cutadapt_6_seqio___pyx_scope_struct____iter__(PyObject *o) { PyObject* tmp; struct __pyx_obj_8cutadapt_6_seqio___pyx_scope_struct____iter__ *p = (struct __pyx_obj_8cutadapt_6_seqio___pyx_scope_struct____iter__ *)o; tmp = ((PyObject*)p->__pyx_v_it); p->__pyx_v_it = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_sequence_class); p->__pyx_v_sequence_class = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_t_0); p->__pyx_t_0 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } static PyTypeObject __pyx_type_8cutadapt_6_seqio___pyx_scope_struct____iter__ = { PyVarObject_HEAD_INIT(0, 0) "cutadapt._seqio.__pyx_scope_struct____iter__", /*tp_name*/ sizeof(struct __pyx_obj_8cutadapt_6_seqio___pyx_scope_struct____iter__), /*tp_basicsize*/ 0, /*tp_itemsize*/ __pyx_tp_dealloc_8cutadapt_6_seqio___pyx_scope_struct____iter__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 0, /*tp_compare*/ #endif #if PY_MAJOR_VERSION >= 3 0, /*tp_as_async*/ #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_8cutadapt_6_seqio___pyx_scope_struct____iter__, /*tp_traverse*/ __pyx_tp_clear_8cutadapt_6_seqio___pyx_scope_struct____iter__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ __pyx_tp_new_8cutadapt_6_seqio___pyx_scope_struct____iter__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ 0, /*tp_mro*/ 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ 0, /*tp_del*/ 0, /*tp_version_tag*/ #if PY_VERSION_HEX >= 0x030400a1 0, /*tp_finalize*/ #endif }; static PyMethodDef __pyx_methods[] = { {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef __pyx_moduledef = { #if PY_VERSION_HEX < 0x03020000 { PyObject_HEAD_INIT(NULL) NULL, 0, NULL }, #else PyModuleDef_HEAD_INIT, #endif "_seqio", 0, /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0}, {&__pyx_kp_s_At_line_0_Sequence_descriptions, __pyx_k_At_line_0_Sequence_descriptions, sizeof(__pyx_k_At_line_0_Sequence_descriptions), 0, 0, 1, 0}, {&__pyx_n_s_Exception, __pyx_k_Exception, sizeof(__pyx_k_Exception), 0, 0, 1, 1}, {&__pyx_kp_s_FASTQ_file_ended_prematurely, __pyx_k_FASTQ_file_ended_prematurely, sizeof(__pyx_k_FASTQ_file_ended_prematurely), 0, 0, 1, 0}, {&__pyx_n_s_FastqReader, __pyx_k_FastqReader, sizeof(__pyx_k_FastqReader), 0, 0, 1, 1}, {&__pyx_n_s_FastqReader___enter, __pyx_k_FastqReader___enter, sizeof(__pyx_k_FastqReader___enter), 0, 0, 1, 1}, {&__pyx_n_s_FastqReader___exit, __pyx_k_FastqReader___exit, sizeof(__pyx_k_FastqReader___exit), 0, 0, 1, 1}, {&__pyx_n_s_FastqReader___init, __pyx_k_FastqReader___init, sizeof(__pyx_k_FastqReader___init), 0, 0, 1, 1}, {&__pyx_n_s_FastqReader___iter, __pyx_k_FastqReader___iter, sizeof(__pyx_k_FastqReader___iter), 0, 0, 1, 1}, {&__pyx_n_s_FastqReader_close, __pyx_k_FastqReader_close, sizeof(__pyx_k_FastqReader_close), 0, 0, 1, 1}, {&__pyx_n_s_FormatError, __pyx_k_FormatError, sizeof(__pyx_k_FormatError), 0, 0, 1, 1}, {&__pyx_kp_s_I_O_operation_on_closed_FastqRea, __pyx_k_I_O_operation_on_closed_FastqRea, sizeof(__pyx_k_I_O_operation_on_closed_FastqRea), 0, 0, 1, 0}, {&__pyx_kp_s_In_read_named_0_r_length_of_qual, __pyx_k_In_read_named_0_r_length_of_qual, sizeof(__pyx_k_In_read_named_0_r_length_of_qual), 0, 0, 1, 0}, {&__pyx_kp_s_Line_0_in_FASTQ_file_is_expected, __pyx_k_Line_0_in_FASTQ_file_is_expected, sizeof(__pyx_k_Line_0_in_FASTQ_file_is_expected), 0, 0, 1, 0}, {&__pyx_kp_s_Line_0_in_FASTQ_file_is_expected_2, __pyx_k_Line_0_in_FASTQ_file_is_expected_2, sizeof(__pyx_k_Line_0_in_FASTQ_file_is_expected_2), 0, 0, 1, 0}, {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1}, {&__pyx_kp_s_Raised_when_an_input_file_FASTA, __pyx_k_Raised_when_an_input_file_FASTA, sizeof(__pyx_k_Raised_when_an_input_file_FASTA), 0, 0, 1, 0}, {&__pyx_kp_s_Reader_for_FASTQ_files_Does_not, __pyx_k_Reader_for_FASTQ_files_Does_not, sizeof(__pyx_k_Reader_for_FASTQ_files_Does_not), 0, 0, 1, 0}, {&__pyx_kp_s_Sequence_name_0_r_sequence_1_r, __pyx_k_Sequence_name_0_r_sequence_1_r, sizeof(__pyx_k_Sequence_name_0_r_sequence_1_r), 0, 0, 1, 0}, {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0}, {&__pyx_kp_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 0}, {&__pyx_kp_s__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 0, 1, 0}, {&__pyx_kp_s__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 0, 1, 0}, {&__pyx_kp_s__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 0, 1, 0}, {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1}, {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1}, {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1}, {&__pyx_n_s_close_on_exit, __pyx_k_close_on_exit, sizeof(__pyx_k_close_on_exit), 0, 0, 1, 1}, {&__pyx_n_s_cutadapt__seqio, __pyx_k_cutadapt__seqio, sizeof(__pyx_k_cutadapt__seqio), 0, 0, 1, 1}, {&__pyx_n_s_delivers_qualities, __pyx_k_delivers_qualities, sizeof(__pyx_k_delivers_qualities), 0, 0, 1, 1}, {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1}, {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1}, {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1}, {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1}, {&__pyx_n_s_file_2, __pyx_k_file_2, sizeof(__pyx_k_file_2), 0, 0, 1, 1}, {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1}, {&__pyx_kp_s_home_marcel_scm_cutadapt_cutada, __pyx_k_home_marcel_scm_cutadapt_cutada, sizeof(__pyx_k_home_marcel_scm_cutadapt_cutada), 0, 0, 1, 0}, {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1}, {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1}, {&__pyx_n_s_it, __pyx_k_it, sizeof(__pyx_k_it), 0, 0, 1, 1}, {&__pyx_n_s_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 0, 0, 1, 1}, {&__pyx_n_s_line, __pyx_k_line, sizeof(__pyx_k_line), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_match, __pyx_k_match, sizeof(__pyx_k_match), 0, 0, 1, 1}, {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1}, {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1}, {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1}, {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, {&__pyx_n_s_name2, __pyx_k_name2, sizeof(__pyx_k_name2), 0, 0, 1, 1}, {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1}, {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1}, {&__pyx_n_s_qualities, __pyx_k_qualities, sizeof(__pyx_k_qualities), 0, 0, 1, 1}, {&__pyx_kp_s_qualities_0_r, __pyx_k_qualities_0_r, sizeof(__pyx_k_qualities_0_r), 0, 0, 1, 0}, {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1}, {&__pyx_n_s_rstrip, __pyx_k_rstrip, sizeof(__pyx_k_rstrip), 0, 0, 1, 1}, {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1}, {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1}, {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1}, {&__pyx_n_s_sequence, __pyx_k_sequence, sizeof(__pyx_k_sequence), 0, 0, 1, 1}, {&__pyx_n_s_sequence_class, __pyx_k_sequence_class, sizeof(__pyx_k_sequence_class), 0, 0, 1, 1}, {&__pyx_n_s_shorten, __pyx_k_shorten, sizeof(__pyx_k_shorten), 0, 0, 1, 1}, {&__pyx_n_s_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 0, 0, 1, 1}, {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1}, {&__pyx_n_s_xopen, __pyx_k_xopen, sizeof(__pyx_k_xopen), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_Exception = __Pyx_GetBuiltinName(__pyx_n_s_Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "cutadapt/_seqio.pyx":152 * qualities = line[:strip] * else: * qualities = line.rstrip('\r\n') # <<<<<<<<<<<<<< * yield sequence_class(name, sequence, qualities, name2=name2) * i = (i + 1) % 4 */ __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s__4); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); /* "cutadapt/_seqio.pyx":156 * i = (i + 1) % 4 * if i != 0: * raise FormatError("FASTQ file ended prematurely") # <<<<<<<<<<<<<< * * def close(self): */ __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_FASTQ_file_ended_prematurely); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); /* "cutadapt/_seqio.pyx":165 * def __enter__(self): * if self._file is None: * raise ValueError("I/O operation on closed FastqReader") # <<<<<<<<<<<<<< * return self * */ __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_I_O_operation_on_closed_FastqRea); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); /* "cutadapt/_seqio.pyx":16 * * * def _shorten(s, n=100): # <<<<<<<<<<<<<< * """Shorten string s to at most n characters, appending "..." if necessary.""" * if s is None: */ __pyx_tuple__10 = PyTuple_Pack(2, __pyx_n_s_s, __pyx_n_s_n); if (unlikely(!__pyx_tuple__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_marcel_scm_cutadapt_cutada, __pyx_n_s_shorten, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_seqio.pyx":94 * _close_on_exit = False * * def __init__(self, file, sequence_class=Sequence): # <<<<<<<<<<<<<< * """ * file is a filename or a file-like object. */ __pyx_tuple__12 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_file, __pyx_n_s_sequence_class); if (unlikely(!__pyx_tuple__12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__12); __Pyx_GIVEREF(__pyx_tuple__12); __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_marcel_scm_cutadapt_cutada, __pyx_n_s_init, 94, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_seqio.pyx":106 * self.delivers_qualities = True * * def __iter__(self): # <<<<<<<<<<<<<< * """ * Yield Sequence objects */ __pyx_tuple__14 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_i, __pyx_n_s_strip, __pyx_n_s_line, __pyx_n_s_name, __pyx_n_s_qualities, __pyx_n_s_sequence, __pyx_n_s_name2, __pyx_n_s_sequence_class, __pyx_n_s_it); if (unlikely(!__pyx_tuple__14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(1, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_marcel_scm_cutadapt_cutada, __pyx_n_s_iter, 106, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_seqio.pyx":158 * raise FormatError("FASTQ file ended prematurely") * * def close(self): # <<<<<<<<<<<<<< * if self._close_on_exit and self._file is not None: * self._file.close() */ __pyx_tuple__16 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__16); __Pyx_GIVEREF(__pyx_tuple__16); __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__16, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_marcel_scm_cutadapt_cutada, __pyx_n_s_close, 158, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_seqio.pyx":163 * self._file = None * * def __enter__(self): # <<<<<<<<<<<<<< * if self._file is None: * raise ValueError("I/O operation on closed FastqReader") */ __pyx_tuple__18 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__18); __Pyx_GIVEREF(__pyx_tuple__18); __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_marcel_scm_cutadapt_cutada, __pyx_n_s_enter, 163, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_seqio.pyx":168 * return self * * def __exit__(self, *args): # <<<<<<<<<<<<<< * self.close() */ __pyx_tuple__20 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_args); if (unlikely(!__pyx_tuple__20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__20); __Pyx_GIVEREF(__pyx_tuple__20); __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_marcel_scm_cutadapt_cutada, __pyx_n_s_exit, 168, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_InitGlobals(void) { if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_int_100 = PyInt_FromLong(100); if (unlikely(!__pyx_int_100)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; } #if PY_MAJOR_VERSION < 3 PyMODINIT_FUNC init_seqio(void); /*proto*/ PyMODINIT_FUNC init_seqio(void) #else PyMODINIT_FUNC PyInit__seqio(void); /*proto*/ PyMODINIT_FUNC PyInit__seqio(void) #endif { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit__seqio(void)", 0); if (__Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #ifdef __Pyx_CyFunction_USED if (__pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Coroutine_USED if (__pyx_Coroutine_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_StopAsyncIteration_USED if (__pyx_StopAsyncIteration_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4("_seqio", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_INCREF(__pyx_d); __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); #endif if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; /*--- Initialize various global constants etc. ---*/ if (__Pyx_InitGlobals() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (__pyx_module_is_main_cutadapt___seqio) { if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!PyDict_GetItemString(modules, "cutadapt._seqio")) { if (unlikely(PyDict_SetItemString(modules, "cutadapt._seqio", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif /*--- Builtin init code ---*/ if (__Pyx_InitCachedBuiltins() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Constants init code ---*/ if (__Pyx_InitCachedConstants() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Global init code ---*/ /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ if (PyType_Ready(&__pyx_type_8cutadapt_6_seqio_Sequence) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_8cutadapt_6_seqio_Sequence.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8cutadapt_6_seqio_Sequence, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_8cutadapt_6_seqio_8Sequence___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_8cutadapt_6_seqio_8Sequence___init__.doc = __pyx_doc_8cutadapt_6_seqio_8Sequence___init__; ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8cutadapt_6_seqio_8Sequence___init__; } } #endif #if CYTHON_COMPILING_IN_CPYTHON { PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_8cutadapt_6_seqio_Sequence, "__getitem__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_8cutadapt_6_seqio_8Sequence_2__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_8cutadapt_6_seqio_8Sequence_2__getitem__.doc = __pyx_doc_8cutadapt_6_seqio_8Sequence_2__getitem__; ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_8cutadapt_6_seqio_8Sequence_2__getitem__; } } #endif if (PyObject_SetAttrString(__pyx_m, "Sequence", (PyObject *)&__pyx_type_8cutadapt_6_seqio_Sequence) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_8cutadapt_6_seqio_Sequence = &__pyx_type_8cutadapt_6_seqio_Sequence; if (PyType_Ready(&__pyx_type_8cutadapt_6_seqio___pyx_scope_struct____iter__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_8cutadapt_6_seqio___pyx_scope_struct____iter__.tp_print = 0; __pyx_ptype_8cutadapt_6_seqio___pyx_scope_struct____iter__ = &__pyx_type_8cutadapt_6_seqio___pyx_scope_struct____iter__; /*--- Type import code ---*/ /*--- Variable import code ---*/ /*--- Function import code ---*/ /*--- Execution code ---*/ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) if (__Pyx_patch_abc() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /* "cutadapt/_seqio.pyx":4 * # cython: profile=False * from __future__ import print_function, division, absolute_import * from .xopen import xopen # <<<<<<<<<<<<<< * * # TODO */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_xopen); __Pyx_GIVEREF(__pyx_n_s_xopen); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_xopen); __pyx_t_2 = __Pyx_Import(__pyx_n_s_xopen, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_xopen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_xopen, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cutadapt/_seqio.pyx":10 * # since we would get circular imports * * class FormatError(Exception): # <<<<<<<<<<<<<< * """ * Raised when an input file (FASTA or FASTQ) is malformatted. */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_Exception); __Pyx_GIVEREF(__pyx_builtin_Exception); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_Exception); __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_FormatError, __pyx_n_s_FormatError, (PyObject *) NULL, __pyx_n_s_cutadapt__seqio, __pyx_kp_s_Raised_when_an_input_file_FASTA); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_FormatError, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_FormatError, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cutadapt/_seqio.pyx":16 * * * def _shorten(s, n=100): # <<<<<<<<<<<<<< * """Shorten string s to at most n characters, appending "..." if necessary.""" * if s is None: */ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_8cutadapt_6_seqio_1_shorten, NULL, __pyx_n_s_cutadapt__seqio); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_shorten, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cutadapt/_seqio.pyx":88 * * * class FastqReader(object): # <<<<<<<<<<<<<< * """ * Reader for FASTQ files. Does not support multi-line FASTQ files. */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_object); __Pyx_GIVEREF(__pyx_builtin_object); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_object); __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_FastqReader, __pyx_n_s_FastqReader, (PyObject *) NULL, __pyx_n_s_cutadapt__seqio, __pyx_kp_s_Reader_for_FASTQ_files_Does_not); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); /* "cutadapt/_seqio.pyx":92 * Reader for FASTQ files. Does not support multi-line FASTQ files. * """ * _close_on_exit = False # <<<<<<<<<<<<<< * * def __init__(self, file, sequence_class=Sequence): */ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_close_on_exit, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cutadapt/_seqio.pyx":94 * _close_on_exit = False * * def __init__(self, file, sequence_class=Sequence): # <<<<<<<<<<<<<< * """ * file is a filename or a file-like object. */ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8cutadapt_6_seqio_11FastqReader_1__init__, 0, __pyx_n_s_FastqReader___init, NULL, __pyx_n_s_cutadapt__seqio, __pyx_d, ((PyObject *)__pyx_codeobj__13)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (!__Pyx_CyFunction_InitDefaults(__pyx_t_4, sizeof(__pyx_defaults), 1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_INCREF(((PyObject *)__pyx_ptype_8cutadapt_6_seqio_Sequence)); __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_4)->__pyx_arg_sequence_class = ((PyObject *)__pyx_ptype_8cutadapt_6_seqio_Sequence); __Pyx_GIVEREF(__pyx_ptype_8cutadapt_6_seqio_Sequence); __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_4, __pyx_pf_8cutadapt_6_seqio_11FastqReader_11__defaults__); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cutadapt/_seqio.pyx":106 * self.delivers_qualities = True * * def __iter__(self): # <<<<<<<<<<<<<< * """ * Yield Sequence objects */ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8cutadapt_6_seqio_11FastqReader_3__iter__, 0, __pyx_n_s_FastqReader___iter, NULL, __pyx_n_s_cutadapt__seqio, __pyx_d, ((PyObject *)__pyx_codeobj__15)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_iter, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cutadapt/_seqio.pyx":158 * raise FormatError("FASTQ file ended prematurely") * * def close(self): # <<<<<<<<<<<<<< * if self._close_on_exit and self._file is not None: * self._file.close() */ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8cutadapt_6_seqio_11FastqReader_6close, 0, __pyx_n_s_FastqReader_close, NULL, __pyx_n_s_cutadapt__seqio, __pyx_d, ((PyObject *)__pyx_codeobj__17)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_close, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cutadapt/_seqio.pyx":163 * self._file = None * * def __enter__(self): # <<<<<<<<<<<<<< * if self._file is None: * raise ValueError("I/O operation on closed FastqReader") */ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8cutadapt_6_seqio_11FastqReader_8__enter__, 0, __pyx_n_s_FastqReader___enter, NULL, __pyx_n_s_cutadapt__seqio, __pyx_d, ((PyObject *)__pyx_codeobj__19)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_enter, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cutadapt/_seqio.pyx":168 * return self * * def __exit__(self, *args): # <<<<<<<<<<<<<< * self.close() */ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_8cutadapt_6_seqio_11FastqReader_10__exit__, 0, __pyx_n_s_FastqReader___exit, NULL, __pyx_n_s_cutadapt__seqio, __pyx_d, ((PyObject *)__pyx_codeobj__21)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_exit, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "cutadapt/_seqio.pyx":88 * * * class FastqReader(object): # <<<<<<<<<<<<<< * """ * Reader for FASTQ files. Does not support multi-line FASTQ files. */ __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_FastqReader, __pyx_t_2, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_d, __pyx_n_s_FastqReader, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "cutadapt/_seqio.pyx":1 * # kate: syntax Python; # <<<<<<<<<<<<<< * # cython: profile=False * from __future__ import print_function, division, absolute_import */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /*--- Wrapped vars code ---*/ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); if (__pyx_m) { if (__pyx_d) { __Pyx_AddTraceback("init cutadapt._seqio", __pyx_clineno, __pyx_lineno, __pyx_filename); } Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init cutadapt._seqio"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if PY_MAJOR_VERSION < 3 return; #else return __pyx_m; #endif } /* --- Runtime support code --- */ #if CYTHON_REFNANNY static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { PyObject *m = NULL, *p = NULL; void *r = NULL; m = PyImport_ImportModule((char *)modname); if (!m) goto end; p = PyObject_GetAttrString(m, (char *)"RefNannyAPI"); if (!p) goto end; r = PyLong_AsVoidPtr(p); end: Py_XDECREF(p); Py_XDECREF(m); return (__Pyx_RefNannyAPIStruct *)r; } #endif static PyObject *__Pyx_GetBuiltinName(PyObject *name) { PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name); if (unlikely(!result)) { PyErr_Format(PyExc_NameError, #if PY_MAJOR_VERSION >= 3 "name '%U' is not defined", name); #else "name '%.200s' is not defined", PyString_AS_STRING(name)); #endif } return result; } static void __Pyx_RaiseDoubleKeywordsError( const char* func_name, PyObject* kw_name) { PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION >= 3 "%s() got multiple values for keyword argument '%U'", func_name, kw_name); #else "%s() got multiple values for keyword argument '%s'", func_name, PyString_AsString(kw_name)); #endif } static int __Pyx_ParseOptionalKeywords( PyObject *kwds, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name) { PyObject *key = 0, *value = 0; Py_ssize_t pos = 0; PyObject*** name; PyObject*** first_kw_arg = argnames + num_pos_args; while (PyDict_Next(kwds, &pos, &key, &value)) { name = first_kw_arg; while (*name && (**name != key)) name++; if (*name) { values[name-argnames] = value; continue; } name = first_kw_arg; #if PY_MAJOR_VERSION < 3 if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { while (*name) { if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) && _PyString_Eq(**name, key)) { values[name-argnames] = value; break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { if ((**argname == key) || ( (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) && _PyString_Eq(**argname, key))) { goto arg_passed_twice; } argname++; } } } else #endif if (likely(PyUnicode_Check(key))) { while (*name) { int cmp = (**name == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : #endif PyUnicode_Compare(**name, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) { values[name-argnames] = value; break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { int cmp = (**argname == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : #endif PyUnicode_Compare(**argname, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) goto arg_passed_twice; argname++; } } } else goto invalid_keyword_type; if (kwds2) { if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; } else { goto invalid_keyword; } } return 0; arg_passed_twice: __Pyx_RaiseDoubleKeywordsError(function_name, key); goto bad; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); goto bad; invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif bad: return -1; } static void __Pyx_RaiseArgtupleInvalid( const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found) { Py_ssize_t num_expected; const char *more_or_less; if (num_found < num_min) { num_expected = num_min; more_or_less = "at least"; } else { num_expected = num_max; more_or_less = "at most"; } if (exact) { more_or_less = "exactly"; } PyErr_Format(PyExc_TypeError, "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", func_name, more_or_less, num_expected, (num_expected == 1) ? "" : "s", num_found); } #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) { #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { const long b = intval; long x; long a = PyInt_AS_LONG(op1); x = (long)((unsigned long)a - b); if (likely((x^a) >= 0 || (x^~b) >= 0)) return PyInt_FromLong(x); return PyLong_Type.tp_as_number->nb_subtract(op1, op2); } #endif #if CYTHON_USE_PYLONG_INTERNALS && PY_MAJOR_VERSION >= 3 if (likely(PyLong_CheckExact(op1))) { const long b = intval; long a, x; const PY_LONG_LONG llb = intval; PY_LONG_LONG lla, llx; const digit* digits = ((PyLongObject*)op1)->ob_digit; const Py_ssize_t size = Py_SIZE(op1); if (likely(__Pyx_sst_abs(size) <= 1)) { a = likely(size) ? digits[0] : 0; if (size == -1) a = -a; } else { switch (size) { case -2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } case 2: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } case -3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } case 3: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } case -4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } case 4: if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); break; } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) { lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0])); goto long_long; } default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2); } } x = a - b; return PyLong_FromLong(x); long_long: llx = lla - llb; return PyLong_FromLongLong(llx); } #endif if (PyFloat_CheckExact(op1)) { const long b = intval; double a = PyFloat_AS_DOUBLE(op1); double result; PyFPE_START_PROTECT("subtract", return NULL) result = ((double)a) - (double)b; PyFPE_END_PROTECT(result) return PyFloat_FromDouble(result); } return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2); } #endif static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { #if CYTHON_COMPILING_IN_CPYTHON PyMappingMethods* mp; #if PY_MAJOR_VERSION < 3 PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; if (likely(ms && ms->sq_slice)) { if (!has_cstart) { if (_py_start && (*_py_start != Py_None)) { cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstart = 0; } if (!has_cstop) { if (_py_stop && (*_py_stop != Py_None)) { cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; } else cstop = PY_SSIZE_T_MAX; } if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { Py_ssize_t l = ms->sq_length(obj); if (likely(l >= 0)) { if (cstop < 0) { cstop += l; if (cstop < 0) cstop = 0; } if (cstart < 0) { cstart += l; if (cstart < 0) cstart = 0; } } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else goto bad; } } return ms->sq_slice(obj, cstart, cstop); } #endif mp = Py_TYPE(obj)->tp_as_mapping; if (likely(mp && mp->mp_subscript)) #endif { PyObject* result; PyObject *py_slice, *py_start, *py_stop; if (_py_slice) { py_slice = *_py_slice; } else { PyObject* owned_start = NULL; PyObject* owned_stop = NULL; if (_py_start) { py_start = *_py_start; } else { if (has_cstart) { owned_start = py_start = PyInt_FromSsize_t(cstart); if (unlikely(!py_start)) goto bad; } else py_start = Py_None; } if (_py_stop) { py_stop = *_py_stop; } else { if (has_cstop) { owned_stop = py_stop = PyInt_FromSsize_t(cstop); if (unlikely(!py_stop)) { Py_XDECREF(owned_start); goto bad; } } else py_stop = Py_None; } py_slice = PySlice_New(py_start, py_stop, Py_None); Py_XDECREF(owned_start); Py_XDECREF(owned_stop); if (unlikely(!py_slice)) goto bad; } #if CYTHON_COMPILING_IN_CPYTHON result = mp->mp_subscript(obj, py_slice); #else result = PyObject_GetItem(obj, py_slice); #endif if (!_py_slice) { Py_DECREF(py_slice); } return result; } PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name); bad: return NULL; } static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) { PyErr_Format(PyExc_TypeError, "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", name, type->tp_name, Py_TYPE(obj)->tp_name); } static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (none_allowed && obj == Py_None) return 1; else if (exact) { if (likely(Py_TYPE(obj) == type)) return 1; #if PY_MAJOR_VERSION == 2 else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; #endif } else { if (likely(PyObject_TypeCheck(obj, type))) return 1; } __Pyx_RaiseArgumentTypeInvalid(name, obj, type); return 0; } static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { PyObject *result; #if CYTHON_COMPILING_IN_CPYTHON result = PyDict_GetItem(__pyx_d, name); if (likely(result)) { Py_INCREF(result); } else { #else result = PyObject_GetItem(__pyx_d, name); if (!result) { PyErr_Clear(); #endif result = __Pyx_GetBuiltinName(name); } return result; } #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyObject *result; ternaryfunc call = func->ob_type->tp_call; if (unlikely(!call)) return PyObject_Call(func, arg, kw); if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; result = (*call)(func, arg, kw); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { PyObject *self, *result; PyCFunction cfunc; cfunc = PyCFunction_GET_FUNCTION(func); self = PyCFunction_GET_SELF(func); if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) return NULL; result = cfunc(self, arg); Py_LeaveRecursiveCall(); if (unlikely(!result) && unlikely(!PyErr_Occurred())) { PyErr_SetString( PyExc_SystemError, "NULL result without error in PyObject_Call"); } return result; } #endif #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject *result; PyObject *args = PyTuple_New(1); if (unlikely(!args)) return NULL; Py_INCREF(arg); PyTuple_SET_ITEM(args, 0, arg); result = __Pyx_PyObject_Call(func, args, NULL); Py_DECREF(args); return result; } static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { #ifdef __Pyx_CyFunction_USED if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) { #else if (likely(PyCFunction_Check(func))) { #endif if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { return __Pyx_PyObject_CallMethO(func, arg); } } return __Pyx__PyObject_CallOneArg(func, arg); } #else static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { PyObject* args = PyTuple_Pack(1, arg); return (likely(args)) ? __Pyx_PyObject_Call(func, args, NULL) : NULL; } #endif static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON PyObject *tmp_type, *tmp_value, *tmp_tb; PyThreadState *tstate = PyThreadState_GET(); tmp_type = tstate->curexc_type; tmp_value = tstate->curexc_value; tmp_tb = tstate->curexc_traceback; tstate->curexc_type = type; tstate->curexc_value = value; tstate->curexc_traceback = tb; Py_XDECREF(tmp_type); Py_XDECREF(tmp_value); Py_XDECREF(tmp_tb); #else PyErr_Restore(type, value, tb); #endif } static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); *type = tstate->curexc_type; *value = tstate->curexc_value; *tb = tstate->curexc_traceback; tstate->curexc_type = 0; tstate->curexc_value = 0; tstate->curexc_traceback = 0; #else PyErr_Fetch(type, value, tb); #endif } #if PY_MAJOR_VERSION < 3 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, CYTHON_UNUSED PyObject *cause) { Py_XINCREF(type); if (!value || value == Py_None) value = NULL; else Py_INCREF(value); if (!tb || tb == Py_None) tb = NULL; else { Py_INCREF(tb); if (!PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto raise_error; } } if (PyType_Check(type)) { #if CYTHON_COMPILING_IN_PYPY if (!value) { Py_INCREF(Py_None); value = Py_None; } #endif PyErr_NormalizeException(&type, &value, &tb); } else { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto raise_error; } value = type; type = (PyObject*) Py_TYPE(type); Py_INCREF(type); if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto raise_error; } } __Pyx_ErrRestore(type, value, tb); return; raise_error: Py_XDECREF(value); Py_XDECREF(type); Py_XDECREF(tb); return; } #else static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { PyObject* owned_instance = NULL; if (tb == Py_None) { tb = 0; } else if (tb && !PyTraceBack_Check(tb)) { PyErr_SetString(PyExc_TypeError, "raise: arg 3 must be a traceback or None"); goto bad; } if (value == Py_None) value = 0; if (PyExceptionInstance_Check(type)) { if (value) { PyErr_SetString(PyExc_TypeError, "instance exception may not have a separate value"); goto bad; } value = type; type = (PyObject*) Py_TYPE(value); } else if (PyExceptionClass_Check(type)) { PyObject *instance_class = NULL; if (value && PyExceptionInstance_Check(value)) { instance_class = (PyObject*) Py_TYPE(value); if (instance_class != type) { int is_subclass = PyObject_IsSubclass(instance_class, type); if (!is_subclass) { instance_class = NULL; } else if (unlikely(is_subclass == -1)) { goto bad; } else { type = instance_class; } } } if (!instance_class) { PyObject *args; if (!value) args = PyTuple_New(0); else if (PyTuple_Check(value)) { Py_INCREF(value); args = value; } else args = PyTuple_Pack(1, value); if (!args) goto bad; owned_instance = PyObject_Call(type, args, NULL); Py_DECREF(args); if (!owned_instance) goto bad; value = owned_instance; if (!PyExceptionInstance_Check(value)) { PyErr_Format(PyExc_TypeError, "calling %R should have returned an instance of " "BaseException, not %R", type, Py_TYPE(value)); goto bad; } } } else { PyErr_SetString(PyExc_TypeError, "raise: exception class must be a subclass of BaseException"); goto bad; } #if PY_VERSION_HEX >= 0x03030000 if (cause) { #else if (cause && cause != Py_None) { #endif PyObject *fixed_cause; if (cause == Py_None) { fixed_cause = NULL; } else if (PyExceptionClass_Check(cause)) { fixed_cause = PyObject_CallObject(cause, NULL); if (fixed_cause == NULL) goto bad; } else if (PyExceptionInstance_Check(cause)) { fixed_cause = cause; Py_INCREF(fixed_cause); } else { PyErr_SetString(PyExc_TypeError, "exception causes must derive from " "BaseException"); goto bad; } PyException_SetCause(value, fixed_cause); } PyErr_SetObject(type, value); if (tb) { #if CYTHON_COMPILING_IN_PYPY PyObject *tmp_type, *tmp_value, *tmp_tb; PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); Py_INCREF(tb); PyErr_Restore(tmp_type, tmp_value, tb); Py_XDECREF(tmp_tb); #else PyThreadState *tstate = PyThreadState_GET(); PyObject* tmp_tb = tstate->curexc_traceback; if (tb != tmp_tb) { Py_INCREF(tb); tstate->curexc_traceback = tb; Py_XDECREF(tmp_tb); } #endif } bad: Py_XDECREF(owned_instance); return; } #endif #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { #ifdef __Pyx_CyFunction_USED if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) { #else if (likely(PyCFunction_Check(func))) { #endif if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) { return __Pyx_PyObject_CallMethO(func, NULL); } } return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL); } #endif static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject* iterator, PyObject* defval) { PyObject* next; iternextfunc iternext = Py_TYPE(iterator)->tp_iternext; #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(!iternext)) { #else if (unlikely(!iternext) || unlikely(!PyIter_Check(iterator))) { #endif PyErr_Format(PyExc_TypeError, "%.200s object is not an iterator", Py_TYPE(iterator)->tp_name); return NULL; } next = iternext(iterator); if (likely(next)) return next; #if CYTHON_COMPILING_IN_CPYTHON #if PY_VERSION_HEX >= 0x02070000 if (unlikely(iternext == &_PyObject_NextNotImplemented)) return NULL; #endif #endif if (defval) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (unlikely(exc_type != PyExc_StopIteration) && !PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)) return NULL; PyErr_Clear(); } Py_INCREF(defval); return defval; } if (!PyErr_Occurred()) PyErr_SetNone(PyExc_StopIteration); return NULL; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (!j) return NULL; r = PyObject_GetItem(o, j); Py_DECREF(j); return r; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; } } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else return NULL; } } return m->sq_item(o, i); } } #else if (is_list || PySequence_Check(o)) { return PySequence_GetItem(o, i); } #endif return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); } static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else if (s1 == s2) { return (equals == Py_EQ); } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { const char *ps1, *ps2; Py_ssize_t length = PyBytes_GET_SIZE(s1); if (length != PyBytes_GET_SIZE(s2)) return (equals == Py_NE); ps1 = PyBytes_AS_STRING(s1); ps2 = PyBytes_AS_STRING(s2); if (ps1[0] != ps2[0]) { return (equals == Py_NE); } else if (length == 1) { return (equals == Py_EQ); } else { int result = memcmp(ps1, ps2, (size_t)length); return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { return (equals == Py_NE); } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { return (equals == Py_NE); } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } #endif } static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else #if PY_MAJOR_VERSION < 3 PyObject* owned_ref = NULL; #endif int s1_is_unicode, s2_is_unicode; if (s1 == s2) { goto return_eq; } s1_is_unicode = PyUnicode_CheckExact(s1); s2_is_unicode = PyUnicode_CheckExact(s2); #if PY_MAJOR_VERSION < 3 if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) { owned_ref = PyUnicode_FromObject(s2); if (unlikely(!owned_ref)) return -1; s2 = owned_ref; s2_is_unicode = 1; } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) { owned_ref = PyUnicode_FromObject(s1); if (unlikely(!owned_ref)) return -1; s1 = owned_ref; s1_is_unicode = 1; } else if (((!s2_is_unicode) & (!s1_is_unicode))) { return __Pyx_PyBytes_Equals(s1, s2, equals); } #endif if (s1_is_unicode & s2_is_unicode) { Py_ssize_t length; int kind; void *data1, *data2; if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) return -1; length = __Pyx_PyUnicode_GET_LENGTH(s1); if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) { goto return_ne; } kind = __Pyx_PyUnicode_KIND(s1); if (kind != __Pyx_PyUnicode_KIND(s2)) { goto return_ne; } data1 = __Pyx_PyUnicode_DATA(s1); data2 = __Pyx_PyUnicode_DATA(s2); if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { goto return_ne; } else if (length == 1) { goto return_eq; } else { int result = memcmp(data1, data2, (size_t)(length * kind)); #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ) ? (result == 0) : (result != 0); } } else if ((s1 == Py_None) & s2_is_unicode) { goto return_ne; } else if ((s2 == Py_None) & s1_is_unicode) { goto return_ne; } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); Py_DECREF(py_result); return result; } return_eq: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_EQ); return_ne: #if PY_MAJOR_VERSION < 3 Py_XDECREF(owned_ref); #endif return (equals == Py_NE); #endif } static int __Pyx_PyBytes_SingleTailmatch(PyObject* self, PyObject* arg, Py_ssize_t start, Py_ssize_t end, int direction) { const char* self_ptr = PyBytes_AS_STRING(self); Py_ssize_t self_len = PyBytes_GET_SIZE(self); const char* sub_ptr; Py_ssize_t sub_len; int retval; Py_buffer view; view.obj = NULL; if ( PyBytes_Check(arg) ) { sub_ptr = PyBytes_AS_STRING(arg); sub_len = PyBytes_GET_SIZE(arg); } #if PY_MAJOR_VERSION < 3 else if ( PyUnicode_Check(arg) ) { return (int) PyUnicode_Tailmatch(self, arg, start, end, direction); } #endif else { if (unlikely(PyObject_GetBuffer(self, &view, PyBUF_SIMPLE) == -1)) return -1; sub_ptr = (const char*) view.buf; sub_len = view.len; } if (end > self_len) end = self_len; else if (end < 0) end += self_len; if (end < 0) end = 0; if (start < 0) start += self_len; if (start < 0) start = 0; if (direction > 0) { if (end-sub_len > start) start = end - sub_len; } if (start + sub_len <= end) retval = !memcmp(self_ptr+start, sub_ptr, (size_t)sub_len); else retval = 0; if (view.obj) PyBuffer_Release(&view); return retval; } static int __Pyx_PyBytes_Tailmatch(PyObject* self, PyObject* substr, Py_ssize_t start, Py_ssize_t end, int direction) { if (unlikely(PyTuple_Check(substr))) { Py_ssize_t i, count = PyTuple_GET_SIZE(substr); for (i = 0; i < count; i++) { int result; #if CYTHON_COMPILING_IN_CPYTHON result = __Pyx_PyBytes_SingleTailmatch(self, PyTuple_GET_ITEM(substr, i), start, end, direction); #else PyObject* sub = PySequence_ITEM(substr, i); if (unlikely(!sub)) return -1; result = __Pyx_PyBytes_SingleTailmatch(self, sub, start, end, direction); Py_DECREF(sub); #endif if (result) { return result; } } return 0; } return __Pyx_PyBytes_SingleTailmatch(self, substr, start, end, direction); } static int __Pyx_PyUnicode_Tailmatch(PyObject* s, PyObject* substr, Py_ssize_t start, Py_ssize_t end, int direction) { if (unlikely(PyTuple_Check(substr))) { Py_ssize_t i, count = PyTuple_GET_SIZE(substr); for (i = 0; i < count; i++) { Py_ssize_t result; #if CYTHON_COMPILING_IN_CPYTHON result = PyUnicode_Tailmatch(s, PyTuple_GET_ITEM(substr, i), start, end, direction); #else PyObject* sub = PySequence_ITEM(substr, i); if (unlikely(!sub)) return -1; result = PyUnicode_Tailmatch(s, sub, start, end, direction); Py_DECREF(sub); #endif if (result) { return (int) result; } } return 0; } return (int) PyUnicode_Tailmatch(s, substr, start, end, direction); } static CYTHON_INLINE int __Pyx_PyStr_Tailmatch(PyObject* self, PyObject* arg, Py_ssize_t start, Py_ssize_t end, int direction) { if (PY_MAJOR_VERSION < 3) return __Pyx_PyBytes_Tailmatch(self, arg, start, end, direction); else return __Pyx_PyUnicode_Tailmatch(self, arg, start, end, direction); } static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) { PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); } static CYTHON_INLINE long __Pyx_mod_long(long a, long b) { long r = a % b; r += ((r != 0) & ((r ^ b) < 0)) * b; return r; } static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; PyObject *empty_dict = 0; PyObject *list; #if PY_VERSION_HEX < 0x03030000 PyObject *py_import; py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); if (!py_import) goto bad; #endif if (from_list) list = from_list; else { empty_list = PyList_New(0); if (!empty_list) goto bad; list = empty_list; } global_dict = PyModule_GetDict(__pyx_m); if (!global_dict) goto bad; empty_dict = PyDict_New(); if (!empty_dict) goto bad; { #if PY_MAJOR_VERSION >= 3 if (level == -1) { if (strchr(__Pyx_MODULE_NAME, '.')) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(1); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, 1); #endif if (!module) { if (!PyErr_ExceptionMatches(PyExc_ImportError)) goto bad; PyErr_Clear(); } } level = 0; } #endif if (!module) { #if PY_VERSION_HEX < 0x03030000 PyObject *py_level = PyInt_FromLong(level); if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, name, global_dict, empty_dict, list, py_level, NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( name, global_dict, empty_dict, list, level); #endif } } bad: #if PY_VERSION_HEX < 0x03030000 Py_XDECREF(py_import); #endif Py_XDECREF(empty_list); Py_XDECREF(empty_dict); return module; } static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Format(PyExc_ImportError, #if PY_MAJOR_VERSION < 3 "cannot import name %.230s", PyString_AS_STRING(name)); #else "cannot import name %S", name); #endif } return value; } static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases); for (i=0; i < nbases; i++) { PyTypeObject *tmptype; PyObject *tmp = PyTuple_GET_ITEM(bases, i); tmptype = Py_TYPE(tmp); #if PY_MAJOR_VERSION < 3 if (tmptype == &PyClass_Type) continue; #endif if (!metaclass) { metaclass = tmptype; continue; } if (PyType_IsSubtype(metaclass, tmptype)) continue; if (PyType_IsSubtype(tmptype, metaclass)) { metaclass = tmptype; continue; } PyErr_SetString(PyExc_TypeError, "metaclass conflict: " "the metaclass of a derived class " "must be a (non-strict) subclass " "of the metaclasses of all its bases"); return NULL; } if (!metaclass) { #if PY_MAJOR_VERSION < 3 metaclass = &PyClass_Type; #else metaclass = &PyType_Type; #endif } Py_INCREF((PyObject*) metaclass); return (PyObject*) metaclass; } static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { PyObject *ns; if (metaclass) { PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare); if (prep) { PyObject *pargs = PyTuple_Pack(2, name, bases); if (unlikely(!pargs)) { Py_DECREF(prep); return NULL; } ns = PyObject_Call(prep, pargs, mkw); Py_DECREF(prep); Py_DECREF(pargs); } else { if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError))) return NULL; PyErr_Clear(); ns = PyDict_New(); } } else { ns = PyDict_New(); } if (unlikely(!ns)) return NULL; if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad; if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad; if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad; return ns; bad: Py_DECREF(ns); return NULL; } static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass) { PyObject *result, *margs; PyObject *owned_metaclass = NULL; if (allow_py2_metaclass) { owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass); if (owned_metaclass) { metaclass = owned_metaclass; } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { PyErr_Clear(); } else { return NULL; } } if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); Py_XDECREF(owned_metaclass); if (unlikely(!metaclass)) return NULL; owned_metaclass = metaclass; } margs = PyTuple_Pack(3, name, bases, dict); if (unlikely(!margs)) { result = NULL; } else { result = PyObject_Call(metaclass, margs, mkw); Py_DECREF(margs); } Py_XDECREF(owned_metaclass); return result; } static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { PyObject* fake_module; PyTypeObject* cached_type = NULL; fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI); if (!fake_module) return NULL; Py_INCREF(fake_module); cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name); if (cached_type) { if (!PyType_Check((PyObject*)cached_type)) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s is not a type object", type->tp_name); goto bad; } if (cached_type->tp_basicsize != type->tp_basicsize) { PyErr_Format(PyExc_TypeError, "Shared Cython type %.200s has the wrong size, try recompiling", type->tp_name); goto bad; } } else { if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; PyErr_Clear(); if (PyType_Ready(type) < 0) goto bad; if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0) goto bad; Py_INCREF(type); cached_type = type; } done: Py_DECREF(fake_module); return cached_type; bad: Py_XDECREF(cached_type); cached_type = NULL; goto done; } static PyObject * __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) { if (unlikely(op->func_doc == NULL)) { if (op->func.m_ml->ml_doc) { #if PY_MAJOR_VERSION >= 3 op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc); #else op->func_doc = PyString_FromString(op->func.m_ml->ml_doc); #endif if (unlikely(op->func_doc == NULL)) return NULL; } else { Py_INCREF(Py_None); return Py_None; } } Py_INCREF(op->func_doc); return op->func_doc; } static int __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp = op->func_doc; if (value == NULL) { value = Py_None; } Py_INCREF(value); op->func_doc = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op) { if (unlikely(op->func_name == NULL)) { #if PY_MAJOR_VERSION >= 3 op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name); #else op->func_name = PyString_InternFromString(op->func.m_ml->ml_name); #endif if (unlikely(op->func_name == NULL)) return NULL; } Py_INCREF(op->func_name); return op->func_name; } static int __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) { #else if (unlikely(value == NULL || !PyString_Check(value))) { #endif PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; } tmp = op->func_name; Py_INCREF(value); op->func_name = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op) { Py_INCREF(op->func_qualname); return op->func_qualname; } static int __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) { #else if (unlikely(value == NULL || !PyString_Check(value))) { #endif PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; } tmp = op->func_qualname; Py_INCREF(value); op->func_qualname = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure) { PyObject *self; self = m->func_closure; if (self == NULL) self = Py_None; Py_INCREF(self); return self; } static PyObject * __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op) { if (unlikely(op->func_dict == NULL)) { op->func_dict = PyDict_New(); if (unlikely(op->func_dict == NULL)) return NULL; } Py_INCREF(op->func_dict); return op->func_dict; } static int __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; if (unlikely(value == NULL)) { PyErr_SetString(PyExc_TypeError, "function's dictionary may not be deleted"); return -1; } if (unlikely(!PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "setting function's dictionary to a non-dict"); return -1; } tmp = op->func_dict; Py_INCREF(value); op->func_dict = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op) { Py_INCREF(op->func_globals); return op->func_globals; } static PyObject * __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op) { Py_INCREF(Py_None); return Py_None; } static PyObject * __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op) { PyObject* result = (op->func_code) ? op->func_code : Py_None; Py_INCREF(result); return result; } static int __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { int result = 0; PyObject *res = op->defaults_getter((PyObject *) op); if (unlikely(!res)) return -1; #if CYTHON_COMPILING_IN_CPYTHON op->defaults_tuple = PyTuple_GET_ITEM(res, 0); Py_INCREF(op->defaults_tuple); op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); Py_INCREF(op->defaults_kwdict); #else op->defaults_tuple = PySequence_ITEM(res, 0); if (unlikely(!op->defaults_tuple)) result = -1; else { op->defaults_kwdict = PySequence_ITEM(res, 1); if (unlikely(!op->defaults_kwdict)) result = -1; } #endif Py_DECREF(res); return result; } static int __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) { PyObject* tmp; if (!value) { value = Py_None; } else if (value != Py_None && !PyTuple_Check(value)) { PyErr_SetString(PyExc_TypeError, "__defaults__ must be set to a tuple object"); return -1; } Py_INCREF(value); tmp = op->defaults_tuple; op->defaults_tuple = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) { PyObject* result = op->defaults_tuple; if (unlikely(!result)) { if (op->defaults_getter) { if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; result = op->defaults_tuple; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) { PyObject* tmp; if (!value) { value = Py_None; } else if (value != Py_None && !PyDict_Check(value)) { PyErr_SetString(PyExc_TypeError, "__kwdefaults__ must be set to a dict object"); return -1; } Py_INCREF(value); tmp = op->defaults_kwdict; op->defaults_kwdict = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) { PyObject* result = op->defaults_kwdict; if (unlikely(!result)) { if (op->defaults_getter) { if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; result = op->defaults_kwdict; } else { result = Py_None; } } Py_INCREF(result); return result; } static int __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) { PyObject* tmp; if (!value || value == Py_None) { value = NULL; } else if (!PyDict_Check(value)) { PyErr_SetString(PyExc_TypeError, "__annotations__ must be set to a dict object"); return -1; } Py_XINCREF(value); tmp = op->func_annotations; op->func_annotations = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) { PyObject* result = op->func_annotations; if (unlikely(!result)) { result = PyDict_New(); if (unlikely(!result)) return NULL; op->func_annotations = result; } Py_INCREF(result); return result; } static PyGetSetDef __pyx_CyFunction_getsets[] = { {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0}, {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, {0, 0, 0, 0, 0} }; static PyMemberDef __pyx_CyFunction_members[] = { {(char *) "__module__", T_OBJECT, offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0}, {0, 0, 0, 0, 0} }; static PyObject * __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromString(m->func.m_ml->ml_name); #else return PyString_FromString(m->func.m_ml->ml_name); #endif } static PyMethodDef __pyx_CyFunction_methods[] = { {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, {0, 0, 0, 0} }; #if PY_VERSION_HEX < 0x030500A0 #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) #else #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist) #endif static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname, PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type); if (op == NULL) return NULL; op->flags = flags; __Pyx_CyFunction_weakreflist(op) = NULL; op->func.m_ml = ml; op->func.m_self = (PyObject *) op; Py_XINCREF(closure); op->func_closure = closure; Py_XINCREF(module); op->func.m_module = module; op->func_dict = NULL; op->func_name = NULL; Py_INCREF(qualname); op->func_qualname = qualname; op->func_doc = NULL; op->func_classobj = NULL; op->func_globals = globals; Py_INCREF(op->func_globals); Py_XINCREF(code); op->func_code = code; op->defaults_pyobjects = 0; op->defaults = NULL; op->defaults_tuple = NULL; op->defaults_kwdict = NULL; op->defaults_getter = NULL; op->func_annotations = NULL; PyObject_GC_Track(op); return (PyObject *) op; } static int __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) { Py_CLEAR(m->func_closure); Py_CLEAR(m->func.m_module); Py_CLEAR(m->func_dict); Py_CLEAR(m->func_name); Py_CLEAR(m->func_qualname); Py_CLEAR(m->func_doc); Py_CLEAR(m->func_globals); Py_CLEAR(m->func_code); Py_CLEAR(m->func_classobj); Py_CLEAR(m->defaults_tuple); Py_CLEAR(m->defaults_kwdict); Py_CLEAR(m->func_annotations); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_XDECREF(pydefaults[i]); PyMem_Free(m->defaults); m->defaults = NULL; } return 0; } static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) { PyObject_GC_UnTrack(m); if (__Pyx_CyFunction_weakreflist(m) != NULL) PyObject_ClearWeakRefs((PyObject *) m); __Pyx_CyFunction_clear(m); PyObject_GC_Del(m); } static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) { Py_VISIT(m->func_closure); Py_VISIT(m->func.m_module); Py_VISIT(m->func_dict); Py_VISIT(m->func_name); Py_VISIT(m->func_qualname); Py_VISIT(m->func_doc); Py_VISIT(m->func_globals); Py_VISIT(m->func_code); Py_VISIT(m->func_classobj); Py_VISIT(m->defaults_tuple); Py_VISIT(m->defaults_kwdict); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; for (i = 0; i < m->defaults_pyobjects; i++) Py_VISIT(pydefaults[i]); } return 0; } static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) { Py_INCREF(func); return func; } if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) { if (type == NULL) type = (PyObject *)(Py_TYPE(obj)); return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type))); } if (obj == Py_None) obj = NULL; return __Pyx_PyMethod_New(func, obj, type); } static PyObject* __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) { #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromFormat("", op->func_qualname, (void *)op); #else return PyString_FromFormat("", PyString_AsString(op->func_qualname), (void *)op); #endif } #if CYTHON_COMPILING_IN_PYPY static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { PyCFunctionObject* f = (PyCFunctionObject*)func; PyCFunction meth = f->m_ml->ml_meth; PyObject *self = f->m_self; Py_ssize_t size; switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { case METH_VARARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) return (*meth)(self, arg); break; case METH_VARARGS | METH_KEYWORDS: return (*(PyCFunctionWithKeywords)meth)(self, arg, kw); case METH_NOARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { size = PyTuple_GET_SIZE(arg); if (likely(size == 0)) return (*meth)(self, NULL); PyErr_Format(PyExc_TypeError, "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", f->m_ml->ml_name, size); return NULL; } break; case METH_O: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { size = PyTuple_GET_SIZE(arg); if (likely(size == 1)) { PyObject *result, *arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; result = (*meth)(self, arg0); Py_DECREF(arg0); return result; } PyErr_Format(PyExc_TypeError, "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", f->m_ml->ml_name, size); return NULL; } break; default: PyErr_SetString(PyExc_SystemError, "Bad call flags in " "__Pyx_CyFunction_Call. METH_OLDARGS is no " "longer supported!"); return NULL; } PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", f->m_ml->ml_name); return NULL; } #else static PyObject * __Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { return PyCFunction_Call(func, arg, kw); } #endif static PyTypeObject __pyx_CyFunctionType_type = { PyVarObject_HEAD_INIT(0, 0) "cython_function_or_method", sizeof(__pyx_CyFunctionObject), 0, (destructor) __Pyx_CyFunction_dealloc, 0, 0, 0, #if PY_MAJOR_VERSION < 3 0, #else 0, #endif (reprfunc) __Pyx_CyFunction_repr, 0, 0, 0, 0, __Pyx_CyFunction_Call, 0, 0, 0, 0, Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, 0, (traverseproc) __Pyx_CyFunction_traverse, (inquiry) __Pyx_CyFunction_clear, 0, #if PY_VERSION_HEX < 0x030500A0 offsetof(__pyx_CyFunctionObject, func_weakreflist), #else offsetof(PyCFunctionObject, m_weakreflist), #endif 0, 0, __pyx_CyFunction_methods, __pyx_CyFunction_members, __pyx_CyFunction_getsets, 0, 0, __Pyx_CyFunction_descr_get, 0, offsetof(__pyx_CyFunctionObject, func_dict), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, #if PY_VERSION_HEX >= 0x030400a1 0, #endif }; static int __pyx_CyFunction_init(void) { #if !CYTHON_COMPILING_IN_PYPY __pyx_CyFunctionType_type.tp_call = PyCFunction_Call; #endif __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); if (__pyx_CyFunctionType == NULL) { return -1; } return 0; } static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults = PyMem_Malloc(size); if (!m->defaults) return PyErr_NoMemory(); memset(m->defaults, 0, size); m->defaults_pyobjects = pyobjects; return m->defaults; } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_tuple = tuple; Py_INCREF(tuple); } static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->defaults_kwdict = dict; Py_INCREF(dict); } static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; m->func_annotations = dict; Py_INCREF(dict); } static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { int start = 0, mid = 0, end = count - 1; if (end >= 0 && code_line > entries[end].code_line) { return count; } while (start < end) { mid = start + (end - start) / 2; if (code_line < entries[mid].code_line) { end = mid; } else if (code_line > entries[mid].code_line) { start = mid + 1; } else { return mid; } } if (code_line <= entries[mid].code_line) { return mid; } else { return mid + 1; } } static PyCodeObject *__pyx_find_code_object(int code_line) { PyCodeObject* code_object; int pos; if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { return NULL; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { return NULL; } code_object = __pyx_code_cache.entries[pos].code_object; Py_INCREF(code_object); return code_object; } static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { int pos, i; __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; if (unlikely(!code_line)) { return; } if (unlikely(!entries)) { entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); if (likely(entries)) { __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = 64; __pyx_code_cache.count = 1; entries[0].code_line = code_line; entries[0].code_object = code_object; Py_INCREF(code_object); } return; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { PyCodeObject* tmp = entries[pos].code_object; entries[pos].code_object = code_object; Py_DECREF(tmp); return; } if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = new_max; } for (i=__pyx_code_cache.count; i>pos; i--) { entries[i] = entries[i-1]; } entries[pos].code_line = code_line; entries[pos].code_object = code_object; __pyx_code_cache.count++; Py_INCREF(code_object); } #include "compile.h" #include "frameobject.h" #include "traceback.h" static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyObject *py_srcfile = 0; PyObject *py_funcname = 0; #if PY_MAJOR_VERSION < 3 py_srcfile = PyString_FromString(filename); #else py_srcfile = PyUnicode_FromString(filename); #endif if (!py_srcfile) goto bad; if (c_line) { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #else py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #endif } else { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromString(funcname); #else py_funcname = PyUnicode_FromString(funcname); #endif } if (!py_funcname) goto bad; py_code = __Pyx_PyCode_New( 0, 0, 0, 0, 0, __pyx_empty_bytes, /*PyObject *code,*/ __pyx_empty_tuple, /*PyObject *consts,*/ __pyx_empty_tuple, /*PyObject *names,*/ __pyx_empty_tuple, /*PyObject *varnames,*/ __pyx_empty_tuple, /*PyObject *freevars,*/ __pyx_empty_tuple, /*PyObject *cellvars,*/ py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ py_line, __pyx_empty_bytes /*PyObject *lnotab*/ ); Py_DECREF(py_srcfile); Py_DECREF(py_funcname); return py_code; bad: Py_XDECREF(py_srcfile); Py_XDECREF(py_funcname); return NULL; } static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; py_code = __pyx_find_code_object(c_line ? c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? c_line : py_line, py_code); } py_frame = PyFrame_New( PyThreadState_GET(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ __pyx_d, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = py_line; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ {\ func_type value = func_value;\ if (sizeof(target_type) < sizeof(func_type)) {\ if (unlikely(value != (func_type) (target_type) value)) {\ func_type zero = 0;\ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ return (target_type) -1;\ if (is_unsigned && unlikely(value < zero))\ goto raise_neg_overflow;\ else\ goto raise_overflow;\ }\ }\ return (target_type) value;\ } static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { const int neg_one = (int) -1, const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(int) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (int) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (int) 0; case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) case 2: if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 3: if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; case 4: if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (int) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(int) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (int) 0; case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, -(sdigit) digits[0]) case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) case -2: if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 2: if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -3: if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 3: if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case -4: if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; case 4: if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); } } break; } #endif if (sizeof(int) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else int val; PyObject *v = __Pyx_PyNumber_Int(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (int) -1; } } else { int val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (int) -1; val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to int"); return (int) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { const long neg_one = (long) -1, const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(long) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); } } static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { const long neg_one = (long) -1, const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(long) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (long) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (long) 0; case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) case 2: if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 3: if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; case 4: if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (long) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(long) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (long) 0; case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, -(sdigit) digits[0]) case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) case -2: if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 2: if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -3: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 3: if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case -4: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; case 4: if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); } } break; } #endif if (sizeof(long) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else long val; PyObject *v = __Pyx_PyNumber_Int(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (long) -1; } } else { long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (long) -1; val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to long"); return (long) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; #if CYTHON_COMPILING_IN_CPYTHON PyThreadState *tstate = PyThreadState_GET(); tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; tmp_tb = tstate->exc_traceback; tstate->exc_type = *type; tstate->exc_value = *value; tstate->exc_traceback = *tb; #else PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); PyErr_SetExcInfo(*type, *value, *tb); #endif *type = tmp_type; *value = tmp_value; *tb = tmp_tb; } static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { PyObject *method, *result = NULL; method = __Pyx_PyObject_GetAttrStr(obj, method_name); if (unlikely(!method)) goto bad; #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyMethod_Check(method))) { PyObject *self = PyMethod_GET_SELF(method); if (likely(self)) { PyObject *args; PyObject *function = PyMethod_GET_FUNCTION(method); args = PyTuple_New(2); if (unlikely(!args)) goto bad; Py_INCREF(self); PyTuple_SET_ITEM(args, 0, self); Py_INCREF(arg); PyTuple_SET_ITEM(args, 1, arg); Py_INCREF(function); Py_DECREF(method); method = NULL; result = __Pyx_PyObject_Call(function, args, NULL); Py_DECREF(args); Py_DECREF(function); return result; } } #endif result = __Pyx_PyObject_CallOneArg(method, arg); bad: Py_XDECREF(method); return result; } #include #include static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value); static PyObject *__Pyx_Coroutine_Close(PyObject *self); static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args); #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom) #if 1 || PY_VERSION_HEX < 0x030300B0 static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue) { PyObject *et, *ev, *tb; PyObject *value = NULL; __Pyx_ErrFetch(&et, &ev, &tb); if (!et) { Py_XDECREF(tb); Py_XDECREF(ev); Py_INCREF(Py_None); *pvalue = Py_None; return 0; } if (likely(et == PyExc_StopIteration)) { #if PY_VERSION_HEX >= 0x030300A0 if (ev && Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) { value = ((PyStopIterationObject *)ev)->value; Py_INCREF(value); Py_DECREF(ev); Py_XDECREF(tb); Py_DECREF(et); *pvalue = value; return 0; } #endif if (!ev || !PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) { if (!ev) { Py_INCREF(Py_None); ev = Py_None; } else if (PyTuple_Check(ev)) { if (PyTuple_GET_SIZE(ev) >= 1) { PyObject *value; #if CYTHON_COMPILING_IN_CPYTHON value = PySequence_ITEM(ev, 0); #else value = PyTuple_GET_ITEM(ev, 0); Py_INCREF(value); #endif Py_DECREF(ev); ev = value; } else { Py_INCREF(Py_None); Py_DECREF(ev); ev = Py_None; } } Py_XDECREF(tb); Py_DECREF(et); *pvalue = ev; return 0; } } else if (!PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) { __Pyx_ErrRestore(et, ev, tb); return -1; } PyErr_NormalizeException(&et, &ev, &tb); if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) { __Pyx_ErrRestore(et, ev, tb); return -1; } Py_XDECREF(tb); Py_DECREF(et); #if PY_VERSION_HEX >= 0x030300A0 value = ((PyStopIterationObject *)ev)->value; Py_INCREF(value); Py_DECREF(ev); #else { PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args); Py_DECREF(ev); if (likely(args)) { value = PySequence_GetItem(args, 0); Py_DECREF(args); } if (unlikely(!value)) { __Pyx_ErrRestore(NULL, NULL, NULL); Py_INCREF(Py_None); value = Py_None; } } #endif *pvalue = value; return 0; } #endif static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__pyx_CoroutineObject *self) { PyObject *exc_type = self->exc_type; PyObject *exc_value = self->exc_value; PyObject *exc_traceback = self->exc_traceback; self->exc_type = NULL; self->exc_value = NULL; self->exc_traceback = NULL; Py_XDECREF(exc_type); Py_XDECREF(exc_value); Py_XDECREF(exc_traceback); } static CYTHON_INLINE int __Pyx_Coroutine_CheckRunning(__pyx_CoroutineObject *gen) { if (unlikely(gen->is_running)) { PyErr_SetString(PyExc_ValueError, "generator already executing"); return 1; } return 0; } static CYTHON_INLINE PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value) { PyObject *retval; assert(!self->is_running); if (unlikely(self->resume_label == 0)) { if (unlikely(value && value != Py_None)) { PyErr_SetString(PyExc_TypeError, "can't send non-None value to a " "just-started generator"); return NULL; } } if (unlikely(self->resume_label == -1)) { PyErr_SetNone(PyExc_StopIteration); return NULL; } if (value) { #if CYTHON_COMPILING_IN_PYPY #else if (self->exc_traceback) { PyThreadState *tstate = PyThreadState_GET(); PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback; PyFrameObject *f = tb->tb_frame; Py_XINCREF(tstate->frame); assert(f->f_back == NULL); f->f_back = tstate->frame; } #endif __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value, &self->exc_traceback); } else { __Pyx_Coroutine_ExceptionClear(self); } self->is_running = 1; retval = self->body((PyObject *) self, value); self->is_running = 0; if (retval) { __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value, &self->exc_traceback); #if CYTHON_COMPILING_IN_PYPY #else if (self->exc_traceback) { PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback; PyFrameObject *f = tb->tb_frame; Py_CLEAR(f->f_back); } #endif } else { __Pyx_Coroutine_ExceptionClear(self); } return retval; } static CYTHON_INLINE PyObject *__Pyx_Coroutine_MethodReturn(PyObject *retval) { if (unlikely(!retval && !PyErr_Occurred())) { PyErr_SetNone(PyExc_StopIteration); } return retval; } static CYTHON_INLINE PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) { PyObject *ret; PyObject *val = NULL; __Pyx_Coroutine_Undelegate(gen); __Pyx_PyGen_FetchStopIterationValue(&val); ret = __Pyx_Coroutine_SendEx(gen, val); Py_XDECREF(val); return ret; } static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) { PyObject *retval; __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; PyObject *yf = gen->yieldfrom; if (unlikely(__Pyx_Coroutine_CheckRunning(gen))) return NULL; if (yf) { PyObject *ret; gen->is_running = 1; #ifdef __Pyx_Generator_USED if (__Pyx_Generator_CheckExact(yf)) { ret = __Pyx_Coroutine_Send(yf, value); } else #endif #ifdef __Pyx_Coroutine_USED if (__Pyx_Coroutine_CheckExact(yf)) { ret = __Pyx_Coroutine_Send(yf, value); } else #endif { if (value == Py_None) ret = PyIter_Next(yf); else ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value); } gen->is_running = 0; if (likely(ret)) { return ret; } retval = __Pyx_Coroutine_FinishDelegation(gen); } else { retval = __Pyx_Coroutine_SendEx(gen, value); } return __Pyx_Coroutine_MethodReturn(retval); } static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) { PyObject *retval = NULL; int err = 0; #ifdef __Pyx_Generator_USED if (__Pyx_Generator_CheckExact(yf)) { retval = __Pyx_Coroutine_Close(yf); if (!retval) return -1; } else #endif #ifdef __Pyx_Coroutine_USED if (__Pyx_Coroutine_CheckExact(yf)) { retval = __Pyx_Coroutine_Close(yf); if (!retval) return -1; } else #endif { PyObject *meth; gen->is_running = 1; meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close); if (unlikely(!meth)) { if (!PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_WriteUnraisable(yf); } PyErr_Clear(); } else { retval = PyObject_CallFunction(meth, NULL); Py_DECREF(meth); if (!retval) err = -1; } gen->is_running = 0; } Py_XDECREF(retval); return err; } static PyObject *__Pyx_Generator_Next(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; PyObject *yf = gen->yieldfrom; if (unlikely(__Pyx_Coroutine_CheckRunning(gen))) return NULL; if (yf) { PyObject *ret; gen->is_running = 1; ret = Py_TYPE(yf)->tp_iternext(yf); gen->is_running = 0; if (likely(ret)) { return ret; } return __Pyx_Coroutine_FinishDelegation(gen); } return __Pyx_Coroutine_SendEx(gen, Py_None); } static PyObject *__Pyx_Coroutine_Close(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; PyObject *retval, *raised_exception; PyObject *yf = gen->yieldfrom; int err = 0; if (unlikely(__Pyx_Coroutine_CheckRunning(gen))) return NULL; if (yf) { Py_INCREF(yf); err = __Pyx_Coroutine_CloseIter(gen, yf); __Pyx_Coroutine_Undelegate(gen); Py_DECREF(yf); } if (err == 0) PyErr_SetNone(PyExc_GeneratorExit); retval = __Pyx_Coroutine_SendEx(gen, NULL); if (retval) { Py_DECREF(retval); PyErr_SetString(PyExc_RuntimeError, "generator ignored GeneratorExit"); return NULL; } raised_exception = PyErr_Occurred(); if (!raised_exception || raised_exception == PyExc_StopIteration || raised_exception == PyExc_GeneratorExit || PyErr_GivenExceptionMatches(raised_exception, PyExc_GeneratorExit) || PyErr_GivenExceptionMatches(raised_exception, PyExc_StopIteration)) { if (raised_exception) PyErr_Clear(); Py_INCREF(Py_None); return Py_None; } return NULL; } static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; PyObject *typ; PyObject *tb = NULL; PyObject *val = NULL; PyObject *yf = gen->yieldfrom; if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb)) return NULL; if (unlikely(__Pyx_Coroutine_CheckRunning(gen))) return NULL; if (yf) { PyObject *ret; Py_INCREF(yf); if (PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit)) { int err = __Pyx_Coroutine_CloseIter(gen, yf); Py_DECREF(yf); __Pyx_Coroutine_Undelegate(gen); if (err < 0) return __Pyx_Coroutine_MethodReturn(__Pyx_Coroutine_SendEx(gen, NULL)); goto throw_here; } gen->is_running = 1; #ifdef __Pyx_Generator_USED if (__Pyx_Generator_CheckExact(yf)) { ret = __Pyx_Coroutine_Throw(yf, args); } else #endif #ifdef __Pyx_Coroutine_USED if (__Pyx_Coroutine_CheckExact(yf)) { ret = __Pyx_Coroutine_Throw(yf, args); } else #endif { PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw); if (unlikely(!meth)) { Py_DECREF(yf); if (!PyErr_ExceptionMatches(PyExc_AttributeError)) { gen->is_running = 0; return NULL; } PyErr_Clear(); __Pyx_Coroutine_Undelegate(gen); gen->is_running = 0; goto throw_here; } ret = PyObject_CallObject(meth, args); Py_DECREF(meth); } gen->is_running = 0; Py_DECREF(yf); if (!ret) { ret = __Pyx_Coroutine_FinishDelegation(gen); } return __Pyx_Coroutine_MethodReturn(ret); } throw_here: __Pyx_Raise(typ, val, tb, NULL); return __Pyx_Coroutine_MethodReturn(__Pyx_Coroutine_SendEx(gen, NULL)); } static int __Pyx_Coroutine_traverse(PyObject *self, visitproc visit, void *arg) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; Py_VISIT(gen->closure); Py_VISIT(gen->classobj); Py_VISIT(gen->yieldfrom); Py_VISIT(gen->exc_type); Py_VISIT(gen->exc_value); Py_VISIT(gen->exc_traceback); return 0; } static int __Pyx_Coroutine_clear(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; Py_CLEAR(gen->closure); Py_CLEAR(gen->classobj); Py_CLEAR(gen->yieldfrom); Py_CLEAR(gen->exc_type); Py_CLEAR(gen->exc_value); Py_CLEAR(gen->exc_traceback); Py_CLEAR(gen->gi_name); Py_CLEAR(gen->gi_qualname); return 0; } static void __Pyx_Coroutine_dealloc(PyObject *self) { __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; PyObject_GC_UnTrack(gen); if (gen->gi_weakreflist != NULL) PyObject_ClearWeakRefs(self); if (gen->resume_label > 0) { PyObject_GC_Track(self); #if PY_VERSION_HEX >= 0x030400a1 if (PyObject_CallFinalizerFromDealloc(self)) #else Py_TYPE(gen)->tp_del(self); if (self->ob_refcnt > 0) #endif { return; } PyObject_GC_UnTrack(self); } __Pyx_Coroutine_clear(self); PyObject_GC_Del(gen); } static void __Pyx_Coroutine_del(PyObject *self) { PyObject *res; PyObject *error_type, *error_value, *error_traceback; __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; if (gen->resume_label <= 0) return ; #if PY_VERSION_HEX < 0x030400a1 assert(self->ob_refcnt == 0); self->ob_refcnt = 1; #endif __Pyx_ErrFetch(&error_type, &error_value, &error_traceback); res = __Pyx_Coroutine_Close(self); if (res == NULL) PyErr_WriteUnraisable(self); else Py_DECREF(res); __Pyx_ErrRestore(error_type, error_value, error_traceback); #if PY_VERSION_HEX < 0x030400a1 assert(self->ob_refcnt > 0); if (--self->ob_refcnt == 0) { return; } { Py_ssize_t refcnt = self->ob_refcnt; _Py_NewReference(self); self->ob_refcnt = refcnt; } #if CYTHON_COMPILING_IN_CPYTHON assert(PyType_IS_GC(self->ob_type) && _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED); _Py_DEC_REFTOTAL; #endif #ifdef COUNT_ALLOCS --Py_TYPE(self)->tp_frees; --Py_TYPE(self)->tp_allocs; #endif #endif } static PyObject * __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self) { Py_INCREF(self->gi_name); return self->gi_name; } static int __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) { #else if (unlikely(value == NULL || !PyString_Check(value))) { #endif PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; } tmp = self->gi_name; Py_INCREF(value); self->gi_name = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self) { Py_INCREF(self->gi_qualname); return self->gi_qualname; } static int __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 if (unlikely(value == NULL || !PyUnicode_Check(value))) { #else if (unlikely(value == NULL || !PyString_Check(value))) { #endif PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; } tmp = self->gi_qualname; Py_INCREF(value); self->gi_qualname = value; Py_XDECREF(tmp); return 0; } static __pyx_CoroutineObject *__Pyx__Coroutine_New(PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *closure, PyObject *name, PyObject *qualname) { __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type); if (gen == NULL) return NULL; gen->body = body; gen->closure = closure; Py_XINCREF(closure); gen->is_running = 0; gen->resume_label = 0; gen->classobj = NULL; gen->yieldfrom = NULL; gen->exc_type = NULL; gen->exc_value = NULL; gen->exc_traceback = NULL; gen->gi_weakreflist = NULL; Py_XINCREF(qualname); gen->gi_qualname = qualname; Py_XINCREF(name); gen->gi_name = name; PyObject_GC_Track(gen); return gen; } static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) { #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) int result; PyObject *globals, *result_obj; globals = PyDict_New(); if (unlikely(!globals)) goto ignore; result = PyDict_SetItemString(globals, "_cython_coroutine_type", #ifdef __Pyx_Coroutine_USED (PyObject*)__pyx_CoroutineType); #else Py_None); #endif if (unlikely(result < 0)) goto ignore; result = PyDict_SetItemString(globals, "_cython_generator_type", #ifdef __Pyx_Generator_USED (PyObject*)__pyx_GeneratorType); #else Py_None); #endif if (unlikely(result < 0)) goto ignore; if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore; if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore; result_obj = PyRun_String(py_code, Py_file_input, globals, globals); if (unlikely(!result_obj)) goto ignore; Py_DECREF(result_obj); Py_DECREF(globals); return module; ignore: Py_XDECREF(globals); PyErr_WriteUnraisable(module); if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) { Py_DECREF(module); module = NULL; } #else py_code++; #endif return module; } #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) static PyObject* __Pyx_patch_abc_module(PyObject *module); static PyObject* __Pyx_patch_abc_module(PyObject *module) { module = __Pyx_Coroutine_patch_module( module, "" "if _cython_generator_type is not None:\n" " try: Generator = _module.Generator\n" " except AttributeError: pass\n" " else: Generator.register(_cython_generator_type)\n" "if _cython_coroutine_type is not None:\n" " try: Coroutine = _module.Coroutine\n" " except AttributeError: pass\n" " else: Coroutine.register(_cython_coroutine_type)\n" ); return module; } #endif static int __Pyx_patch_abc(void) { #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) static int abc_patched = 0; if (!abc_patched) { PyObject *module; module = PyImport_ImportModule((PY_VERSION_HEX >= 0x03030000) ? "collections.abc" : "collections"); if (!module) { PyErr_WriteUnraisable(NULL); if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, ((PY_VERSION_HEX >= 0x03030000) ? "Cython module failed to register with collections.abc module" : "Cython module failed to register with collections module"), 1) < 0)) { return -1; } } else { module = __Pyx_patch_abc_module(module); abc_patched = 1; if (unlikely(!module)) return -1; Py_DECREF(module); } module = PyImport_ImportModule("backports_abc"); if (module) { module = __Pyx_patch_abc_module(module); Py_XDECREF(module); } if (!module) { PyErr_Clear(); } } #else if (0) __Pyx_Coroutine_patch_module(NULL, NULL); #endif return 0; } static PyMethodDef __pyx_Generator_methods[] = { {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O, (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")}, {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS, (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")}, {"close", (PyCFunction) __Pyx_Coroutine_Close, METH_NOARGS, (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")}, {0, 0, 0, 0} }; static PyMemberDef __pyx_Generator_memberlist[] = { {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL}, {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY, (char*) PyDoc_STR("object being iterated by 'yield from', or None")}, {0, 0, 0, 0, 0} }; static PyGetSetDef __pyx_Generator_getsets[] = { {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name, (char*) PyDoc_STR("name of the generator"), 0}, {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname, (char*) PyDoc_STR("qualified name of the generator"), 0}, {0, 0, 0, 0, 0} }; static PyTypeObject __pyx_GeneratorType_type = { PyVarObject_HEAD_INIT(0, 0) "generator", sizeof(__pyx_CoroutineObject), 0, (destructor) __Pyx_Coroutine_dealloc, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, 0, (traverseproc) __Pyx_Coroutine_traverse, 0, 0, offsetof(__pyx_CoroutineObject, gi_weakreflist), 0, (iternextfunc) __Pyx_Generator_Next, __pyx_Generator_methods, __pyx_Generator_memberlist, __pyx_Generator_getsets, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, #if PY_VERSION_HEX >= 0x030400a1 0, #else __Pyx_Coroutine_del, #endif 0, #if PY_VERSION_HEX >= 0x030400a1 __Pyx_Coroutine_del, #endif }; static int __pyx_Generator_init(void) { __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr; __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter; __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type); if (unlikely(!__pyx_GeneratorType)) { return -1; } return 0; } static int __Pyx_check_binary_version(void) { char ctversion[4], rtversion[4]; PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION); PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion()); if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) { char message[200]; PyOS_snprintf(message, sizeof(message), "compiletime version %s of module '%.100s' " "does not match runtime version %s", ctversion, __Pyx_MODULE_NAME, rtversion); return PyErr_WarnEx(NULL, message, 1); } return 0; } static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION < 3 if (t->is_unicode) { *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); } else if (t->intern) { *t->p = PyString_InternFromString(t->s); } else { *t->p = PyString_FromStringAndSize(t->s, t->n - 1); } #else if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; ++t; } return 0; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); } static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if CYTHON_COMPILING_IN_CPYTHON && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { #if PY_VERSION_HEX < 0x03030000 char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif *length = PyBytes_GET_SIZE(defenc); return defenc_c; #else if (__Pyx_PyUnicode_READY(o) == -1) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (PyUnicode_IS_ASCII(o)) { *length = PyUnicode_GET_LENGTH(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else return PyUnicode_AsUTF8AndSize(o, length); #endif #endif } else #endif #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) if (PyByteArray_Check(o)) { *length = PyByteArray_GET_SIZE(o); return PyByteArray_AS_STRING(o); } else #endif { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (unlikely(r < 0)) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (PyInt_Check(x) || PyLong_Check(x)) #else if (PyLong_Check(x)) #endif return __Pyx_NewRef(x); m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = PyNumber_Int(x); } else if (m && m->nb_long) { name = "long"; res = PyNumber_Long(x); } #else if (m && m->nb_int) { name = "int"; res = PyNumber_Long(x); } #endif if (res) { #if PY_MAJOR_VERSION < 3 if (!PyInt_Check(res) && !PyLong_Check(res)) { #else if (!PyLong_Check(res)) { #endif PyErr_Format(PyExc_TypeError, "__%.4s__ returned non-%.4s (type %.200s)", name, name, Py_TYPE(res)->tp_name); Py_DECREF(res); return NULL; } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject *x; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(b))) { if (sizeof(Py_ssize_t) >= sizeof(long)) return PyInt_AS_LONG(b); else return PyInt_AsSsize_t(x); } #endif if (likely(PyLong_CheckExact(b))) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)b)->ob_digit; const Py_ssize_t size = Py_SIZE(b); if (likely(__Pyx_sst_abs(size) <= 1)) { ival = likely(size) ? digits[0] : 0; if (size == -1) ival = -ival; return ival; } else { switch (size) { case 2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case 4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; case -4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); } break; } } #endif return PyLong_AsSsize_t(b); } x = PyNumber_Index(b); if (!x) return -1; ival = PyInt_AsSsize_t(x); Py_DECREF(x); return ival; } static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { return PyInt_FromSize_t(ival); } #endif /* Py_PYTHON_H */ cutadapt-1.9.1/cutadapt/_seqio.pyx0000664000175000017500000001125212627537126017723 0ustar marcelmarcel00000000000000# kate: syntax Python; # cython: profile=False from __future__ import print_function, division, absolute_import from .xopen import xopen # TODO # the following function and class cannot be imported from seqio.py # since we would get circular imports class FormatError(Exception): """ Raised when an input file (FASTA or FASTQ) is malformatted. """ def _shorten(s, n=100): """Shorten string s to at most n characters, appending "..." if necessary.""" if s is None: return None if len(s) > n: s = s[:n-3] + '...' return s cdef class Sequence(object): """ A record in a FASTQ file. Also used for FASTA (then the qualities attribute is None). qualities is a string and it contains the qualities encoded as ascii(qual+33). If an adapter has been matched to the sequence, the 'match' attribute is set to the corresponding Match instance. """ cdef: public str name public str sequence public str qualities public str name2 public object match def __init__(self, str name, str sequence, str qualities=None, str name2='', match=None): """Set qualities to None if there are no quality values""" self.name = name self.sequence = sequence self.qualities = qualities self.name2 = name2 self.match = match if qualities is not None and len(qualities) != len(sequence): rname = _shorten(name) raise FormatError("In read named {0!r}: length of quality sequence ({1}) and length of read ({2}) do not match".format( rname, len(qualities), len(sequence))) def __getitem__(self, key): """slicing""" return self.__class__( self.name, self.sequence[key], self.qualities[key] if self.qualities is not None else None, self.name2, self.match) def __repr__(self): qstr = '' if self.qualities is not None: qstr = ', qualities={0!r}'.format(_shorten(self.qualities)) return ''.format(_shorten(self.name), _shorten(self.sequence), qstr) def __len__(self): return len(self.sequence) def __richcmp__(self, other, int op): if 2 <= op <= 3: eq = self.name == other.name and \ self.sequence == other.sequence and \ self.qualities == other.qualities if op == 2: return eq else: return not eq else: raise NotImplementedError() def __reduce__(self): return (Sequence, (self.name, self.sequence, self.qualities, self.name2)) class FastqReader(object): """ Reader for FASTQ files. Does not support multi-line FASTQ files. """ _close_on_exit = False def __init__(self, file, sequence_class=Sequence): """ file is a filename or a file-like object. If file is a filename, then .gz files are supported. """ if isinstance(file, basestring): file = xopen(file) self._close_on_exit = True self._file = file self.sequence_class = sequence_class self.delivers_qualities = True def __iter__(self): """ Yield Sequence objects """ cdef int i = 0 cdef int strip cdef str line, name, qualities, sequence, name2 sequence_class = self.sequence_class it = iter(self._file) line = next(it) if not (line and line[0] == '@'): raise FormatError("Line {0} in FASTQ file is expected to start with '@', but found {1!r}".format(i+1, line[:10])) strip = -2 if line.endswith('\r\n') else -1 name = line[1:strip] i = 1 for line in it: if i == 0: if not (line and line[0] == '@'): raise FormatError("Line {0} in FASTQ file is expected to start with '@', but found {1!r}".format(i+1, line[:10])) name = line[1:strip] elif i == 1: sequence = line[:strip] elif i == 2: if line == '+\n': # check most common case first name2 = '' else: line = line[:strip] if not (line and line[0] == '+'): raise FormatError("Line {0} in FASTQ file is expected to start with '+', but found {1!r}".format(i+1, line[:10])) if len(line) > 1: if not line[1:] == name: raise FormatError( "At line {0}: Sequence descriptions in the FASTQ file don't match " "({1!r} != {2!r}).\n" "The second sequence description must be either empty " "or equal to the first description.".format(i+1, name, line[1:])) name2 = name else: name2 = '' elif i == 3: if len(line) == len(sequence) - strip: qualities = line[:strip] else: qualities = line.rstrip('\r\n') yield sequence_class(name, sequence, qualities, name2=name2) i = (i + 1) % 4 if i != 0: raise FormatError("FASTQ file ended prematurely") def close(self): if self._close_on_exit and self._file is not None: self._file.close() self._file = None def __enter__(self): if self._file is None: raise ValueError("I/O operation on closed FastqReader") return self def __exit__(self, *args): self.close() cutadapt-1.9.1/cutadapt/_qualtrim.so0000775000175000017500000026375012623615256020256 0ustar marcelmarcel00000000000000ELF>@@(_@8@# GG MM M MM M $$PtdDDDLLQtdRtdMM M GNUqmb$^2 ަ(wZ+ ? A ?ABCDEBE|j'qX -6 @.F Iul!!u5#,aRx h  a +G[8 W:R"WX j(Y  @ X@ :g^X  X __gmon_start___init_fini_ITM_deregisterTMCloneTable_ITM_registerTMCloneTable__cxa_finalize_Jv_RegisterClassesPyByteArray_TypePyType_IsSubtypePyExc_TypeErrorPyErr_FormatPyExc_ValueError_PyThreadState_CurrentPyFrame_NewPyTraceBack_HerePyString_FromStringPyString_FromFormatPyCode_NewPyMem_ReallocPyMem_MallocPyExc_NameErrorPyObject_GetAttrPyNumber_IntPyNumber_LongPyErr_OccurredPyErr_SetStringPyExc_OverflowErrorPyLong_AsLong_Py_NoneStructPyString_TypePyObject_SizePyList_TypePyTuple_TypePyInt_FromLongPyTuple_NewPyInt_FromSsize_tPyObject_GetItemPyDict_SizePyDict_GetItemPyErr_ExceptionMatchesPyErr_ClearPyDict_Next_PyString_EqPyString_AsStringPyUnicodeUCS4_ComparePyBaseString_Type__stack_chk_failPyUnicode_Typeinit_qualtrimPyOS_snprintfPy_GetVersionPyErr_WarnExPyString_FromStringAndSizePy_InitModule4_64PyModule_GetDictPyImport_AddModulePyObject_SetAttrStringPyString_InternFromStringPyUnicodeUCS4_DecodeUTF8__pyx_module_is_main_cutadapt___qualtrimPyTuple_PackPyCFunction_NewExPyDict_SetItemPyDict_NewPyExc_ImportErrorlibpthread.so.0libc.so.6_edata__bss_start_endGLIBC_2.2.5GLIBC_2.4Mui oii {M M Q Q T X T X T X T X U X U T (U X 0U T PU X XU HT xU X U 8T U X U S U X U T U X U T V X V xT @V X HV XT hV X pV S V X V T V X V hT V X V T W xX W T 0W pX 8W T XW hX `W T W `X W T W CW P$W Q hO pO xO  O EO O O O O  O "O 'O .O /O 1O 4O 6O 8O :O >P  P (P 0P 8P @P  HP  PP  XP  `P hP pP xP P P P P P P P P P P P  P !P #P $P %P &Q (Q )Q *Q + Q ,(Q -0Q 08Q 2@Q 3HQ 5PQ 7XQ 9`Q :hQ ;pQ <xQ =HH]7 HtH57 %7 @%7 h%7 h%7 h%7 h%7 h%z7 h%r7 h%j7 hp%b7 h`%Z7 h P%R7 h @%J7 h 0%B7 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]A\A]A^A_DHF0HD$hHC(Hk H[HD$`Hl$XH\$PHMHHEHcAH9AHl$`HMH^HEHcЉD$H9|$Hl$hHQHMHHEHcЉD$H9|$H;) tHCH;h) BHHHD$(HHIHK Dl$Hy) AD$E111H$Dl$ HCH;$uH;( LhhMIEHH}HIMLH9.IUHJHIMi|$ )xA9}Dd$AIcAI9_HH{|$(Ń|$ H( E1E1AH$D$D$D$ HCH;$HcH;' H@hH?H@H2HIMLL9IuHNHIM[t$ )AxE9~l$ EnD$9D$ Hc 1D$ \HI Hc|$ FHI H LhL` f.IMHD$ LQ0HD$ ~HHtCHHHD$ HL$ IH9HwHH1 HAHP0MDBfDH H=ډy1fHHSHxdHkH9bHSHHIfDHHSHxHTP4Ht$8IHHIH9\HE!HE~LD$8LHHO HNH5 H81gHEH=L LHT$@H)I>HTPHt$8H-& +HEIH8H9t`lHt$8HH9uHLHH HH5D H81^HC0Hv LAH5 HH81I,$ID$LP0HHH IH LAH5 HH81/I,$$ID$LP0HH^H IH LAH5U HH81I,$ID$LP0HHHA I0ImgI$0 HHI$ID$LP0H=a H9= H L@H H H5 HKH811\2H7H H5 H8C>HEHPH H^ HcHHHcAH9Hu HuHc H5 H8HmYAhHHcЉD$H9Hu mHuH H5 H8HmGD$HEHPHwH HcHHEHPHH HcHHHcЉD$H9Hu HuHe H5 H8HmD$HEE1HHHEDH;5 ttHI DIIHt$8HH9H9$y HtZHED$HHHEQHh Hg H5H81EHH‹EH HcAH9iHHEHH‹EH HHcAH9:Dm,H7AIELP0DmAD}EII IIcI9(VED$D}EII IcI9+HED$HHHEHD$E؉D$E؉D$EHH‹EH HHcЉD$H9ED$HL  L 11Ҿ APj5 52 AQAQPAQfH@HH* H=+ 1HHjH5 H=B HH+[HHAH5` H=  HH+HCHP0A[HHc H5H8A"A H=y AאAAAAH+HCHP0HCHP0AH= ATAiAYHHonly single character unicode strings can be converted to Py_UCS4, got length %zdord() expected string of length 1, but %.200s foundord() expected a character, but string of length %zd found__%.4s__ returned non-%.4s (type %.200s)value too large to convert to int%.200s() takes %.8s %zd positional argument%.1s (%zd given)%s() got multiple values for keyword argument '%s'%.200s() keywords must be strings%.200s() got an unexpected keyword argument '%.200s'Argument '%.200s' has incorrect type (expected %.200s, got %.200s)cutadapt._qualtrim.quality_trim_indexcompiletime version %s of module '%.100s' does not match runtime version %scutadapt/_qualtrim.c%s (%s:%d)name '%.200s' is not definedintlongan integer is requiredat leastat mostquality_trim_indexqualitiescutadapt/_qualtrim.pyx%d.%d%s__builtin____builtins____name__init cutadapt._qualtrim`<+P]Xzw%$;Lh0@zRx $@FJ w?;*3$"Dp4\PAd K V J d L ^ B vBBB B(D0A8HP 8A0A(B BBBG O 8A0A(B BBBG W 8A0A(B BBBG zXA`BhBpBxBBBPP44AAG h DAJ x DAA DlpmAAD0 AAE F AAH j FAG |BBB B(A0A8JA`Az 8A0A(B BBBF  IfAUIfGl4gBAH W  AABB FFFIgBFFBBABI=M @ X@M M oH  P 8  o oo^ o,M v&6FVfv&6FVfv&6Q Find the positions at which to trim low-quality ends from a nucleotide sequence. Return tuple (start, stop) that indicates the good-quality segment. Qualities are assumed to be ASCII-encoded as chr(qual + base). The algorithm is the same as the one used by BWA within the function 'bwa_trim_read': - Subtract the cutoff value from all qualities. - Compute partial sums from all indices to the end of the sequence. - Trim sequence at the index at which the sum is minimal. /home/marcel/scm/cutadapt/cutadapt/_qualtrim.pyxquality_trim_indexcutadapt._qualtrim Quality trimming. cutoff_frontcutoff_backqualitiesreversedmax_qualxrangestartrange__test__stop__main__basesiX X X X X T X T X HT X 8T X S 1X T X T X xT X XT X S X T X hT X T xX T pX T hX T `X T CP$Q GCC: (Ubuntu 5.2.1-22ubuntu2) 5.2.1 20151010,@$Ny |@$8~uint/i|i{ i?0;2V b ( 0 8 @ H gP X z` * h G bp bt qpx F T r Z u%{ r. Z / y0 1 2- 4b %6 B  Zz zw bI  B   } f bb3Mfi- 7) 9b  :b) jY k k D E  E  E , F  G  G(  KW 0  Lt 8 M @ = N H  OP 6 PX x T` u Uh  V p  Z&x ~ [  \  ]  ^  a s di  f  j . m  qG  t  xr  y~  |T  }_  ~*  _ @    (; 0e 8 : @Z H& _PQ _X> _`p _h _p W x* MY l4 n4 o o o1 pP JP___: pv___ ____ b_W _ b_e *0_D_` OU_n_ yb__ b__ b___d '_ l =CW_W hn_` $ buf obj _len   b  b$I ( W0 W8D W@ $ H X 4 M  J P bi _i b4  z   _i  כ  b __(  b _  b _ 8  e e e e e  e(| 0 ?8 ?@[ ?H P  ?X> e`2 ehw ep exC eW . ? ? ?| ? ? e eb e e  e ~  = e  e  eT e e  e e e  e( ?0  P     e    } D n( 0   8 H e@ , Ho   ! , " ! #e  $ % 0 '.  ( + )'  *2 ~ +]  ,?  -o (9 .  1F L W  2c i t _ 3  b _ b 4  _ _ 5p 6  b__v 7v 8  9J :28iG_r ;SY_r__b <J =J^ >; ? @( A___ B_   .  %T# & '#T (b *Z( X get >set cdoc 4  e Ydo M 0 5    / str 5  i  _(} tri]G  Z[[[\(#$$$%i&b v'$10t5bx (#  _  (i& '' p ,k88< ?_(_0_8@sHU _P6%_X1%_` %_h'pV (bx.b|/b 01x9* IO_c_ ntb___isP [?J__A_  _( _0_8_@bH_ts8? ;?<l>8?buCbqDb PFP(GGP0H_8I_@K_HL_P M_X8O_`3P_h Q_pS_x [b]b__`igbbc_%-[ab_8b_Eg w   b_ bG b b _ v_(_0 _8_@_H_P _Xcb`$_hp_x7(psn  7 ! " E Fb GwEHzI] Jb Kb L]   b  b bs c  29-.  l  X!obj_ ")%b*!x%_#&#&# '$( $%}#7+i&#+i%#m*%#7p%#7q%#7ui&#ui%#7~8&#~8i&#i&'valb'tmp_0 "] 3]!x3_#/4", _!o_!i ] b |b  b%'n &'r_%'n&'r_&'m&'l"0_! X0_#3 1_"T_c 7b### "$_ ~_ _ b <b b#Rb# b#b#b#b#_#D#Nb#X_#bi#lb#vb#_#_# b##+ b$Y 5$$ $;I= S> m ?b i@ A B# D# E"b$Y " bg!obj_  b X m b V SW X_"cb d_ e f_ g <h i'keyk_#7k_'posl#Xm#-n$C(bad$O$%T#%f'cmpb&#&'cmpb"b!t)mb@p**m]U+mb*mbQ,nbL-midnb-endnb )Qi.cQ_g,RW/5Z0F12P3!M4T h@5,M5H!M" b#'posb"u d  b b ## _#a _(bad  b 'posb'ib#]%'tmp&#b6\ #+d +b+ b+[,R,i #(bad/0 0m102234U~4T}4Q/`!0<0080$o01`2H. 2T 2`I 7l88M8!4U8CMp!4U =C4T|4Q (C4Rs88M!4U88M!4U|84NM!4U04T04Q04R09 !4U}: !4U~/ue"0 0= 12 2 2U ;m"2 3 YM4U4T s $ &4$< #"2 8"4U4Ts4Q~3!dM4U 8'oM"4T|4R08:zM"4Us:+ 4U|" _H#!obj _  _'tp =P!;$00 >/#`!01#00# 0$#102<#J9u!#4Tv9!#4Tv$3!M4Tv?!0?!>3!!M4T HC4Qv$"h < _y$!x< _'m= #X> 'res? _=!m,'0>)>5>A7M7U1p>>/;$!%0L$W12V$2`$.2l$8"M%4UU5"M8"!MK%4T 8A5 #M8(#Mw%4T nC::#4Us/B" '01 2)252A7M@U#)>5>A7M7U1p>>/;$+ *0L$ 1 2V$ 2`$2!2l$!5+M8+M*4T nC8|1M*4Uv85!M*4T 8A95*4Uv35M4Uv/1p,0t"1p2)"25#2A#7M@UF7<1m+2b5$;W,2X$<7'+2$<67+2 %5A7M3'7M4Uv)>5>A7M7U1 >>/;$+;.0L$M)12V$)2`$)2l$*5+M8+M-4T nC82M-4Uv825!M.4T 8A9H5%.4Uv3c5M4Uv/A2/0!+12)}+25+2A+7M@U7)>5>A7M7U10 >>/;$2 O30L$21 2V$32`$<32l$382M24Uv85!M24T 8A96 34Uv8!6M%34Uv56M36M4T nC/20 40~410 2)425Q52AQ57M@UD8<332b5; 425; 3286<8(E42[6<48042~65?8M3$8M4Uv<9"d426<9 426?L:268Z8M44T hA3C:y$4Uv:+34Uv3*M4T hA;@ m9,p$7,@7<+!g5,7_?83+M4U// 70b8069090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NE4T C8>N F4U W 4T08>N%F4Qs5>N8?NJF4Qs93?^F4Us5U?M8t?MF4T C9?F4Us9@F4Us5W@\NC_  Y Cp_ Y C}_ Y C<_ Y C _ Y # b#+ bC]G (C # ~G #G nGC N( X # h_#i_#j_ G C#kG T C-lG T H CcmH T ;H C\n+H T C oH T Cp+H T H CH q}H T Cr}H T H CsH T Ck t+H xT C.u+H hT I C?v I XT AI Cw1I HT gI CxWI 8T CYy  T I CazI T C {I S I 0CN|I S C}_ X C~~_ X C_ X C_ X C _ X CB_ X C0_ X C_ X Ca_ X C?_ X C_ X C_ X CN_ X C_ xX C_ pX C_ hX C*_ `X # _#_ KJCK Q C . W .K CAK @X K CHWK U KK L HL KKtKStKU K 7K8K LMK4LK"K)K_K+_K _K_K_K_K_K^N eb  X OjjP O?OXXBOGO5O4O77=OPUU Pn n sP|OOONOOnOJO EP`` OrOOOyODD\OPP..O(O&P O(QP99AO  O mOwwTO>P O.O uO__!OAA"PB B O 1OppoOm% : ; I$ > $ >   I : ;  : ; I8 : ;I8 I !I/ : ; &I7I : ; : ;I8 : ; 'II : ; I8 ' : ; : ;I : ;< : ;I8  : ;  : ; I8 : ;  : ;.: ;'  : ;I!: ;I".: ;'I #4: ;I$ : ;% & '4: ;I( : ;).: ;'I@B*: ;I+: ;I,4: ;I-4: ;I.: ;I/1RUX Y011 U241314B516.: ;'@7 1819:; U< =.1@B>41? @ 1A4: ;I B : ;C4: ;ID41E1X YF1G1X YH.?: ;'@BI1RUX YJ!I/K4: ; I?<L4: ;I?<M!N4: ;I?O.?<n: ; P.?<n: ;Q.?<ni  cutadapt/usr/lib/gcc/x86_64-linux-gnu/5/include/usr/include/x86_64-linux-gnu/bits/usr/include/usr/include/x86_64-linux-gnu/sys/usr/include/python2.7_qualtrim.cstddef.htypes.hstdio.hlibio.htypes.hstdint.hpyport.htime.hobject.hmethodobject.hdescrobject.hunicodeobject.hintobject.hlongobject.hlongintrepr.hstringobject.hbytearrayobject.htupleobject.hlistobject.hframeobject.hpystate.hcode.hboolobject.hpyerrors.hpymem.htraceback.habstract.hdictobject.hwarnings.hpythonrun.hmodsupport.hmoduleobject.himport.h @ =-/7Y; Xq .R >!KgJnbtKg.JrKg Ju  <vYy<gt M+[.KKXziwƒq"KKu=K}ytK Xy.xFy  fOL0Wu <{t"  Wuw}  |tsJ X{9%Z-uP<;$$ft(x|xD{Jvv .]+KKHYYXZw.XZw<Zw<z%fKrXKY zYK fJX~ J~XJ .{>H_[pP Vf V VpVUV#-VVV  f    p K #-   2  0f 0 0p0K0#-000200 P{ v vpv P 0PPv_UV#-VVVdPPU{0{ eCQ#-0Q0 iCU0P#-0PV0PVVVVV  2  00200_vvv v_P0_v vPP\ ;P;J|J\{\|TV VV{VV)1VP T { T  T - T f T  T  T 0{00-0f000 C{ C C- Cf C C CV{-f_{__-_f___S!P!7S7p^pP pT "S{^S-S^f{S{^SS P S{S#S-SfSSS T V C|-S0P\VVpxPP)2)4)3)0) C53) C5n15n45n35n05n C5{35n Cysy4y3y0y CqXR 191Tf1 C9 CTf CT C f U IU )UUUU9UqU ] ~~~~~ ] ~~~~~ 8 ]]]~] ] 0] V vu" V F 0F \ |t" \6 V f V VIV )\\0O\O~V~0 ] 0] _ V _ F 0F _6 _ f _ _I_ )__0~_~0 ] ~F ~ ~ 6 ~~~~#~+?~~~~9~q~ ] 0] ~ ~Y ~ ~ ? ~G f ~I~0O~~~0] | |~F V v6 | f | |I| )VV5V?EVO~| 1 01 6 P6 f 0 I0 )000090q0  P $ ~$ ? P?  ^ * P6 ^ f ^ ^I^PPO~^~P* ] 0] | \ |  p 6 V6 | f | |I| )VV5V?EVO~|~0VVVqV 0 0 01 6 0Y 0 f 0 ]I00+0O09]q] P P6 N PN Y ~ P P)~?OP vu" $0-  $v $- |t" $0-  $| $- ~ $~ $,  01 0 f 0 I0 )00009\q\ 0 1 P1 f 0 I0 )000090q0 0 f 0 0 SI0 )00E000090q0 0 f 0 0  CI0 )00 C00009 Cq C 0 f 0 0 VI0 )00 00009 q ] 0Y 0 f 0I0O~0] 1Y 1 f 1I1O~1] TY g T G TG T PT V TV d Pd f T.T.@~@ITO[~| ]I]O~]/DPOVPY 0Y 1Y g Th | P| ~} P ]  P  Q$ G P; G QQ 00+0Q 11+1Q T v $ &T v $ &+Th u Pu s#h01T v $ &P~P]TQ+T+Q 6   9 q 6 0090q0  ~ 6  9 q 6 090q0k0"0""P""S""0""P""S"#09##0##S##0##P#$0$$Pk0#09#F#0F#P#1P##0##V##0#$V$$0k0#09#F#0F#P# CP##0## C##0#$ C$$0k0#09#F#0F#P#\P##0##\##0#$\$$0 U !S@!\!S"#S(Enh %,2 ,Ubk 8Ph5@ @p&  Pp4y p P027Tfq4 ] 0 S207T)1q;] 8]207T)1q]h2h;>)1q;>)1al  SpA20A202'0n0X\m Sp p  pU#-2{  pU#- P #-f)1{-f-?CH\\ @Tf p P0@q] ` p PO~x PO~*PO~  P `  P ` p F N Q 0  X !@!`!.symtab.strtab.shstrtab.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.init_array.fini_array.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_line.debug_str.debug_loc.debug_rangesH^    @ ` @ X@ h@DEM M M M hO P Q X  M  @. A WX fM  M  @p  X Y Y 0Y B P!WY _ !my P$X X X X T ( Y  T 3@X AU RX aX qX `X X X xX pX X X X 'X DW xhX T T HT 8T S 1T  T xT (XT :S UT chT tT ~T T T T Q GM Q M X #P 9Rmy  X ! X JU X@[w/=N]i} :g (Y &X 2=J^jy   ' 9 F "b  @h ~   crtstuff.c__JCR_LIST__deregister_tm_clonesregister_tm_clones__do_global_dtors_auxcompleted.7568__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entry_qualtrim.c__pyx_bisect_code_objects__Pyx__PyObject_Ord__Pyx_AddTraceback__pyx_code_cache__pyx_d__pyx_empty_tuple__pyx_empty_bytes__Pyx_GetBuiltinName__pyx_b__Pyx_PyInt_As_int.part.1__pyx_pw_8cutadapt_9_qualtrim_1quality_trim_index__pyx_n_s_base__pyx_n_s_qualities__pyx_n_s_cutoff_front__pyx_n_s_cutoff_back__pyx_pyargnames.11114__pyx_m__pyx_k_Quality_trimming__pyx_methods__pyx_string_tab__pyx_n_s_main__pyx_n_s_range__pyx_n_s_reversed__pyx_n_s_xrange__pyx_n_s_s__pyx_n_s_i__pyx_n_s_start__pyx_n_s_stop__pyx_n_s_max_qual__pyx_n_s_quality_trim_index__pyx_kp_s_home_marcel_scm_cutadapt_cutada__pyx_n_s_cutadapt__qualtrim__pyx_mdef_8cutadapt_9_qualtrim_1quality_trim_index__pyx_n_s_test__pyx_k_base__pyx_k_cutadapt__qualtrim__pyx_k_cutoff_back__pyx_k_cutoff_front__pyx_k_home_marcel_scm_cutadapt_cutada__pyx_k_i__pyx_k_main__pyx_k_max_qual__pyx_k_qualities__pyx_k_quality_trim_index__pyx_k_range__pyx_k_reversed__pyx_k_s__pyx_k_start__pyx_k_stop__pyx_k_test__pyx_k_xrange__pyx_doc_8cutadapt_9_qualtrim_quality_trim_index__FRAME_END____JCR_END____dso_handle_DYNAMIC__TMC_END___GLOBAL_OFFSET_TABLE_PyUnicodeUCS4_DecodeUTF8PyString_FromStringAndSizePyDict_Size_ITM_deregisterTMCloneTablePyTuple_TypePyFrame_NewPyCFunction_NewExPy_InitModule4_64PyByteArray_TypePyImport_AddModulePyObject_SetAttrStringPyErr_WarnEx_edata__pyx_module_is_main_cutadapt___qualtrimPyCode_New_fini__stack_chk_fail@@GLIBC_2.4PyNumber_LongPyErr_SetStringPyObject_GetItemPyInt_FromSsize_tPyExc_ValueErrorPyExc_TypeErrorPyString_InternFromStringPyMem_ReallocPyErr_ExceptionMatches_PyThreadState_CurrentPyOS_snprintfPyTraceBack_HerePyDict_GetItemPyErr_ClearPyString_FromStringinit_qualtrimPyString_Type__gmon_start__PyTuple_NewPyExc_OverflowErrorPyErr_OccurredPyLong_AsLongPyString_AsStringPyObject_Size_Py_NoneStruct_endPyNumber_Int__bss_startPyDict_New_PyString_EqPyString_FromFormatPyDict_NextPyInt_FromLong_Jv_RegisterClassesPyExc_ImportErrorPyDict_SetItemPyUnicode_TypePyType_IsSubtypePyErr_FormatPyExc_NameErrorPyModule_GetDict_ITM_registerTMCloneTablePyObject_GetAttrPyBaseString_TypePyMem_Malloc__cxa_finalize@@GLIBC_2.2.5_initPyUnicodeUCS4_ComparePyTuple_PackPy_GetVersionPyList_Type$.oX8 HH@Ho^ ^ Uo 0d  nB8 x@@s``~@@%X@X@ h@h@HDDLEEM MM MM MM MhO hOP PQ Q X X( 0X--X0]XO ` jm '0״)2a=3PBDKE"f U cutadapt-1.9.1/cutadapt/xopen.py0000664000175000017500000001124612576751564017417 0ustar marcelmarcel00000000000000""" Open compressed files transparently. """ from __future__ import print_function, division, absolute_import __author__ = 'Marcel Martin' import gzip import sys import io import os from subprocess import Popen, PIPE from .compat import PY3, basestring try: import bz2 except ImportError: bz2 = None try: import lzma except ImportError: lzma = None if sys.version_info < (2, 7): buffered_reader = lambda x: x buffered_writer = lambda x: x else: buffered_reader = io.BufferedReader buffered_writer = io.BufferedWriter class GzipWriter: def __init__(self, path, mode='w'): self.outfile = open(path, mode) self.devnull = open(os.devnull, 'w') try: # Setting close_fds to True is necessary due to # http://bugs.python.org/issue12786 self.process = Popen(['gzip'], stdin=PIPE, stdout=self.outfile, stderr=self.devnull, close_fds=True) except IOError as e: self.outfile.close() self.devnull.close() raise def write(self, arg): self.process.stdin.write(arg) def close(self): self.process.stdin.close() retcode = self.process.wait() self.outfile.close() self.devnull.close() if retcode != 0: raise IOError("Output gzip process terminated with exit code {0}".format(retcode)) def __enter__(self): return self def __exit__(self, *exc_info): self.close() class GzipReader: def __init__(self, path): self.process = Popen(['gzip', '-cd', path], stdout=PIPE) def close(self): retcode = self.process.poll() if retcode is None: # still running self.process.terminate() self._raise_if_error() def __iter__(self): for line in self.process.stdout: yield line self.process.wait() self._raise_if_error() def _raise_if_error(self): """ Raise EOFError if process is not running anymore and the exit code is nonzero. """ retcode = self.process.poll() if retcode is not None and retcode != 0: raise EOFError("gzip process returned non-zero exit code {0}. Is the input file truncated or corrupt?".format(retcode)) def read(self, *args): data = self.process.stdout.read(*args) if len(args) == 0 or args[0] <= 0: # wait for process to terminate until we check the exit code self.process.wait() self._raise_if_error() def __enter__(self): return self def __exit__(self, *exc_info): self.close() def xopen(filename, mode='r'): """ Replacement for the "open" function that can also open files that have been compressed with gzip or bzip2. If the filename is '-', standard output (mode 'w') or input (mode 'r') is returned. If the filename ends with .gz, the file is opened with a pipe to the gzip program. If that does not work, then gzip.open() is used (the gzip module is slower than the pipe to the gzip program). If the filename ends with .bz2, it's opened as a bz2.BZ2File. Otherwise, the regular open() is used. mode can be: 'rt', 'rb', 'a', 'wt', or 'wb' Instead of 'rt' and 'wt', 'r' and 'w' can be used as abbreviations. In Python 2, the 't' and 'b' characters are ignored. Append mode ('a') is unavailable with BZ2 compression and will raise an error. """ if mode == 'r': mode = 'rt' elif mode == 'w': mode = 'wt' if mode not in ('rt', 'rb', 'wt', 'wb', 'a'): raise ValueError("mode '{0}' not supported".format(mode)) if not PY3: mode = mode[0] if not isinstance(filename, basestring): raise ValueError("the filename must be a string") # standard input and standard output handling if filename == '-': if not PY3: return sys.stdin if 'r' in mode else sys.stdout return dict( rt=sys.stdin, wt=sys.stdout, rb=sys.stdin.buffer, wb=sys.stdout.buffer)[mode] if filename.endswith('.bz2'): if bz2 is None: raise ImportError("Cannot open bz2 files: The bz2 module is not available") if PY3: if 't' in mode: return io.TextIOWrapper(bz2.BZ2File(filename, mode[0])) else: return bz2.BZ2File(filename, mode) else: return bz2.BZ2File(filename, mode) elif filename.endswith('.xz'): if lzma is None: raise ImportError("Cannot open xz files: The lzma module is not available (use Python 3.3 or newer)") return lzma.open(filename, mode) elif filename.endswith('.gz'): if PY3: if 't' in mode: return io.TextIOWrapper(gzip.open(filename, mode[0])) else: if 'r' in mode: return io.BufferedReader(gzip.open(filename, mode)) else: return io.BufferedWriter(gzip.open(filename, mode)) else: # rb/rt are equivalent in Py2 if 'r' in mode: try: return GzipReader(filename) except IOError: # gzip not installed return buffered_reader(gzip.open(filename, mode)) else: try: return GzipWriter(filename, mode) except IOError: return buffered_writer(gzip.open(filename, mode)) else: return open(filename, mode) cutadapt-1.9.1/cutadapt/adapters.py0000664000175000017500000003343412627537126020065 0ustar marcelmarcel00000000000000# coding: utf-8 """ Adapters """ from __future__ import print_function, division, absolute_import import sys import re from collections import defaultdict from cutadapt import align, colorspace from cutadapt.seqio import ColorspaceSequence, FastaReader # Constants for the find_best_alignment function. # The function is called with SEQ1 as the adapter, SEQ2 as the read. BACK = align.START_WITHIN_SEQ2 | align.STOP_WITHIN_SEQ2 | align.STOP_WITHIN_SEQ1 FRONT = align.START_WITHIN_SEQ2 | align.STOP_WITHIN_SEQ2 | align.START_WITHIN_SEQ1 PREFIX = align.STOP_WITHIN_SEQ2 SUFFIX = align.START_WITHIN_SEQ2 ANYWHERE = align.SEMIGLOBAL def parse_adapter_name(seq): """ Parse an adapter given as 'name=adapt' into 'name' and 'adapt'. """ fields = seq.split('=', 1) if len(fields) > 1: name, seq = fields name = name.strip() else: name = None seq = seq.strip() return name, seq def parse_adapter(sequence, where): """ Recognize anchored adapter sequences and return a corrected tuple (sequence, where). """ if where == FRONT and sequence.startswith('^'): return (sequence[1:], PREFIX) if where == BACK and sequence.endswith('$'): return (sequence[:-1], SUFFIX) if where == BACK and sequence.endswith('...'): return (sequence[:-3], PREFIX) return (sequence, where) def parse_braces(sequence): """ Replace all occurrences of ``x{n}`` (where x is any character) with n occurrences of x. Raise ValueError if the expression cannot be parsed. >>> parse_braces('TGA{5}CT') TGAAAAACT """ # Simple DFA with four states, encoded in prev result = '' prev = None for s in re.split('(\{|\})', sequence): if s == '': continue if prev is None: if s == '{': raise ValueError('"{" must be used after a character') if s == '}': raise ValueError('"}" cannot be used here') prev = s result += s elif prev == '{': prev = int(s) if not 0 <= prev <= 10000: raise ValueError('Value {} invalid'.format(prev)) elif isinstance(prev, int): if s != '}': raise ValueError('"}" expected') result = result[:-1] + result[-1] * prev prev = None else: if s != '{': raise ValueError('Expected "{"') prev = '{' # Check if we are in a non-terminating state if isinstance(prev, int) or prev == '{': raise ValueError("Unterminated expression") return result def gather_adapters(back, anywhere, front): """ Yield (name, seq, where) tuples from which Adapter instances can be built. This generator deals with the notation for anchored 5'/3' adapters and also understands the ``file:`` syntax for reading adapters from an external FASTA file. """ for adapter_list, where in ((back, BACK), (anywhere, ANYWHERE), (front, FRONT)): for seq in adapter_list: if seq.startswith('file:'): # read adapter sequences from a file path = seq[5:] with FastaReader(path) as fasta: for record in fasta: name = record.name.split(None, 1)[0] seq, w = parse_adapter(record.sequence, where) yield (name, seq, w) else: name, seq = parse_adapter_name(seq) seq, w = parse_adapter(seq, where) yield (name, seq, w) class Match(object): """ TODO creating instances of this class is relatively slow and responsible for quite some runtime. """ __slots__ = ['astart', 'astop', 'rstart', 'rstop', 'matches', 'errors', 'front', 'adapter', 'read', 'length'] def __init__(self, astart, astop, rstart, rstop, matches, errors, front, adapter, read): self.astart = astart self.astop = astop self.rstart = rstart self.rstop = rstop self.matches = matches self.errors = errors self.front = self._guess_is_front() if front is None else front self.adapter = adapter self.read = read # Number of aligned characters in the adapter. If there are # indels, this may be different from the number of characters # in the read. self.length = self.astop - self.astart def __str__(self): return 'Match(astart={0}, astop={1}, rstart={2}, rstop={3}, matches={4}, errors={5})'.format( self.astart, self.astop, self.rstart, self.rstop, self.matches, self.errors) def _guess_is_front(self): """ Return whether this is guessed to be a front adapter. The match is assumed to be a front adapter when the first base of the read is involved in the alignment to the adapter. """ return self.rstart == 0 def wildcards(self, wildcard_char='N'): """ Return a string that contains, for each wildcard character, the character that it matches. For example, if the adapter ATNGNA matches ATCGTA, then the string 'CT' is returned. If there are indels, this is not reliable as the full alignment is not available. """ wildcards = [ self.read.sequence[self.rstart + i:self.rstart + i + 1] for i in range(self.length) if self.adapter.sequence[self.astart + i] == wildcard_char and self.rstart + i < len(self.read.sequence) ] return ''.join(wildcards) def rest(self): """ Return the part of the read before this match if this is a 'front' (5') adapter, return the part after the match if this is not a 'front' adapter (3'). This can be an empty string. """ if self.front: return self.read.sequence[:self.rstart] else: return self.read.sequence[self.rstop:] def generate_adapter_name(_start=[1]): name = str(_start[0]) _start[0] += 1 return name class Adapter(object): """ An adapter knows how to match itself to a read. In particular, it knows where it should be within the read and how to interpret wildcard characters. where -- One of the BACK, FRONT, PREFIX, SUFFIX or ANYWHERE constants. This influences where the adapter is allowed to appear within in the read and also which part of the read is removed. sequence -- The adapter sequence as string. Will be converted to uppercase. Also, Us will be converted to Ts. max_error_rate -- Maximum allowed error rate. The error rate is the number of errors in the alignment divided by the length of the part of the alignment that matches the adapter. minimum_overlap -- Minimum length of the part of the alignment that matches the adapter. read_wildcards -- Whether IUPAC wildcards in the read are allowed. adapter_wildcards -- Whether IUPAC wildcards in the adapter are allowed. name -- optional name of the adapter. If not provided, the name is set to a unique number. """ def __init__(self, sequence, where, max_error_rate, min_overlap=3, read_wildcards=False, adapter_wildcards=True, name=None, indels=True): self.debug = False self.name = generate_adapter_name() if name is None else name self.sequence = parse_braces(sequence.upper().replace('U', 'T')) self.where = where self.max_error_rate = max_error_rate self.min_overlap = min(min_overlap, len(self.sequence)) self.indels = indels self.adapter_wildcards = adapter_wildcards and not set(self.sequence) <= set('ACGT') self.read_wildcards = read_wildcards # redirect trimmed() to appropriate function depending on adapter type trimmers = { FRONT: self._trimmed_front, PREFIX: self._trimmed_front, BACK: self._trimmed_back, SUFFIX: self._trimmed_back, ANYWHERE: self._trimmed_anywhere } self.trimmed = trimmers[where] if where == ANYWHERE: self._front_flag = None # means: guess else: self._front_flag = where not in (BACK, SUFFIX) # statistics about length of removed sequences self.lengths_front = defaultdict(int) self.lengths_back = defaultdict(int) self.errors_front = defaultdict(lambda: defaultdict(int)) self.errors_back = defaultdict(lambda: defaultdict(int)) self.adjacent_bases = { 'A': 0, 'C': 0, 'G': 0, 'T': 0, '': 0 } self.aligner = align.Aligner(self.sequence, self.max_error_rate, flags=self.where, wildcard_ref=self.adapter_wildcards, wildcard_query=self.read_wildcards) self.aligner.min_overlap = self.min_overlap if not self.indels: # TODO # When indels are disallowed, an entirely different algorithm # should be used. self.aligner.indel_cost = 100000 def __repr__(self): return ''.format(**vars(self)) def enable_debug(self): """ Print out the dynamic programming matrix after matching a read to an adapter. """ self.debug = True self.aligner.enable_debug() def match_to(self, read): """ Attempt to match this adapter to the given read. Return an Match instance if a match was found; return None if no match was found given the matching criteria (minimum overlap length, maximum error rate). """ read_seq = read.sequence.upper() pos = -1 # try to find an exact match first unless wildcards are allowed if not self.adapter_wildcards: if self.where == PREFIX: pos = 0 if read_seq.startswith(self.sequence) else -1 elif self.where == SUFFIX: pos = (len(read_seq) - len(self.sequence)) if read_seq.endswith(self.sequence) else -1 else: pos = read_seq.find(self.sequence) if pos >= 0: match = Match( 0, len(self.sequence), pos, pos + len(self.sequence), len(self.sequence), 0, self._front_flag, self, read) else: # try approximate matching if not self.indels and self.where in (PREFIX, SUFFIX): if self.where == PREFIX: alignment = align.compare_prefixes(self.sequence, read_seq, wildcard_ref=self.adapter_wildcards, wildcard_query=self.read_wildcards) else: alignment = align.compare_suffixes(self.sequence, read_seq, wildcard_ref=self.adapter_wildcards, wildcard_query=self.read_wildcards) astart, astop, rstart, rstop, matches, errors = alignment if astop - astart >= self.min_overlap and errors / (astop - astart) <= self.max_error_rate: match = Match(*(alignment + (self._front_flag, self, read))) else: match = None else: alignment = self.aligner.locate(read_seq) if self.debug: print(self.aligner.dpmatrix) # pragma: no cover if alignment is None: match = None else: astart, astop, rstart, rstop, matches, errors = alignment match = Match(astart, astop, rstart, rstop, matches, errors, self._front_flag, self, read) if match is None: return None assert match.length > 0 and match.errors / match.length <= self.max_error_rate, match assert match.length >= self.min_overlap return match def _trimmed_anywhere(self, match): """Return a trimmed read""" if match.front: return self._trimmed_front(match) else: return self._trimmed_back(match) def _trimmed_front(self, match): """Return a trimmed read""" # TODO move away self.lengths_front[match.rstop] += 1 self.errors_front[match.rstop][match.errors] += 1 return match.read[match.rstop:] def _trimmed_back(self, match): """Return a trimmed read without the 3' (back) adapter""" # TODO move away self.lengths_back[len(match.read) - match.rstart] += 1 self.errors_back[len(match.read) - match.rstart][match.errors] += 1 adjacent_base = match.read.sequence[match.rstart-1:match.rstart] if adjacent_base not in 'ACGT': adjacent_base = '' self.adjacent_bases[adjacent_base] += 1 return match.read[:match.rstart] def __len__(self): return len(self.sequence) class ColorspaceAdapter(Adapter): def __init__(self, *args, **kwargs): super(ColorspaceAdapter, self).__init__(*args, **kwargs) has_nucleotide_seq = False if set(self.sequence) <= set('ACGT'): # adapter was given in basespace self.nucleotide_sequence = self.sequence has_nucleotide_seq = True self.sequence = colorspace.encode(self.sequence)[1:] if self.where in (PREFIX, FRONT) and not has_nucleotide_seq: raise ValueError("A 5' colorspace adapter needs to be given in nucleotide space") self.aligner.reference = self.sequence def match_to(self, read): """Return Match instance""" if self.where != PREFIX: return super(ColorspaceAdapter, self).match_to(read) # create artificial adapter that includes a first color that encodes the # transition from primer base into adapter asequence = colorspace.ENCODE[read.primer + self.nucleotide_sequence[0:1]] + self.sequence pos = 0 if read.sequence.startswith(asequence) else -1 if pos >= 0: match = Match( 0, len(asequence), pos, pos + len(asequence), len(asequence), 0, self._front_flag, self, read) else: # try approximate matching self.aligner.reference = asequence alignment = self.aligner.locate(read.sequence) if self.debug: print(self.aligner.dpmatrix) # pragma: no cover if alignment is not None: match = Match(*(alignment + (self._front_flag, self, read))) else: match = None if match is None: return None assert match.length > 0 and match.errors / match.length <= self.max_error_rate assert match.length >= self.min_overlap return match def _trimmed_front(self, match): """Return a trimmed read""" read = match.read self.lengths_front[match.rstop] += 1 self.errors_front[match.rstop][match.errors] += 1 # to remove a front adapter, we need to re-encode the first color following the adapter match color_after_adapter = read.sequence[match.rstop:match.rstop + 1] if not color_after_adapter: # the read is empty return read[match.rstop:] base_after_adapter = colorspace.DECODE[self.nucleotide_sequence[-1:] + color_after_adapter] new_first_color = colorspace.ENCODE[read.primer + base_after_adapter] new_read = read[:] new_read.sequence = new_first_color + read.sequence[(match.rstop + 1):] new_read.qualities = read.qualities[match.rstop:] if read.qualities else None return new_read def _trimmed_back(self, match): """Return a trimmed read""" # trim one more color if long enough adjusted_rstart = max(match.rstart - 1, 0) self.lengths_back[len(match.read) - adjusted_rstart] += 1 self.errors_back[len(match.read) - adjusted_rstart][match.errors] += 1 return match.read[:adjusted_rstart] def __repr__(self): return ''.format(self.sequence, self.where) cutadapt-1.9.1/cutadapt/_qualtrim.pyx0000664000175000017500000000225512575761274020451 0ustar marcelmarcel00000000000000# kate: syntax Python; """ Quality trimming. """ def quality_trim_index(str qualities, int cutoff_front, int cutoff_back, int base=33): """ Find the positions at which to trim low-quality ends from a nucleotide sequence. Return tuple (start, stop) that indicates the good-quality segment. Qualities are assumed to be ASCII-encoded as chr(qual + base). The algorithm is the same as the one used by BWA within the function 'bwa_trim_read': - Subtract the cutoff value from all qualities. - Compute partial sums from all indices to the end of the sequence. - Trim sequence at the index at which the sum is minimal. """ cdef int s cdef int max_qual cdef int stop = len(qualities) cdef int start = 0 cdef int i # find trim position for 5' end s = 0 max_qual = 0 for i in range(len(qualities)): s += cutoff_front - (ord(qualities[i]) - base) if s < 0: break if s > max_qual: max_qual = s start = i + 1 # same for 3' end max_qual = 0 s = 0 for i in reversed(xrange(len(qualities))): s += cutoff_back - (ord(qualities[i]) - base) if s < 0: break if s > max_qual: max_qual = s stop = i if start >= stop: start, stop = 0, 0 return (start, stop) cutadapt-1.9.1/cutadapt/modifiers.py0000664000175000017500000001702212627537126020236 0ustar marcelmarcel00000000000000# coding: utf-8 """ This module implements all the read modifications that cutadapt supports. A modifier must be callable. It is implemented as a function if no parameters need to be stored, and as a class with a __call__ method if there are parameters (or statistics). """ from __future__ import print_function, division, absolute_import import re from cutadapt.qualtrim import quality_trim_index from cutadapt.compat import maketrans class AdapterCutter(object): """ Repeatedly find one of multiple adapters in reads. The number of times the search is repeated is specified by the times parameter. """ def __init__(self, adapters, times=1, wildcard_file=None, info_file=None, rest_writer=None, action='trim'): """ adapters -- list of Adapter objects action -- What to do with a found adapter: None, 'trim', or 'mask' """ self.adapters = adapters self.times = times self.wildcard_file = wildcard_file self.info_file = info_file self.rest_writer = rest_writer self.action = action self.with_adapters = 0 def _best_match(self, read): """ Find the best matching adapter in the given read. Return either an Match instance or None if there are no matches. """ best = None for adapter in self.adapters: match = adapter.match_to(read) if match is None: continue # the no. of matches determines which adapter fits best if best is None or match.matches > best.matches: best = match return best def _write_info(self, read, matches): """ Write to the info, wildcard and rest files. # TODO # This design with a read having a .match attribute and # a match having a .read attribute is really confusing. """ match = read.match if self.rest_writer and match: self.rest_writer.write(match) if self.wildcard_file and match: print(match.wildcards(), read.name, file=self.wildcard_file) if self.info_file: if match: for m in matches: seq = m.read.sequence qualities = m.read.qualities if qualities is None: qualities = '' print( m.read.name, m.errors, m.rstart, m.rstop, seq[0:m.rstart], seq[m.rstart:m.rstop], seq[m.rstop:], m.adapter.name, qualities[0:m.rstart], qualities[m.rstart:m.rstop], qualities[m.rstop:], sep='\t', file=self.info_file ) else: seq = read.sequence qualities = read.qualities if read.qualities is not None else '' print(read.name, -1, seq, qualities, sep='\t', file=self.info_file) def __call__(self, read): """ Determine the adapter that best matches the given read. Since the best adapter is searched repeatedly, a list of Match instances is returned, which need to be applied consecutively to the read. The list is empty if there are no adapter matches. The read is converted to uppercase before it is compared to the adapter sequences. Cut found adapters from a single read. Return modified read. """ matches = [] # try at most self.times times to remove an adapter trimmed_read = read for t in range(self.times): match = self._best_match(trimmed_read) if match is None: # nothing found break assert match.length > 0 assert match.errors / match.length <= match.adapter.max_error_rate assert match.length - match.errors > 0 matches.append(match) trimmed_read = match.adapter.trimmed(match) trimmed_read.match = matches[-1] if matches else None self._write_info(trimmed_read, matches) if not matches: return trimmed_read if __debug__: assert len(trimmed_read) < len(read), "Trimmed read isn't shorter than original" if self.action == 'trim': # read is already trimmed, nothing to do pass elif self.action == 'mask': # add N from last modification masked_sequence = trimmed_read.sequence for match in sorted(matches, reverse=True, key=lambda m: m.astart): ns = 'N' * (len(match.read.sequence) - len(match.adapter.trimmed(match).sequence)) # add N depending on match position if match.front: masked_sequence = ns + masked_sequence else: masked_sequence += ns # set masked sequence as sequence with original quality trimmed_read.sequence = masked_sequence trimmed_read.qualities = matches[0].read.qualities assert len(trimmed_read.sequence) == len(read) elif self.action is None: trimmed_read = read trimmed_read.match = matches[-1] self.with_adapters += 1 return trimmed_read class UnconditionalCutter(object): """ A modifier that unconditionally removes the first n or the last n bases from a read. If the length is positive, the bases are removed from the beginning of the read. If the length is negative, the bases are removed from the end of the read. """ def __init__(self, length): self.length = length def __call__(self, read): if self.length > 0: return read[self.length:] elif self.length < 0: return read[:self.length] class LengthTagModifier(object): """ Replace "length=..." strings in read names. """ def __init__(self, length_tag): self.regex = re.compile(r"\b" + length_tag + r"[0-9]*\b") self.length_tag = length_tag def __call__(self, read): read = read[:] if read.name.find(self.length_tag) >= 0: read.name = self.regex.sub(self.length_tag + str(len(read.sequence)), read.name) return read class SuffixRemover(object): """ Remove a given suffix from read names. """ def __init__(self, suffix): self.suffix = suffix def __call__(self, read): read = read[:] if read.name.endswith(self.suffix): read.name = read.name[:-len(self.suffix)] return read class PrefixSuffixAdder(object): """ Add a suffix and a prefix to read names """ def __init__(self, prefix, suffix): self.prefix = prefix self.suffix = suffix def __call__(self, read): read = read[:] adapter_name = 'no_adapter' if read.match is None else read.match.adapter.name read.name = self.prefix.replace('{name}', adapter_name) + read.name + \ self.suffix.replace('{name}', adapter_name) return read class DoubleEncoder(object): """ Double-encode colorspace reads, using characters ACGTN to represent colors. """ def __init__(self): self.double_encode_trans = maketrans('0123.', 'ACGTN') def __call__(self, read): read = read[:] read.sequence = read.sequence.translate(self.double_encode_trans) return read class ZeroCapper(object): """ Change negative quality values of a read to zero """ def __init__(self, quality_base=33): qb = quality_base self.zero_cap_trans = maketrans(''.join(map(chr, range(qb))), chr(qb) * qb) def __call__(self, read): read = read[:] read.qualities = read.qualities.translate(self.zero_cap_trans) return read def PrimerTrimmer(read): """Trim primer base from colorspace reads""" read = read[1:] read.primer = '' return read class QualityTrimmer(object): def __init__(self, cutoff_front, cutoff_back, base): self.cutoff_front = cutoff_front self.cutoff_back = cutoff_back self.base = base self.trimmed_bases = 0 def __call__(self, read): start, stop = quality_trim_index(read.qualities, self.cutoff_front, self.cutoff_back, self.base) self.trimmed_bases += len(read) - (stop - start) return read[start:stop] class NEndTrimmer(object): """Trims Ns from the 3' and 5' end of reads""" def __init__(self): self.start_trim = re.compile(r'^N+') self.end_trim = re.compile(r'N+$') def __call__(self, read): sequence = read.sequence start_cut = self.start_trim.match(sequence) end_cut = self.end_trim.search(sequence) start_cut = start_cut.end() if start_cut else 0 end_cut = end_cut.start() if end_cut else len(read) return read[start_cut:end_cut] cutadapt-1.9.1/cutadapt/_seqio.so0000775000175000017500000141054012623615260017523 0ustar marcelmarcel00000000000000ELF>H@@8@# BB LL!L!('`+ LL!L!$$Ptd***QtdRtdLL!L!hhGNUZ:wpn{4Yl]"/K  @ qXNAN2ԙCE[SpL| Bt?^2 p??QJ7 =0D-|'kajj+# s J)3T1uA#M\Ap{a b~~|[WqyQ8 "IR"Zf s! B8 w!8 w!8 P s!s! p w!__gmon_start___init_fini_ITM_deregisterTMCloneTable_ITM_registerTMCloneTable__cxa_finalize_Jv_RegisterClasses_Py_NoneStruct_PyThreadState_CurrentPyBaseObject_TypePyDict_NewPyObject_GetAttr_Py_CheckRecursionLimitPyObject_Call_Py_CheckRecursiveCallPyErr_OccurredPyExc_SystemErrorPyErr_SetStringPyImport_AddModulePyObject_GetAttrStringPyExc_TypeErrorPyErr_FormatPyExc_AttributeErrorPyErr_ExceptionMatchesPyErr_ClearPyType_ReadyPyObject_SetAttrStringPyInt_FromSsize_tPyObject_GC_UnTrackPyCFunction_CallPyString_InternFromStringPyString_FromStringPyMem_FreePyString_AsStringPyString_FromFormatPyObject_ClearWeakRefsPyObject_GC_DelPyFrame_NewPyTraceBack_HerePyCode_NewPyMem_ReallocPyMem_MallocPyTuple_NewPyClass_TypePyType_IsSubtypePyObject_GC_TrackPyMethod_NewPyString_TypePyObject_SizePyDict_SetItemStringPyRun_StringFlagsPyErr_WriteUnraisablePyExc_RuntimeWarningPyErr_WarnExPyTuple_PackPyObject_SetItem_PyObject_GC_NewPyObject_GetItemPyExc_KeyErrormemcmpPyBuffer_ReleasePyObject_GetBufferPyUnicodeUCS4_Tailmatch__stack_chk_failPyDict_Next_PyString_EqPyUnicodeUCS4_ComparePyInt_TypePyInt_FromLongPyFloat_TypePyNumber_SubtractPyLong_TypePyFPE_counterPyFPE_jbuf_setjmpPyFPE_dummyPyFloat_FromDoublePyExc_FloatingPointErrorPyObject_RichCompare_Py_TrueStruct_Py_ZeroStructPyObject_IsTruePyNumber_AddPyDict_SizePyDict_GetItemPySlice_NewPyExc_OverflowErrorPyNumber_IndexPyInt_AsSsize_tPyLong_AsSsize_tPyList_TypePyTuple_TypePyExc_NameErrorPyExc_StopIterationPyErr_SetNonePyMethod_TypePyCFunction_TypePyTuple_GetSlicePyExc_RuntimeErrorPyExc_GeneratorExitPyExc_ValueErrorPyErr_GivenExceptionMatches_PyObject_CallFunction_SizeTPyObject_SetAttrPyTraceBack_TypePyErr_NormalizeExceptionPyExc_BaseExceptionPySequence_GetItemPyArg_UnpackTuplePyObject_CallObjectPyIter_NextPyBaseString_TypePyUnicode_TypePySequence_GetSlicePyDict_SetItemPyObject_GetIter_PyObject_NextNotImplementedPyExc_UnboundLocalErrorinit_seqioPyOS_snprintfPy_GetVersionPyString_FromStringAndSizePyObject_GenericGetAttrPyObject_SelfIterPy_InitModule4_64PyModule_GetDictPyExc_ImportErrorPyUnicodeUCS4_DecodeUTF8__pyx_module_is_main_cutadapt___seqioPyWrapperDescr_TypePyList_NewPyObject_CallFunctionObjArgsPyCFunction_NewEx__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H==V HV NHHGo H"G H=R H|S HF HS MHHn  H5k H= 11A|;HH o DHH?HHn  HH=- p;HHn y H=n H5EHZ;H-Z H"HZ 3fH{Ge }9HH6HHCpsHHCpCxHGHd HHHSpHHNHH55c H0H+u HCHP0L b Ld H5` H Mc Hc H=d 8HHH5b HH40uH+u HCHP0L a L^d H57` H b Hc H="d a8HHH5b HH/H+u HCHP0L (a Lc H5_ H b HAA4AjA2AjyA(A^hA#A^W*A!A^ send 'arg' into generator, return next yielded value or raise StopIteration.throw(typ[,val[,tb]]) -> raise exception in generator, return next yielded value or raise StopIteration.close() -> raise GeneratorExit inside generator.cutadapt._seqio.__pyx_scope_struct____iter__ A record in a FASTQ file. Also used for FASTA (then the qualities attribute is None). qualities is a string and it contains the qualities encoded as ascii(qual+33). If an adapter has been matched to the sequence, the 'match' attribute is set to the corresponding Match instance. _cython_0_23_4cutadapt/_seqio.c%s (%s:%d)cutadapt/_seqio.pyxstrExpected %.16s, got %.200s_cython_coroutine_type_cython_generator_type_module__builtins__subtractat leastat mostcutadapt._seqio._shortenname '%.200s' is not defined__exit__generator already executing__init__throwsequencequalitiesname2endswith__iter__%d.%d%s__builtin____name____getitem__collectionsbackports_abccannot import name %.230sinit cutadapt._seqioname of the generator__qualname__gi_runninggi_yieldfromsendclosecython_function_or_method__reduce____module__func_doc__doc__func_name__self__func_dict__dict__func_globals__globals__func_closure__closure__func_code__code__func_defaults__defaults____kwdefaults____annotations__cutadapt._seqio.Sequencematch__enter__-$ @a@;aH0 t   !` #X#p#$$($8$H$%0%h&&8&H&X&x&&8(0H(HX(`()h)))H*0x*HH+,,.(/H/`//x2226X7X8 8P H9 : ; ; 8<@ <` X= = 8> > ?8 X?` ? @ xA XB( 8C` C (E H8IXhPQXR0STTUHU(Xpx\]@^(dgHhihpHrsh{ `؋h8(xzRx $FJ w?;*3$"D( \0 EtPth ` X P H ,@ AAG  CAI 4 AAD H AAH O AAG T8!QtPl! x!! x! p!x!p!LA J # 4" L"`D E l0#_AG UA$p#McXNC$#McXNC$#7YY A C#A\ d$,D4($BAA D0I  AABK D  AABH <|$7BDH v ABI N ABG ,%\AAJ0E AAE $%A H K E 'A M 4H(L@(7AU J Vl`( ,X(|BAD  CBG *"AZ*)Ac*BBB B(D0A8HP 8A0A(B BBBG O 8A0A(B BBBG W 8A0A(B BBBG zXA`BhBpBxBBBPP4-AAL0M AAC p CAD 4p.AAL0w AAI r CAJ 48/uAAG0p CAC ^ CAF 4</eBAD H GBH AAB<t/:BBB A(D0'(A BBB40BDA w ABG AAB1DG E  1DJ B ,1DJ B L`2Dx D o A l2pDx D o 3pDx D o< BBE A(D0v(A BBB03s\G 3F$$3MAU J \ D LL3YAz E T4l04AAG0s AAB ^ CAF 44AAG0s AAB ^ CAF 45AAG0s AAB ^ CAF 4 (6AAG0s AAB ^ CAF 4L 6AD i AA X AG z AE , AAD AAL =EBE E(D0A8B@8D0A(B BBBD BBE B(D0A8E@8A0A(B BBBDL LBBE B(D0A8E@8D0A(B BBB< 863BBD A(D (A ABBH L 87\BBE B(D0A8K} 8A0A(B BBBA $ H:*D0J B LD X;BBB A(D0D`hHpRhA`w 0A(A BBBC 4 AAAD0z AAF  FAE L BAAD p CAF x DAC W DAD T DAG \ CKBBC A(G@ (A ABBC X (A ABBB r(C ABB| DpDx D o `DpDx D o4 DAAG h DAJ x DAA  E)A\ C DD EBAA G0  AABC U  AABG |\ G`BBB B(A0A8JP 8A0A(B BBBC h 8A0A(B BBBF  8C0A(B BBBE L KBBD A(L@ (A ABBE D (C ABBD L,PLBBA A(J@V (A ABBD Y (G ABBK \|LBBB B(A0A8J` 8A0A(B BBBG ShOpdhA`T0R[BAA D0x  AABD   CABH \  AABH 448U<BAD D0  CABH \l@V MBB B(A0A8G@8A0A(B BBBD@dVBBB B(A0A8GPo 8D0A(B BBBC | 8C0A(B BBBH 44]LAAD@ AAB P AAF ,l0_AG A DC { DA l `BBB B(D0A8DpxA`xAp 8A0A(B BBBF xIfxAp< @gBBA A(G`  (A ABBH DLnBBD A(XXo`TXAP (A ABBH d8sBBB B(D0A8DP: 8A0A(B BBBK  8C0A(B BBBA TvBAA G0r  AABG "  CABH D  DABM LTxBBB B(D0A8D` 8D0A(B BBBC lȇ BBB B(D0A8G 8A0A(B BBBH {AaAIfALMBBB B(A0A8DP 8D0A(B BBBH dd(BBB B(A0A8Gp 8A0A(B BBBH 5 8C0A(B BBBG \BBI B(G0A8Q  8A0A(B BBBD BFFBBABIQBFFBBABIb]KFFFIgBFFBBABIJEFFBBABIJEFFBBABITEFFBBABIBlANM  B pL!L!oX P!X: oooo"L!C&C6CFCVCfCvCCCCCCCCCDD&D6DFDVDfDvDDDDDDDDDEE&E6EFEVEfEvEEEEEEEEEFF&F6FFFVFfFvFFFFFFFFFGG&G6GFGVGfGvGGGGGGGGGHH&H6HFHVHfHvHHHR! Yield Sequence objects file is a filename or a file-like object. If file is a filename, then .gz files are supported. slicingSet qualities to None if there are no quality valuesShorten string s to at most n characters, appending "..." if necessary.Line {0} in FASTQ file is expected to start with '+', but found {1!r}Line {0} in FASTQ file is expected to start with '@', but found {1!r}In read named {0!r}: length of quality sequence ({1}) and length of read ({2}) do not matchI/O operation on closed FastqReader/home/marcel/scm/cutadapt/cutadapt/_seqio.pyx Reader for FASTQ files. Does not support multi-line FASTQ files. Raised when an input file (FASTA or FASTQ) is malformatted. At line {0}: Sequence descriptions in the FASTQ file don't match ({1!r} != {2!r}). The second sequence description must be either empty or equal to the first description.FASTQ file ended prematurelyNotImplementedErrorFastqReader.__enter__delivers_qualitiesFastqReader.__iter__FastqReader.__init__FastqReader.__exit__FastqReader.closecutadapt._seqiosequence_class, qualities={0!r}_close_on_exitFormatErrorFastqReaderValueErrorqualities__metaclass__Exceptionsequence__qualname___shorten__prepare__rstripobject__module____import__format_filexopenthrowstripname2match__enter__close__class____test__sendselfname__main__line__iter____init__file__exit__args__doc__it++ @sni...Xu!u!8u!Pu!xu!u!`u!u!u!t!u!.)hjA@e8]! ]!\!(R`~")8)S~$E)dP)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}  #& 2   " 3  ^  ^N5 4   3 5r 6^3 7 8 : 9{E5 :ciex ;^ <{xJ ={ >c ? @3 A ', B0'&   _  %2 &G3 ' % (^1 *H ( $L8 &G '^BE (#% )^doc *  ( #L8 get 'setLdoc2  h2iD ' ee8<  " Z[D ['[G\D 'D.*(#E$D $'$7%e&^  '$61 D '    P(D 'JpG& B'.&  ,H( QU RD R'? S + T| U !J V0 D  'B!+"A# A&$(%`%(  D  '?*&^ f+^$&D 'B:/ SF(?0d=80J@6 JH&PR;%X%`%%h],'qp(^x1.^|C/^*051xb}E28L9 W]^v :8 L8BE^0Fdoc #%^(): 0)0@cAD A' JA A+Bc  C(ED_isPB*+ F7*UF #(I0 8h@0^Ht_ts8 B*; # <`&>@?^C^D^ c(F1(;8G10FH8-I@6KHLPMXT;O`Ph%Qp8)Sxc [^v]^_tA`ep+b^BcL%t-<B^`^&o gf X D  ' ^b ^%^"^` ?( <0lJ8E@xLHDPm$X^`Jhp xAwKn e~ "- (c )^@*HK0 ~ ()pJsn) ' P L!  " E F a /8  D ' L8 "$ 7 P( K,0Ix  D ' F^ H 2 ( 0 I:8 @@ yH P /^X 6` "6h ,6{p + BU 4( 3)0 G88 /@ KH P N1X 2` h p Y^x #%^| CG  tE{   ^  Xd 9^ 9^  h  D ' G   2! T;" #( %$0 c%8 &@ ,'H )(P )X *^` O3+dK<,G-    *E  ^% ^H ^ *E 932fq @q  r !*{ a@ ^@   ^K @   !*  $ ^@$  % ^W%I @@I  J !*S D ^j@   ^MC @   !* ) ^@   ^! @!  " !*+ > ^.@> *>  ? ^C[ ^X@[  \ ^f @f  g  @   -> @>  ?   @     * @   /L3 ^` @3 *3  4 ^!+P ^ @P  Q ^1^ "o"v"x8 ^ "o "v  "a #e ^#p z6^$""m$": "arg$I! ^$[! ^$m! ^$! ^$! ^$! ^$! ^$! ^$! ^$! ^$! ^% !J#i^% ^: ^"U : "arg #gen "$}"  ^$"  ^$"  ^$"  ^$"  ^%  ^|i^#"opi$"i#tmpjDK^D#"opK$"K#tmpLO-^y#"op-$"-#tmp.^#"op$"#tmp} ^#"op$"#tmpb^$"op$"#tmp;^6$"gen"=!^l$U!"!#tmp! ^$U " #tmp &8%$L8"objG  4$L8 @'^L%"objG   ^L8i^G%1 ;#i 9% J6 #tmp.%B.& &G "tbC!1E&Y#j&G JJ"tbJ  = ) _,qu&U" E$& _,q#tb&#f&%#tb&#f&% [Eq('E"'"o"i)%^G^Y^${'#n%#r$'#n%#r%#m6%#lfM"^'"xM" "N"^/^^("s1"s2a7^$C(#ps1#ps2 :% @^% @^ @':&N((?/N(NFN^(+N)e("t "a"k#o")"b" "#x"% YI") ")) a)B"objG #m$"u$)"op$"2&5 )U #gen "B^)"gen""yf E#err^% J3 &1<*G JJ"tbJ _,q&(9 *U #res       #gen "%  m<! *U! #gen" "#yf# %#ret' T!+T![:+9@  "6 ,6 66 ^  $^!V"!* % 0%#tmp&M2,G8i^  <! %# %$(=,9=@= > "6@ ,6A^ 66B^ C^ D $E^!V"!*}-9@  "6^ ,6 66^ @6^  R6 ^  $^!V"!C!*!% 0%#tmpU9 -9 @  V+    ^   $ ^!V" %#gen ".!;.!e ";. <";. l'# e-^.U"arg-"end^&x'.0"e."ae"be#re4 /9 @ J     "6 ^ ,6 ^ 66  @6    R6   ^   $ ^!V"] !*d $/ 0 %#tmp %#tmp" :R09RGRFR S "6U^ ,6V^ 66W @6X Y Z^ [ $\^!*!V"%#tmpJ ^1@ *   ^ "6   ^   $ ^!V" !* i ^<1@ *   ^|2 ^f1@   ^w^1"ow"vw"xwf ^ 2@f *f  g ^ "6i  j ^ k  $l ^!V"z !*~ I[ ^B2@[ *[  \ ^( ^l2@   ^!j^2"oj"vj"xj ^3@ *   ^ "6   ^   $ ^!V" !* ?  ^H3@ *   ^X ^r3@   ^ ]^3"o]"v]"x]I! ^4@ *   ^ "6   ^   $ ^!V" !* E ^N4@ *   ^gD ^x4@   ^FP^4"oP"vP"xPv5@  "6  ,6   ^   $^!V"(!*,)p^) !^*!"5G ! G! 2!L8!/!#gen!"A6"objl1>JAJ~AJh^1^G^#mp<#ms6*bad$=6#l% @ A > A% - :7"op1:"op2:U):eZJ:^$6#b=;.#x>e#a?e%#b;.#a. @.6^8Cc-8C J@2#key #pos L88 8!*bad! !>$7 H8$7#cmp^% H8%#cmp^J*^8U*"arg*-+"end++^ 6, !- . 9/ E0^ !1e X^9UXX-Y"endYY^%#i[ 9[% @]^3<h9< < B*= =>% T;RGI!^9"t!9."8:18L88;88)9"mkw9m*:^1:^ @; -); <-:G  "ml #%^/2S1#op$"4;:B)b^#m$",e;1;L8/"mkwl/"doc#ns*bad4% K% D$G;L8bJH^ A  , 7 gJ *bad% f, +!O<+!M9+! @-!^ .! M.!!HE!+3^@N<,o3,v3 9,a3#e4^-p5.QNT/TQ0<^`NE=,o<0-tmp=i-p>+<LN =1oLU1xLT2XNM3i4N5u2PNj 6aU4N5m7yN+#YN >1oYU1xYT2NZ34N5B2N 6U4N5B7N+7fN X?1ofU1xfT2Ng3f4N52NB 6U4N5+77N+&sN @1osU1xsT2Nt34N52jN 6{U4N57N+!,N @1oU1xT2 N3 4N5 2N 6U4N57N0^O'A,o;-tmp-p  /&TnAG nn"tbn p =p )p _,qq8'AOA34A3@A3LAR5WA5cA5oA35{A9JP/Uv0+$^`PQEB,op$":-tmpp+|P uB1op$"U+#PB1m$"U;2T;D=[  >0UD=[ J >`oD=[  >D=[  >D=[  >D=[ " > D=[ X 4^R=[  +  R +E;U "U+_> S \E;U "U+3-S`E,t  ,a ,ku -p -o ?%SE/UU/T09nS/Q00-^pS_MF,op$"0 @@^-res| 9~S/Us+m[SMF,op[$" =@\:ASE/Us+= TMF,op=$"=@> AKTE/Us+EypT7HG,opy$"X=@zBT +~TAG,op$"BT ;G"obj;;#tp< CGU,3H3G:3G5GeDUH/UU/TTD'U%H/TT#$E,U![ 'HB'"arg'"kw' @( )C3H0U1I3DH3PH63\H5gHt5sH?pUH/UsEU !FU!I/U BU$!AU/!/T 0iKY V7qJ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^,? ^c ^0 ^ ^Z ^G ^ ^ Aq^b !6^^"^%"^aF/K^ s!av  w!auId w!b$$#mcEE ca a $0bEE!5bLL ObII Nb`4`4%c b bAA \b++ PcHH c?"?" b\)\)(c&6b #bBBTbY*Y*?b**'6b- - Eb--BcPDPD c??&7bh7h7Gb00'5bZ3Z3'4b=b??b''(cl-l- c&5bss1c%%$b&&#b(:b b) b,,.c$c&3c&&$bII*Ec$jc%%$c%'%'dp p b5:5:Jcb77#rb3J3J&bQQ?bC>C>"b993c B B$b L L#nb + +#ycll b99cII$Ub5555*b+ cDD c$b?? Lb8#8#,b [c$`c!! bJJ ]c$>cQ8Q8$:b,c""$c))$Eb00#ocFF$xc-8-8 Abee(mb55>cmmbtt%c$fb,,-b66 bPP,ub/b%% 1% U: ; I$ > $ >   I : ;  : ; I8 : ;I8 I !I/ : ; &I : ; 7I : ; : ;I8'II : ; I8 ' : ; : ;I : ; : ;  : ; I8 : ;  : ;I8  : ;.: ;'I : ;I 4: ;I! : ;": ;I#4: ;I$ % &.: ;' '.?: ; 'I 4(: ; I).: ;'I * : ;+.: ;'I@B,: ;I-4: ;I.BB/B0.: ;'I@B1: ;I21X Y314 541617 18.1@9:: ;I;: ;I<4: ;I=4: ;I> U?@4: ;I A1B1C.1@BDBEB1F1G : ;H.: ;'@BIBJ KB1L.: ;'@BM.: ;'@N1RUX YO UP 1Q1RUX YR.1@BS1X YT41U1 VBWBX1Y41Z41 [1B\4: ;I].?: ;'@B^4: ; I?<_4: ;I?<`!a4: ;I?b.?<n: ; c.?<n: ;d.?<nb20 cutadapt/usr/include/x86_64-linux-gnu/bits/usr/lib/gcc/x86_64-linux-gnu/5/include/usr/include/usr/include/python2.7/usr/include/x86_64-linux-gnu/sys_seqio.cstring3.hstddef.htypes.hstdio.hlibio.hsigset.hstdint.hpyport.htime.hobject.hmethodobject.hstructmember.hdescrobject.hintobject.hlongobject.hlongintrepr.hfloatobject.hstringobject.htupleobject.hlistobject.hclassobject.htraceback.hframeobject.hpystate.hcode.hsetjmp.hsetjmp.hunicodeobject.hboolobject.hbytearrayobject.hpyerrors.hceval.hpyfpe.hdictobject.habstract.himport.hobjimpl.hpymem.hpythonrun.hwarnings.hstring.hsliceobject.hmodsupport.hmoduleobject.h @N$G?YK;K.yO  nK JoK JoK JpK JqKJsK;=.KXKXKXfviKKKKKKXgXuXjbs;K1L;K.wQz+tKJKZL9uL"XKM[L9uLX=-/7Y; Xq . >!!!!vKJKbJMZx8KKKKvtW[K Ju-0tu`LwNyLa6VXu`LwNyLa60Xu]LwMYYvL)3~KKxt;K1KKN<Kh)Z"g^u(&iq#YK;=gέg*zzefu-t/YvjoZ:L> >Y!!!!!!!g@T~t CY!!uu|!I= XKKy:L3.u!!!!!!!!!KKttf;=sk  A[MJ =Yu=M+[.KKXziwƒq"KKu=K] XvX JMUvsKLJxr<XzE3ef{XcXJ JtXLLXJ8jJXFt;JE.$qXMJqwG[gJqtt?G?YM+\i9=I=XYYYY!!KKI/ vHhX//Y-HvuLKuuX/yt](NKuuX/dyt](NKuuX/dyt(L]KKKX/tZ XwXPOXKKKX/ sWXOXKKKX/ spX#Z%򭈌t:>NKZv JzJ|!I=XKKqZ:L .zX X >Yuu fb=cpXZMN.qwG[gJqJ.p$tW#pXZMN.pwG[gJpJ.p$tW#oXZMN.owG[gJoJ.o$tW#nXZMN.nwG[gJnJ.n$tW#|Kjfj<$['$"G Is;Js< J MYa(yKZftx  uJt$!6yzJx" U(YA#zuzJ8@w<52uJ%#]K/xJ `LH0KKYXv t;-DJ%;-D;.D<6֭Sf$ hJ[Kue=l;=Y%f[;tFtv7~0s$tK9?1SA[J$[&$YKבI= fh<;=gW=YֽC z.4Uuu&&aKrLhuXw Ige^t. <wJ ;= f;f`JJ`tXKKYK brKKuu/ MM&)tv ~rKKuuK;=kaf$X u <u<= tKJ|w'Xw0tk s <s< txtt/a'wX~J~JfI=XL~aKKK--Kh;K~fxF=MKHIMKJ~(sl.uI=Yu3OYXxmɫ6Klt)<i<i<t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a 'aa0ab 'Qaa0aa aa0ab bbUbbSbbUbbSbbUbcSb"bT"bcTbb0bc0bbUbbSbbUbbSbcSbb0bbPbb0bc0b#b0#b/bVbb0bbVbyb0ybbPbc0bb0bbUbb0bcUbb0bb 'bb0bc 'bb0bb < bb0bc < c0cU0cLcSLcNcUNcqcSqcscUsccSc;cT;cAcXAcNcTNcfcTfcscTsccTccTc&cQ&cNcQNc[cQ[ccQc;cT;cAcXAcEcTc0cU0cEcSc0cU0cLcSLcNcUc;cT;cAcXAcEcTEcNc0Nc[cQ[ccQNcqcSqcscUsccSNcjcSsccSNcqcSqcscUsccSjcsc0ccUccSccUccSccUccTccVccPccTccVccTccQcc\ccTccQcc\ccQccPccPccPccUccSccUccSccUcc\ccTccQccVccPccTccSccUddUd2eS2e:eUddTd3eV3e:eTddQd5e\5e:eQd'dP5d=dPKdSdPSd1e\Sd1eVSd1eSadidPwddPddPddPddPddPddPddPe e0 e/e]!e%eP@eKeUKee\eeUee\eeU@eYeTYeeSeePeeTeeSeeT@eZeQZeeVeeTeeQeeVeeQ@eKeUKee\eeUee\eeU[e_ePnerePeePeeVeeTeeQeeSeePeeTee\eeUeePeePefUffUf'fU'f,fU,fIfUIfUfUeeT,f2fT2f4fT4fFfTFfUfTefPf)fP4fIfUIfNfU4fFfTFfNfT`ffUffUffUffUffUffU`ffTffTffTffTffTffPffPffUffUffTffTf8gU8g?gU?gGgUGgLgULgigUigugUfgTLgSgTSgUgTUgfgTfgugTg8gP?gIgPUgigUigngUUgfgTfgngTggUggUggUggUggUggUghUh hUggTggTggTggTggTggTggTg hTggPggPghUhhUggTghThFhUFhMhUMhWhUWh\hU\hqhUqhhUhFhTFhMhTMhYhTYh\hT\hnhTnhhT*hFhPMhYhPhhUhhUhhUhhUhhUhhUhhThhThhThhThhThhThhPhhPHHUH IS I IV IISHHTH)I])I,ITH'I\H+I^HIVHH|3$}"HISHI]h!iU!iNiQNiTiUTibiUbiciUhNiTNiTiTTiaiTaiciThiQiTiQTibi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P0VPQ0QoV0I 0y 0PS 0 PS0PS)0)@P@YSY0PS0 P #S#>0>YPYrSr0^000S$0$2P2C0CQSQ0PSP&S&7P7HSHYPYjSj{P{SP`0`oS 0I 0y  0  1 04^0]0040]e0e404o0 0I 0y  0   ' 0^ '^0 '00 '0 'e0e '0 'o0 0I 0y  0  ^ 0 ^0^00 0^e0e 0 o0 `c!1 S  SS1]PPP^PP PJVP~P0POVP11Qe11__Qe__^^Qe^^0o00P\\Qe00B0BLPL\Qe\\S0SbPbVVQe0V0__$_Q_*;P;SSQeSSioPo]]PS^S\^\P^ePe_<88<11P<SSPS{S*18*10*1PQQRRQQRRQQRRQRRRR'RRR0R>RRRGRURRRWWXYdYWWHYXYWW8YHYXX(Y8YX0XY(Y9XKXYYTXfXXYoX}XXXXXXXYY@ZLZYY0Z@ZYY Z0ZYYZ ZZZp\\ZZ ],]Z[] ][#[]],[>[\]G[Y[\\b[t[\\}[[\\[[\\[[\\[[\\[ \\\]]] ^^Z_@````ae_l_r_ `0`@````aOal````bbbbbbbbbcPcjcxcccccccceeeeeeeeHH I I~iiiiXjcjdjij~jjjjkJkjjjjjk^kkkkk*lkkkkkk>lhllll mpllllllmHmxmmmmPmjmnmpmmmmn n4n@nvnnnq3qqqPrVrcrrrr0sFaL`< :@h@hٹ60=@C(JT 0b{@`_wlw»P]`c Hp.F@`;F@`z"%(]spisp(:=@`u -03Tbr P4dJ`| || ##=/=P4dJ`/W\k44=$<,9EIPh8Py@H , fhp, J`&6Dl]g`y &Z`yZ] &Z] &DZpr,P#2Q!$t< i@ ! 0mMlDY8LORdC`#8;E:OR\6<FWfilT[_egq8    $ 8   !,KKqQeY^<@NoH5M.symtab.strtab.shstrtab.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.init_array.fini_array.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_info.debug_abbrev.debug_line.debug_str.debug_loc.debug_rangesX: B C H p *-L!L!L!L!N!P!R!s! L! @M. MA MWs!fL! NL! @N `NE N G N z N  N  N  OL O] `PQv P  P P  Q  Q 0Qp QL2 R K S h S`Pw! pS_ SM TM pT7  TA: U,T 0Uh V7~ @W\ W t!&@t!@d pY PZ `Z7 Z  Z| 0]" `]) ]10w!B`w!JHw!\ Pa bw! cu ce^ d:x @e e `f f g  hp( hpB H[ hs piF iM jY pj  PkG  0lz  m  m  ,I  w! Xw!  GJ=D @u!V hu!g (u!z u!  K  lL pu!  n3  o\4  @s*Z  pt t! t! v! `u! u! Z!  {  @|  }KL w! v! u!  @(  `~p  ~p  @2  )L  c  Ђ` v!  0  P @w!  @#v!3u!BZ!Y [o @<  v!u! L pFt!Uv!n t!t!u!Z! u!  .v!= St!c xu!  @v!0u!u!t!Pv!? @ nu!8u!Pu!xu!Xu!`Z!0v!v! MOv!qxv!8v!0v!t!(v!pv! u!t!$ v!2v!]hw!e ^![!t! `c! u!v!w!Hu!w!hv!6Hv!Kv!sv!u!u!t!u!t! u!u!#t!5t!Gu!Wt!iu!xt!o!n!s!u! `v!8u!Rs! yv!Xv!s! v! `s! A@s! sv! s! v!s! v!6t!ES!5tS!]! ]!x\!x_!@ `!P$``!=CZ!FV!nY! pW!X! W!0X!X! W!&PX!@X! T`U!$}U!\T!F@T!FW!@V!@>U!Ef@W!*X! v!;Z!8Z!5Z!3Z!!Z!Y! Y!X!pX!.W!I(Z!UY! cZ! pZ!}Y!Y!U!.AZ!xY! Z! 0Z!Y! Y!Y! Y!)X!;hY! J?Z!TY!aY!o[Y!~HY! X! X!(Y! TY!=Z!Y!Y!Y! X!"8Y! 2Y!@Y! MY![Y!i`q!P0q!r!@q!S!* S!g]S!HBL!R!L!s!P! $ 6 K W f t   w!8   !!#!5!F!X!e!|!!!!!s!!!!"#"/":"O"Z" p`"r"~""""""" ##,#=#M#g#u########$ $3$@$T$e$t$$$$$$s!$ %%,% ;%G%_%s%%%%%%%% &&:&H&W&w!\&l&&w!8&&s!&&&&''/':'F'c't'' ''''''(('(8(E(Q(a(r(( ((((((") B ))4) P?)L)Y)g){)))crtstuff.c__JCR_LIST__deregister_tm_clonesregister_tm_clones__do_global_dtors_auxcompleted.7568__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entry_seqio.c__pyx_tp_traverse_8cutadapt_6_seqio_Sequence__pyx_tp_clear_8cutadapt_6_seqio_Sequence__pyx_getprop_8cutadapt_6_seqio_8Sequence_name__pyx_getprop_8cutadapt_6_seqio_8Sequence_sequence__pyx_getprop_8cutadapt_6_seqio_8Sequence_qualities__pyx_getprop_8cutadapt_6_seqio_8Sequence_name2__pyx_getprop_8cutadapt_6_seqio_8Sequence_match__pyx_tp_clear_8cutadapt_6_seqio___pyx_scope_struct____iter____Pyx_ErrRestore__Pyx_CyFunction_set_doc__Pyx_CyFunction_get_qualname__Pyx_CyFunction_get_self__Pyx_CyFunction_get_globals__Pyx_CyFunction_get_closure__Pyx_CyFunction_get_code__pyx_bisect_code_objects__Pyx_Coroutine_clear__Pyx_Coroutine_get_name__Pyx_Coroutine_get_qualname__pyx_tp_new_8cutadapt_6_seqio_Sequence__pyx_empty_tuple__Pyx_CyFunction_init_defaults__Pyx_CyFunction_get_kwdefaults__Pyx_CyFunction_get_defaults__Pyx_CyFunction_get_annotations__Pyx_CyFunction_get_dict__Pyx_PyObject_GetAttrStr__Pyx_PyObject_Call__Pyx_FetchCommonType__pyx_sq_item_8cutadapt_6_seqio_Sequence__pyx_tp_dealloc_8cutadapt_6_seqio___pyx_scope_struct____iter____pyx_freecount_8cutadapt_6_seqio___pyx_scope_struct____iter____pyx_freelist_8cutadapt_6_seqio___pyx_scope_struct____iter____pyx_tp_dealloc_8cutadapt_6_seqio_Sequence__Pyx_CyFunction_Call__Pyx_CyFunction_get_name__Pyx_CyFunction_reduce__Pyx_CyFunction_clear__Pyx_CyFunction_repr__Pyx_CyFunction_dealloc__Pyx_AddTraceback__pyx_code_cache__pyx_d__pyx_empty_bytes__pyx_pf_8cutadapt_6_seqio_11FastqReader_11__defaults____pyx_pw_8cutadapt_6_seqio_8Sequence_11__reduce____pyx_ptype_8cutadapt_6_seqio_Sequence__pyx_setprop_8cutadapt_6_seqio_8Sequence_match__pyx_tp_traverse_8cutadapt_6_seqio___pyx_scope_struct____iter____Pyx_CyFunction_traverse__Pyx_Coroutine_traverse__Pyx_CyFunction_set_annotations__Pyx_CyFunction_set_kwdefaults__Pyx_CyFunction_set_defaults__Pyx_CyFunction_set_dict__Pyx_CyFunction_set_qualname__Pyx_CyFunction_set_name__Pyx_CalculateMetaclass__pyx_tp_new_8cutadapt_6_seqio___pyx_scope_struct____iter____Pyx_CyFunction_descr_get__Pyx_CyFunction_get_doc__Pyx_Coroutine_dealloc__pyx_setprop_8cutadapt_6_seqio_8Sequence_name2__pyx_setprop_8cutadapt_6_seqio_8Sequence_qualities__pyx_setprop_8cutadapt_6_seqio_8Sequence_sequence__pyx_setprop_8cutadapt_6_seqio_8Sequence_name__pyx_pw_8cutadapt_6_seqio_8Sequence_7__len____Pyx_Coroutine_patch_module.constprop.58__pyx_GeneratorType__pyx_b__Pyx_Py3MetaclassPrepare.constprop.60__pyx_n_s_prepare__pyx_n_s_module__pyx_n_s_qualname__pyx_n_s_doc__Pyx_CyFunction_New.constprop.62__Pyx_Py3ClassCreate.constprop.63__pyx_n_s_metaclass__Pyx_PyBytes_SingleTailmatch.constprop.67__Pyx_ParseOptionalKeywords.constprop.71__Pyx_PyInt_SubtractObjC.constprop.72__pyx_pw_8cutadapt_6_seqio_1_shorten__pyx_int_100__pyx_int_3__pyx_kp_s___pyx_n_s_n__pyx_n_s_s__pyx_pyargnames.11567__Pyx_PyBytes_Equals.constprop.69__Pyx_GetItemInt_Fast.constprop.68__pyx_pw_8cutadapt_6_seqio_11FastqReader_3__iter____pyx_ptype_8cutadapt_6_seqio___pyx_scope_struct____iter____pyx_n_s_FastqReader___iter__pyx_n_s_iter__pyx_gb_8cutadapt_6_seqio_11FastqReader_4generator__Pyx_Coroutine_set_name__Pyx_Coroutine_set_qualname__Pyx_GetBuiltinName__Pyx_GetModuleGlobalName__Pyx_Coroutine_SendEx__pyx_pw_8cutadapt_6_seqio_8Sequence_3__getitem____pyx_n_s_class__Pyx__PyObject_CallOneArg__Pyx_PyObject_CallOneArg__pyx_CyFunctionType__pyx_pw_8cutadapt_6_seqio_11FastqReader_10__exit____pyx_n_s_close__pyx_n_s_self__pyx_pyargnames.12250__Pyx_Coroutine_Close__Pyx_Coroutine_CloseIter.isra.40__Pyx_Coroutine_del__pyx_pw_8cutadapt_6_seqio_11FastqReader_6close__pyx_n_s_close_on_exit__pyx_n_s_file_2__Pyx_Raise.isra.30__pyx_pw_8cutadapt_6_seqio_11FastqReader_8__enter____pyx_tuple__9__pyx_builtin_ValueError__pyx_pw_8cutadapt_6_seqio_11FastqReader_1__init____pyx_n_s_xopen__pyx_n_s_sequence_class__pyx_n_s_delivers_qualities__pyx_pyargnames.12044__pyx_n_s_file__Pyx_Coroutine_FinishDelegation__pyx_n_s_args__Pyx_Coroutine_Throw__pyx_n_s_throw__Pyx_Coroutine_Send__pyx_n_s_send__Pyx_Generator_Next__pyx_pw_8cutadapt_6_seqio_8Sequence_5__repr____pyx_kp_s__2__pyx_kp_s_qualities_0_r__pyx_n_s_format__pyx_n_s_shorten__pyx_kp_s_Sequence_name_0_r_sequence_1_r__pyx_pw_8cutadapt_6_seqio_8Sequence_1__init____pyx_n_s_sequence__pyx_n_s_qualities__pyx_n_s_name2__pyx_n_s_match__pyx_n_s_name__pyx_pyargnames.11623__pyx_n_s_FormatError__pyx_kp_s_In_read_named_0_r_length_of_qual__pyx_pw_8cutadapt_6_seqio_8Sequence_9__richcmp____pyx_builtin_NotImplementedError__pyx_kp_s_Line_0_in_FASTQ_file_is_expected__pyx_kp_s__3__pyx_kp_s__4__pyx_tuple__8__pyx_kp_s__5__pyx_kp_s_Line_0_in_FASTQ_file_is_expected_2__pyx_n_s_rstrip__pyx_tuple__7__pyx_kp_s__6__pyx_kp_s_At_line_0_Sequence_descriptions__pyx_m__pyx_CyFunctionType_type__pyx_GeneratorType_type__pyx_methods__pyx_string_tab__pyx_n_s_main__pyx_n_s_Exception__pyx_builtin_Exception__pyx_n_s_object__pyx_builtin_object__pyx_n_s_NotImplementedError__pyx_n_s_ValueError__pyx_kp_s_FASTQ_file_ended_prematurely__pyx_kp_s_I_O_operation_on_closed_FastqRea__pyx_kp_s_home_marcel_scm_cutadapt_cutada__pyx_n_s_init__pyx_codeobj__13__pyx_n_s_line__pyx_n_s_strip__pyx_n_s_i__pyx_n_s_it__pyx_codeobj__15__pyx_codeobj__17__pyx_n_s_enter__pyx_codeobj__19__pyx_n_s_exit__pyx_codeobj__21__pyx_type_8cutadapt_6_seqio_Sequence__pyx_type_8cutadapt_6_seqio___pyx_scope_struct____iter__abc_patched.13394__pyx_n_s_import__pyx_kp_s_Raised_when_an_input_file_FASTA__pyx_n_s_cutadapt__seqio__pyx_mdef_8cutadapt_6_seqio_1_shorten__pyx_n_s_FastqReader__pyx_kp_s_Reader_for_FASTQ_files_Does_not__pyx_mdef_8cutadapt_6_seqio_11FastqReader_1__init____pyx_n_s_FastqReader___init__pyx_mdef_8cutadapt_6_seqio_11FastqReader_3__iter____pyx_mdef_8cutadapt_6_seqio_11FastqReader_6close__pyx_n_s_FastqReader_close__pyx_mdef_8cutadapt_6_seqio_11FastqReader_8__enter____pyx_n_s_FastqReader___enter__pyx_mdef_8cutadapt_6_seqio_11FastqReader_10__exit____pyx_n_s_FastqReader___exit__pyx_n_s_test__pyx_doc_8cutadapt_6_seqio_8Sequence___init____pyx_doc_8cutadapt_6_seqio_8Sequence_2__getitem____pyx_Generator_methods__pyx_Generator_memberlist__pyx_Generator_getsets__pyx_CyFunction_methods__pyx_CyFunction_members__pyx_CyFunction_getsets__pyx_k___pyx_k_At_line_0_Sequence_descriptions__pyx_k_Exception__pyx_k_FASTQ_file_ended_prematurely__pyx_k_FastqReader__pyx_k_FastqReader___enter__pyx_k_FastqReader___exit__pyx_k_FastqReader___init__pyx_k_FastqReader___iter__pyx_k_FastqReader_close__pyx_k_FormatError__pyx_k_I_O_operation_on_closed_FastqRea__pyx_k_In_read_named_0_r_length_of_qual__pyx_k_Line_0_in_FASTQ_file_is_expected__pyx_k_Line_0_in_FASTQ_file_is_expected_2__pyx_k_NotImplementedError__pyx_k_Raised_when_an_input_file_FASTA__pyx_k_Reader_for_FASTQ_files_Does_not__pyx_k_Sequence_name_0_r_sequence_1_r__pyx_k_ValueError__pyx_k__2__pyx_k__3__pyx_k__4__pyx_k__5__pyx_k__6__pyx_k_args__pyx_k_class__pyx_k_close__pyx_k_close_on_exit__pyx_k_cutadapt__seqio__pyx_k_delivers_qualities__pyx_k_doc__pyx_k_enter__pyx_k_exit__pyx_k_file__pyx_k_file_2__pyx_k_format__pyx_k_home_marcel_scm_cutadapt_cutada__pyx_k_i__pyx_k_import__pyx_k_init__pyx_k_it__pyx_k_iter__pyx_k_line__pyx_k_main__pyx_k_match__pyx_k_metaclass__pyx_k_module__pyx_k_n__pyx_k_name__pyx_k_name2__pyx_k_object__pyx_k_prepare__pyx_k_qualities__pyx_k_qualities_0_r__pyx_k_qualname__pyx_k_rstrip__pyx_k_s__pyx_k_self__pyx_k_send__pyx_k_sequence__pyx_k_sequence_class__pyx_k_shorten__pyx_k_strip__pyx_k_test__pyx_k_throw__pyx_k_xopen__pyx_tp_as_sequence_Sequence__pyx_tp_as_mapping_Sequence__pyx_methods_8cutadapt_6_seqio_Sequence__pyx_getsets_8cutadapt_6_seqio_Sequence__pyx_doc_8cutadapt_6_seqio_11FastqReader_2__iter____pyx_doc_8cutadapt_6_seqio_11FastqReader___init____pyx_doc_8cutadapt_6_seqio__shorten__FRAME_END____JCR_END____dso_handle_DYNAMIC__TMC_END___GLOBAL_OFFSET_TABLE_PyObject_SetItemPyUnicodeUCS4_DecodeUTF8PyList_NewPyString_FromStringAndSizePyExc_SystemErrorPyDict_SetItemStringPyDict_Size_Py_ZeroStructPyMethod_Type_ITM_deregisterTMCloneTablePyFloat_TypePyTuple_Type__pyx_wrapperbase_8cutadapt_6_seqio_8Sequence_2__getitem__PyObject_ClearWeakRefsPyInt_AsSsize_tPyFrame_NewPyMem_FreePyCFunction_NewExPyBuffer_ReleasePy_InitModule4_64PyNumber_AddPyObject_GetAttrStringPyImport_AddModulePyObject_SetAttrStringPyWrapperDescr_TypePyErr_WarnEx_edataPyErr_NoMemoryPyObject_GC_DelPyErr_NormalizeException_PyObject_CallFunction_SizeTPyIter_NextPyFPE_jbufPyObject_RichComparePyCode_New_finiPyObject_GC_TrackPyFPE_dummy__stack_chk_fail@@GLIBC_2.4PyExc_RuntimeErrorPyObject_SelfIterPyErr_GivenExceptionMatchesPyErr_SetStringPyMethod_New_PyObject_GC_NewPyObject_GetItemPyInt_FromSsize_tPyExc_ValueErrorPyExc_TypeErrorPyString_InternFromStringPyMem_ReallocPyErr_SetNonePyErr_ExceptionMatchesPyTraceBack_Type_PyThreadState_CurrentPyOS_snprintfPySequence_GetItemPyTraceBack_HerePySequence_GetSlicePyUnicodeUCS4_TailmatchPyFloat_FromDoublePyType_Readymemcmp@@GLIBC_2.2.5PyLong_AsSsize_tPyDict_GetItemPyCFunction_Call_setjmp@@GLIBC_2.2.5PyErr_Clear_Py_CheckRecursiveCall_Py_CheckRecursionLimit__pyx_module_is_main_cutadapt___seqioPyExc_KeyErrorPyString_FromStringPyString_Type__gmon_start__PyTuple_NewPyObject_GenericGetAttrPyExc_OverflowErrorPyArg_UnpackTuplePyExc_FloatingPointErrorPyObject_SetAttrPyErr_OccurredPyImport_ImportModulePyString_AsStringPyObject_CallObjectPyTuple_GetSlicePyRun_StringFlagsPyObject_CallFunctionObjArgsPyObject_Size_Py_NoneStruct_endPyObject_IsTruePyExc_BaseException__pyx_wrapperbase_8cutadapt_6_seqio_8Sequence___init___Py_TrueStruct__bss_startPyDict_NewPyObject_GetBuffer_PyString_EqPyString_FromFormatPyDict_NextPyBaseObject_TypePyInt_TypePyLong_Type_PyObject_NextNotImplementedPyObject_GetIterPyInt_FromLong_Jv_RegisterClassesPyExc_ImportErrorPyDict_SetItemPyExc_AttributeErrorPyExc_StopIterationPyExc_RuntimeWarningPyObject_CallPyUnicode_TypePyExc_GeneratorExitPyType_IsSubtypePyErr_FormatPySlice_NewPyExc_NameErrorPyModule_GetDictPyFPE_counter_ITM_registerTMCloneTablePyNumber_IndexPyObject_GetAttrPyCFunction_TypePyBaseString_TypePyMem_Malloc__cxa_finalize@@GLIBC_2.2.5_initPyNumber_SubtractPyUnicodeUCS4_Compareinit_seqioPyClass_TypePyTuple_PackPy_GetVersionPyObject_GC_UnTrackPyExc_UnboundLocalErrorPyErr_WriteUnraisablePyList_Type$.od8 XXP @ HoUo0dnB::X xBBsCC~HHpp 8**--,L!LL!LL!LL!LN!NP!PR!R s!s8 0s-s@-t$ <<f2'0L2P=n`BK0,"Q )cutadapt-1.9.1/cutadapt/colorspace.py0000664000175000017500000000312112575761274020407 0ustar marcelmarcel00000000000000# coding: utf-8 """ Colorspace conversion routines. Inspired by agapython/util/Dibase.py from Corona lite, but reimplemented to avoid licensing issues. Encoding Table A C G T A 0 1 2 3 C 1 0 3 2 G 2 3 0 1 T 3 2 1 0 """ from __future__ import print_function, division, absolute_import __author__ = 'Marcel Martin' def _initialize_dicts(): """ Create the colorspace encoding and decoding dictionaries. """ enc = {} for i, c1 in enumerate("ACGT"): enc['N' + c1] = '4' enc[c1 + 'N'] = '4' enc['.' + c1] = '4' enc[c1 + '.'] = '4' for j, c2 in enumerate("ACGT"): # XOR of nucleotides gives color enc[c1 + c2] = chr(ord('0') + (i ^ j)) enc.update({ 'NN': '4', 'N.': '4', '.N': '4', '..': '4'}) dec = {} for i, c1 in enumerate("ACGT"): dec['.' + str(i)] = 'N' dec['N' + str(i)] = 'N' dec[c1 + '4'] = 'N' dec[c1 + '.'] = 'N' for j, c2 in enumerate("ACGT"): # XOR of nucleotides gives color dec[c1 + chr(ord('0') + (i ^ j))] = c2 dec['N4'] = 'N' return (enc, dec) def encode(s): """ Given a sequence of nucleotides, convert them to colorspace. Only uppercase characters are allowed. >>> encode("ACGGTC") "A13012" """ if not s: return s r = s[0:1] for i in range(len(s) - 1): r += ENCODE[s[i:i+2]] return r def decode(s): """ Decode a sequence of colors to nucleotide space. The first character in s must be a nucleotide. Only uppercase characters are allowed. >>> decode("A13012") "ACGGTC" """ if len(s) < 2: return s x = s[0] result = x for c in s[1:]: x = DECODE[x + c] result += x return result (ENCODE, DECODE) = _initialize_dicts() cutadapt-1.9.1/cutadapt/scripts/0000775000175000017500000000000012627541606017366 5ustar marcelmarcel00000000000000cutadapt-1.9.1/cutadapt/scripts/cutadapt.py0000775000175000017500000007706112627541202021553 0ustar marcelmarcel00000000000000#!/usr/bin/env python # -*- coding: utf-8 -*- # kate: word-wrap off; remove-trailing-spaces all; # # Copyright (c) 2010-2015 Marcel Martin # # 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. """ cutadapt version %version Copyright (C) 2010-2015 Marcel Martin cutadapt removes adapter sequences from high-throughput sequencing reads. Usage: cutadapt -a ADAPTER [options] [-o output.fastq] input.fastq For paired-end reads: cutadapt -a ADAPT1 -A ADAPT2 [options] -o out1.fastq -p out2.fastq in1.fastq in2.fastq Replace "ADAPTER" with the actual sequence of your 3' adapter. IUPAC wildcard characters are supported. The reverse complement is *not* automatically searched. All reads from input.fastq will be written to output.fastq with the adapter sequence removed. Adapter matching is error-tolerant. Multiple adapter sequences can be given (use further -a options), but only the best-matching adapter will be removed. Input may also be in FASTA format. Compressed input and output is supported and auto-detected from the file name (.gz, .xz, .bz2). Use the file name '-' for standard input/output. Without the -o option, output is sent to standard output. Citation: Marcel Martin. Cutadapt removes adapter sequences from high-throughput sequencing reads. EMBnet.Journal, 17(1):10-12, May 2011. http://dx.doi.org/10.14806/ej.17.1.200 Use "cutadapt --help" to see all command-line options. See http://cutadapt.readthedocs.org/ for full documentation. """ from __future__ import print_function, division, absolute_import # Print a helpful error message if the extension modules cannot be imported. from cutadapt import check_importability check_importability() import sys import time import errno from optparse import OptionParser, OptionGroup, SUPPRESS_HELP import functools import logging import platform import textwrap from cutadapt import seqio, __version__ from cutadapt.xopen import xopen from cutadapt.adapters import (Adapter, ColorspaceAdapter, gather_adapters, BACK, FRONT, PREFIX, SUFFIX, ANYWHERE) from cutadapt.modifiers import (LengthTagModifier, SuffixRemover, PrefixSuffixAdder, DoubleEncoder, ZeroCapper, PrimerTrimmer, QualityTrimmer, UnconditionalCutter, NEndTrimmer, AdapterCutter) from cutadapt.filters import (NoFilter, PairedNoFilter, Redirector, PairedRedirector, LegacyPairedRedirector, TooShortReadFilter, TooLongReadFilter, Demultiplexer, NContentFilter, DiscardUntrimmedFilter, DiscardTrimmedFilter) from cutadapt.report import Statistics, print_report, redirect_standard_output from cutadapt.compat import next logger = logging.getLogger(__name__) class CutadaptOptionParser(OptionParser): def get_usage(self): return self.usage.lstrip().replace('%version', __version__) class RestFileWriter(object): def __init__(self, file): self.file = file def write(self, match): rest = match.rest() if len(rest) > 0: print(rest, match.read.name, file=self.file) def process_single_reads(reader, modifiers, filters): """ Loop over reads, find adapters, trim reads, apply modifiers and output modified reads. Return a Statistics object. """ n = 0 # no. of processed reads total_bp = 0 for read in reader: n += 1 total_bp += len(read.sequence) for modifier in modifiers: read = modifier(read) for filter in filters: if filter(read): break return Statistics(n=n, total_bp1=total_bp, total_bp2=None) def process_paired_reads(paired_reader, modifiers1, modifiers2, filters): """ Loop over reads, find adapters, trim reads, apply modifiers and output modified reads. Return a Statistics object. """ n = 0 # no. of processed reads total1_bp = 0 total2_bp = 0 for read1, read2 in paired_reader: n += 1 total1_bp += len(read1.sequence) total2_bp += len(read2.sequence) for modifier in modifiers1: read1 = modifier(read1) for modifier in modifiers2: read2 = modifier(read2) for filter in filters: # Stop writing as soon as one of the filters was successful. if filter(read1, read2): break return Statistics(n=n, total_bp1=total1_bp, total_bp2=total2_bp) def get_option_parser(): parser = CutadaptOptionParser(usage=__doc__, version=__version__) parser.add_option("--debug", action='store_true', default=False, help="Print debugging information.") parser.add_option("-f", "--format", help="Input file format; can be either 'fasta', 'fastq' or 'sra-fastq'. " "Ignored when reading csfasta/qual files (default: auto-detect " "from file name extension).") group = OptionGroup(parser, "Options that influence how the adapters are found", description="Each of the three parameters -a, -b, -g can be used " "multiple times and in any combination to search for an entire set of " "adapters of possibly different types. Only the best matching " "adapter is trimmed from each read (but see the --times option). " "Instead of giving an adapter directly, you can also write " "file:FILE and the adapter sequences will be read from the given " "FASTA FILE.") group.add_option("-a", "--adapter", action="append", default=[], metavar="ADAPTER", dest="adapters", help="Sequence of an adapter that was ligated to the 3' end. The " "adapter itself and anything that follows is trimmed. If the " "adapter sequence ends with the '$' character, the adapter is " "anchored to the end of the read and only found if it is a " "suffix of the read.") group.add_option("-g", "--front", action="append", default=[], metavar="ADAPTER", help="Sequence of an adapter that was ligated to the 5' end. If the " "adapter sequence starts with the character '^', the adapter is " "'anchored'. An anchored adapter must appear in its entirety at the " "5' end of the read (it is a prefix of the read). A non-anchored adapter may " "appear partially at the 5' end, or it may occur within the read. If it is " "found within a read, the sequence preceding the adapter is also trimmed. " "In all cases, the adapter itself is trimmed.") group.add_option("-b", "--anywhere", action="append", default=[], metavar="ADAPTER", help="Sequence of an adapter that was ligated to the 5' or 3' end. If " "the adapter is found within the read or overlapping the 3' end of " "the read, the behavior is the same as for the -a option. If the " "adapter overlaps the 5' end (beginning of the read), the initial " "portion of the read matching the adapter is trimmed, but anything " "that follows is kept.") group.add_option("-e", "--error-rate", type=float, default=0.1, help="Maximum allowed error rate (no. of errors divided by the length " "of the matching region) (default: %default)") group.add_option("--no-indels", action='store_false', dest='indels', default=True, help="Do not allow indels in the alignments (allow only mismatches). " "(default: allow both mismatches and indels)") group.add_option("-n", "--times", type=int, metavar="COUNT", default=1, help="Remove up to COUNT adapters from each read (default: %default)") group.add_option("-O", "--overlap", type=int, metavar="LENGTH", default=3, help="Minimum overlap length. If the overlap between the read and the " "adapter is shorter than LENGTH, the read is not modified. " "This reduces the no. of bases trimmed purely due to short random " "adapter matches (default: %default).") group.add_option("--match-read-wildcards", action="store_true", default=False, help="Allow IUPAC wildcards in reads (default: %default).") group.add_option("-N", "--no-match-adapter-wildcards", action="store_false", default=True, dest='match_adapter_wildcards', help="Do not interpret IUPAC wildcards in adapters.") group.add_option("--no-trim", dest='action', action='store_const', const=None, help="Match and redirect reads to output/untrimmed-output as usual, " "but do not remove adapters.") group.add_option("--mask-adapter", dest='action', action='store_const', const='mask', help="Mask adapters with 'N' characters instead of trimming them.") parser.add_option_group(group) group = OptionGroup(parser, "Additional read modifications") group.add_option("-u", "--cut", action='append', default=[], type=int, metavar="LENGTH", help="Remove LENGTH bases from the beginning or end of each read. " "If LENGTH is positive, bases are removed from the beginning of each read. " "If LENGTH is negative, bases are removed from the end of each read. " "This option can be specified twice if the LENGTHs have different signs.") group.add_option("-q", "--quality-cutoff", default=None, metavar="[5'CUTOFF,]3'CUTOFF", help="Trim low-quality bases from 5' and/or 3' ends of reads before " "adapter removal. If one value is given, only the 3' end is trimmed. " "If two comma-separated cutoffs are given, the 5' end is trimmed with " "the first cutoff, the 3' end with the second. See documentation for " "the algorithm. (default: no trimming)") group.add_option("--quality-base", type=int, default=33, help="Assume that quality values in FASTQ are encoded as ascii(quality " "+ QUALITY_BASE). This needs to be set to 64 for some old Illumina " "FASTQ files. Default: %default") group.add_option("--trim-n", action='store_true', default=False, help="Trim N's on ends of reads.") group.add_option("-x", "--prefix", default='', help="Add this prefix to read names. Use {name} to insert the name of the matching adapter.") group.add_option("-y", "--suffix", default='', help="Add this suffix to read names; can also include {name}") group.add_option("--strip-suffix", action='append', default=[], help="Remove this suffix from read names if present. Can be given multiple times.") group.add_option("--length-tag", metavar="TAG", help="Search for TAG followed by a decimal number in the description " "field of the read. Replace the decimal number with the correct " "length of the trimmed read. For example, use --length-tag 'length=' " "to correct fields like 'length=123'.") parser.add_option_group(group) group = OptionGroup(parser, "Options for filtering of processed reads") group.add_option("--discard-trimmed", "--discard", action='store_true', default=False, help="Discard reads that contain an adapter. Also use -O to avoid " "discarding too many randomly matching reads!") group.add_option("--discard-untrimmed", "--trimmed-only", action='store_true', default=False, help="Discard reads that do not contain the adapter.") group.add_option("-m", "--minimum-length", type=int, default=0, metavar="LENGTH", help="Discard trimmed reads that are shorter than LENGTH. Reads that " "are too short even before adapter removal are also discarded. In " "colorspace, an initial primer is not counted (default: 0).") group.add_option("-M", "--maximum-length", type=int, default=sys.maxsize, metavar="LENGTH", help="Discard trimmed reads that are longer than LENGTH. " "Reads that are too long even before adapter removal " "are also discarded. In colorspace, an initial primer " "is not counted (default: no limit).") group.add_option("--max-n", type=float, default=-1.0, metavar="COUNT", help="Discard reads with too many N bases. If COUNT is an integer, it " "is treated as the absolute number of N bases. If it is between 0 " "and 1, it is treated as the proportion of N's allowed in a read.") parser.add_option_group(group) group = OptionGroup(parser, "Options that influence what gets output to where") group.add_option("--quiet", default=False, action='store_true', help="Do not print a report at the end.") group.add_option("-o", "--output", metavar="FILE", help="Write modified reads to FILE. FASTQ or FASTA format is chosen " "depending on input. The summary report is sent to standard output. " "Use '{name}' in FILE to demultiplex reads into multiple " "files. (default: trimmed reads are written to standard output)") group.add_option("--info-file", metavar="FILE", help="Write information about each read and its adapter matches into FILE. " "See the documentation for the file format.") group.add_option("-r", "--rest-file", metavar="FILE", help="When the adapter matches in the middle of a read, write the " "rest (after the adapter) into FILE.") group.add_option("--wildcard-file", metavar="FILE", help="When the adapter has N bases (wildcards), write adapter bases " "matching wildcard positions to FILE. When there are indels in the " "alignment, this will often not be accurate.") group.add_option("--too-short-output", metavar="FILE", help="Write reads that are too short (according to length specified by " "-m) to FILE. (default: discard reads)") group.add_option("--too-long-output", metavar="FILE", help="Write reads that are too long (according to length specified by " "-M) to FILE. (default: discard reads)") group.add_option("--untrimmed-output", default=None, metavar="FILE", help="Write reads that do not contain the adapter to FILE. (default: " "output to same file as trimmed reads)") parser.add_option_group(group) group = OptionGroup(parser, "Colorspace options") group.add_option("-c", "--colorspace", action='store_true', default=False, help="Enable colorspace mode: Also trim the color that is adjacent to the found adapter.") group.add_option("-d", "--double-encode", action='store_true', default=False, help="Double-encode colors (map 0,1,2,3,4 to A,C,G,T,N).") group.add_option("-t", "--trim-primer", action='store_true', default=False, help="Trim primer base and the first color (which is the transition " "to the first nucleotide)") group.add_option("--strip-f3", action='store_true', default=False, help="Strip the _F3 suffix of read names") group.add_option("--maq", "--bwa", action='store_true', default=False, help="MAQ- and BWA-compatible colorspace output. This enables -c, -d, " "-t, --strip-f3 and -y '/1'.") group.add_option("--no-zero-cap", dest='zero_cap', action='store_false', help="Do not change negative quality values to zero in colorspace " "data. By default, they are changed to zero since many tools have " "problems with negative qualities.") group.add_option("--zero-cap", "-z", action='store_true', help="Change negative quality values to zero. This is enabled " "by default when -c/--colorspace is also enabled. Use the above option " "to disable it.") parser.set_defaults(zero_cap=None, action='trim') parser.add_option_group(group) group = OptionGroup(parser, "Paired-end options", description="The " "-A/-G/-B/-U options work like their -a/-b/-g/-u counterparts.") group.add_option("-A", dest='adapters2', action='append', default=[], metavar='ADAPTER', help="3' adapter to be removed from second read in a pair.") group.add_option("-G", dest='front2', action='append', default=[], metavar='ADAPTER', help="5' adapter to be removed from second read in a pair.") group.add_option("-B", dest='anywhere2', action='append', default=[], metavar='ADAPTER', help="5'/3 adapter to be removed from second read in a pair.") group.add_option("-U", dest='cut2', action='append', default=[], type=int, metavar="LENGTH", help="Remove LENGTH bases from the beginning or end of each second read (see --cut).") group.add_option("-p", "--paired-output", metavar="FILE", help="Write second read in a pair to FILE.") # Setting the default for pair_filter to None allows us to find out whether # the option was used at all. group.add_option("--pair-filter", metavar='(any|both)', default=None, choices=("any", "both"), help="Which of the reads in a paired-end read have to match the " "filtering criterion in order for it to be filtered. " "Default: any.") group.add_option("--interleaved", action='store_true', default=False, help="Read and write interleaved paired-end reads.") group.add_option("--untrimmed-paired-output", metavar="FILE", help="Write second read in a pair to this FILE when no adapter " "was found in the first read. Use this option together with " "--untrimmed-output when trimming paired-end reads. (Default: output " "to same file as trimmed reads.)") group.add_option("--too-short-paired-output", metavar="FILE", default=None, help="Write second read in a pair to this file if pair is too short. " "Use together with --too-short-output.") group.add_option("--too-long-paired-output", metavar="FILE", default=None, help="Write second read in a pair to this file if pair is too long. " "Use together with --too-long-output.") parser.add_option_group(group) return parser def main(cmdlineargs=None, default_outfile=sys.stdout): """ Main function that evaluates command-line parameters and iterates over all reads. default_outfile is the file to which trimmed reads are sent if the ``-o`` parameter is not used. """ logging.basicConfig(level=logging.INFO, format='%(message)s') # %(levelname)s parser = get_option_parser() if cmdlineargs is None: cmdlineargs = sys.argv[1:] options, args = parser.parse_args(args=cmdlineargs) if len(args) == 0: parser.error("At least one parameter needed: name of a FASTA or FASTQ file.") elif len(args) > 2: parser.error("Too many parameters.") input_filename = args[0] if input_filename.endswith('.qual'): parser.error("If a .qual file is given, it must be the second argument.") # Find out which 'mode' we need to use. # Default: single-read trimming (neither -p nor -A/-G/-B/-U/--interleaved given) paired = False if options.paired_output: # Modify first read only, keep second in sync (-p given, but not -A/-G/-B/-U). # This exists for backwards compatibility ('legacy mode'). paired = 'first' # Any of these options switch off legacy mode if (options.adapters2 or options.front2 or options.anywhere2 or options.cut2 or options.interleaved or options.pair_filter or options.too_short_paired_output or options.too_long_paired_output): # Full paired-end trimming when both -p and -A/-G/-B/-U given # Read modifications (such as quality trimming) are applied also to second read. paired = 'both' if paired and len(args) == 1 and not options.interleaved: parser.error("When paired-end trimming is enabled via -A/-G/-B/-U or -p, " "two input files are required.") if options.interleaved and len(args) != 1: parser.error("When reading interleaved files, only one input file may " "be given.") if not paired: if options.untrimmed_paired_output: parser.error("Option --untrimmed-paired-output can only be used when " "trimming paired-end reads (with option -p).") # Assign input_paired_filename and quality_filename input_paired_filename = None quality_filename = None if paired: if not options.interleaved: input_paired_filename = args[1] if not options.paired_output: parser.error("When paired-end trimming is enabled via -A/-G/-B/-U, " "a second output file needs to be specified via -p (--paired-output).") if not options.output: parser.error("When you use -p or --paired-output, you must also " "use the -o option.") if bool(options.untrimmed_output) != bool(options.untrimmed_paired_output): parser.error("When trimming paired-end reads, you must use either none " "or both of the --untrimmed-output/--untrimmed-paired-output options.") if options.too_short_output and not options.too_short_paired_output: parser.error("When using --too-short-output with paired-end " "reads, you also need to use --too-short-paired-output") if options.too_long_output and not options.too_long_paired_output: parser.error("When using --too-long-output with paired-end " "reads, you also need to use --too-long-paired-output") elif len(args) == 2: quality_filename = args[1] if options.format is not None: parser.error("If a pair of .fasta and .qual files is given, the -f/--format parameter cannot be used.") if options.format is not None and options.format.lower() not in ['fasta', 'fastq', 'sra-fastq']: parser.error("The input file format must be either 'fasta', 'fastq' or " "'sra-fastq' (not '{0}').".format(options.format)) # Open input file(s) try: reader = seqio.open(input_filename, file2=input_paired_filename, qualfile=quality_filename, colorspace=options.colorspace, fileformat=options.format, interleaved=options.interleaved) except (seqio.UnknownFileType, IOError) as e: parser.error(e) fileformat = 'fastq' if reader.delivers_qualities else 'fasta' if options.quality_cutoff is not None: cutoffs = options.quality_cutoff.split(',') if len(cutoffs) == 1: try: cutoffs = [0, int(cutoffs[0])] except ValueError as e: parser.error("Quality cutoff value not recognized: {0}".format(e)) elif len(cutoffs) == 2: try: cutoffs = [int(cutoffs[0]), int(cutoffs[1])] except ValueError as e: parser.error("Quality cutoff value not recognized: {0}".format(e)) else: parser.error("Expected one value or two values separated by comma for the quality cutoff") else: cutoffs = None open_writer = functools.partial(seqio.open, mode='w', fileformat=fileformat, colorspace=options.colorspace, interleaved=options.interleaved) if options.pair_filter is None: options.pair_filter = 'any' min_affected = 2 if options.pair_filter == 'both' else 1 if not paired: filter_wrapper = Redirector elif paired == 'first': filter_wrapper = LegacyPairedRedirector elif paired == 'both': filter_wrapper = functools.partial(PairedRedirector, min_affected=min_affected) filters = [] # TODO open_files = [] too_short_writer = None # too short reads go here # TODO pass file name to TooShortReadFilter, add a .close() method? if options.minimum_length > 0: if options.too_short_output: too_short_writer = open_writer(options.too_short_output, options.too_short_paired_output) filters.append(filter_wrapper(too_short_writer, TooShortReadFilter(options.minimum_length))) too_long_writer = None # too long reads go here if options.maximum_length < sys.maxsize: if options.too_long_output is not None: too_long_writer = open_writer(options.too_long_output, options.too_long_paired_output) filters.append(filter_wrapper(too_long_writer, TooLongReadFilter(options.maximum_length))) if options.max_n != -1: filters.append(filter_wrapper(None, NContentFilter(options.max_n))) if int(options.discard_trimmed) + int(options.discard_untrimmed) + int(options.untrimmed_output is not None) > 1: parser.error("Only one of the --discard-trimmed, --discard-untrimmed " "and --untrimmed-output options can be used at the same time.") demultiplexer = None untrimmed_writer = None writer = None if options.output is not None and '{name}' in options.output: if options.discard_trimmed: parser.error("Do not use --discard-trimmed when demultiplexing.") if paired: parser.error("Demultiplexing not supported for paired-end files, yet.") untrimmed = options.output.replace('{name}', 'unknown') if options.untrimmed_output: untrimmed = options.untrimmed_output if options.discard_untrimmed: untrimmed = None demultiplexer = Demultiplexer(options.output, untrimmed, fileformat=fileformat, colorspace=options.colorspace) filters.append(demultiplexer) else: # Set up the remaining filters to deal with --discard-trimmed, # --discard-untrimmed and --untrimmed-output. These options # are mutually exclusive in order to avoid brain damage. if options.discard_trimmed: filters.append(filter_wrapper(None, DiscardTrimmedFilter())) elif options.discard_untrimmed: filters.append(filter_wrapper(None, DiscardUntrimmedFilter())) elif options.untrimmed_output: untrimmed_writer = open_writer(options.untrimmed_output, options.untrimmed_paired_output) filters.append(filter_wrapper(untrimmed_writer, DiscardUntrimmedFilter())) # Finally, figure out where the reads that passed all the previous # filters should go. if options.output is not None: writer = open_writer(options.output, options.paired_output) else: writer = open_writer(default_outfile) if not paired: filters.append(NoFilter(writer)) else: filters.append(PairedNoFilter(writer)) if options.maq: options.colorspace = True options.double_encode = True options.trim_primer = True options.strip_suffix.append('_F3') options.suffix = "/1" if options.zero_cap is None: options.zero_cap = options.colorspace if options.trim_primer and not options.colorspace: parser.error("Trimming the primer makes only sense in colorspace.") if options.double_encode and not options.colorspace: parser.error("Double-encoding makes only sense in colorspace.") if options.anywhere and options.colorspace: parser.error("Using --anywhere with colorspace reads is currently not supported (if you think this may be useful, contact the author).") if not (0 <= options.error_rate <= 1.): parser.error("The maximum error rate must be between 0 and 1.") if options.overlap < 1: parser.error("The overlap must be at least 1.") if options.rest_file is not None: options.rest_file = xopen(options.rest_file, 'w') rest_writer = RestFileWriter(options.rest_file) else: rest_writer = None if options.info_file is not None: options.info_file = xopen(options.info_file, 'w') if options.wildcard_file is not None: options.wildcard_file = xopen(options.wildcard_file, 'w') if options.colorspace: if options.match_read_wildcards: parser.error('IUPAC wildcards not supported in colorspace') options.match_adapter_wildcards = False ADAPTER_CLASS = ColorspaceAdapter if options.colorspace else Adapter try: # TODO refactor this a bit def collect(back, anywhere, front): adapters = [] for name, seq, where in gather_adapters(back, anywhere, front): if not seq: parser.error("The adapter sequence is empty.") adapter = ADAPTER_CLASS(seq, where, options.error_rate, options.overlap, options.match_read_wildcards, options.match_adapter_wildcards, name=name, indels=options.indels) if options.debug: adapter.enable_debug() adapters.append(adapter) return adapters adapters = collect(options.adapters, options.anywhere, options.front) adapters2 = collect(options.adapters2, options.anywhere2, options.front2) except IOError as e: if e.errno == errno.ENOENT: parser.error(e) raise if not adapters and not adapters2 and not cutoffs and \ options.cut == [] and options.cut2 == [] and \ options.minimum_length == 0 and \ options.maximum_length == sys.maxsize and \ quality_filename is None and \ options.max_n == -1: parser.error("You need to provide at least one adapter sequence.") # Create the single-end processing pipeline (a list of "modifiers") modifiers = [] if options.cut: if len(options.cut) > 2: parser.error("You cannot remove bases from more than two ends.") if len(options.cut) == 2 and options.cut[0] * options.cut[1] > 0: parser.error("You cannot remove bases from the same end twice.") for cut in options.cut: if cut != 0: modifiers.append(UnconditionalCutter(cut)) if cutoffs: modifiers.append(QualityTrimmer(cutoffs[0], cutoffs[1], options.quality_base)) if adapters: adapter_cutter = AdapterCutter(adapters, options.times, options.wildcard_file, options.info_file, rest_writer, options.action) modifiers.append(adapter_cutter) # Modifiers that apply to both reads of paired-end reads unless in legacy mode modifiers_both = [] if options.trim_n: modifiers_both.append(NEndTrimmer()) if options.length_tag: modifiers_both.append(LengthTagModifier(options.length_tag)) if options.strip_f3: options.strip_suffix.append('_F3') for suffix in options.strip_suffix: modifiers_both.append(SuffixRemover(suffix)) if options.prefix or options.suffix: modifiers_both.append(PrefixSuffixAdder(options.prefix, options.suffix)) if options.double_encode: modifiers_both.append(DoubleEncoder()) if options.zero_cap and reader.delivers_qualities: modifiers_both.append(ZeroCapper(quality_base=options.quality_base)) if options.trim_primer: modifiers_both.append(PrimerTrimmer) modifiers.extend(modifiers_both) # For paired-end data, create a second processing pipeline. # However, if no second-read adapters were given (via -A/-G/-B/-U), we need to # be backwards compatible and *no modifications* are done to the second read. modifiers2 = [] if paired == 'both': if options.cut2: if len(options.cut2) > 2: parser.error("You cannot remove bases from more than two ends.") if len(options.cut2) == 2 and options.cut2[0] * options.cut2[1] > 0: parser.error("You cannot remove bases from the same end twice.") for cut in options.cut2: if cut != 0: modifiers2.append(UnconditionalCutter(cut)) if cutoffs: modifiers2.append(QualityTrimmer(cutoffs[0], cutoffs[1], options.quality_base)) if adapters2: adapter_cutter2 = AdapterCutter(adapters2, options.times, None, None, None, options.action) modifiers2.append(adapter_cutter2) else: adapter_cutter2 = None modifiers2.extend(modifiers_both) # Due to backwards compatibility, from here on logging output needs to be # sent to standard output instead of standard error if the -o option is used. if options.output: logger.root.handlers = [] logging.basicConfig(level=logging.INFO, format='%(message)s', stream=sys.stdout) logger.info("This is cutadapt %s with Python %s", __version__, platform.python_version()) logger.info("Command line parameters: %s", " ".join(cmdlineargs)) logger.info("Trimming %s adapter%s with at most %.1f%% errors in %s mode ...", len(adapters) + len(adapters2), 's' if len(adapters) + len(adapters2) != 1 else '', options.error_rate * 100, { False: 'single-end', 'first': 'paired-end legacy', 'both': 'paired-end' }[paired]) if paired == 'first' and (modifiers_both or cutoffs): logger.warn('\n'.join(textwrap.wrap('WARNING: Requested read ' 'modifications are applied only to the first ' 'read since backwards compatibility mode is enabled. ' 'To modify both reads, also use any of the -A/-B/-G/-U options. ' 'Use a dummy adapter sequence when necessary: -A XXX'))) start_time = time.clock() try: if paired: stats = process_paired_reads(reader, modifiers, modifiers2, filters) else: stats = process_single_reads(reader, modifiers, filters) except KeyboardInterrupt as e: print("Interrupted", file=sys.stderr) sys.exit(130) except IOError as e: if e.errno == errno.EPIPE: sys.exit(1) raise except (seqio.FormatError, EOFError) as e: sys.exit("cutadapt: error: {0}".format(e)) # close open files for f in [writer, untrimmed_writer, options.rest_file, options.wildcard_file, options.info_file, too_short_writer, too_long_writer, options.info_file, demultiplexer]: if f is not None and f is not sys.stdin and f is not sys.stdout: f.close() elapsed_time = time.clock() - start_time if not options.quiet: stats.collect((adapters, adapters2), elapsed_time, modifiers, modifiers2, filters) # send statistics to stderr if result was sent to stdout stat_file = sys.stderr if options.output is None else None with redirect_standard_output(stat_file): print_report(stats, (adapters, adapters2)) if __name__ == '__main__': main() cutadapt-1.9.1/cutadapt/scripts/__init__.py0000664000175000017500000000000012575761274021474 0ustar marcelmarcel00000000000000cutadapt-1.9.1/cutadapt/_align.pyx0000664000175000017500000003662512611675431017703 0ustar marcelmarcel00000000000000from cpython.mem cimport PyMem_Malloc, PyMem_Free, PyMem_Realloc DEF START_WITHIN_SEQ1 = 1 DEF START_WITHIN_SEQ2 = 2 DEF STOP_WITHIN_SEQ1 = 4 DEF STOP_WITHIN_SEQ2 = 8 DEF SEMIGLOBAL = 15 # structure for a DP matrix entry ctypedef struct _Entry: int cost int matches # no. of matches in this alignment int origin # where the alignment originated: negative for positions within seq1, positive for pos. within seq2 ctypedef struct _Match: int origin int cost int matches int ref_stop int query_stop def _acgt_table(): """ Return a translation table that maps A, C, G, T characters to the lower four bits of a byte. Other characters (including possibly IUPAC characters) are mapped to zero. Lowercase versions are also translated, and U is treated the same as T. """ d = dict(A=1, C=2, G=4, T=8, U=8) t = bytearray(b'\0') * 256 for c, v in d.items(): t[ord(c)] = v t[ord(c.lower())] = v return bytes(t) def _iupac_table(): """ Return a translation table for IUPAC characters. The table maps ASCII-encoded IUPAC nucleotide characters to bytes in which the four least significant bits are used to represent one nucleotide each. Whether two characters x and y match can then be checked with the expression "x & y != 0". """ A = 1 C = 2 G = 4 T = 8 d = dict( X=0, A=A, C=C, G=G, T=T, U=T, R=A|G, Y=C|T, S=G|C, W=A|T, K=G|T, M=A|C, B=C|G|T, D=A|G|T, H=A|C|T, V=A|C|G, N=A|C|G|T ) t = bytearray(b'\0') * 256 for c, v in d.items(): t[ord(c)] = v t[ord(c.lower())] = v return bytes(t) cdef bytes ACGT_TABLE = _acgt_table() cdef bytes IUPAC_TABLE = _iupac_table() class DPMatrix: """ Representation of the dynamic-programming matrix. This used only when debugging is enabled in the Aligner class since the matrix is normally not stored in full. Entries in the matrix may be None, in which case that value was not computed. """ def __init__(self, reference, query): m = len(reference) n = len(query) self._rows = [ [None] * (n+1) for _ in range(m + 1) ] self.reference = reference self.query = query def set_entry(self, int i, int j, cost): """ Set an entry in the dynamic programming matrix. """ self._rows[i][j] = cost def __str__(self): """ Return a representation of the matrix as a string. """ rows = [' ' + ' '.join(c.rjust(2) for c in self.query)] for c, row in zip(' ' + self.reference, self._rows): r = c + ' ' + ' '.join(' ' if v is None else '{0:2d}'.format(v) for v in row) rows.append(r) return '\n'.join(rows) cdef class Aligner: """ TODO documentation still uses s1 (reference) and s2 (query). Locate one string within another by computing an optimal semiglobal alignment between string1 and string2. The alignment uses unit costs, which means that mismatches, insertions and deletions are counted as one error. flags is a bitwise 'or' of the allowed flags. To allow skipping of a prefix of string1 at no cost, set the START_WITHIN_SEQ1 flag. To allow skipping of a prefix of string2 at no cost, set the START_WITHIN_SEQ2 flag. If both are set, a prefix of string1 or of string1 is skipped, never both. Similarly, set STOP_WITHIN_SEQ1 and STOP_WITHIN_SEQ2 to allow skipping of suffixes of string1 or string2. Again, when both flags are set, never suffixes in both strings are skipped. If all flags are set, this results in standard semiglobal alignment. The skipped parts are described with two intervals (start1, stop1), (start2, stop2). For example, an optimal semiglobal alignment of SISSI and MISSISSIPPI looks like this: ---SISSI--- MISSISSIPPI start1, stop1 = 0, 5 start2, stop2 = 3, 8 (with zero errors) The aligned parts are string1[start1:stop1] and string2[start2:stop2]. The error rate is: errors / length where length is (stop1 - start1). An optimal alignment fulfills all of these criteria: - its error_rate is at most max_error_rate - Among those alignments with error_rate <= max_error_rate, the alignment contains a maximal number of matches (there is no alignment with more matches). - If there are multiple alignments with the same no. of matches, then one that has minimal no. of errors is chosen. - If there are still multiple candidates, choose the alignment that starts at the leftmost position within the read. The alignment itself is not returned, only the tuple (start1, stop1, start2, stop2, matches, errors), where the first four fields have the meaning as described, matches is the number of matches and errors is the number of errors in the alignment. It is always the case that at least one of start1 and start2 is zero. IUPAC wildcard characters can be allowed in the reference and the query by setting the appropriate flags. If neither flag is set, the full ASCII alphabet is used for comparison. If any of the flags is set, all non-IUPAC characters in the sequences compare as 'not equal'. """ cdef int m cdef _Entry* column # one column of the DP matrix cdef double max_error_rate cdef int flags cdef int _insertion_cost cdef int _deletion_cost cdef int _min_overlap cdef bint wildcard_ref cdef bint wildcard_query cdef bint debug cdef object _dpmatrix cdef bytes _reference # TODO rename to translated_reference or so cdef str str_reference def __cinit__(self, str reference, double max_error_rate, int flags=SEMIGLOBAL, bint wildcard_ref=False, bint wildcard_query=False): self.max_error_rate = max_error_rate self.flags = flags self.wildcard_ref = wildcard_ref self.wildcard_query = wildcard_query self.str_reference = reference self.reference = reference self._min_overlap = 1 self.debug = False self._dpmatrix = None self._insertion_cost = 1 self._deletion_cost = 1 property min_overlap: def __get__(self): return self._min_overlap def __set__(self, int value): if value < 1: raise ValueError('Minimum overlap must be at least 1') self._min_overlap = value property indel_cost: """ Matches cost 0, mismatches cost 1. Only insertion/deletion costs can be changed. """ def __set__(self, value): if value < 1: raise ValueError('Insertion/deletion cost must be at leat 1') self._insertion_cost = value self._deletion_cost = value property reference: def __get__(self): return self._reference def __set__(self, str reference): mem = <_Entry*> PyMem_Realloc(self.column, (len(reference) + 1) * sizeof(_Entry)) if not mem: raise MemoryError() self.column = mem self._reference = reference.encode('ascii') self.m = len(reference) if self.wildcard_ref: self._reference = self._reference.translate(IUPAC_TABLE) elif self.wildcard_query: self._reference = self._reference.translate(ACGT_TABLE) self.str_reference = reference property dpmatrix: """ The dynamic programming matrix as a DPMatrix object. This attribute is usually None, unless debugging has been enabled with enable_debug(). """ def __get__(self): return self._dpmatrix def enable_debug(self): """ Store the dynamic programming matrix while running the locate() method and make it available in the .dpmatrix attribute. """ self.debug = True def locate(self, str query): """ locate(query) -> (refstart, refstop, querystart, querystop, matches, errors) Find the query within the reference associated with this aligner. The intervals (querystart, querystop) and (refstart, refstop) give the location of the match. That is, the substrings query[querystart:querystop] and self.reference[refstart:refstop] were found to align best to each other, with the given number of matches and the given number of errors. The alignment itself is not returned. """ cdef char* s1 = self._reference cdef bytes query_bytes = query.encode('ascii') cdef char* s2 = query_bytes cdef int m = self.m cdef int n = len(query) cdef _Entry* column = self.column cdef double max_error_rate = self.max_error_rate cdef bint start_in_ref = self.flags & START_WITHIN_SEQ1 cdef bint start_in_query = self.flags & START_WITHIN_SEQ2 cdef bint stop_in_ref = self.flags & STOP_WITHIN_SEQ1 cdef bint stop_in_query = self.flags & STOP_WITHIN_SEQ2 if self.wildcard_query: query_bytes = query_bytes.translate(IUPAC_TABLE) s2 = query_bytes elif self.wildcard_ref: query_bytes = query_bytes.translate(ACGT_TABLE) s2 = query_bytes cdef bint compare_ascii = not (self.wildcard_query or self.wildcard_ref) """ DP Matrix: query (j) ----------> n | ref (i) | | V m """ cdef int i, j # maximum no. of errors cdef int k = (max_error_rate * m) # Determine largest and smallest column we need to compute cdef int max_n = n cdef int min_n = 0 if not start_in_query: # costs can only get worse after column m max_n = min(n, m + k) if not stop_in_query: min_n = max(0, n - m - k) # Fill column min_n. # # Four cases: # not startin1, not startin2: c(i,j) = max(i,j); origin(i, j) = 0 # startin1, not startin2: c(i,j) = j ; origin(i, j) = min(0, j - i) # not startin1, startin2: c(i,j) = i ; origin(i, j) = # startin1, startin2: c(i,j) = min(i,j) # TODO (later) # fill out columns only until 'last' if not start_in_ref and not start_in_query: for i in range(m + 1): column[i].matches = 0 column[i].cost = max(i, min_n) * self._insertion_cost column[i].origin = 0 elif start_in_ref and not start_in_query: for i in range(m + 1): column[i].matches = 0 column[i].cost = min_n * self._insertion_cost column[i].origin = min(0, min_n - i) elif not start_in_ref and start_in_query: for i in range(m + 1): column[i].matches = 0 column[i].cost = i * self._insertion_cost column[i].origin = max(0, min_n - i) else: for i in range(m + 1): column[i].matches = 0 column[i].cost = min(i, min_n) * self._insertion_cost column[i].origin = min_n - i if self.debug: self._dpmatrix = DPMatrix(self.str_reference, query) for i in range(m + 1): self._dpmatrix.set_entry(i, min_n, column[i].cost) cdef _Match best best.ref_stop = m best.query_stop = n best.cost = m + n best.origin = 0 best.matches = 0 # Ukkonen's trick: index of the last cell that is less than k. cdef int last = min(m, k + 1) if start_in_ref: last = m cdef int cost_diag cdef int cost_deletion cdef int cost_insertion cdef int origin, cost, matches cdef int length cdef bint characters_equal cdef _Entry tmp_entry with nogil: # iterate over columns for j in range(min_n + 1, max_n + 1): # remember first entry tmp_entry = column[0] # fill in first entry in this column if start_in_query: column[0].origin = j else: column[0].cost = j * self._insertion_cost for i in range(1, last + 1): if compare_ascii: characters_equal = (s1[i-1] == s2[j-1]) else: characters_equal = (s1[i-1] & s2[j-1]) != 0 if characters_equal: # Characters match: This cannot be an indel. cost = tmp_entry.cost origin = tmp_entry.origin matches = tmp_entry.matches + 1 else: # Characters do not match. cost_diag = tmp_entry.cost + 1 cost_deletion = column[i].cost + self._deletion_cost cost_insertion = column[i-1].cost + self._insertion_cost if cost_diag <= cost_deletion and cost_diag <= cost_insertion: # MISMATCH cost = cost_diag origin = tmp_entry.origin matches = tmp_entry.matches elif cost_insertion <= cost_deletion: # INSERTION cost = cost_insertion origin = column[i-1].origin matches = column[i-1].matches else: # DELETION cost = cost_deletion origin = column[i].origin matches = column[i].matches # remember current cell for next iteration tmp_entry = column[i] column[i].cost = cost column[i].origin = origin column[i].matches = matches if self.debug: with gil: for i in range(last + 1): self._dpmatrix.set_entry(i, j, column[i].cost) while last >= 0 and column[last].cost > k: last -= 1 # last can be -1 here, but will be incremented next. # TODO if last is -1, can we stop searching? if last < m: last += 1 elif stop_in_query: # Found a match. If requested, find best match in last row. # length of the aligned part of the reference length = m + min(column[m].origin, 0) cost = column[m].cost matches = column[m].matches if length >= self._min_overlap and cost <= length * max_error_rate and (matches > best.matches or (matches == best.matches and cost < best.cost)): # update best.matches = matches best.cost = cost best.origin = column[m].origin best.ref_stop = m best.query_stop = j if cost == 0 and matches == m: # exact match, stop early break # column finished if max_n == n: first_i = 0 if stop_in_ref else m # search in last column # TODO last? for i in range(first_i, m+1): length = i + min(column[i].origin, 0) cost = column[i].cost matches = column[i].matches if length >= self._min_overlap and cost <= length * max_error_rate and (matches > best.matches or (matches == best.matches and cost < best.cost)): # update best best.matches = matches best.cost = cost best.origin = column[i].origin best.ref_stop = i best.query_stop = n if best.cost == m + n: # best.cost was initialized with this value. # If it is unchanged, no alignment was found that has # an error rate within the allowed range. return None cdef int start1, start2 if best.origin >= 0: start1 = 0 start2 = best.origin else: start1 = -best.origin start2 = 0 assert best.ref_stop - start1 > 0 # Do not return empty alignments. return (start1, best.ref_stop, start2, best.query_stop, best.matches, best.cost) def __dealloc__(self): PyMem_Free(self.column) def locate(str reference, str query, double max_error_rate, int flags=SEMIGLOBAL, bint wildcard_ref=False, bint wildcard_query=False, int min_overlap=1): aligner = Aligner(reference, max_error_rate, flags, wildcard_ref, wildcard_query) aligner.min_overlap = min_overlap return aligner.locate(query) def compare_prefixes(str ref, str query, bint wildcard_ref=False, bint wildcard_query=False): """ Find out whether one string is the prefix of the other one, allowing IUPAC wildcards in ref and/or query if the appropriate flag is set. This is used to find an anchored 5' adapter (type 'FRONT') in the 'no indels' mode. This is very simple as only the number of errors needs to be counted. This function returns a tuple compatible with what Aligner.locate outputs. """ cdef int m = len(ref) cdef int n = len(query) cdef bytes query_bytes = query.encode('ascii') cdef bytes ref_bytes = ref.encode('ascii') cdef char* r_ptr cdef char* q_ptr cdef int length = min(m, n) cdef int i, matches = 0 cdef bint compare_ascii = False if wildcard_ref: ref_bytes = ref_bytes.translate(IUPAC_TABLE) elif wildcard_query: ref_bytes = ref_bytes.translate(ACGT_TABLE) else: compare_ascii = True if wildcard_query: query_bytes = query_bytes.translate(IUPAC_TABLE) elif wildcard_ref: query_bytes = query_bytes.translate(ACGT_TABLE) if compare_ascii: for i in range(length): if ref[i] == query[i]: matches += 1 else: r_ptr = ref_bytes q_ptr = query_bytes for i in range(length): if (r_ptr[i] & q_ptr[i]) != 0: matches += 1 # length - matches = no. of errors return (0, length, 0, length, matches, length - matches) cutadapt-1.9.1/cutadapt/compat.py0000664000175000017500000000132412575761274017543 0ustar marcelmarcel00000000000000# coding: utf-8 """ Minimal Py2/Py3 compatibility library. """ from __future__ import print_function, division, absolute_import import sys PY3 = sys.version > '3' if PY3: maketrans = str.maketrans basestring = str zip = zip next = next def bytes_to_str(s): return s.decode('ascii') def str_to_bytes(s): return s.encode('ascii') def force_str(s): if isinstance(s, bytes): return s.decode('ascii') else: return s from io import StringIO else: def bytes_to_str(s): return s def str_to_bytes(s): return s def force_str(s): return s def next(it): return it.next() from string import maketrans basestring = basestring from itertools import izip as zip from StringIO import StringIO cutadapt-1.9.1/cutadapt/_qualtrim.c0000664000175000017500000030263312575767334020061 0ustar marcelmarcel00000000000000/* Generated by Cython 0.23.1 */ /* BEGIN: Cython Metadata { "distutils": {} } END: Cython Metadata */ #define PY_SSIZE_T_CLEAN #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000) #error Cython requires Python 2.6+ or Python 3.2+. #else #define CYTHON_ABI "0_23_1" #include #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif #if !defined(WIN32) && !defined(MS_WINDOWS) #ifndef __stdcall #define __stdcall #endif #ifndef __cdecl #define __cdecl #endif #ifndef __fastcall #define __fastcall #endif #endif #ifndef DL_IMPORT #define DL_IMPORT(t) t #endif #ifndef DL_EXPORT #define DL_EXPORT(t) t #endif #ifndef PY_LONG_LONG #define PY_LONG_LONG LONG_LONG #endif #ifndef Py_HUGE_VAL #define Py_HUGE_VAL HUGE_VAL #endif #ifdef PYPY_VERSION #define CYTHON_COMPILING_IN_PYPY 1 #define CYTHON_COMPILING_IN_CPYTHON 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #endif #if !defined(CYTHON_USE_PYLONG_INTERNALS) && CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070000 #define CYTHON_USE_PYLONG_INTERNALS 1 #endif #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) #define Py_OptimizeFlag 0 #endif #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" #if PY_MAJOR_VERSION < 3 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #define __Pyx_DefaultClassType PyClass_Type #else #define __Pyx_BUILTIN_MODULE_NAME "builtins" #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #define __Pyx_DefaultClassType PyType_Type #endif #ifndef Py_TPFLAGS_CHECKTYPES #define Py_TPFLAGS_CHECKTYPES 0 #endif #ifndef Py_TPFLAGS_HAVE_INDEX #define Py_TPFLAGS_HAVE_INDEX 0 #endif #ifndef Py_TPFLAGS_HAVE_NEWBUFFER #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif #ifndef Py_TPFLAGS_HAVE_FINALIZE #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #else #define CYTHON_PEP393_ENABLED 0 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #endif #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) #else #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) #endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains) #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) #endif #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) #else #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) #endif #if PY_MAJOR_VERSION >= 3 #define PyBaseString_Type PyUnicode_Type #define PyStringObject PyUnicodeObject #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) #else #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) #endif #ifndef PySet_CheckExact #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) #endif #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) #if PY_MAJOR_VERSION >= 3 #define PyIntObject PyLongObject #define PyInt_Type PyLong_Type #define PyInt_Check(op) PyLong_Check(op) #define PyInt_CheckExact(op) PyLong_CheckExact(op) #define PyInt_FromString PyLong_FromString #define PyInt_FromUnicode PyLong_FromUnicode #define PyInt_FromLong PyLong_FromLong #define PyInt_FromSize_t PyLong_FromSize_t #define PyInt_FromSsize_t PyLong_FromSsize_t #define PyInt_AsLong PyLong_AsLong #define PyInt_AS_LONG PyLong_AS_LONG #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask #define PyNumber_Int PyNumber_Long #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY #ifndef PyUnicode_InternFromString #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) #endif #endif #if PY_VERSION_HEX < 0x030200A4 typedef long Py_hash_t; #define __Pyx_PyInt_FromHash_t PyInt_FromLong #define __Pyx_PyInt_AsHash_t PyInt_AsLong #else #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func)) #else #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) #endif #if PY_VERSION_HEX >= 0x030500B1 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) #elif CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 typedef struct { unaryfunc am_await; unaryfunc am_aiter; unaryfunc am_anext; } __Pyx_PyAsyncMethodsStruct; #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) #else #define __Pyx_PyType_AsAsync(obj) NULL #endif #ifndef CYTHON_RESTRICT #if defined(__GNUC__) #define CYTHON_RESTRICT __restrict__ #elif defined(_MSC_VER) && _MSC_VER >= 1400 #define CYTHON_RESTRICT __restrict #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_RESTRICT restrict #else #define CYTHON_RESTRICT #endif #endif #define __Pyx_void_to_None(void_result) (void_result, Py_INCREF(Py_None), Py_None) #ifndef CYTHON_INLINE #if defined(__GNUC__) #define CYTHON_INLINE __inline__ #elif defined(_MSC_VER) #define CYTHON_INLINE __inline #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_INLINE inline #else #define CYTHON_INLINE #endif #endif #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif #include #ifdef NAN #define __PYX_NAN() ((float) NAN) #else static CYTHON_INLINE float __PYX_NAN() { float value; memset(&value, 0xFF, sizeof(value)); return value; } #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) #else #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) #endif #ifndef __PYX_EXTERN_C #ifdef __cplusplus #define __PYX_EXTERN_C extern "C" #else #define __PYX_EXTERN_C extern #endif #endif #define __PYX_HAVE__cutadapt___qualtrim #define __PYX_HAVE_API__cutadapt___qualtrim #ifdef _OPENMP #include #endif /* _OPENMP */ #ifdef PYREX_WITHOUT_ASSERTIONS #define CYTHON_WITHOUT_ASSERTIONS #endif #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) # define CYTHON_UNUSED __attribute__ ((__unused__)) # else # define CYTHON_UNUSED # endif #endif #ifndef CYTHON_NCP_UNUSED # if CYTHON_COMPILING_IN_CPYTHON # define CYTHON_NCP_UNUSED # else # define CYTHON_NCP_UNUSED CYTHON_UNUSED # endif #endif typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0 #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #define __Pyx_uchar_cast(c) ((unsigned char)c) #define __Pyx_long_cast(x) ((long)x) #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ (sizeof(type) < sizeof(Py_ssize_t)) ||\ (sizeof(type) > sizeof(Py_ssize_t) &&\ likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX) &&\ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ v == (type)PY_SSIZE_T_MIN))) ||\ (sizeof(type) == sizeof(Py_ssize_t) &&\ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX))) ) #if defined (__cplusplus) && __cplusplus >= 201103L #include #define __Pyx_sst_abs(value) std::abs(value) #elif SIZEOF_INT >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) abs(value) #elif SIZEOF_LONG >= SIZEOF_SIZE_T #define __Pyx_sst_abs(value) labs(value) #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define __Pyx_sst_abs(value) llabs(value) #elif defined (_MSC_VER) && defined (_M_X64) #define __Pyx_sst_abs(value) _abs64(value) #elif defined (__GNUC__) #define __Pyx_sst_abs(value) __builtin_llabs(value) #else #define __Pyx_sst_abs(value) ((value<0) ? -value : value) #endif static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*); static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) #define __Pyx_PyBytes_FromString PyBytes_FromString #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); #if PY_MAJOR_VERSION < 3 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize #else #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize #endif #define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) #if PY_MAJOR_VERSION < 3 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { const Py_UNICODE *u_end = u; while (*u_end++) ; return (size_t)(u_end - u - 1); } #else #define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen #endif #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) #define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False)) static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); #if CYTHON_COMPILING_IN_CPYTHON #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII static int __Pyx_sys_getdefaultencoding_not_ascii; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; PyObject* ascii_chars_b = NULL; const char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; if (strcmp(default_encoding_c, "ascii") == 0) { __Pyx_sys_getdefaultencoding_not_ascii = 0; } else { char ascii_chars[128]; int c; for (c = 0; c < 128; c++) { ascii_chars[c] = c; } __Pyx_sys_getdefaultencoding_not_ascii = 1; ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); if (!ascii_chars_u) goto bad; ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { PyErr_Format( PyExc_ValueError, "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", default_encoding_c); goto bad; } Py_DECREF(ascii_chars_u); Py_DECREF(ascii_chars_b); } Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); Py_XDECREF(ascii_chars_u); Py_XDECREF(ascii_chars_b); return -1; } #endif #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) #else #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT static char* __PYX_DEFAULT_STRING_ENCODING; static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys; PyObject* default_encoding = NULL; char* default_encoding_c; sys = PyImport_ImportModule("sys"); if (!sys) goto bad; default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); Py_DECREF(sys); if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(default_encoding); return 0; bad: Py_XDECREF(default_encoding); return -1; } #endif #endif /* Test for GCC > 2.95 */ #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) #else /* !__GNUC__ or GCC < 2.95 */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ static PyObject *__pyx_m; static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static int __pyx_lineno; static int __pyx_clineno = 0; static const char * __pyx_cfilenm= __FILE__; static const char *__pyx_filename; static const char *__pyx_f[] = { "cutadapt/_qualtrim.pyx", }; /*--- Type declarations ---*/ /* --- Runtime support code (head) --- */ #ifndef CYTHON_REFNANNY #define CYTHON_REFNANNY 0 #endif #if CYTHON_REFNANNY typedef struct { void (*INCREF)(void*, PyObject*, int); void (*DECREF)(void*, PyObject*, int); void (*GOTREF)(void*, PyObject*, int); void (*GIVEREF)(void*, PyObject*, int); void* (*SetupContext)(const char*, int, const char*); void (*FinishContext)(void**); } __Pyx_RefNannyAPIStruct; static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; #ifdef WITH_THREAD #define __Pyx_RefNannySetupContext(name, acquire_gil)\ if (acquire_gil) {\ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ PyGILState_Release(__pyx_gilstate_save);\ } else {\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ } #else #define __Pyx_RefNannySetupContext(name, acquire_gil)\ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) #endif #define __Pyx_RefNannyFinishContext()\ __Pyx_RefNanny->FinishContext(&__pyx_refnanny) #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) #else #define __Pyx_RefNannyDeclarations #define __Pyx_RefNannySetupContext(name, acquire_gil) #define __Pyx_RefNannyFinishContext() #define __Pyx_INCREF(r) Py_INCREF(r) #define __Pyx_DECREF(r) Py_DECREF(r) #define __Pyx_GOTREF(r) #define __Pyx_GIVEREF(r) #define __Pyx_XINCREF(r) Py_XINCREF(r) #define __Pyx_XDECREF(r) Py_XDECREF(r) #define __Pyx_XGOTREF(r) #define __Pyx_XGIVEREF(r) #endif #define __Pyx_XDECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_XDECREF(tmp);\ } while (0) #define __Pyx_DECREF_SET(r, v) do {\ PyObject *tmp = (PyObject *) r;\ r = v; __Pyx_DECREF(tmp);\ } while (0) #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { PyTypeObject* tp = Py_TYPE(obj); if (likely(tp->tp_getattro)) return tp->tp_getattro(obj, attr_name); #if PY_MAJOR_VERSION < 3 if (likely(tp->tp_getattr)) return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); #endif return PyObject_GetAttr(obj, attr_name); } #else #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) #endif static PyObject *__Pyx_GetBuiltinName(PyObject *name); static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ const char* function_name); static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact); #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ __Pyx_GetItemInt_Generic(o, to_py_func(i)))) #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, int wraparound, int boundscheck); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound, int boundscheck); static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject*); #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyObject_Ord(c)\ (likely(PyUnicode_Check(c)) ? (long)__Pyx_PyUnicode_AsPy_UCS4(c) : __Pyx__PyObject_Ord(c)) #else #define __Pyx_PyObject_Ord(c) __Pyx__PyObject_Ord(c) #endif static long __Pyx__PyObject_Ord(PyObject* c); typedef struct { int code_line; PyCodeObject* code_object; } __Pyx_CodeObjectCacheEntry; struct __Pyx_CodeObjectCache { int count; int max_count; __Pyx_CodeObjectCacheEntry* entries; }; static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); static PyCodeObject *__pyx_find_code_object(int code_line); static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); static int __Pyx_check_binary_version(void); static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /* Module declarations from 'cutadapt._qualtrim' */ #define __Pyx_MODULE_NAME "cutadapt._qualtrim" int __pyx_module_is_main_cutadapt___qualtrim = 0; /* Implementation of 'cutadapt._qualtrim' */ static PyObject *__pyx_builtin_range; static PyObject *__pyx_builtin_reversed; static PyObject *__pyx_builtin_xrange; static char __pyx_k_i[] = "i"; static char __pyx_k_s[] = "s"; static char __pyx_k_base[] = "base"; static char __pyx_k_main[] = "__main__"; static char __pyx_k_stop[] = "stop"; static char __pyx_k_test[] = "__test__"; static char __pyx_k_range[] = "range"; static char __pyx_k_start[] = "start"; static char __pyx_k_xrange[] = "xrange"; static char __pyx_k_max_qual[] = "max_qual"; static char __pyx_k_reversed[] = "reversed"; static char __pyx_k_qualities[] = "qualities"; static char __pyx_k_cutoff_back[] = "cutoff_back"; static char __pyx_k_cutoff_front[] = "cutoff_front"; static char __pyx_k_Quality_trimming[] = "\nQuality trimming.\n"; static char __pyx_k_cutadapt__qualtrim[] = "cutadapt._qualtrim"; static char __pyx_k_quality_trim_index[] = "quality_trim_index"; static char __pyx_k_home_marcel_scm_cutadapt_cutada[] = "/home/marcel/scm/cutadapt/cutadapt/_qualtrim.pyx"; static PyObject *__pyx_n_s_base; static PyObject *__pyx_n_s_cutadapt__qualtrim; static PyObject *__pyx_n_s_cutoff_back; static PyObject *__pyx_n_s_cutoff_front; static PyObject *__pyx_kp_s_home_marcel_scm_cutadapt_cutada; static PyObject *__pyx_n_s_i; static PyObject *__pyx_n_s_main; static PyObject *__pyx_n_s_max_qual; static PyObject *__pyx_n_s_qualities; static PyObject *__pyx_n_s_quality_trim_index; static PyObject *__pyx_n_s_range; static PyObject *__pyx_n_s_reversed; static PyObject *__pyx_n_s_s; static PyObject *__pyx_n_s_start; static PyObject *__pyx_n_s_stop; static PyObject *__pyx_n_s_test; static PyObject *__pyx_n_s_xrange; static PyObject *__pyx_pf_8cutadapt_9_qualtrim_quality_trim_index(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_qualities, int __pyx_v_cutoff_front, int __pyx_v_cutoff_back, int __pyx_v_base); /* proto */ static PyObject *__pyx_tuple_; static PyObject *__pyx_codeobj__2; /* "cutadapt/_qualtrim.pyx":6 * """ * * def quality_trim_index(str qualities, int cutoff_front, int cutoff_back, int base=33): # <<<<<<<<<<<<<< * """ * Find the positions at which to trim low-quality ends from a nucleotide sequence. */ /* Python wrapper */ static PyObject *__pyx_pw_8cutadapt_9_qualtrim_1quality_trim_index(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_8cutadapt_9_qualtrim_quality_trim_index[] = "\n\tFind the positions at which to trim low-quality ends from a nucleotide sequence.\n\tReturn tuple (start, stop) that indicates the good-quality segment.\n\n\tQualities are assumed to be ASCII-encoded as chr(qual + base).\n\n\tThe algorithm is the same as the one used by BWA within the function\n\t'bwa_trim_read':\n\t- Subtract the cutoff value from all qualities.\n\t- Compute partial sums from all indices to the end of the sequence.\n\t- Trim sequence at the index at which the sum is minimal.\n\t"; static PyMethodDef __pyx_mdef_8cutadapt_9_qualtrim_1quality_trim_index = {"quality_trim_index", (PyCFunction)__pyx_pw_8cutadapt_9_qualtrim_1quality_trim_index, METH_VARARGS|METH_KEYWORDS, __pyx_doc_8cutadapt_9_qualtrim_quality_trim_index}; static PyObject *__pyx_pw_8cutadapt_9_qualtrim_1quality_trim_index(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_qualities = 0; int __pyx_v_cutoff_front; int __pyx_v_cutoff_back; int __pyx_v_base; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("quality_trim_index (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_qualities,&__pyx_n_s_cutoff_front,&__pyx_n_s_cutoff_back,&__pyx_n_s_base,0}; PyObject* values[4] = {0,0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_qualities)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cutoff_front)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("quality_trim_index", 0, 3, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cutoff_back)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("quality_trim_index", 0, 3, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_base); if (value) { values[3] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "quality_trim_index") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_qualities = ((PyObject*)values[0]); __pyx_v_cutoff_front = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_cutoff_front == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_cutoff_back = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_cutoff_back == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L3_error;} if (values[3]) { __pyx_v_base = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_base == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_base = ((int)33); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("quality_trim_index", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cutadapt._qualtrim.quality_trim_index", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qualities), (&PyString_Type), 1, "qualities", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_8cutadapt_9_qualtrim_quality_trim_index(__pyx_self, __pyx_v_qualities, __pyx_v_cutoff_front, __pyx_v_cutoff_back, __pyx_v_base); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_8cutadapt_9_qualtrim_quality_trim_index(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_qualities, int __pyx_v_cutoff_front, int __pyx_v_cutoff_back, int __pyx_v_base) { int __pyx_v_s; int __pyx_v_max_qual; int __pyx_v_stop; int __pyx_v_start; int __pyx_v_i; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations Py_ssize_t __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; long __pyx_t_4; int __pyx_t_5; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("quality_trim_index", 0); /* "cutadapt/_qualtrim.pyx":21 * cdef int s * cdef int max_qual * cdef int stop = len(qualities) # <<<<<<<<<<<<<< * cdef int start = 0 * cdef int i */ __pyx_t_1 = PyObject_Length(__pyx_v_qualities); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_stop = __pyx_t_1; /* "cutadapt/_qualtrim.pyx":22 * cdef int max_qual * cdef int stop = len(qualities) * cdef int start = 0 # <<<<<<<<<<<<<< * cdef int i * */ __pyx_v_start = 0; /* "cutadapt/_qualtrim.pyx":26 * * # find trim position for 5' end * s = 0 # <<<<<<<<<<<<<< * max_qual = 0 * for i in range(len(qualities)): */ __pyx_v_s = 0; /* "cutadapt/_qualtrim.pyx":27 * # find trim position for 5' end * s = 0 * max_qual = 0 # <<<<<<<<<<<<<< * for i in range(len(qualities)): * s += cutoff_front - (ord(qualities[i]) - base) */ __pyx_v_max_qual = 0; /* "cutadapt/_qualtrim.pyx":28 * s = 0 * max_qual = 0 * for i in range(len(qualities)): # <<<<<<<<<<<<<< * s += cutoff_front - (ord(qualities[i]) - base) * if s < 0: */ __pyx_t_1 = PyObject_Length(__pyx_v_qualities); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; /* "cutadapt/_qualtrim.pyx":29 * max_qual = 0 * for i in range(len(qualities)): * s += cutoff_front - (ord(qualities[i]) - base) # <<<<<<<<<<<<<< * if s < 0: * break */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_qualities, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Ord(__pyx_t_3); if (unlikely(__pyx_t_4 == (long)(Py_UCS4)-1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_s = (__pyx_v_s + (__pyx_v_cutoff_front - (__pyx_t_4 - __pyx_v_base))); /* "cutadapt/_qualtrim.pyx":30 * for i in range(len(qualities)): * s += cutoff_front - (ord(qualities[i]) - base) * if s < 0: # <<<<<<<<<<<<<< * break * if s > max_qual: */ __pyx_t_5 = ((__pyx_v_s < 0) != 0); if (__pyx_t_5) { /* "cutadapt/_qualtrim.pyx":31 * s += cutoff_front - (ord(qualities[i]) - base) * if s < 0: * break # <<<<<<<<<<<<<< * if s > max_qual: * max_qual = s */ goto __pyx_L4_break; /* "cutadapt/_qualtrim.pyx":30 * for i in range(len(qualities)): * s += cutoff_front - (ord(qualities[i]) - base) * if s < 0: # <<<<<<<<<<<<<< * break * if s > max_qual: */ } /* "cutadapt/_qualtrim.pyx":32 * if s < 0: * break * if s > max_qual: # <<<<<<<<<<<<<< * max_qual = s * start = i + 1 */ __pyx_t_5 = ((__pyx_v_s > __pyx_v_max_qual) != 0); if (__pyx_t_5) { /* "cutadapt/_qualtrim.pyx":33 * break * if s > max_qual: * max_qual = s # <<<<<<<<<<<<<< * start = i + 1 * */ __pyx_v_max_qual = __pyx_v_s; /* "cutadapt/_qualtrim.pyx":34 * if s > max_qual: * max_qual = s * start = i + 1 # <<<<<<<<<<<<<< * * # same for 3' end */ __pyx_v_start = (__pyx_v_i + 1); /* "cutadapt/_qualtrim.pyx":32 * if s < 0: * break * if s > max_qual: # <<<<<<<<<<<<<< * max_qual = s * start = i + 1 */ } } __pyx_L4_break:; /* "cutadapt/_qualtrim.pyx":37 * * # same for 3' end * max_qual = 0 # <<<<<<<<<<<<<< * s = 0 * for i in reversed(xrange(len(qualities))): */ __pyx_v_max_qual = 0; /* "cutadapt/_qualtrim.pyx":38 * # same for 3' end * max_qual = 0 * s = 0 # <<<<<<<<<<<<<< * for i in reversed(xrange(len(qualities))): * s += cutoff_back - (ord(qualities[i]) - base) */ __pyx_v_s = 0; /* "cutadapt/_qualtrim.pyx":39 * max_qual = 0 * s = 0 * for i in reversed(xrange(len(qualities))): # <<<<<<<<<<<<<< * s += cutoff_back - (ord(qualities[i]) - base) * if s < 0: */ __pyx_t_1 = PyObject_Length(__pyx_v_qualities); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = __pyx_t_1-1; __pyx_t_2 >= 0; __pyx_t_2-=1) { __pyx_v_i = __pyx_t_2; /* "cutadapt/_qualtrim.pyx":40 * s = 0 * for i in reversed(xrange(len(qualities))): * s += cutoff_back - (ord(qualities[i]) - base) # <<<<<<<<<<<<<< * if s < 0: * break */ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_qualities, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_Ord(__pyx_t_3); if (unlikely(__pyx_t_4 == (long)(Py_UCS4)-1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_s = (__pyx_v_s + (__pyx_v_cutoff_back - (__pyx_t_4 - __pyx_v_base))); /* "cutadapt/_qualtrim.pyx":41 * for i in reversed(xrange(len(qualities))): * s += cutoff_back - (ord(qualities[i]) - base) * if s < 0: # <<<<<<<<<<<<<< * break * if s > max_qual: */ __pyx_t_5 = ((__pyx_v_s < 0) != 0); if (__pyx_t_5) { /* "cutadapt/_qualtrim.pyx":42 * s += cutoff_back - (ord(qualities[i]) - base) * if s < 0: * break # <<<<<<<<<<<<<< * if s > max_qual: * max_qual = s */ goto __pyx_L8_break; /* "cutadapt/_qualtrim.pyx":41 * for i in reversed(xrange(len(qualities))): * s += cutoff_back - (ord(qualities[i]) - base) * if s < 0: # <<<<<<<<<<<<<< * break * if s > max_qual: */ } /* "cutadapt/_qualtrim.pyx":43 * if s < 0: * break * if s > max_qual: # <<<<<<<<<<<<<< * max_qual = s * stop = i */ __pyx_t_5 = ((__pyx_v_s > __pyx_v_max_qual) != 0); if (__pyx_t_5) { /* "cutadapt/_qualtrim.pyx":44 * break * if s > max_qual: * max_qual = s # <<<<<<<<<<<<<< * stop = i * if start >= stop: */ __pyx_v_max_qual = __pyx_v_s; /* "cutadapt/_qualtrim.pyx":45 * if s > max_qual: * max_qual = s * stop = i # <<<<<<<<<<<<<< * if start >= stop: * start, stop = 0, 0 */ __pyx_v_stop = __pyx_v_i; /* "cutadapt/_qualtrim.pyx":43 * if s < 0: * break * if s > max_qual: # <<<<<<<<<<<<<< * max_qual = s * stop = i */ } } __pyx_L8_break:; /* "cutadapt/_qualtrim.pyx":46 * max_qual = s * stop = i * if start >= stop: # <<<<<<<<<<<<<< * start, stop = 0, 0 * return (start, stop) */ __pyx_t_5 = ((__pyx_v_start >= __pyx_v_stop) != 0); if (__pyx_t_5) { /* "cutadapt/_qualtrim.pyx":47 * stop = i * if start >= stop: * start, stop = 0, 0 # <<<<<<<<<<<<<< * return (start, stop) */ __pyx_t_2 = 0; __pyx_t_6 = 0; __pyx_v_start = __pyx_t_2; __pyx_v_stop = __pyx_t_6; /* "cutadapt/_qualtrim.pyx":46 * max_qual = s * stop = i * if start >= stop: # <<<<<<<<<<<<<< * start, stop = 0, 0 * return (start, stop) */ } /* "cutadapt/_qualtrim.pyx":48 * if start >= stop: * start, stop = 0, 0 * return (start, stop) # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_start); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_stop); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7); __pyx_t_3 = 0; __pyx_t_7 = 0; __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; /* "cutadapt/_qualtrim.pyx":6 * """ * * def quality_trim_index(str qualities, int cutoff_front, int cutoff_back, int base=33): # <<<<<<<<<<<<<< * """ * Find the positions at which to trim low-quality ends from a nucleotide sequence. */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("cutadapt._qualtrim.quality_trim_index", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyMethodDef __pyx_methods[] = { {0, 0, 0, 0} }; #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef __pyx_moduledef = { #if PY_VERSION_HEX < 0x03020000 { PyObject_HEAD_INIT(NULL) NULL, 0, NULL }, #else PyModuleDef_HEAD_INIT, #endif "_qualtrim", __pyx_k_Quality_trimming, /* m_doc */ -1, /* m_size */ __pyx_methods /* m_methods */, NULL, /* m_reload */ NULL, /* m_traverse */ NULL, /* m_clear */ NULL /* m_free */ }; #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1}, {&__pyx_n_s_cutadapt__qualtrim, __pyx_k_cutadapt__qualtrim, sizeof(__pyx_k_cutadapt__qualtrim), 0, 0, 1, 1}, {&__pyx_n_s_cutoff_back, __pyx_k_cutoff_back, sizeof(__pyx_k_cutoff_back), 0, 0, 1, 1}, {&__pyx_n_s_cutoff_front, __pyx_k_cutoff_front, sizeof(__pyx_k_cutoff_front), 0, 0, 1, 1}, {&__pyx_kp_s_home_marcel_scm_cutadapt_cutada, __pyx_k_home_marcel_scm_cutadapt_cutada, sizeof(__pyx_k_home_marcel_scm_cutadapt_cutada), 0, 0, 1, 0}, {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, {&__pyx_n_s_max_qual, __pyx_k_max_qual, sizeof(__pyx_k_max_qual), 0, 0, 1, 1}, {&__pyx_n_s_qualities, __pyx_k_qualities, sizeof(__pyx_k_qualities), 0, 0, 1, 1}, {&__pyx_n_s_quality_trim_index, __pyx_k_quality_trim_index, sizeof(__pyx_k_quality_trim_index), 0, 0, 1, 1}, {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, {&__pyx_n_s_reversed, __pyx_k_reversed, sizeof(__pyx_k_reversed), 0, 0, 1, 1}, {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1}, {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1}, {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1}, {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, {&__pyx_n_s_xrange, __pyx_k_xrange, sizeof(__pyx_k_xrange), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_reversed = __Pyx_GetBuiltinName(__pyx_n_s_reversed); if (!__pyx_builtin_reversed) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if PY_MAJOR_VERSION >= 3 __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_xrange); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif return 0; __pyx_L1_error:; return -1; } static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); /* "cutadapt/_qualtrim.pyx":6 * """ * * def quality_trim_index(str qualities, int cutoff_front, int cutoff_back, int base=33): # <<<<<<<<<<<<<< * """ * Find the positions at which to trim low-quality ends from a nucleotide sequence. */ __pyx_tuple_ = PyTuple_Pack(9, __pyx_n_s_qualities, __pyx_n_s_cutoff_front, __pyx_n_s_cutoff_back, __pyx_n_s_base, __pyx_n_s_s, __pyx_n_s_max_qual, __pyx_n_s_stop, __pyx_n_s_start, __pyx_n_s_i); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple_); __Pyx_GIVEREF(__pyx_tuple_); __pyx_codeobj__2 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple_, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_marcel_scm_cutadapt_cutada, __pyx_n_s_quality_trim_index, 6, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; __Pyx_RefNannyFinishContext(); return -1; } static int __Pyx_InitGlobals(void) { if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; return 0; __pyx_L1_error:; return -1; } #if PY_MAJOR_VERSION < 3 PyMODINIT_FUNC init_qualtrim(void); /*proto*/ PyMODINIT_FUNC init_qualtrim(void) #else PyMODINIT_FUNC PyInit__qualtrim(void); /*proto*/ PyMODINIT_FUNC PyInit__qualtrim(void) #endif { PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); if (!__Pyx_RefNanny) { PyErr_Clear(); __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); if (!__Pyx_RefNanny) Py_FatalError("failed to import 'refnanny' module"); } #endif __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit__qualtrim(void)", 0); if (__Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #ifdef __Pyx_CyFunction_USED if (__pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_FusedFunction_USED if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Coroutine_USED if (__pyx_Coroutine_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_Generator_USED if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif #ifdef __Pyx_StopAsyncIteration_USED if (__pyx_StopAsyncIteration_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /*--- Library function declarations ---*/ /*--- Threads initialization code ---*/ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS #ifdef WITH_THREAD /* Python build with threading support? */ PyEval_InitThreads(); #endif #endif /*--- Module creation code ---*/ #if PY_MAJOR_VERSION < 3 __pyx_m = Py_InitModule4("_qualtrim", __pyx_methods, __pyx_k_Quality_trimming, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); #else __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} Py_INCREF(__pyx_d); __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); #endif if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; /*--- Initialize various global constants etc. ---*/ if (__Pyx_InitGlobals() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if (__pyx_module_is_main_cutadapt___qualtrim) { if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if PY_MAJOR_VERSION >= 3 { PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (!PyDict_GetItemString(modules, "cutadapt._qualtrim")) { if (unlikely(PyDict_SetItemString(modules, "cutadapt._qualtrim", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } } #endif /*--- Builtin init code ---*/ if (__Pyx_InitCachedBuiltins() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Constants init code ---*/ if (__Pyx_InitCachedConstants() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Global init code ---*/ /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ /*--- Type import code ---*/ /*--- Variable import code ---*/ /*--- Function import code ---*/ /*--- Execution code ---*/ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) if (__Pyx_patch_abc() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif /* "cutadapt/_qualtrim.pyx":6 * """ * * def quality_trim_index(str qualities, int cutoff_front, int cutoff_back, int base=33): # <<<<<<<<<<<<<< * """ * Find the positions at which to trim low-quality ends from a nucleotide sequence. */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_8cutadapt_9_qualtrim_1quality_trim_index, NULL, __pyx_n_s_cutadapt__qualtrim); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_quality_trim_index, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "cutadapt/_qualtrim.pyx":1 * # kate: syntax Python; # <<<<<<<<<<<<<< * """ * Quality trimming. */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /*--- Wrapped vars code ---*/ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); if (__pyx_m) { if (__pyx_d) { __Pyx_AddTraceback("init cutadapt._qualtrim", __pyx_clineno, __pyx_lineno, __pyx_filename); } Py_DECREF(__pyx_m); __pyx_m = 0; } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init cutadapt._qualtrim"); } __pyx_L0:; __Pyx_RefNannyFinishContext(); #if PY_MAJOR_VERSION < 3 return; #else return __pyx_m; #endif } /* --- Runtime support code --- */ #if CYTHON_REFNANNY static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { PyObject *m = NULL, *p = NULL; void *r = NULL; m = PyImport_ImportModule((char *)modname); if (!m) goto end; p = PyObject_GetAttrString(m, (char *)"RefNannyAPI"); if (!p) goto end; r = PyLong_AsVoidPtr(p); end: Py_XDECREF(p); Py_XDECREF(m); return (__Pyx_RefNannyAPIStruct *)r; } #endif static PyObject *__Pyx_GetBuiltinName(PyObject *name) { PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name); if (unlikely(!result)) { PyErr_Format(PyExc_NameError, #if PY_MAJOR_VERSION >= 3 "name '%U' is not defined", name); #else "name '%.200s' is not defined", PyString_AS_STRING(name)); #endif } return result; } static void __Pyx_RaiseArgtupleInvalid( const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found) { Py_ssize_t num_expected; const char *more_or_less; if (num_found < num_min) { num_expected = num_min; more_or_less = "at least"; } else { num_expected = num_max; more_or_less = "at most"; } if (exact) { more_or_less = "exactly"; } PyErr_Format(PyExc_TypeError, "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", func_name, more_or_less, num_expected, (num_expected == 1) ? "" : "s", num_found); } static void __Pyx_RaiseDoubleKeywordsError( const char* func_name, PyObject* kw_name) { PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION >= 3 "%s() got multiple values for keyword argument '%U'", func_name, kw_name); #else "%s() got multiple values for keyword argument '%s'", func_name, PyString_AsString(kw_name)); #endif } static int __Pyx_ParseOptionalKeywords( PyObject *kwds, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name) { PyObject *key = 0, *value = 0; Py_ssize_t pos = 0; PyObject*** name; PyObject*** first_kw_arg = argnames + num_pos_args; while (PyDict_Next(kwds, &pos, &key, &value)) { name = first_kw_arg; while (*name && (**name != key)) name++; if (*name) { values[name-argnames] = value; continue; } name = first_kw_arg; #if PY_MAJOR_VERSION < 3 if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { while (*name) { if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) && _PyString_Eq(**name, key)) { values[name-argnames] = value; break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { if ((**argname == key) || ( (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) && _PyString_Eq(**argname, key))) { goto arg_passed_twice; } argname++; } } } else #endif if (likely(PyUnicode_Check(key))) { while (*name) { int cmp = (**name == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : #endif PyUnicode_Compare(**name, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) { values[name-argnames] = value; break; } name++; } if (*name) continue; else { PyObject*** argname = argnames; while (argname != first_kw_arg) { int cmp = (**argname == key) ? 0 : #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : #endif PyUnicode_Compare(**argname, key); if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; if (cmp == 0) goto arg_passed_twice; argname++; } } } else goto invalid_keyword_type; if (kwds2) { if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; } else { goto invalid_keyword; } } return 0; arg_passed_twice: __Pyx_RaiseDoubleKeywordsError(function_name, key); goto bad; invalid_keyword_type: PyErr_Format(PyExc_TypeError, "%.200s() keywords must be strings", function_name); goto bad; invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", function_name, key); #endif bad: return -1; } static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) { PyErr_Format(PyExc_TypeError, "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", name, type->tp_name, Py_TYPE(obj)->tp_name); } static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (none_allowed && obj == Py_None) return 1; else if (exact) { if (likely(Py_TYPE(obj) == type)) return 1; #if PY_MAJOR_VERSION == 2 else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; #endif } else { if (likely(PyObject_TypeCheck(obj, type))) return 1; } __Pyx_RaiseArgumentTypeInvalid(name, obj, type); return 0; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (!j) return NULL; r = PyObject_GetItem(o, j); Py_DECREF(j); return r; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, i); Py_INCREF(r); return r; } return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else return PySequence_GetItem(o, i); #endif } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; } } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; } } else { PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; if (likely(m && m->sq_item)) { if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { Py_ssize_t l = m->sq_length(o); if (likely(l >= 0)) { i += l; } else { if (PyErr_ExceptionMatches(PyExc_OverflowError)) PyErr_Clear(); else return NULL; } } return m->sq_item(o, i); } } #else if (is_list || PySequence_Check(o)) { return PySequence_GetItem(o, i); } #endif return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); } static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject* x) { Py_ssize_t length; #if CYTHON_PEP393_ENABLED length = PyUnicode_GET_LENGTH(x); if (likely(length == 1)) { return PyUnicode_READ_CHAR(x, 0); } #else length = PyUnicode_GET_SIZE(x); if (likely(length == 1)) { return PyUnicode_AS_UNICODE(x)[0]; } #if Py_UNICODE_SIZE == 2 else if (PyUnicode_GET_SIZE(x) == 2) { Py_UCS4 high_val = PyUnicode_AS_UNICODE(x)[0]; if (high_val >= 0xD800 && high_val <= 0xDBFF) { Py_UCS4 low_val = PyUnicode_AS_UNICODE(x)[1]; if (low_val >= 0xDC00 && low_val <= 0xDFFF) { return 0x10000 + (((high_val & ((1<<10)-1)) << 10) | (low_val & ((1<<10)-1))); } } } #endif #endif PyErr_Format(PyExc_ValueError, "only single character unicode strings can be converted to Py_UCS4, " "got length %" CYTHON_FORMAT_SSIZE_T "d", length); return (Py_UCS4)-1; } static long __Pyx__PyObject_Ord(PyObject* c) { Py_ssize_t size; if (PyBytes_Check(c)) { size = PyBytes_GET_SIZE(c); if (likely(size == 1)) { return (unsigned char) PyBytes_AS_STRING(c)[0]; } #if PY_MAJOR_VERSION < 3 } else if (PyUnicode_Check(c)) { return (long)__Pyx_PyUnicode_AsPy_UCS4(c); #endif #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) } else if (PyByteArray_Check(c)) { size = PyByteArray_GET_SIZE(c); if (likely(size == 1)) { return (unsigned char) PyByteArray_AS_STRING(c)[0]; } #endif } else { PyErr_Format(PyExc_TypeError, "ord() expected string of length 1, but %.200s found", c->ob_type->tp_name); return (long)(Py_UCS4)-1; } PyErr_Format(PyExc_TypeError, "ord() expected a character, but string of length %zd found", size); return (long)(Py_UCS4)-1; } static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { int start = 0, mid = 0, end = count - 1; if (end >= 0 && code_line > entries[end].code_line) { return count; } while (start < end) { mid = start + (end - start) / 2; if (code_line < entries[mid].code_line) { end = mid; } else if (code_line > entries[mid].code_line) { start = mid + 1; } else { return mid; } } if (code_line <= entries[mid].code_line) { return mid; } else { return mid + 1; } } static PyCodeObject *__pyx_find_code_object(int code_line) { PyCodeObject* code_object; int pos; if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { return NULL; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { return NULL; } code_object = __pyx_code_cache.entries[pos].code_object; Py_INCREF(code_object); return code_object; } static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { int pos, i; __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; if (unlikely(!code_line)) { return; } if (unlikely(!entries)) { entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); if (likely(entries)) { __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = 64; __pyx_code_cache.count = 1; entries[0].code_line = code_line; entries[0].code_object = code_object; Py_INCREF(code_object); } return; } pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { PyCodeObject* tmp = entries[pos].code_object; entries[pos].code_object = code_object; Py_DECREF(tmp); return; } if (__pyx_code_cache.count == __pyx_code_cache.max_count) { int new_max = __pyx_code_cache.max_count + 64; entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); if (unlikely(!entries)) { return; } __pyx_code_cache.entries = entries; __pyx_code_cache.max_count = new_max; } for (i=__pyx_code_cache.count; i>pos; i--) { entries[i] = entries[i-1]; } entries[pos].code_line = code_line; entries[pos].code_object = code_object; __pyx_code_cache.count++; Py_INCREF(code_object); } #include "compile.h" #include "frameobject.h" #include "traceback.h" static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyObject *py_srcfile = 0; PyObject *py_funcname = 0; #if PY_MAJOR_VERSION < 3 py_srcfile = PyString_FromString(filename); #else py_srcfile = PyUnicode_FromString(filename); #endif if (!py_srcfile) goto bad; if (c_line) { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #else py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); #endif } else { #if PY_MAJOR_VERSION < 3 py_funcname = PyString_FromString(funcname); #else py_funcname = PyUnicode_FromString(funcname); #endif } if (!py_funcname) goto bad; py_code = __Pyx_PyCode_New( 0, 0, 0, 0, 0, __pyx_empty_bytes, /*PyObject *code,*/ __pyx_empty_tuple, /*PyObject *consts,*/ __pyx_empty_tuple, /*PyObject *names,*/ __pyx_empty_tuple, /*PyObject *varnames,*/ __pyx_empty_tuple, /*PyObject *freevars,*/ __pyx_empty_tuple, /*PyObject *cellvars,*/ py_srcfile, /*PyObject *filename,*/ py_funcname, /*PyObject *name,*/ py_line, __pyx_empty_bytes /*PyObject *lnotab*/ ); Py_DECREF(py_srcfile); Py_DECREF(py_funcname); return py_code; bad: Py_XDECREF(py_srcfile); Py_XDECREF(py_funcname); return NULL; } static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename) { PyCodeObject *py_code = 0; PyFrameObject *py_frame = 0; py_code = __pyx_find_code_object(c_line ? c_line : py_line); if (!py_code) { py_code = __Pyx_CreateCodeObjectForTraceback( funcname, c_line, py_line, filename); if (!py_code) goto bad; __pyx_insert_code_object(c_line ? c_line : py_line, py_code); } py_frame = PyFrame_New( PyThreadState_GET(), /*PyThreadState *tstate,*/ py_code, /*PyCodeObject *code,*/ __pyx_d, /*PyObject *globals,*/ 0 /*PyObject *locals*/ ); if (!py_frame) goto bad; py_frame->f_lineno = py_line; PyTraceBack_Here(py_frame); bad: Py_XDECREF(py_code); Py_XDECREF(py_frame); } #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ {\ func_type value = func_value;\ if (sizeof(target_type) < sizeof(func_type)) {\ if (unlikely(value != (func_type) (target_type) value)) {\ func_type zero = 0;\ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ return (target_type) -1;\ if (is_unsigned && unlikely(value < zero))\ goto raise_neg_overflow;\ else\ goto raise_overflow;\ }\ }\ return (target_type) value;\ } #if CYTHON_USE_PYLONG_INTERNALS #include "longintrepr.h" #endif static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { const int neg_one = (int) -1, const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(int) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (int) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (int) 0; case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) case 2: if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | digits[0]))) } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { return (int) (((((int)digits[1]) << PyLong_SHIFT) | digits[0])); } } break; case 3: if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]))) } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { return (int) (((((((int)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0])); } } break; case 4: if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]))) } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (int) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(int) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (int) 0; case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, -(sdigit) digits[0]) case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) case -2: if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | digits[0]))) } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { return (int) -(((((int)digits[1]) << PyLong_SHIFT) | digits[0])); } } break; case 2: if (8 * sizeof(int) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | digits[0]))) } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { return (int) (((((int)digits[1]) << PyLong_SHIFT) | digits[0])); } } break; case -3: if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]))) } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { return (int) -(((((((int)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0])); } } break; case 3: if (8 * sizeof(int) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]))) } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { return (int) (((((((int)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0])); } } break; case -4: if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]))) } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { return (int) -(((((((((int)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0])); } } break; case 4: if (8 * sizeof(int) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]))) } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0])); } } break; } #endif if (sizeof(int) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else int val; PyObject *v = __Pyx_PyNumber_Int(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (int) -1; } } else { int val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (int) -1; val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to int"); return (int) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to int"); return (int) -1; } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { const int neg_one = (int) -1, const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(int) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(int) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(int), little, !is_unsigned); } } static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { const long neg_one = (long) -1, const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(unsigned long)) { return PyLong_FromUnsignedLong((unsigned long) value); } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); } } else { if (sizeof(long) <= sizeof(long)) { return PyInt_FromLong((long) value); } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { return PyLong_FromLongLong((PY_LONG_LONG) value); } } { int one = 1; int little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&value; return _PyLong_FromByteArray(bytes, sizeof(long), little, !is_unsigned); } } static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { const long neg_one = (long) -1, const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { if (sizeof(long) < sizeof(long)) { __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) } else { long val = PyInt_AS_LONG(x); if (is_unsigned && unlikely(val < 0)) { goto raise_neg_overflow; } return (long) val; } } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (long) 0; case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) case 2: if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | digits[0]))) } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { return (long) (((((long)digits[1]) << PyLong_SHIFT) | digits[0])); } } break; case 3: if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]))) } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { return (long) (((((((long)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0])); } } break; case 4: if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]))) } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0])); } } break; } #endif #if CYTHON_COMPILING_IN_CPYTHON if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } #else { int result = PyObject_RichCompareBool(x, Py_False, Py_LT); if (unlikely(result < 0)) return (long) -1; if (unlikely(result == 1)) goto raise_neg_overflow; } #endif if (sizeof(long) <= sizeof(unsigned long)) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) } } else { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return (long) 0; case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, -(sdigit) digits[0]) case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) case -2: if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | digits[0]))) } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { return (long) -(((((long)digits[1]) << PyLong_SHIFT) | digits[0])); } } break; case 2: if (8 * sizeof(long) > 1 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | digits[0]))) } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { return (long) (((((long)digits[1]) << PyLong_SHIFT) | digits[0])); } } break; case -3: if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]))) } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { return (long) -(((((((long)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0])); } } break; case 3: if (8 * sizeof(long) > 2 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]))) } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { return (long) (((((((long)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0])); } } break; case -4: if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]))) } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { return (long) -(((((((((long)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0])); } } break; case 4: if (8 * sizeof(long) > 3 * PyLong_SHIFT) { if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0]))) } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0])); } } break; } #endif if (sizeof(long) <= sizeof(long)) { __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) } } { #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) PyErr_SetString(PyExc_RuntimeError, "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); #else long val; PyObject *v = __Pyx_PyNumber_Int(x); #if PY_MAJOR_VERSION < 3 if (likely(v) && !PyLong_Check(v)) { PyObject *tmp = v; v = PyNumber_Long(tmp); Py_DECREF(tmp); } #endif if (likely(v)) { int one = 1; int is_little = (int)*(unsigned char *)&one; unsigned char *bytes = (unsigned char *)&val; int ret = _PyLong_AsByteArray((PyLongObject *)v, bytes, sizeof(val), is_little, !is_unsigned); Py_DECREF(v); if (likely(!ret)) return val; } #endif return (long) -1; } } else { long val; PyObject *tmp = __Pyx_PyNumber_Int(x); if (!tmp) return (long) -1; val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } raise_overflow: PyErr_SetString(PyExc_OverflowError, "value too large to convert to long"); return (long) -1; raise_neg_overflow: PyErr_SetString(PyExc_OverflowError, "can't convert negative value to long"); return (long) -1; } static int __Pyx_check_binary_version(void) { char ctversion[4], rtversion[4]; PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION); PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion()); if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) { char message[200]; PyOS_snprintf(message, sizeof(message), "compiletime version %s of module '%.100s' " "does not match runtime version %s", ctversion, __Pyx_MODULE_NAME, rtversion); return PyErr_WarnEx(NULL, message, 1); } return 0; } static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION < 3 if (t->is_unicode) { *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); } else if (t->intern) { *t->p = PyString_InternFromString(t->s); } else { *t->p = PyString_FromStringAndSize(t->s, t->n - 1); } #else if (t->is_unicode | t->is_str) { if (t->intern) { *t->p = PyUnicode_InternFromString(t->s); } else if (t->encoding) { *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); } else { *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); } } else { *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); } #endif if (!*t->p) return -1; ++t; } return 0; } static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); } static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) { Py_ssize_t ignore; return __Pyx_PyObject_AsStringAndSize(o, &ignore); } static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { #if CYTHON_COMPILING_IN_CPYTHON && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) if ( #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII __Pyx_sys_getdefaultencoding_not_ascii && #endif PyUnicode_Check(o)) { #if PY_VERSION_HEX < 0x03030000 char* defenc_c; PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); if (!defenc) return NULL; defenc_c = PyBytes_AS_STRING(defenc); #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII { char* end = defenc_c + PyBytes_GET_SIZE(defenc); char* c; for (c = defenc_c; c < end; c++) { if ((unsigned char) (*c) >= 128) { PyUnicode_AsASCIIString(o); return NULL; } } } #endif *length = PyBytes_GET_SIZE(defenc); return defenc_c; #else if (__Pyx_PyUnicode_READY(o) == -1) return NULL; #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII if (PyUnicode_IS_ASCII(o)) { *length = PyUnicode_GET_LENGTH(o); return PyUnicode_AsUTF8(o); } else { PyUnicode_AsASCIIString(o); return NULL; } #else return PyUnicode_AsUTF8AndSize(o, length); #endif #endif } else #endif #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) if (PyByteArray_Check(o)) { *length = PyByteArray_GET_SIZE(o); return PyByteArray_AS_STRING(o); } else #endif { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); if (unlikely(r < 0)) { return NULL; } else { return result; } } } static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; #if PY_MAJOR_VERSION < 3 if (PyInt_Check(x) || PyLong_Check(x)) #else if (PyLong_Check(x)) #endif return __Pyx_NewRef(x); m = Py_TYPE(x)->tp_as_number; #if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = PyNumber_Int(x); } else if (m && m->nb_long) { name = "long"; res = PyNumber_Long(x); } #else if (m && m->nb_int) { name = "int"; res = PyNumber_Long(x); } #endif if (res) { #if PY_MAJOR_VERSION < 3 if (!PyInt_Check(res) && !PyLong_Check(res)) { #else if (!PyLong_Check(res)) { #endif PyErr_Format(PyExc_TypeError, "__%.4s__ returned non-%.4s (type %.200s)", name, name, Py_TYPE(res)->tp_name); Py_DECREF(res); return NULL; } } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_TypeError, "an integer is required"); } return res; } static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; PyObject *x; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(b))) { if (sizeof(Py_ssize_t) >= sizeof(long)) return PyInt_AS_LONG(b); else return PyInt_AsSsize_t(x); } #endif if (likely(PyLong_CheckExact(b))) { #if CYTHON_USE_PYLONG_INTERNALS const digit* digits = ((PyLongObject*)b)->ob_digit; const Py_ssize_t size = Py_SIZE(b); if (likely(__Pyx_sst_abs(size) <= 1)) { ival = likely(size) ? digits[0] : 0; if (size == -1) ival = -ival; return ival; } else { switch (size) { case 2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | digits[0])); } break; case -2: if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | digits[0])); } break; case 3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0])); } break; case -3: if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0])); } break; case 4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0])); } break; case -4: if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | digits[2]) << PyLong_SHIFT) | digits[1]) << PyLong_SHIFT) | digits[0])); } break; } } #endif return PyLong_AsSsize_t(b); } x = PyNumber_Index(b); if (!x) return -1; ival = PyInt_AsSsize_t(x); Py_DECREF(x); return ival; } static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { return PyInt_FromSize_t(ival); } #endif /* Py_PYTHON_H */ cutadapt-1.9.1/cutadapt/seqio.py0000664000175000017500000005252112627537126017400 0ustar marcelmarcel00000000000000# coding: utf-8 """ Sequence I/O classes: Reading and writing of FASTA and FASTQ files. TODO - Sequence.name should be Sequence.description or so (reserve .name for the part before the first space) """ from __future__ import print_function, division, absolute_import import sys from os.path import splitext from cutadapt.xopen import xopen from cutadapt.compat import zip, basestring __author__ = "Marcel Martin" class FormatError(Exception): """ Raised when an input file (FASTA or FASTQ) is malformatted. """ def _shorten(s, n=100): """Shorten string s to at most n characters, appending "..." if necessary.""" if s is None: return None if len(s) > n: s = s[:n-3] + '...' return s class Sequence(object): """qualities is a string and it contains the qualities encoded as ascii(qual+33).""" def __init__(self, name, sequence, qualities=None, name2='', match=None): """Set qualities to None if there are no quality values""" self.name = name self.sequence = sequence self.qualities = qualities self.name2 = name2 self.match = match if qualities is not None: if len(qualities) != len(sequence): rname = _shorten(name) raise FormatError("In read named {0!r}: Length of quality sequence ({1}) and length of read ({2}) do not match".format( rname, len(qualities), len(sequence))) def __getitem__(self, key): """slicing""" return self.__class__( self.name, self.sequence[key], self.qualities[key] if self.qualities is not None else None, self.name2, self.match) def __repr__(self): qstr = '' if self.qualities is not None: qstr = ', qualities={0!r}'.format(_shorten(self.qualities)) return ''.format(_shorten(self.name), _shorten(self.sequence), qstr) def __len__(self): return len(self.sequence) def __eq__(self, other): return self.name == other.name and \ self.sequence == other.sequence and \ self.qualities == other.qualities def __ne__(self, other): return not self.__eq__(other) try: from ._seqio import Sequence except ImportError: pass class ColorspaceSequence(Sequence): def __init__(self, name, sequence, qualities, primer=None, name2='', match=None): # In colorspace, the first character is the last nucleotide of the primer base # and the second character encodes the transition from the primer base to the # first real base of the read. if primer is None: self.primer = sequence[0:1] sequence = sequence[1:] else: self.primer = primer if qualities is not None and len(sequence) != len(qualities): rname = _shorten(name) raise FormatError("In read named {0!r}: length of colorspace quality " "sequence ({1}) and length of read ({2}) do not match (primer " "is: {3!r})".format(rname, len(qualities), len(sequence), self.primer)) super(ColorspaceSequence, self).__init__(name, sequence, qualities, name2, match) if not self.primer in ('A', 'C', 'G', 'T'): raise FormatError("Primer base is {0!r} in read {1!r}, but it " "should be one of A, C, G, T.".format( self.primer, _shorten(name))) def __repr__(self): qstr = '' if self.qualities is not None: qstr = ', qualities={0!r}'.format(_shorten(self.qualities)) return ''.format(_shorten(self.name), self.primer, _shorten(self.sequence), qstr) def __getitem__(self, key): return self.__class__( self.name, self.sequence[key], self.qualities[key] if self.qualities is not None else None, self.primer, self.name2, self.match) def sra_colorspace_sequence(name, sequence, qualities, name2): """Factory for an SRA colorspace sequence (which has one quality value too many)""" return ColorspaceSequence(name, sequence, qualities[1:], name2=name2) class FileWithPrependedLine(object): """ A file-like object that allows to "prepend" a single line to an already opened file. That is, further reads on the file will return the provided line and only then the actual content. This is needed to solve the problem of autodetecting input from a stream: As soon as the first line has been read, we know the file type, but also that line is "gone" and unavailable for further processing. """ def __init__(self, file, line): """ file is an already opened file-like object. line is a single string (newline will be appended if not included) """ if not line.endswith('\n'): line += '\n' self.first_line = line self._file = file def __iter__(self): yield self.first_line for line in self._file: yield line def close(self): self._file.close() class FastaReader(object): """ Reader for FASTA files. """ _close_on_exit = False def __init__(self, file, keep_linebreaks=False, sequence_class=Sequence): """ file is a filename or a file-like object. If file is a filename, then it is passed to xopen(). keep_linebreaks -- whether to keep newline characters in the sequence """ if isinstance(file, basestring): file = xopen(file) self._close_on_exit = True self._file = file self.sequence_class = sequence_class self.delivers_qualities = False self._delimiter = '\n' if keep_linebreaks else '' def __iter__(self): """ Read next entry from the file (single entry at a time). """ name = None seq = [] for i, line in enumerate(self._file): # strip() also removes DOS line breaks line = line.strip() if not line: continue if line and line[0] == '>': if name is not None: yield self.sequence_class(name, self._delimiter.join(seq), None) name = line[1:] seq = [] elif line and line[0] == '#': continue elif name is not None: seq.append(line) else: raise FormatError("At line {0}: Expected '>' at beginning of " "FASTA record, but got {1!r}.".format(i+1, _shorten(line))) if name is not None: yield self.sequence_class(name, self._delimiter.join(seq), None) def close(self): if self._close_on_exit and self._file is not None: self._file.close() self._file = None def __enter__(self): if self._file is None: raise ValueError("I/O operation on closed FastaReader") return self def __exit__(self, *args): self.close() class ColorspaceFastaReader(FastaReader): def __init__(self, file, keep_linebreaks=False): super(ColorspaceFastaReader, self).__init__(file, keep_linebreaks, sequence_class=ColorspaceSequence) class FastqReader(object): """ Reader for FASTQ files. Does not support multi-line FASTQ files. """ _close_on_exit = False def __init__(self, file, sequence_class=Sequence): # TODO could be a class attribute """ file is a filename or a file-like object. If file is a filename, then .gz files are supported. The sequence_class should be a class such as Sequence or ColorspaceSequence. """ if isinstance(file, basestring): file = xopen(file) self._close_on_exit = True self._file = file self.sequence_class = sequence_class self.delivers_qualities = True def __iter__(self): """ Return tuples: (name, sequence, qualities). qualities is a string and it contains the unmodified, encoded qualities. """ for i, line in enumerate(self._file): if i % 4 == 0: if not line.startswith('@'): raise FormatError("Line {0} in FASTQ file is expected to start with '@', but found {1!r}".format(i+1, line[:10])) name = line.strip()[1:] elif i % 4 == 1: sequence = line.strip() elif i % 4 == 2: line = line.strip() if not line.startswith('+'): raise FormatError("Line {0} in FASTQ file is expected to start with '+', but found {1!r}".format(i+1, line[:10])) if len(line) > 1: if line[1:] != name: raise FormatError( "At line {0}: Sequence descriptions in the FASTQ file do not match " "({1!r} != {2!r}).\n" "The second sequence description must be either empty " "or equal to the first description.".format( i+1, name, line[1:].rstrip())) name2 = name else: name2 = '' elif i % 4 == 3: qualities = line.rstrip('\n\r') yield self.sequence_class(name, sequence, qualities, name2=name2) def close(self): if self._close_on_exit and self._file is not None: self._file.close() self._file = None def __enter__(self): if self._file is None: raise ValueError("I/O operation on closed FastqReader") return self def __exit__(self, *args): self.close() try: from ._seqio import FastqReader, FormatError except ImportError: pass class ColorspaceFastqReader(FastqReader): def __init__(self, file): super(ColorspaceFastqReader, self).__init__(file, sequence_class=ColorspaceSequence) class SRAColorspaceFastqReader(FastqReader): def __init__(self, file): super(SRAColorspaceFastqReader, self).__init__(file, sequence_class=sra_colorspace_sequence) class FastaQualReader(object): """ Reader for reads that are stored in .(CS)FASTA and .QUAL files. """ delivers_qualities = True def __init__(self, fastafile, qualfile, sequence_class=Sequence): """ fastafile and qualfile are filenames or file-like objects. If a filename is used, then .gz files are recognized. The objects returned when iteritng over this file are instances of the given sequence_class. """ self.fastareader = FastaReader(fastafile) self.qualreader = FastaReader(qualfile, keep_linebreaks=True) self.sequence_class = sequence_class def __iter__(self): """ Yield Sequence objects. """ # conversion dictionary: maps strings to the appropriate ASCII-encoded character conv = dict() for i in range(-5, 256 - 33): conv[str(i)] = chr(i + 33) for fastaread, qualread in zip(self.fastareader, self.qualreader): if fastaread.name != qualread.name: raise FormatError("The read names in the FASTA and QUAL file do not match ({0!r} != {1!r})".format(fastaread.name, qualread.name)) try: qualities = ''.join([conv[value] for value in qualread.sequence.split()]) except KeyError as e: raise FormatError("Within read named {0!r}: Found invalid quality value {1}".format(fastaread.name, e)) assert fastaread.name == qualread.name yield self.sequence_class(fastaread.name, fastaread.sequence, qualities) def close(self): self.fastareader.close() self.qualreader.close() def __enter__(self): return self def __exit__(self, *args): self.close() class ColorspaceFastaQualReader(FastaQualReader): def __init__(self, fastafile, qualfile): super(ColorspaceFastaQualReader, self).__init__(fastafile, qualfile, sequence_class=ColorspaceSequence) def sequence_names_match(r1, r2): """ Check whether the sequences r1 and r2 have identical names (ignoring /1 and /2 suffixes). """ name1 = r1.name.split(None, 1)[0] name2 = r2.name.split(None, 1)[0] if name1[-2:-1] == '/': name1 = name1[:-2] if name2[-2:-1] == '/': name2 = name2[:-2] return name1 == name2 class PairedSequenceReader(object): """ Read paired-end reads from two files. Wraps two SequenceReader instances, making sure that reads are properly paired. """ def __init__(self, file1, file2, colorspace=False, fileformat=None): self.reader1 = open(file1, colorspace=colorspace, fileformat=fileformat) self.reader2 = open(file2, colorspace=colorspace, fileformat=fileformat) self.delivers_qualities = self.reader1.delivers_qualities def __iter__(self): """ Iterate over the paired reads. Each item is a pair of Sequence objects. """ # Avoid usage of zip() below since it will consume one item too many. it1, it2 = iter(self.reader1), iter(self.reader2) while True: try: r1 = next(it1) except StopIteration: # End of file 1. Make sure that file 2 is also at end. try: next(it2) raise FormatError("Reads are improperly paired. There are more reads in file 2 than in file 1.") except StopIteration: pass break try: r2 = next(it2) except StopIteration: raise FormatError("Reads are improperly paired. There are more reads in file 1 than in file 2.") if not sequence_names_match(r1, r2): raise FormatError("Reads are improperly paired. Read name '{0}' " "in file 1 does not match '{1}' in file 2.".format(r1.name, r2.name)) yield (r1, r2) def close(self): self.reader1.close() self.reader2.close() def __enter__(self): return self def __exit__(self, *args): self.close() class InterleavedSequenceReader(object): """ Read paired-end reads from an interleaved FASTQ file. """ def __init__(self, file, colorspace=False, fileformat=None): self.reader = open(file, colorspace=colorspace, fileformat=fileformat) self.delivers_qualities = self.reader.delivers_qualities def __iter__(self): # Avoid usage of zip() below since it will consume one item too many. it = iter(self.reader) for r1 in it: try: r2 = next(it) except StopIteration: raise FormatError("Interleaved input file incomplete: Last record has no partner.") if not sequence_names_match(r1, r2): raise FormatError("Reads are improperly paired. Name {0!r} " "(first) does not match {1!r} (second).".format(r1.name, r2.name)) yield (r1, r2) def close(self): self.reader.close() def __enter__(self): return self def __exit__(self, *args): self.close() class FastaWriter(object): """ Write FASTA-formatted sequences to a file. """ _close_on_exit = False def __init__(self, file, line_length=None): """ If line_length is not None, the lines will be wrapped after line_length characters. """ self.line_length = line_length if line_length != 0 else None if isinstance(file, str): file = xopen(file, 'w') self._close_on_exit = True self._file = file def write(self, name_or_seq, sequence=None): """Write an entry to the the FASTA file. If only one parameter (name_or_seq) is given, it must have attributes .name and .sequence, which are then used. Otherwise, the first parameter must be the name and the second the sequence. The effect is that you can write this: writer.write("name", "ACCAT") or writer.write(Sequence("name", "ACCAT")) """ if sequence is None: name = name_or_seq.name sequence = name_or_seq.sequence else: name = name_or_seq if self.line_length is not None: print('>{0}'.format(name), file=self._file) for i in range(0, len(sequence), self.line_length): print(sequence[i:i+self.line_length], file=self._file) if len(sequence) == 0: print(file=self._file) else: print('>{0}'.format(name), sequence, file=self._file, sep='\n') def close(self): if self._close_on_exit: self._file.close() def __enter__(self): if self._file.closed: raise ValueError("I/O operation on closed file") return self def __exit__(self, *args): self.close() class ColorspaceFastaWriter(FastaWriter): def write(self, record): name = record.name sequence = record.primer + record.sequence super(ColorspaceFastaWriter, self).write(name, sequence) class FastqWriter(object): """ Write sequences with qualities in FASTQ format. FASTQ files are formatted like this: @read name SEQUENCE + QUALITIS """ _close_on_exit = False def __init__(self, file): if isinstance(file, str): file = xopen(file, "w") self._close_on_exit = True self._file = file def write(self, record): """ Write a Sequence record to the the FASTQ file. The record must have attributes .name, .sequence and .qualities. """ s = ('@' + record.name + '\n' + record.sequence + '\n+' + record.name2 + '\n' + record.qualities + '\n') self._file.write(s) def writeseq(self, name, sequence, qualities): print("@{0:s}\n{1:s}\n+\n{2:s}".format( name, sequence, qualities), file=self._file) def close(self): if self._close_on_exit: self._file.close() def __enter__(self): if self._file.closed: raise ValueError("I/O operation on closed file") return self def __exit__(self, *args): self.close() class ColorspaceFastqWriter(FastqWriter): def write(self, record): name = record.name sequence = record.primer + record.sequence qualities = record.qualities super(ColorspaceFastqWriter, self).writeseq(name, sequence, qualities) class PairedSequenceWriter(object): def __init__(self, file1, file2, colorspace=False, fileformat='fastq'): self._writer1 = open(file1, colorspace=colorspace, fileformat=fileformat, mode='w') self._writer2 = open(file2, colorspace=colorspace, fileformat=fileformat, mode='w') def write(self, read1, read2): self._writer1.write(read1) self._writer2.write(read2) def close(self): self._writer1.close() self._writer2.close() def __enter__(self): # TODO do not allow this twice return self def __exit__(self, *args): self.close() class InterleavedSequenceWriter(object): """ Write paired-end reads to an interleaved FASTA or FASTQ file """ def __init__(self, file, colorspace=False, fileformat='fastq'): self._writer = open(file, colorspace=colorspace, fileformat=fileformat, mode='w') def write(self, read1, read2): self._writer.write(read1) self._writer.write(read2) def close(self): self._writer.close() def __enter__(self): return self def __exit__(self, *args): self.close() class UnknownFileType(Exception): """ Raised when open could not autodetect the file type. """ def open(file1, file2=None, qualfile=None, colorspace=False, fileformat=None, interleaved=False, mode='r'): """ Open sequence file in FASTA or FASTQ format. Parameters file1, file2 and qualfile can be paths to regular or compressed files or file-like objects. If only file1 is provided and interleaved is True, an InterleavedSequenceReader (for paired-end reads) is returned. If only file1 is provided and interleaved is False, a FastaReader or FastqReader (for single-end reads) is returned. If file2 is also provided, a PairedSequenceReader is returned. If qualfile is given, a FastaQualReader from file1 and qualfile is returned. One of file2 and qualfile must always be None (no paired-end data is supported when reading qualfiles). If the colorspace parameter is set to True, the returned readers are ColorspaceFastaReader, ColorspaceFastqReader or ColorspaceFastaQualReader instead. If possible, file format is autodetected by inspecting the file name: .fasta/.fa, .fastq/.fq and some other extensions are allowed. If the file name is not available (when reading from standard input), the file is read and the file type determined from the content. The autodetection can be skipped by setting fileformat to one of 'fasta', 'fastq', 'sra-fastq'. Colorspace is not auto-detected and must always be requested explicitly. """ if mode not in ('r', 'w'): raise ValueError("Mode must be 'r' or 'w'") if interleaved and (file2 is not None or qualfile is not None): raise ValueError("When interleaved is set, file2 and qualfile must be None") if file2 is not None and qualfile is not None: raise ValueError("Setting both file2 and qualfile is not supported") if file2 is not None: if mode == 'r': return PairedSequenceReader(file1, file2, colorspace, fileformat) else: return PairedSequenceWriter(file1, file2, colorspace, fileformat) if interleaved: if mode == 'r': return InterleavedSequenceReader(file1, colorspace, fileformat) else: return InterleavedSequenceWriter(file1, colorspace, fileformat) if qualfile is not None: if mode == 'w': raise NotImplementedError('Writing to csfasta/qual not supported') if colorspace: # read from .(CS)FASTA/.QUAL return ColorspaceFastaQualReader(file1, qualfile) else: return FastaQualReader(file1, qualfile) # read from FASTA or FASTQ if mode == 'r': fastq_handler = ColorspaceFastqReader if colorspace else FastqReader fasta_handler = ColorspaceFastaReader if colorspace else FastaReader else: fastq_handler = ColorspaceFastqWriter if colorspace else FastqWriter fasta_handler = ColorspaceFastaWriter if colorspace else FastaWriter if fileformat is not None: # explict file format given fileformat = fileformat.lower() if fileformat == 'fasta': return fasta_handler(file1) elif fileformat == 'fastq': return fastq_handler(file1) elif fileformat == 'sra-fastq' and colorspace: if mode == 'w': raise NotImplementedError('Writing to sra-fastq not supported') return SRAColorspaceFastqReader(file1) else: raise UnknownFileType("File format {0!r} is unknown (expected " "'sra-fastq' (only for colorspace), 'fasta' or 'fastq').".format(fileformat)) if mode == 'w': raise NotImplementedError('autodetection of file type for output files not implemented') # Try to detect the file format name = None if file1 == "-": file1 = sys.stdin elif isinstance(file1, basestring): name = file1 elif hasattr(file1, "name"): # file1 seems to be an open file-like object name = file1.name if name is not None: if name.endswith('.gz'): name = name[:-3] elif name.endswith('.xz'): name = name[:-3] elif name.endswith('.bz2'): name = name[:-4] name, ext = splitext(name) ext = ext.lower() if ext in ['.fasta', '.fa', '.fna', '.csfasta', '.csfa']: return fasta_handler(file1) elif ext in ['.fastq', '.fq'] or (ext == '.txt' and name.endswith('_sequence')): return fastq_handler(file1) else: raise UnknownFileType("Could not determine whether file {0!r} is FASTA " "or FASTQ: file name extension {1!r} not recognized".format(file1, ext)) # No name available. # autodetect type by reading from the file for line in file1: if line.startswith('#'): # Skip comment lines (needed for csfasta) continue if line.startswith('>'): return fasta_handler(FileWithPrependedLine(file1, line)) if line.startswith('@'): return fastq_handler(FileWithPrependedLine(file1, line)) raise UnknownFileType("File is neither FASTQ nor FASTA.") cutadapt-1.9.1/cutadapt/filters.py0000664000175000017500000001702512627537126017730 0ustar marcelmarcel00000000000000# coding: utf-8 """ Classes for writing and filtering of processed reads. A Filter is a callable that has the read as its only argument. If it is called, it returns True if the read should be filtered (discarded), and False if not. To be used, a filter needs to be wrapped in one of the redirector classes. They are called so because they can redirect filtered reads to a file if so desired. They also keep statistics. To determine what happens to a read, a list of redirectors with different filters is created and each redirector is called in turn until one returns True. The read is then assumed to have been "consumed", that is, either written somewhere or filtered (should be discarded). """ from __future__ import print_function, division, absolute_import from .xopen import xopen from . import seqio # Constants used when returning from a Filter’s __call__ method to improve # readability (it is unintuitive that "return True" means "discard the read"). DISCARD = True KEEP = False class NoFilter(object): """ No filtering, just send each read to the given writer. """ def __init__(self, writer): self.filtered = 0 self.writer = writer self.filter = filter self.written = 0 # no of written reads TODO move to writer self.written_bp = [0, 0] def __call__(self, read): self.writer.write(read) self.written += 1 self.written_bp[0] += len(read) return DISCARD class PairedNoFilter(object): """ No filtering, just send each paired-end read to the given writer. """ def __init__(self, writer): self.filtered = 0 self.writer = writer self.written = 0 # no of written reads or read pairs TODO move to writer self.written_bp = [0, 0] def __call__(self, read1, read2): self.writer.write(read1, read2) self.written += 1 self.written_bp[0] += len(read1) self.written_bp[1] += len(read2) return DISCARD class Redirector(object): """ Redirect discarded reads to the given writer. This is for single-end reads. """ def __init__(self, writer, filter): self.filtered = 0 self.writer = writer self.filter = filter self.written = 0 # no of written reads TODO move to writer self.written_bp = [0, 0] def __call__(self, read): if self.filter(read): self.filtered += 1 if self.writer is not None: self.writer.write(read) self.written += 1 self.written_bp[0] += len(read) return DISCARD return KEEP class PairedRedirector(object): """ Redirect discarded reads to the given writer. This is for paired-end reads, using the 'new-style' filtering where both reads are inspected. That is, the entire pair is discarded if at least 1 or 2 of the reads match the filtering criteria. """ def __init__(self, writer, filter, min_affected=1): """ min_affected -- values 1 and 2 are allowed. 1 means: the pair is discarded if any read matches 2 means: the pair is discarded if both reads match """ if not min_affected in (1, 2): raise ValueError("min_affected must be 1 or 2") self.filtered = 0 self.writer = writer self.filter = filter self._min_affected = min_affected self.written = 0 # no of written reads or read pairs TODO move to writer self.written_bp = [0, 0] def __call__(self, read1, read2): if self.filter(read1) + self.filter(read2) >= self._min_affected: self.filtered += 1 # discard read if self.writer is not None: self.writer.write(read1, read2) self.written += 1 self.written_bp[0] += len(read1) self.written_bp[1] += len(read2) return DISCARD return KEEP class LegacyPairedRedirector(object): """ Redirect discarded reads to the given writer. This is for paired-end reads, using the 'legacy' filtering mode (backwards compatibility). That is, if the first read matches the filtering criteria, the pair is discarded. The second read is not inspected. """ def __init__(self, writer, filter): self.filtered = 0 self.writer = writer self.filter = filter self.written = 0 # no of written reads or read pairs TODO move to writer self.written_bp = [0, 0] def __call__(self, read1, read2): if self.filter(read1): self.filtered += 1 # discard read if self.writer is not None: self.writer.write(read1, read2) self.written += 1 self.written_bp[0] += len(read1) self.written_bp[1] += len(read2) return DISCARD return KEEP class TooShortReadFilter(object): # TODO paired_outfile is left at its default value None (read2 is silently discarded) def __init__(self, minimum_length): self.minimum_length = minimum_length def __call__(self, read): return len(read) < self.minimum_length class TooLongReadFilter(object): def __init__(self, maximum_length): self.maximum_length = maximum_length def __call__(self, read): return len(read) > self.maximum_length class NContentFilter(object): """ Discards a reads that has a number of 'N's over a given threshold. It handles both raw counts of Ns as well as proportions. Note, for raw counts, it is a greater than comparison, so a cutoff of '1' will keep reads with a single N in it. """ def __init__(self, count): """ Count -- if it is below 1.0, it will be considered a proportion, and above and equal to 1 will be considered as discarding reads with a number of N's greater than this cutoff. """ assert count >= 0 self.is_proportion = count < 1.0 self.cutoff = count def __call__(self, read): """Return True when the read should be discarded""" n_count = read.sequence.lower().count('n') if self.is_proportion: if len(read) == 0: return False return n_count / len(read) > self.cutoff else: return n_count > self.cutoff class DiscardUntrimmedFilter(object): """ Return True if read is untrimmed. """ def __call__(self, read): return read.match is None class DiscardTrimmedFilter(object): """ Return True if read is trimmed. """ def __call__(self, read): return read.match is not None class Demultiplexer(object): """ Demultiplex trimmed reads. Reads are written to different output files depending on which adapter matches. Files are created when the first read is written to them. """ def __init__(self, path_template, untrimmed_path, fileformat, colorspace): """ path_template must contain the string '{name}', which will be replaced with the name of the adapter to form the final output path. Reads without an adapter match are written to the file named by untrimmed_path. """ assert '{name}' in path_template self.template = path_template self.untrimmed_path = untrimmed_path self.untrimmed_writer = None self.writers = dict() self.written = 0 self.written_bp = [0, 0] self.fileformat = fileformat self.colorspace = colorspace def __call__(self, read1, read2=None): if read2 is None: # single-end read if read1.match is None: if self.untrimmed_writer is None and self.untrimmed_path is not None: self.untrimmed_writer = seqio.open(self.untrimmed_path, mode='w', fileformat=self.fileformat, colorspace=self.colorspace) if self.untrimmed_writer is not None: self.written += 1 self.written_bp[0] += len(read1) self.untrimmed_writer.write(read1) else: name = read1.match.adapter.name if name not in self.writers: self.writers[name] = seqio.open(self.template.replace('{name}', name), mode='w', fileformat=self.fileformat, colorspace=self.colorspace) self.written += 1 self.written_bp[0] += len(read1) self.writers[name].write(read1) return DISCARD else: assert False, "Not supported" # pragma: no cover def close(self): for w in self.writers.values(): w.close() if self.untrimmed_writer is not None: self.untrimmed_writer.close() cutadapt-1.9.1/cutadapt/__init__.py0000664000175000017500000000115712627541202020004 0ustar marcelmarcel00000000000000# coding: utf-8 from __future__ import print_function, division, absolute_import import sys __version__ = '1.9.1' def check_importability(): # pragma: no cover try: import cutadapt._align except ImportError as e: if 'undefined symbol' in str(e): print(""" ERROR: A required extension module could not be imported because it is incompatible with your system. A quick fix is to recompile the extension modules with the following command: {0} setup.py build_ext -i See the documentation for alternative ways of installing the program. The original error message follows. """.format(sys.executable)) raise cutadapt-1.9.1/cutadapt/__main__.py0000755000175000017500000000033312470347250017764 0ustar marcelmarcel00000000000000#!/usr/bin/env python # coding: utf-8 from __future__ import print_function, division, absolute_import import sys try: import _preamble except ImportError: pass from cutadapt.scripts import cutadapt cutadapt.main() cutadapt-1.9.1/CHANGES.rst0000664000175000017500000003727312627540367015713 0ustar marcelmarcel00000000000000======= Changes ======= v1.9.1 ------ * Added ``--pair-filter`` option, which :ref:`modifies how filtering criteria apply to paired-end reads ` * Add ``--too-short-paired-output`` and ``--too-long-paired-output`` options. * Fix incorrect number of trimmed bases reported if ``--times`` option was used. v1.9 ---- * Indels in the alignment can now be disabled for all adapter types (use ``--no-indels``). * Quality values are now printed in the info file (``--info-file``) when trimming FASTQ files. Fixes issue #144. * Options ``--prefix`` and ``--suffix``, which modify read names, now accept the placeholder ``{name}`` and will replace it with the name of the found adapter. Fixes issue #104. * Interleaved FASTQ files: With the ``--interleaved`` switch, paired-end reads will be read from and written to interleaved FASTQ files. Fixes issue #113. * Anchored 5' adapters can now be specified by writing ``-a SEQUENCE...`` (note the three dots). * Fix ``--discard-untrimmed`` and ``--discard-trimmed`` not working as expected in paired-end mode (issue #146). * The minimum overlap is now automatically reduced to the adapter length if it is too large. Fixes part of issue #153. * Thanks to Wolfgang Gerlach, there is now a Dockerfile. * The new ``--debug`` switch makes cutadapt print out the alignment matrix. v1.8.3 ------ * Fix issue #95: Untrimmed reads were not listed in the info file. * Fix issue #138: pip install cutadapt did not work with new setuptools versions. * Fix issue #137: Avoid a hang when writing to two or more gzip-compressed output files in Python 2.6. v1.8.1 ------ * Fix #110: Counts for 'too short' and 'too long' reads were swapped in statistics. * Fix #115: Make ``--trim-n`` work also on second read for paired-end data. v1.8 ---- * Support single-pass paired-end trimming with the new ``-A``/``-G``/``-B``/``-U`` parameters. These work just like their -a/-g/-b/-u counterparts, but they specify sequences that are removed from the *second read* in a pair. Also, if you start using one of those options, the read modification options such as ``-q`` (quality trimming) are applied to *both* reads. For backwards compatibility, read modifications are applied to the first read only if neither of ``-A``/``-G``/``-B``/``-U`` is used. See `the documentation `_ for details. This feature has not been extensively tested, so please give feedback if something does not work. * The report output has been re-worked in order to accomodate the new paired-end trimming mode. This also changes the way the report looks like in single-end mode. It is hopefully now more accessible. * Chris Mitchell contributed a patch adding two new options: ``--trim-n`` removes any ``N`` bases from the read ends, and the ``--max-n`` option can be used to filter out reads with too many ``N``. * Support notation for repeated bases in the adapter sequence: Write ``A{10}`` instead of ``AAAAAAAAAA``. Useful for poly-A trimming: Use ``-a A{100}`` to get the longest possible tail. * Quality trimming at the 5' end of reads is now supported. Use ``-q 15,10`` to trim the 5' end with a cutoff of 15 and the 3' end with a cutoff of 10. * Fix incorrectly reported statistics (> 100% trimmed bases) when ``--times`` set to a value greater than one. * Support .xz-compressed files (if running in Python 3.3 or later). * Started to use the GitHub issue tracker instead of Google Code. All old issues have been moved. v1.7 ---- * IUPAC characters are now supported. For example, use ``-a YACGT`` for an adapter that matches both ``CACGT`` and ``TACGT`` with zero errors. Disable with ``-N``. By default, IUPAC characters in the read are not interpreted in order to avoid matches in reads that consist of many (low-quality) ``N`` bases. Use ``--match-read-wildcards`` to enable them also in the read. * Support for demultiplexing was added. This means that reads can be written to different files depending on which adapter was found. See `the section in the documentation `_ for how to use it. This is currently only supported for single-end reads. * Add support for anchored 3' adapters. Append ``$`` to the adapter sequence to force the adapter to appear in the end of the read (as a suffix). Closes issue #81. * Option ``--cut`` (``-u``) can now be specified twice, once for each end of the read. Thanks to Rasmus Borup Hansen for the patch! * Options ``--minimum-length``/``--maximum-length`` (``-m``/``-M``) can be used standalone. That is, cutadapt can be used to filter reads by length without trimming adapters. * Fix bug: Adapters read from a FASTA file can now be anchored. v1.6 ---- * Fix bug: Ensure ``--format=...`` can be used even with paired-end input. * Fix bug: Sometimes output files would be incomplete because they were not closed correctly. * Alignment algorithm is a tiny bit faster. * Extensive work on the documentation. It's now available at https://cutadapt.readthedocs.org/ . * For 3' adapters, statistics about the bases preceding the trimmed adapter are collected and printed. If one of the bases is overrepresented, a warning is shown since this points to an incomplete adapter sequence. This happens, for example, when a TruSeq adapter is used but the A overhang is not taken into account when running cutadapt. * Due to code cleanup, there is a change in behavior: If you use ``--discard-trimmed`` or ``--discard-untrimmed`` in combination with ``--too-short-output`` or ``--too-long-output``, then cutadapt now writes also the discarded reads to the output files given by the ``--too-short`` or ``--too-long`` options. If anyone complains, I will consider reverting this. * Galaxy support files are now in `a separate repository `_. v1.5 ---- * Adapter sequences can now be read from a FASTA file. For example, write ``-a file:adapters.fasta`` to read 3' adapters from ``adapters.fasta``. This works also for ``-b`` and ``-g``. * Add the option ``--mask-adapter``, which can be used to not remove adapters, but to instead mask them with ``N`` characters. Thanks to Vittorio Zamboni for contributing this feature! * U characters in the adapter sequence are automatically converted to T. * Do not run Cython at installation time unless the --cython option is provided. * Add the option -u/--cut, which can be used to unconditionally remove a number of bases from the beginning or end of each read. * Make ``--zero-cap`` the default for colorspace reads. * When the new option ``--quiet`` is used, no report is printed after all reads have been processed. * When processing paired-end reads, cutadapt now checks whether the reads are properly paired. * To properly handle paired-end reads, an option --untrimmed-paired-output was added. v1.4 ---- * This release of cutadapt reduces the overhead of reading and writing files. On my test data set, a typical run of cutadapt (with a single adapter) takes 40% less time due to the following two changes. * Reading and writing of FASTQ files is faster (thanks to Cython). * Reading and writing of gzipped files is faster (up to 2x) on systems where the ``gzip`` program is available. * The quality trimming function is four times faster (also due to Cython). * Fix the statistics output for 3' colorspace adapters: The reported lengths were one too short. Thanks to Frank Wessely for reporting this. * Support the ``--no-indels`` option. This disallows insertions and deletions while aligning the adapter. Currently, the option is only available for anchored 5' adapters. This fixes issue 69. * As a sideeffect of implementing the --no-indels option: For colorspace, the length of a read (for ``--minimum-length`` and ``--maximum-length``) is now computed after primer base removal (when ``--trim-primer`` is specified). * Added one column to the info file that contains the name of the found adapter. * Add an explanation about colorspace ambiguity to the README v1.3 ---- * Preliminary paired-end support with the ``--paired-output`` option (contributed by James Casbon). See the README section on how to use it. * Improved statistics. * Fix incorrectly reported amount of quality-trimmed Mbp (issue 57, fix by Chris Penkett) * Add the ``--too-long-output`` option. * Add the ``--no-trim`` option, contributed by Dave Lawrence. * Port handwritten C alignment module to Cython. * Fix the ``--rest-file`` option (issue 56) * Slightly speed up alignment of 5' adapters. * Support bzip2-compressed files. v1.2 ---- * At least 25% faster processing of .csfasta/.qual files due to faster parser. * Between 10% and 30% faster writing of gzip-compressed output files. * Support 5' adapters in colorspace, even when no primer trimming is requested. * Add the ``--info-file`` option, which has a line for each found adapter. * Named adapters are possible. Usage: ``-a My_Adapter=ACCGTA`` assigns the name "My_adapter". * Improve alignment algorithm for better poly-A trimming when there are sequencing errors. Previously, not the longest possible poly-A tail would be trimmed. * James Casbon contributed the ``--discard-untrimmed`` option. v1.1 ---- * Allow to "anchor" 5' adapters (``-g``), forcing them to be a prefix of the read. To use this, add the special character ``^`` to the beginning of the adapter sequence. * Add the "-N" option, which allows 'N' characters within adapters to match literally. * Speedup of approx. 25% when reading from .gz files and using Python 2.7. * Allow to only trim qualities when no adapter is given on the command-line. * Add a patch by James Casbon: include read names (ids) in rest file * Use nosetest for testing. To run, install nose and run "nosetests". * When using cutadapt without installing it, you now need to run ``bin/cutadapt`` due to a new directory layout. * Allow to give a colorspace adapter in basespace (gets automatically converted). * Allow to search for 5' adapters (those specified with ``-g``) in colorspace. * Speed up the alignment by a factor of at least 3 by using Ukkonen's algorithm. The total runtime decreases by about 30% in the tested cases. * allow to deal with colorspace FASTQ files from the SRA that contain a fake additional quality in the beginning (use ``--format sra-fastq``) v1.0 ---- * ASCII-encoded quality values were assumed to be encoded as ascii(quality+33). With the new parameter ``--quality-base``, this can be changed to ascii(quality+64), as used in some versions of the Illumina pipeline. (Fixes issue 7.) * Allow to specify that adapters were ligated to the 5' end of reads. This change is based on a patch contributed by James Casbon. * Due to cutadapt being published in EMBnet.journal, I found it appropriate to call this release version 1.0. Please see http://journal.embnet.org/index.php/embnetjournal/article/view/200 for the article and I would be glad if you cite it. * Add Galaxy support, contributed by Lance Parsons. * Patch by James Casbon: Allow N wildcards in read or adapter or both. Wildcard matching of 'N's in the adapter is always done. If 'N's within reads should also match without counting as error, this needs to be explicitly requested via ``--match-read-wildcards``. v0.9.5 ------ * Fix issue 20: Make the report go to standard output when ``-o``/``--output`` is specified. * Recognize `.fq` as an extension for FASTQ files * many more unit tests * The alignment algorithm has changed. It will now find some adapters that previously were missed. Note that this will produce different output than older cutadapt versions! Before this change, finding an adapter would work as follows: - Find an alignment between adapter and read -- longer alignments are better. - If the number of errors in the alignment (divided by length) is above the maximum error rate, report the adapter as not being found. Sometimes, the long alignment that is found had too many errors, but a shorter alignment would not. The adapter was then incorrectly seen as "not found". The new alignment algorithm checks the error rate while aligning and only reports alignments that do not have too many errors. v0.9.4 ------ * now compatible with Python 3 * Add the ``--zero-cap`` option, which changes negative quality values to zero. This is a workaround to avoid segmentation faults in BWA. The option is now enabled by default when ``--bwa``/``--maq`` is used. * Lots of unit tests added. Run them with ``cd tests && ./tests.sh``. * Fix issue 16: ``--discard-trimmed`` did not work. * Allow to override auto-detection of input file format with the new ``-f``/``--format`` parameter. This mostly fixes issue 12. * Don't break when input file is empty. v0.9.2 ------ * Install a single ``cutadapt`` Python package instead of multiple Python modules. This avoids cluttering the global namespace and should lead to less problems with other Python modules. Thanks to Steve Lianoglou for pointing this out to me! * ignore case (ACGT vs acgt) when comparing the adapter with the read sequence * .FASTA/.QUAL files (not necessarily colorspace) can now be read (some 454 software uses this format) * Move some functions into their own modules * lots of refactoring: replace the fasta module with a much nicer seqio module. * allow to input FASTA/FASTQ on standard input (also FASTA/FASTQ is autodetected) v0.9 ---- * add ``--too-short-output`` and ``--untrimmed-output``, based on patch by Paul Ryvkin (thanks!) * add ``--maximum-length`` parameter: discard reads longer than a specified length * group options by category in ``--help`` output * add ``--length-tag`` option. allows to fix read length in FASTA/Q comment lines (e.g., ``length=123`` becomes ``length=58`` after trimming) (requested by Paul Ryvkin) * add ``-q``/``--quality-cutoff`` option for trimming low-quality ends (uses the same algorithm as BWA) * some refactoring * the filename ``-`` is now interpreted as standard in or standard output v0.8 ---- * Change default behavior of searching for an adapter: The adapter is now assumed to be an adapter that has been ligated to the 3' end. This should be the correct behavior for at least the SOLiD small RNA protocol (SREK) and also for the Illumina protocol. To get the old behavior, which uses a heuristic to determine whether the adapter was ligated to the 5' or 3' end and then trimmed the read accordingly, use the new ``-b`` (``--anywhere``) option. * Clear up how the statistics after processing all reads are printed. * Fix incorrect statistics. Adapters starting at pos. 0 were correctly trimmed, but not counted. * Modify scoring scheme: Improves trimming (some reads that should have been trimmed were not). Increases no. of trimmed reads in one of our SOLiD data sets from 36.5 to 37.6%. * Speed improvements (20% less runtime on my test data set). v0.7 ---- * Useful exit codes * Better error reporting when malformed files are encountered * Add ``--minimum-length`` parameter for discarding reads that are shorter than a specified length after trimming. * Generalize the alignment function a bit. This is preparation for supporting adapters that are specific to either the 5' or 3' end. * pure Python fallback for alignment function for when the C module cannot be used. v0.6 ---- * Support gzipped input and output. * Print timing information in statistics. v0.5 ---- * add ``--discard`` option which makes cutadapt discard reads in which an adapter occurs v0.4 ---- * (more) correctly deal with multiple adapters: If a long adapter matches with lots of errors, then this could lead to a a shorter adapter matching with few errors getting ignored. v0.3 ---- * fix huge memory usage (entire input file was unintentionally read into memory) v0.2 ---- * allow FASTQ input v0.1 ---- * initial release cutadapt-1.9.1/doc/0000775000175000017500000000000012627541606014637 5ustar marcelmarcel00000000000000cutadapt-1.9.1/doc/changes.rst0000664000175000017500000000003412575761274017005 0ustar marcelmarcel00000000000000.. include:: ../CHANGES.rst cutadapt-1.9.1/doc/Makefile0000664000175000017500000001517512575761274016317 0ustar marcelmarcel00000000000000# Makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build # User-friendly check for sphinx-build ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) endif # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext all: html help: @echo "Please use \`make ' where is one of" @echo " html to make standalone HTML files" @echo " dirhtml to make HTML files named index.html in directories" @echo " singlehtml to make a single large HTML file" @echo " pickle to make pickle files" @echo " json to make JSON files" @echo " htmlhelp to make HTML files and a HTML help project" @echo " qthelp to make HTML files and a qthelp project" @echo " devhelp to make HTML files and a Devhelp project" @echo " epub to make an epub" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " latexpdf to make LaTeX files and run them through pdflatex" @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" @echo " text to make text files" @echo " man to make manual pages" @echo " texinfo to make Texinfo files" @echo " info to make Texinfo files and run them through makeinfo" @echo " gettext to make PO message catalogs" @echo " changes to make an overview of all changed/added/deprecated items" @echo " xml to make Docutils-native XML files" @echo " pseudoxml to make pseudoxml-XML files for display purposes" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" clean: rm -rf $(BUILDDIR)/* html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." singlehtml: $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." pickle: $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." json: $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." htmlhelp: $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." qthelp: $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/cutadapt.qhcp" @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/cutadapt.qhc" devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @echo "To view the help file:" @echo "# mkdir -p $$HOME/.local/share/devhelp/cutadapt" @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/cutadapt" @echo "# devhelp" epub: $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." latex: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @echo "Run \`make' in that directory to run these through (pdf)latex" \ "(use \`make latexpdf' here to do that automatically)." latexpdf: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." $(MAKE) -C $(BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." latexpdfja: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through platex and dvipdfmx..." $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." text: $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." man: $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." texinfo: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." @echo "Run \`make' in that directory to run these through makeinfo" \ "(use \`make info' here to do that automatically)." info: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo "Running Texinfo files through makeinfo..." make -C $(BUILDDIR)/texinfo info @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." gettext: $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale @echo @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." changes: $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." linkcheck: $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." xml: $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml @echo @echo "Build finished. The XML files are in $(BUILDDIR)/xml." pseudoxml: $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml @echo @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." cutadapt-1.9.1/doc/index.rst0000664000175000017500000000045212575761274016510 0ustar marcelmarcel00000000000000.. include:: ../README.rst ================= Table of contents ================= .. toctree:: :maxdepth: 2 installation guide colorspace recipes ideas changes .. Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search` cutadapt-1.9.1/doc/colorspace.rst0000664000175000017500000001046012575761274017533 0ustar marcelmarcel00000000000000Colorspace reads ================ Cutadapt was designed to work with colorspace reads from the ABi SOLiD sequencer. Colorspace trimming is activated by the ``--colorspace`` option (or use ``-c`` for short). The input reads can be given either: - in a FASTA file - in a FASTQ file - in a ``.csfasta`` and a ``.qual`` file (this is the native SOLiD format). In all cases, the colors must be represented by the characters 0, 1, 2, 3. Example input files are in the cutadapt distribution at ``tests/data/solid.*``. The ``.csfasta``/``.qual`` file format is automatically assumed if two input files are given to cutadapt. In colorspace mode, the adapter sequences given to the ``-a``, ``-b`` and ``-g`` options can be given both as colors or as nucleotides. If given as nucleotides, they will automatically be converted to colorspace. For example, to trim an adapter from ``solid.csfasta`` and ``solid.qual``, use this command-line:: cutadapt -c -a CGCCTTGGCCGTACAGCAG solid.csfasta solid.qual > output.fastq In case you know the colorspace adapter sequence, you can also write ``330201030313112312`` instead of ``CGCCTTGGCCGTACAGCAG`` and the result is the same. Ambiguity in colorspace ----------------------- The ambiguity of colorspace encoding leads to some effects to be aware of when trimming 3' adapters from colorspace reads. For example, when trimming the adapter ``AACTC``, cutadapt searches for its colorspace-encoded version ``0122``. But also ``TTGAG``, ``CCAGA`` and ``GGTCT`` have an encoding of ``0122``. This means that effectively four different adapter sequences are searched and trimmed at the same time. There is no way around this, unless the decoded sequence were available, but that is usually only the case after read mapping. The effect should usually be quite small. The number of false positives is multiplied by four, but with a sufficiently large overlap (3 or 4 is already enough), this is still only around 0.2 bases lost per read on average. If inspecting k-mer frequencies or using small overlaps, you need to be aware of the effect, however. Double-encoding, BWA and MAQ ---------------------------- The read mappers MAQ and BWA (and possibly others) need their colorspace input reads to be in a so-called "double encoding". This simply means that they cannot deal with the characters 0, 1, 2, 3 in the reads, but require that the letters A, C, G, T be used for colors. For example, the colorspace sequence ``0011321`` would be ``AACCTGC`` in double-encoded form. This is not the same as conversion to basespace! The read is still in colorspace, only letters are used instead of digits. If that sounds confusing, that is because it is. Note that MAQ is unmaintained and should not be used in new projects. BWA’s colorspace support was dropped in versions more recent than 0.5.9, but that version works well. When you want to trim reads that will be mapped with BWA or MAQ, you can use the ``--bwa`` option, which enables colorspace mode (``-c``), double-encoding (``-d``), primer trimming (``-t``), all of which are required for BWA, in addition to some other useful options. The ``--maq`` option is an alias for ``--bwa``. Colorspace examples ------------------- To cut an adapter from SOLiD data given in ``solid.csfasta`` and ``solid.qual``, to produce MAQ- and BWA-compatible output, allow the default of 10% errors and write the resulting FASTQ file to output.fastq:: cutadapt --bwa -a CGCCTTGGCCGTACAGCAG solid.csfasta solid.qual > output.fastq Instead of redirecting standard output with ``>``, the ``-o`` option can be used. This also shows that you can give the adapter in colorspace and how to use a different error rate:: cutadapt --bwa -e 0.15 -a 330201030313112312 -o output.fastq solid.csfasta solid.qual This does the same as above, but produces BFAST-compatible output, strips the \_F3 suffix from read names and adds the prefix "abc:" to them:: cutadapt -c -e 0.15 -a 330201030313112312 -x abc: --strip-f3 solid.csfasta solid.qual > output.fastq Bowtie ------ Quality values of colorspace reads are sometimes negative. Bowtie gets confused and prints this message: Encountered a space parsing the quality string for read xyz BWA also has a problem with such data. Cutadapt therefore converts negative quality values to zero in colorspace data. Use the option ``--no-zero-cap`` to turn this off. cutadapt-1.9.1/doc/installation.rst0000664000175000017500000000447012575761274020106 0ustar marcelmarcel00000000000000============ Installation ============ Quickstart ---------- The easiest way to install cutadapt is to use ``pip`` on the command line:: pip install --user --upgrade cutadapt This will download the software from `PyPI (the Python packaging index) `_, and install the cutadapt binary into ``$HOME/.local/bin``. If an old version of cutadapt exists on your system, the ``--upgrade`` parameter is required in order to install a newer version. You can then run the program like this:: ~/.local/bin/cutadapt --help If you want to avoid typing the full path, add the directory ``$HOME/.local/bin`` to your ``$PATH`` environment variable. If the above does not work, keep reading. Dependencies ------------ Cutadapt requires this software to be installed: * One of Python 2.6, 2.7, 3.3 or 3.4. Python 2.7 is a bit faster than the other versions. * A C compiler. Under Ubuntu, you may need to install the packages ``build-essential`` and ``python-dev``. Installation ------------ If you have already downloaded and unpacked the ``.tar.gz`` file, then installation is done like this (replace "python" with "python3" to install the Python 3 version):: python setup.py install --user If you get an error message:: error: command 'gcc' failed with exit status 1 Then check the entire error message. If it says something about a missing ``Python.h`` file, then you need to install the Python development packages. The appropriate package is called ``python-dev`` in Ubuntu (or ``python3-dev`` for Python 3). System-wide installation ------------------------ If you have root access, then you can install cutadapt system-wide by running:: sudo pip install cutadapt This installs cutadapt into `/usr/local/bin`. If you want to upgrade from an older version, use this command instead:: sudo pip install --upgrade cutadapt Use without installation ------------------------ Build the C extension module (you can try to skip this step -- a compiled version of the module for Linux x86\_64 is already included):: python setup.py build_ext -i Then simply run the script from where it is, similar to this:: bin/cutadapt --help If you get any errors, first try to explicitly request a specific Python version by running cutadapt like this:: python2.7 bin/cutadapt --help cutadapt-1.9.1/doc/ideas.rst0000664000175000017500000000710512606161537016457 0ustar marcelmarcel00000000000000Ideas/To Do =========== This is a rather unsorted list of features that would be nice to have, of things that could be improved in the source code, and of possible algorithmic improvements. - show average error rate - In colorspace and probably also for Illumina data, gapped alignment is not necessary - ``--progress`` - run pylint, pychecker - length histogram - check whether input is FASTQ although -f fasta is given - search for adapters in the order in which they are given on the command line - more tests for the alignment algorithm - deprecate ``--rest-file`` - ``--detect`` prints out best guess which of the given adapters is the correct one - alignment algorithm: make a 'banded' version - it seems the str.find optimization isn't very helpful. In any case, it should be moved into the Aligner class. - allow to remove not the adapter itself, but the sequence before or after it - instead of trimming, convert adapter to lowercase - warn when given adapter sequence contains non-IUPAC characters - try multithreading again, this time use os.pipe() or 0mq Specifying adapters ------------------- The idea is to deprecate the ``-b`` and ``-g`` parameters. Only ``-a`` is used with a special syntax for each adapter type. This makes it a bit easier to add new adapter types in the feature. .. csv-table:: back,``-a ADAPTER``,``-a ADAPTER`` or ``-a ...ADAPTER`` suffix,``-a ADAPTER$``,``-a ...ADAPTER$`` front,``-g ADAPTER``,``-a ADAPTER...`` prefix,``-g ^ADAPTER``,``-a ^ADAPTER...`` (or have anchoring by default?) anywhere,``-b ADAPTER``, ``-a ...ADAPTER...`` ??? paired,(not implemented),``-a ADAPTER...ADAPTER`` or ``-a ^ADAPTER...ADAPTER`` Or add only ``-a ADAPTER...`` as an alias for ``-g ^ADAPTER`` and ``-a ...ADAPTER`` as an alias for ``-a ADAPTER``. The ``...`` would be equivalent to ``N*`` as in regular expressions. Another idea: Allow something such as ``-a ADAP$TER`` or ``-a ADAPTER$NNN``. This would be a way to specify less strict anchoring. Make it possible to specify that the rightmost or leftmost match should be picked. Default right now: Leftmost, even for -g adapters. Allow ``N{3,10}`` as in regular expressions (for a variable-length sequence). Use parentheses to specify the part of the sequence that should be kept: * ``-a (...)ADAPTER`` (default) * ``-a (...ADAPTER)`` (default) * ``-a ADAPTER(...)`` (default) * ``-a (ADAPTER...)`` (??) Or, specify the part that should be removed: ``-a ...(ADAPTER...)`` ``-a ...ADAPTER(...)`` ``-a (ADAPTER)...`` Model somehow all the flags that exist for semiglobal alignment. For start of the adapter: * Start of adapter can be degraded or not * Bases are allowed to be before adapter or not Not degraded and no bases before allowed = anchored. Degraded and bases before allowed = regular 5' By default, the 5' end should be anchored, the 3' end not. * ``-a ADAPTER...`` → not degraded, no bases before allowed * ``-a N*ADAPTER...`` → not degraded, bases before allowed * ``-a ADAPTER^...`` → degraded, no bases before allowed * ``-a N*ADAPTER^...`` → degraded, bases before allowed * ``-a ...ADAPTER`` → degraded, bases after allowed * ``-a ...ADAPTER$`` → not degraded, no bases after allowed Paired-end trimming ------------------- * Could also use a paired-end read merger, then remove adapters with -a and -g Available/used letters for command-line options ----------------------------------------------- * Remaining characters: All uppercase letters except A, B, G, M, N, O, U * Lowercase letters: i, j, k, l, s, w * Planned/reserved: Q (paired-end quality trimming), j (multithreading) cutadapt-1.9.1/doc/recipes.rst0000664000175000017500000000572612575761274017044 0ustar marcelmarcel00000000000000======= Recipes ======= For some trimming applications, the pre-defined adapter types behave differently from what you would like to have. In this section, we show some ways in which cutadapt can be made to behave in the desired way. .. note:: This section is still being written. Forcing matches to be at the end of the read -------------------------------------------- Use ``-a TACGGCATXXX``. The ``X`` is always counted as a mismatch and will force the adapter match to be at the end. This is not the same as an anchored 3' adapter since partial matches are still allowed. Removing more than one adapter ------------------------------ If you want to remove more than one adapter, let's say a 5' adapter and a 3' adapter, you have two options. First, you can specify both adapters and also ``--times=2`` (or the short version ``-n 2``). For example:: cutadapt -g ^TTAAGGCC -a TACGGACT -n 2 -o output.fastq input.fastq This instructs cutadapt to run two rounds of adapter finding and removal. That means that, after the first round and only when an adapter was actually found, another round is performed. In both rounds, all given adapters (two in this case) are searched and removed. The problem is that it could happen that one adapter is found twice (so the 3' adapter, for example, could be removed twice). The second option is to not use the ``-n`` option, but to run cutadapt twice, first removing one adapter and then the other. It is easiest if you use a pipe as in this example:: cutadapt -g ^TTAAGGCC input.fastq | cutadapt -a TACGGACT - > output.fastq Trimming poly-A tails --------------------- If you want to trim a poly-A tail from the 3' end of your reads, use the 3' adapter type (``-a``) with an adapter sequence of many repeated ``A`` nucleotides. Starting with version 1.8 of cutadapt, you can use the following notation to specify a sequence that consists of 100 ``A``:: cutadapt -a "A{100}" -o output.fastq input.fastq This also works when there are sequencing errors in the poly-A tail. So this read :: TACGTACGTACGTACGAAATAAAAAAAAAAA will be trimmed to:: TACGTACGTACGTACG If for some reason you would like to use a shorter sequence of ``A``, you can do so: The matching algorithm always picks the leftmost match that it can find, so cutadapt will do the right thing even when the tail has more ``A`` than you used in the adapter sequence. However, sequencing errors may result in shorter matches than desired. For example, using ``-a "A{10}"``, the read above (where the ``AAAT`` is followed by eleven ``A``) would be trimmed to:: TACGTACGTACGTACGAAAT Depending on your application, perhaps a variant of ``-a A{10}N{90}`` is an alternative, forcing the match to be located as much to the left as possible, while still allowing for non-``A`` bases towards the end of the read. Other things (unfinished) ------------------------- * How to detect adapters * Use cutadapt for quality-trimming only * Use it for minimum/maximum length filtering * Use it for conversion to FASTQ cutadapt-1.9.1/doc/conf.py0000664000175000017500000002026112575761274016146 0ustar marcelmarcel00000000000000# -*- coding: utf-8 -*- # # cutadapt documentation build configuration file, created by # sphinx-quickstart on Fri Sep 12 09:11:16 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import sys import os # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, os.path.abspath(os.pardir)) # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. #needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ 'sphinx.ext.autodoc', ] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' # The encoding of source files. #source_encoding = 'utf-8-sig' # The master toctree document. master_doc = 'index' # General information about the project. project = u'cutadapt' copyright = u'2010-2014, Marcel Martin' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. from cutadapt import __version__ # # The short X.Y version. version = __version__ # The full version, including alpha/beta/rc tags. release = __version__ # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. #language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: #today = '' # Else, today_fmt is used as the format for a strftime call. #today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = ['_build'] # The reST default role (used for this markup: `text`) to use for all # documents. #default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. #add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). #add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. #show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. #modindex_common_prefix = [] # If true, keep warnings as "system message" paragraphs in the built documents. #keep_warnings = False # -- Options for HTML output ---------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. html_theme = 'default' try: from better import better_theme_path html_theme_path = [better_theme_path] html_theme = 'better' except ImportError: pass # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. #html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. #html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". #html_title = None # A shorter title for the navigation bar. Default is the same as html_title. #html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. #html_logo = 'logo.png' # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. #html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied # directly to the root of the documentation. #html_extra_path = [] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. #html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. html_use_smartypants = True # Custom sidebar templates, maps document names to template names. #html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. #html_additional_pages = {} # If false, no module index is generated. #html_domain_indices = True # If false, no index is generated. #html_use_index = True # If true, the index is split into individual pages for each letter. #html_split_index = False # If true, links to the reST sources are added to the pages. #html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. #html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. #html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. #html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). #html_file_suffix = None # Output file base name for HTML help builder. htmlhelp_basename = 'cutadaptdoc' # -- Options for LaTeX output --------------------------------------------- latex_elements = { # The paper size ('letterpaper' or 'a4paper'). 'papersize': 'a4paper', # The font size ('10pt', '11pt' or '12pt'). #'pointsize': '10pt', # Additional stuff for the LaTeX preamble. #'preamble': '', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ ('index', 'cutadapt.tex', u'cutadapt Documentation', u'Marcel Martin', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of # the title page. #latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. #latex_use_parts = False # If true, show page references after internal links. #latex_show_pagerefs = False # If true, show URL addresses after external links. #latex_show_urls = False # Documents to append as an appendix to all manuals. #latex_appendices = [] # If false, no module index is generated. #latex_domain_indices = True # -- Options for manual page output --------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ ('index', 'cutadapt', u'cutadapt Documentation', [u'Marcel Martin'], 1) ] # If true, show URL addresses after external links. #man_show_urls = False # -- Options for Texinfo output ------------------------------------------- # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ ('index', 'cutadapt', u'cutadapt Documentation', u'Marcel Martin', 'cutadapt', 'One line description of project.', 'Miscellaneous'), ] # Documents to append as an appendix to all manuals. #texinfo_appendices = [] # If false, no module index is generated. #texinfo_domain_indices = True # How to display URL addresses: 'footnote', 'no', or 'inline'. #texinfo_show_urls = 'footnote' # If true, do not generate a @detailmenu in the "Top" node's menu. #texinfo_no_detailmenu = False cutadapt-1.9.1/doc/guide.rst0000664000175000017500000014643212627540550016475 0ustar marcelmarcel00000000000000========== User guide ========== Basic usage =========== If you just want to trim a 3' adapter, the basic command-line for cutadapt is:: cutadapt -a AACCGGTT -o output.fastq input.fastq The sequence of the adapter is given with the ``-a`` option. Of course, you need to replace ``AACCGGTT`` with your actual adapter sequence. Reads are read from the input file ``input.fastq`` and written to the output file ``output.fastq``. Cutadapt searches for the adapter in all reads and removes it when it finds it. All reads that were present in the input file will also be present in the output file, some of them trimmed, some of them not. Even reads that were trimmed entirely (because the adapter was found in the very beginning) are output. All of this can be changed with command-line options, explained further down. A report is printed after cutadapt has finished processing the reads. Input and output file formats ----------------------------- Input files for cutadapt need to be in one the these formats: * FASTA (file name extensions: ``.fasta``, ``.fa``, ``.fna``, ``.csfasta``, ``.csfa``) * FASTQ (extensions: ``.fastq``, ``.fq``) * A pair of a FASTA file and a ``.(cs)qual`` file The latter format is (or was) used for colorspace data from the SOLiD instruments. The input file format is recognized from the file name extension (given in parentheses in the list above). You can also explicitly specify which format the input has by using the ``--format`` option. The output format is the same as the input format, except for the FASTA/QUAL pairs -- those will always be converted to FASTQ. Also, cutadapt does not check the output file name: If you input FASTQ data, but use ``-o output.fasta``, then the output file will actually be in FASTQ format. Compressed files ---------------- Cutadapt supports compressed input and output files. Whether an input file needs to be decompressed or an output file needs to be compressed is detected automatically by inspecting the file name: If it ends in ``.gz``, then gzip compression is assumed. You can therefore run cutadapt like this and it works as expected:: cutadapt -a AACCGGTT -o output.fastq.gz input.fastq.gz All of cutadapt's options that expect a file name support this. Files compressed with bzip2 (``.bz2``) or xz (``.xz``) are also supported, but only if the Python installation includes the proper modules. xz files require Python 3.3 or later. Standard input and output ------------------------- If no output file is specified via the ``-o`` option, then the output is sent to the standard output stream. Instead of the example command line from above, you can therefore also write:: cutadapt -a AACCGGTT input.fastq > output.fastq There is one difference in behavior if you use cutadapt without ``-o``: The report is sent to the standard error stream instead of standard output. You can redirect it to a file like this:: cutadapt -a AACCGGTT input.fastq > output.fastq 2> report.txt Wherever cutadapt expects a file name, you can also write a dash (``-``) in order to specify that standard input or output should be used. For example:: tail -n 4 input.fastq | cutadapt -a AACCGGTT - > output.fastq The ``tail -n 4`` prints out only the last four lines of ``input.fastq``, which are then piped into cutadapt. Thus, cutadapt will work only on the last read in the input file. In most cases, you should probably use ``-`` at most once for an input file and at most once for an output file, in order not to get mixed output. You cannot combine ``-`` and gzip compression since cutadapt needs to know the file name of the output or input file. if you want to have a gzip-compressed output file, use ``-o`` with an explicit name. One last "trick" is to use ``/dev/null`` as an output file name. This special file discards everything you send into it. If you only want to see the statistics output, for example, and do not care about the trimmed reads at all, you could use something like this:: cutadapt -a AACCGGTT -o /dev/null input.fastq Read processing =============== Cutadapt can do a lot more in addition to removing adapters. There are various command-line options that make it possible to modify and filter reads and to redirect them to various output files. Each read is processed in the following way: 1. :ref:`Read modification options ` are applied. This includes :ref:`adapter removal `, :ref:`quality trimming `, read name modifications etc. 2. :ref:`Filtering options ` are applied, such as removal of too short or untrimmed reads. Some of the filters also allow to redirect a read to a separate output file. 3. If the read has passed all the filters, it is written to the output file. .. _removing-adapters: Removing adapters ================= Cutadapt supports trimming of multiple types of adapters: =================================================== =========================== Adapter type Command-line option =================================================== =========================== :ref:`3' adapter ` ``-a ADAPTER`` :ref:`5' adapter ` ``-g ADAPTER`` :ref:`Anchored 3' adapter ` ``-a ADAPTER$`` :ref:`Anchored 5' adapter ` ``-g ^ADAPTER`` :ref:`5' or 3' (both possible) ` ``-b ADAPTER`` =================================================== =========================== Here is an illustration of the allowed adapter locations relative to the read and depending on the adapter type: | .. image:: _static/adapters.svg | By default, all adapters :ref:`are searched error-tolerantly `. Adapter sequences :ref:`may also contain the "N" wildcard character `. In addition, it is possible to :ref:`remove a fixed number of bases ` from the beginning or end of each read, and to :ref:`remove low-quality bases (quality trimming) ` from the 3' and 5' ends. .. _three-prime-adapters: 3' adapters ----------- A 3' adapter is a piece of DNA ligated to the 3' end of the DNA fragment you are interested in. The sequencer starts the sequencing process at the 5' end of the fragment and sequences into the adapter if the read is long enough. The read that it outputs will then have a part of the adapter in the end. Or, if the adapter was short and the read length quite long, then the adapter will be somewhere within the read (followed by other bases). For example, assume your fragment of interest is *MYSEQUENCE* and the adapter is *ADAPTER*. Depending on the read length, you will get reads that look like this:: MYSEQUEN MYSEQUENCEADAP MYSEQUENCEADAPTER MYSEQUENCEADAPTERSOMETHINGELSE Use cutadapt's ``-a ADAPTER`` option to remove this type of adapter. This will be the result:: MYSEQUEN MYSEQUENCE MYSEQUENCE MYSEQUENCE As can be seen, cutadapt correctly deals with partial adapter matches, and also with any trailing sequences after the adapter. Cutadapt deals with 3' adapters by removing the adapter itself and any sequence that may follow. If the sequence starts with an adapter, like this:: ADAPTERSOMETHING Then the sequence will be empty after trimming. By default, empty reads are kept and will appear in the output. .. _five-prime-adapters: 5' adapters ----------- .. note:: Unless your adapter may also occur in a degraded form, you probably want to use an anchored 5' adapter, described in the next section. A 5' adapter is a piece of DNA ligated to the 5' end of the DNA fragment of interest. The adapter sequence is expected to appear at the start of the read, but may be partially degraded. The sequence may also appear somewhere within the read. In all cases, the adapter itself and the sequence preceding it is removed. Again, assume your fragment of interest is *MYSEQUENCE* and the adapter is *ADAPTER*. The reads may look like this:: ADAPTERMYSEQUENCE DAPTERMYSEQUENCE TERMYSEQUENCE SOMETHINGADAPTERMYSEQUENCE All the above sequences are trimmed to ``MYSEQUENCE`` when you use `-g ADAPTER`. As with 3' adapters, the resulting read may have a length of zero when the sequence ends with the adapter. For example, the read :: SOMETHINGADAPTER will be empty after trimming. .. _anchored-5adapters: Anchored 5' adapters -------------------- In many cases, the above behavior is not really what you want for trimming 5' adapters. You may know, for example, that degradation does not occur and that the adapter is also not expected to be within the read. Thus, you always expect the read to look like the first example from above:: ADAPTERSOMETHING If you want to trim only this type of adapter, use ``-g ^ADAPTER``. The ``^`` is supposed to indicate the the adapter is "anchored" at the beginning of the read. In other words: The adapter is expected to be a prefix of the read. Note that cases like these are also recognized:: ADAPTER ADAPT ADA The read will simply be empty after trimming. Be aware that cutadapt still searches for adapters error-tolerantly and, in particular, allows insertions. So if your maximum error rate is sufficiently high, even this read will be trimmed:: BADAPTERSOMETHING The ``B`` in the beginnig is seen as an insertion. If you also want to prevent this from happening, use the option ``--no-indels`` to disallow insertions and deletions entirely. .. _anchored-3adapters: Anchored 3' adapters -------------------- It is also possible to anchor 3' adapters to the end of the read. This is rarely necessary, but if you have merged, for example, overlapping paired-end reads, then it is useful. Add the ``$`` character to the end of an adapter sequence specified via ``-a`` in order to anchor the adapter to the end of the read, such as ``-a ADAPTER$``. The adapter will only be found if it is a *suffix* of the read, but errors are still allowed as for 5' adapters. You can disable insertions and deletions with ``--no-indels``. Anchored 3' adapters work as if you had reversed the sequence and used an appropriate anchored 5' adapter. As an example, assume you have these reads:: MYSEQUENCEADAP MYSEQUENCEADAPTER MYSEQUENCEADAPTERSOMETHINGELSE Using ``-a ADAPTER$`` will result in:: MYSEQUENCEADAP MYSEQUENCE MYSEQUENCEADAPTERSOMETHINGELSE Only the middle read is trimmed at all. .. _anywhere-adapters: 5' or 3' adapters ----------------- The last type of adapter is a combination of the 5' and 3' adapter. You can use it when your adapter is ligated to the 5' end for some reads and to the 3' end in other reads. This probably does not happen very often, and this adapter type was in fact originally implemented because the library preparation in an experiment did not work as it was supposed to. For this type of adapter, the sequence is specified with ``-b ADAPTER`` (or use the longer spelling ``--anywhere ADAPTER``). The adapter may appear in the beginning (even degraded), within the read, or at the end of the read (even partially). The decision which part of the read to remove is made as follows: If there is at least one base before the found adapter, then the adapter is considered to be a 3' adapter and the adapter itself and everything following it is removed. Otherwise, the adapter is considered to be a 5' adapter and it is removed from the read, but the sequence after it remains. Here are some examples. ============================== =================== ===================== Read before trimming Read after trimming Detected adapter type ============================== =================== ===================== ``MYSEQUENCEADAPTERSOMETHING`` ``MYSEQUENCE`` 3' adapter ``MYSEQUENCEADAPTER`` ``MYSEQUENCE`` 3' adapter ``MYSEQUENCEADAP`` ``MYSEQUENCE`` 3' adapter ``MADAPTER`` ``M`` 3' adapter ``ADAPTERMYSEQUENCE`` ``MYSEQUENCE`` 5' adapter ``PTERMYSEQUENCE`` ``MYSEQUENCE`` 5' adapter ``TERMYSEQUENCE`` ``MYSEQUENCE`` 5' adapter ============================== =================== ===================== The ``-b`` option cannot be used with colorspace data. .. _error-tolerance: Error tolerance --------------- All searches for adapter sequences are error tolerant. Allowed errors are mismatches, insertions and deletions. For example, if you search for the adapter sequence ``ADAPTER`` and the error tolerance is set appropriately (as explained below), then also ``ADABTER`` will be found (with 1 mismatch), as well as ``ADAPTR`` (with 1 deletion), and also ``ADAPPTER`` (with 1 insertion). The level of error tolerance is adjusted by specifying a *maximum error rate*, which is 0.1 (=10%) by default. Use the ``-e`` option to set a different value. To determine the number of allowed errors, the maximum error rate is multiplied by the length of the match (and then rounded off). What does that mean? Assume you have a long adapter ``LONGADAPTER`` and it appears in full somewhere within the read. The length of the match is 11 characters since the full adapter has a length of 11, therefore 11·0.1=1.1 errors are allowed with the default maximum error rate of 0.1. This is rounded off to 1 allowed error. So the adapter will be found within this read:: SEQUENCELONGADUPTERSOMETHING If the match is a bit shorter, however, the result is different:: SEQUENCELONGADUPT Only 9 characters of the adapter match: ``LONGADAPT`` matches ``LONGADUPT`` with one substitution. Therefore, only 9·0.1=0.9 errors are allowed. Since this is rounded off to zero allowed errors, the adapter will not be found. The number of errors allowed for a given adapter match length is also shown in the report that cutadapt prints:: Sequence: 'LONGADAPTER'; Length: 11; Trimmed: 2 times. No. of allowed errors: 0-9 bp: 0; 10-11 bp: 1 This tells us what we now already know: For match lengths of 0-9 bases, zero errors are allowed and for matches of length 10-11 bases, one error is allowed. The reason for this behavior is to ensure that short matches are not favored unfairly. For example, assume the adapter has 40 bases and the maximum error rate is 0.1, which means that four errors are allowed for full-length matches. If four errors were allowed even for a short match such as one with 10 bases, this would mean that the error rate for such a case is 40%, which is clearly not what was desired. Insertions and deletions can be disallowed by using the option ``--no-indels``. See also the :ref:`section on details of the alignment algorithm `. Reducing random matches ----------------------- Since cutadapt allows partial matches between the read and the adapter sequence, short matches can occur by chance, leading to erroneously trimmed bases. For example, roughly 25% of all reads end with a base that is identical to the first base of the adapter. To reduce the number of falsely trimmed bases, the alignment algorithm requires that at least *three bases* match between adapter and read. The minimum overlap length can be changed with the ``--overlap``(short: ``-O``) parameter. Shorter matches are simply ignored, and the bases are not trimmed. Requiring at least three bases to match is quite conservative. Even if no minimum overlap was required, we can compute that we lose only about 0.44 bases per read on average, see `Section 2.3.3 in my thesis `_. With the default minimum overlap length of 3, only about 0.07 bases are lost per read. When choosing an appropriate minimum overlap length, take into account that true adapter matches are also lost when the overlap length is higher than 1, reducing cutadapt's sensitivity. .. _wildcards: Wildcards --------- All `IUPAC nucleotide codes `_ (wildcard characters) are supported. For example, use an ``N`` in the adapter sequence to match any nucleotide in the read, or use ``-a YACGT`` for an adapter that matches both ``CACGT`` and ``TACGT``. The wildcard character ``N`` is useful for trimming adapters with an embedded variable barcode:: cutadapt -a ACGTAANNNNTTAGC -o output.fastq input.fastq Wildcard characters in the adapter are enabled by default. Use the option ``-N`` to disable this. Matching of wildcards in the reads is also possible, but disabled by default in order to avoid matches in reads that consist of many (often low-quality) ``N`` bases. Use ``--match-read-wildcards`` to enable wildcards also in reads. If wildcards are disabled entirely (that is, you use ``-N`` and *do not* use ``--match-read-wildcards``), then cutadapt compares characters by ASCII value. Thus, both the read and adapter can be arbitrary strings (such as ``SEQUENCE`` or ``ADAPTER`` as used here in the examples). Wildcards do not work in colorspace. Repeated bases in the adapter sequence -------------------------------------- If you have many repeated bases in the adapter sequence, such as many ``N``s or many ``A``s, you do not have to spell them out. For example, instead of writing ten ``A`` in a row (``AAAAAAAAAA``), write ``A{10}`` instead. The number within the curly braces specifies how often the character that preceeds it will be repeated. This works also for IUPAC wildcard characters, as in ``N{5}``. It is recommended that you use quotation marks around your adapter sequence if you use this feature. For poly-A trimming, for example, you would write:: cutadapt -a "A{100}" -o output.fastq input.fastq .. _modifying-reads: Modifying reads =============== This section describes in which ways reads can be modified other than adapter removal. .. _cut-bases: Removing a fixed number of bases -------------------------------- By using the ``--cut`` option or its abbreviation ``-u``, it is possible to unconditionally remove bases from the beginning or end of each read. If the given length is positive, the bases are removed from the beginning of each read. If it is negative, the bases are removed from the end. For example, to remove the first five bases of each read:: cutadapt -u 5 -o trimmed.fastq reads.fastq To remove the last seven bases of each read:: cutadapt -u -7 -o trimmed.fastq reads.fastq The ``-u``/``--cut`` option can be combined with the other options, but the desired bases are removed *before* any adapter trimming. .. _quality-trimming: Quality trimming ---------------- The ``-q`` (or ``--trim-qualities``) parameter can be used to trim low-quality ends from reads before adapter removal. For this to work correctly, the quality values must be encoded as ascii(phred quality + 33). If they are encoded as ascii(phred quality + 64), you need to add ``--quality-base=64`` to the command line. Quality trimming can be done without adapter trimming, so this will work:: cutadapt -q 10 -o output.fastq input.fastq By default, only the 3' end of each read is quality-trimmed. If you want to trim the 5' end as well, use the ``-q`` option with two comma-separated cutoffs:: cutadapt -q 15,10 -o output.fastq input.fastq The 5' end will then be trimmed with a cutoff of 15, and the 3' will be trimmed with a cutoff of 10. If you only want to trim the 5' end, then use a cutoff of 0 for the 3' end, as in ``-q 10,0``. Quality trimming algorithm ~~~~~~~~~~~~~~~~~~~~~~~~~~ The trimming algorithm is the same as the one used by BWA, but applied to both ends of the read in turn (if requested). That is: Subtract the given cutoff from all qualities; compute partial sums from all indices to the end of the sequence; cut the sequence at the index at which the sum is minimal. If both ends are to be trimmed, repeat this for the other end. The basic idea is to remove all bases starting from the end of the read whose quality is smaller than the given threshold. This is refined a bit by allowing some good-quality bases among the bad-quality ones. In the following example, we assume that the 3' end is to be quality-trimmed. Assume you use a threshold of 10 and have these quality values: 42, 40, 26, 27, 8, 7, 11, 4, 2, 3 Subtracting the threshold gives: 32, 30, 16, 17, -2, -3, 1, -6, -8, -7 Then sum up the numbers, starting from the end (partial sums). Stop early if the sum is greater than zero: (70), (38), 8, -8, -25, -23, -20, -21, -15, -7 The numbers in parentheses are not computed (because 8 is greater than zero), but shown here for completeness. The position of the minimum (-25) is used as the trimming position. Therefore, the read is trimmed to the first four bases, which have quality values 42, 40, 26, 27. Modifying read names -------------------- If you feel the need to modify the names of processed reads, some of the following options may be useful. Use ``-y`` or ``--suffix`` to append a text to read names. The given string can contain the placeholder ``{name}``, which will be replaced with the name of the adapter found in that read. For example, writing :: cutadapt -a adapter1=ACGT -y ' we found {name}' input.fastq changes a read named ``read1`` to ``read1 we found adapter1`` if the adapter ``ACGT`` was found. The options ``-x``/``--prefix`` work the same, but the text is added in front of the read name. For both options, spaces need to be specified explicitly, as in the above example. If no adapter was found in a read, the text ``no_adapter`` is inserted for ``{name}``. In order to remove a suffix of each read name, use ``--strip-suffix``. Some old 454 read files contain the length of the read in the name:: >read1 length=17 ACGTACGTACAAAAAAA If you want to update this to the correct length after trimming, use the option ``--length-tag``. In this example, this would be ``--length-tag 'length='``. After trimming, the read would perhaps look like this:: >read1 length=10 ACGTACGTAC Read modification order ----------------------- The read modifications described above are applied in the following order to each read. Steps not requested on the command-line are skipped. 1. Unconditional base removal with ``--cut`` 2. Quality trimming (``-q``) 3. Adapter trimming (``-a``, ``-b``, ``-g`` and uppercase versions) 4. N-end trimming (``--trim-n``) 5. Length tag modification (``--length-tag``) 6. Read name suffixe removal (``--strip-suffix``) 7. Addition of prefix and suffix to read name (``-x``/``--prefix`` and ``-y``/``--suffix``) 8. Double-encode the sequence (only colorspace) 9. Replace negative quality values with zero (zero capping, only colorspace) 10. Trim primer base (only colorspace) The last three steps are colorspace-specific. .. _filtering: Filtering reads =============== By default, all processed reads, no matter whether they were trimmed are not, are written to the output file specified by the ``-o`` option (or to standard output if ``-o`` was not provided). For paired-end reads, the second read in a pair is always written to the file specified by the ``-p`` option. The options described here make it possible to filter reads by either discarding them entirely or by redirecting them to other files. When redirecting reads, the basic rule is that *each read is written to at most one file*. You cannot write reads to more than one output file. In the following, the term "processed read" refers to a read to which all modifications have been applied (adapter removal, quality trimming etc.). A processed read can be identical to the input read if no modifications were done. ``--minimum-length N`` or ``-m N`` Throw away processed reads shorter than *N* bases. ``--too-short-output FILE`` Instead of throwing away the reads that are too short according to ``-m``, write them to *FILE* (in FASTA/FASTQ format). ``--maximum-length N`` or ``-M N`` Throw away processed reads longer than *N* bases. ``--too-long-output FILE`` Instead of throwing away the reads that are too long (according to ``-M``), write them to *FILE* (in FASTA/FASTQ format). ``--untrimmed-output FILE`` Write all reads without adapters to *FILE* (in FASTA/FASTQ format) instead of writing them to the regular output file. ``--discard-trimmed`` Throw away reads in which an adapter was found. ``--discard-untrimmed`` Throw away reads in which *no* adapter was found. This has the same effect as specifying ``--untrimmed-output /dev/null``. The options ``--too-short-output`` and ``--too-long-output`` are applied first. This means, for example, that a read that is too long will never end up in the ``--untrimmed-output`` file when ``--too-long-output`` was given, no matter whether it was trimmed or not. The options ``--untrimmed-output``, ``--discard-trimmed`` and ``-discard-untrimmed`` are mutually exclusive. .. _paired-end: Trimming paired-end reads ========================= Cutadapt supports trimming of paired-end reads, trimming both reads in a pair at the same time. Assume the input is in ``reads.1.fastq`` and ``reads.2.fastq`` and that ``ADAPTER_FWD`` should be trimmed from the forward reads (first file) and ``ADAPTER_REV`` from the reverse reads (second file). The basic command-line is:: cutadapt -a ADAPTER_FWD -A ADAPTER_REV -o out.1.fastq -p out.2.fastq reads.1.fastq reads.2.fastq ``-p`` is the short form of ``--paired-output``. The option ``-A`` is used here to specify an adapter sequence that cutadapt should remove from the second read in each pair. There are also the options ``-G``, ``-B``. All of them work just like their lowercase counterparts, except that the adapter is searched for in the second read in each paired-end read. There is also option ``-U``, which you can use to remove a fixed number of bases from the second read in a pair. While it is possible to run cutadapt on the two files separately, processing both files at the same time is highly recommended since the program can check for problems in your input files only when they are processed together. When you use ``-p``/``--paired-output``, cutadapt checks whether the files are properly paired. An error is raised if one of the files contains more reads than the other or if the read names in the two files do not match. Only the part of the read name before the first space is considered. If the read name ends with ``/1`` or ``/2``, then that is also ignored. For example, two FASTQ headers that would be considered to denote properly paired reads are:: @my_read/1 a comment and:: @my_read/2 another comment As soon as you start to use one of the filtering options that discard reads, it is mandatory you process both files at the same time to make sure that the output files are kept synchronized: If a read is removed from one of the files, cutadapt will ensure it is also removed from the other file. The following command-line options are applied to *both* reads: * ``-q`` (along with ``--quality-base``) * ``--times`` applies to all the adapters given * ``--no-trim`` * ``--trim-n`` * ``--mask`` * ``--length-tag`` * ``--prefix``, ``--suffix`` * ``--strip-f3`` * ``--colorspace``, ``--bwa``, ``-z``, ``--no-zero-cap``, ``--double-encode``, ``--trim-primer`` The following limitations still exist: * The ``--info-file``, ``--rest-file`` and ``--wildcard-file`` options write out information only from the first read. * Demultiplexing is not yet supported with paired-end data. .. _filtering-paired: Filtering paired-end reads -------------------------- The :ref:`filtering options listed above ` can also be used when trimming paired-end data. Since there are two reads, however, the filtering criteria are checked for both reads. The question is what to do when a criterion applies to only one read and not the other. By default, the filtering options discard or redirect the read pair if *any* of the two reads fulfill the criteria. That is, ``--max-n`` discards the pair if one of the two reads has too many ``N`` bases; ``--discard-untrimmed`` discards the pair if one of the reads does not contain an adapter; ``--minimum-length`` discards the pair if one of the reads is too short; and ``--maximum-length`` discards the pair if one of the reads is too long. Note that the ``--discard-trimmed`` filter would also apply because it is also the case that at least one of the reads is *trimmed*! To require that filtering criteria must apply to *both* reads in order for a read pair to be considered "filtered", use the option ``--pair-filter=both``. To further complicate matters, cutadapt switches to a backwards compatibility mode ("legacy mode") when none of the uppercase modification options (``-A``/``-B``/``-G``/``-U``) are given. In that mode, filtering criteria are checked only for the *first* read. Cutadapt will also tell you at the top of the report whether legacy mode is active. Check that line if you get strange results! These are the paired-end specific filtering and output options: ``--paired-output FILE`` or ``-p FILE`` Write the second read of each processed pair to *FILE* (in FASTA/FASTQ format). ``--untrimmed-paired-output FILE`` Used together with ``--untrimmed-output``. The second read in a pair is written to this file when the processed pair was *not* trimmed. ``--pair-filter=(any|both)`` Which of the reads in a paired-end read have to match the filtering criterion in order for it to be filtered. Note that the option names can be abbreviated as long as it is clear which option is meant (unique prefix). For example, instead of ``--untrimmed-output`` and ``--untrimmed-paired-output``, you can write ``--untrimmed-o`` and ``--untrimmed-p``. Interleaved paired-end reads ---------------------------- Paired-end reads can be read from a single FASTQ file in which the entries for the first and second read from each pair alternate. The first read in each pair comes before the second. Enable this file format by adding the ``--interleaved`` option to the command-line. For example:: cutadapt --interleaved -q 20 -a ACGT -A TGCA -o trimmed.fastq reads.fastq The output FASTQ file will also be written interleaved. Cutadapt will detect if the input file is not properly interleaved by checking whether read names match and whether the file contains an even number of entries. When ``--interleaved`` is used, legacy mode is disabled (that is, read-modification options such as ``-q`` always apply to both reads). Legacy paired-end read trimming ------------------------------- .. note:: This section describes the way paired-end trimming was done in cutadapt before 1.8, where the ``-A``, ``-G``, ``-B`` options were not available. It is less safe and more complicated, but you can still use it. If you do not use any of the filtering options that discard reads, such as ``--discard``, ``--minimum-length`` or ``--maximum-length``, you can run cutadapt on each file separately:: cutadapt -a ADAPTER_FWD -o trimmed.1.fastq reads1.fastq cutadapt -a ADAPTER_REV -o trimmed.2.fastq reads2.fastq You can use the options that are listed under 'Additional modifications' in cutadapt's help output without problems. For example, if you want to quality-trim the first read in each pair with a threshold of 10, and the second read in each pair with a threshold of 15, then the commands could be:: cutadapt -q 10 -a ADAPTER_FWD -o trimmed.1.fastq reads1.fastq cutadapt -q 15 -a ADAPTER_REV -o trimmed.2.fastq reads2.fastq If you use any of the filtering options, you must use cutadapt in the following way (with the ``-p`` option) to make sure that read pairs remain sychronized. First trim the forward read, writing output to temporary files (we also add some quality trimming):: cutadapt -q 10 -a ADAPTER_FWD --minimum-length 20 -o tmp.1.fastq -p tmp.2.fastq reads.1.fastq reads.2.fastq Then trim the reverse read, using the temporary files as input:: cutadapt -q 15 -a ADAPTER_REV --minimum-length 20 -o trimmed.2.fastq -p trimmed.1.fastq tmp.2.fastq tmp.1.fastq Finally, remove the temporary files:: rm tmp.1.fastq tmp.2.fastq Please see the previous section for a much simpler way of trimming paired-end reads! In legacy paired-end mode, the read-modifying options such as ``-q`` only apply to the first file in each call to cutadapt (first ``reads.1.fastq``, then ``tmp.2.fastq`` in this example). Reads in the second file are not affected by those options, but by the filtering options: If a read in the first file is discarded, then the matching read in the second file is also filtered and not written to the output given by ``--paired-output`` in order to keep both output files synchronized. .. _multiple-adapters: Multiple adapters ================= It is possible to specify more than one adapter sequence by using the options ``-a``, ``-b`` and ``-g`` more than once. Any combination is allowed, such as five ``-a`` adapters and two ``-g`` adapters. Each read will be searched for all given adapters, but **only the best matching adapter is removed**. (But it is possible to :ref:`trim more than one adapter from each read `). This is how a command may look like to trim one of two possible 3' adapters:: cutadapt -a TGAGACACGCA -a AGGCACACAGGG -o output.fastq input.fastq The adapter sequences can also be read from a FASTA file. Instead of giving an explicit adapter sequence, you need to write ``file:`` followed by the name of the FASTA file:: cutadapt -a file:adapters.fasta -o output.fastq input.fastq All of the sequences in the file ``adapters.fasta`` will be used as 3' adapters. The other adapter options ``-b`` and ``-g`` also support this. Again, only the best matching adapter is trimmed from each read. When cutadapt has multiple adapter sequences to work with, either specified explicitly on the command line or via a FASTA file, it decides in the following way which adapter should be trimmed: * All given adapter sequences are matched to the read. * Adapter matches where the overlap length (see the ``-O`` parameter) is too small or where the error rate is too high (``-e``) are removed from further consideration. * Among the remaining matches, the one with the **greatest number of matching bases** is chosen. * If there is a tie, the first adapter wins. The order of adapters is the order in which they are given on the command line or in which they are found in the FASTA file. If your adapter sequences are all similar and differ only by a variable barcode sequence, you should use a single adapter sequence instead that :ref:`contains wildcard characters `. .. _named-adapters: Named adapters -------------- Cutadapt reports statistics for each adapter separately. To identify the adapters, they are numbered and the adapter sequence is also printed:: === Adapter 1 === Sequence: AACCGGTT; Length 8; Trimmed: 5 times. If you want this to look a bit nicer, you can give each adapter a name in this way:: cutadapt -a My_Adapter=AACCGGTT -o output.fastq input.fastq The actual adapter sequence in this example is ``AACCGGTT`` and the name assigned to it is ``My_Adapter``. The report will then contain this name in addition to the other information:: === Adapter 'My_Adapter' === Sequence: TTAGACATATCTCCGTCG; Length 18; Trimmed: 5 times. When adapters are read from a FASTA file, the sequence header is used as the adapter name. Adapter names are also used in column 8 of :ref:`info files `. .. _demultiplexing: Demultiplexing -------------- Cutadapt supports demultiplexing, which means that reads are written to different output files depending on which adapter was found in them. To use this, include the string ``{name}`` in the name of the output file and give each adapter a name. The path is then interpreted as a template and each trimmed read is written to the path in which ``{name}`` is replaced with the name of the adapter that was found in the read. Reads in which no adapter was found will be written to a file in which ``{name}`` is replaced with ``unknown``. .. note: Demultiplexing is currently only supported for single-end reads. Paired-end support is planned for one of the next versions. Example:: cutadapt -a one=TATA -a two=GCGC -o trimmed-{name}.fastq.gz input.fastq.gz This command will create the three files ``demulti-one.fastq.gz``, ``demulti-two.fastq.gz`` and ``demulti-unknown.fastq.gz``. You can :ref:`also provide adapter sequences in a FASTA file `. In order to not trim the input files at all, but to only do multiplexing, use option ``--no-trim``. And if you want to output the reads in which no adapters were found to a different file, use the ``--untrimmed-output`` parameter with a file name. Here is an example that uses both parameters and reads the adapters from a FASTA file (note that ``--untrimmed-output`` can be abbreviated):: cutadapt -a file:barcodes.fasta --no-trim --untrimmed-o untrimmed.fastq.gz -o trimmed-{name}.fastq.gz input.fastq.gz .. _more-than-one: Trimming more than one adapter from each read --------------------------------------------- By default, at most one adapter sequence is removed from each read, even if multiple adapter sequences were provided. This can be changed by using the ``--times`` option (or its abbreviated form ``-n``). Cutadapt will then search for all the given adapter sequences repeatedly, either until no adapter match was found or until the specified number of rounds was reached. As an example, assume you have a protocol in which a 5' adapter gets ligated to your DNA fragment, but it's possible that the adapter is ligated more than once. So your sequence could look like this:: ADAPTERADAPTERADAPTERMYSEQUENCE To be on the safe side, you assume that there are at most 5 copies of the adapter sequence. This command can be used to trim the reads correctly:: cutadapt -g ^ADAPTER -n 5 -o output.fastq input.fastq This feature can also be used to search for *5'/3' linked adapters*. For example, when the 5' adapter is *FIRST* and the 3' adapter is *SECOND*, then the read could look like this:: FIRSTMYSEQUENCESECOND That is, the sequence of interest is framed by the 5' and the 3' adapter. The following command can be used to trim such a read:: cutadapt -g ^FIRST -a SECOND -n 2 ... Support for linked adapters is currently incomplete. For example, it is not possible to specify that SECOND should only be trimmed when FIRST also occurs. `See also this feature request `_, and comment on it if you would like to see this implemented. .. _truseq: Illumina TruSeq =============== If you have reads containing Illumina TruSeq adapters, follow these steps. Single-end reads as well as the first reads of paired-end data need to be trimmed with ``A`` + the “TruSeq Indexed Adapter”. Use only the prefix of the adapter sequence that is common to all Indexed Adapter sequences:: cutadapt -a AGATCGGAAGAGCACACGTCTGAACTCCAGTCAC -o trimmed.fastq.gz reads.fastq.gz If you have paired-end data, trim also read 2 with the reverse complement of the “TruSeq Universal Adapter”. The full command-line looks as follows:: cutadapt \ -a AGATCGGAAGAGCACACGTCTGAACTCCAGTCAC \ -A AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGTAGATCTCGGTGGTCGCCGTATCATT \ -o trimmed.1.fastq.gz -p trimmed.2.fastq.gz \ reads.1.fastq.gz reads.2.fastq.gz See also the :ref:`section about paired-end adapter trimming above `. If you want to simplify this a bit, you can also use the common prefix ``AGATCGGAAGAGC`` as the adapter sequence in both cases:: cutadapt \ -a AGATCGGAAGAGC -A AGATCGGAAGAGC \ -o trimmed.1.fastq.gz -p trimmed.2.fastq.gz \ reads.1.fastq.gz reads.2.fastq.gz The adapter sequences can be found in the document `Illumina TruSeq Adapters De-Mystified `__. .. _warnbase: Warning about incomplete adapter sequences ------------------------------------------ Sometimes cutadapt’s report ends with these lines:: WARNING: One or more of your adapter sequences may be incomplete. Please see the detailed output above. Further up, you’ll see a message like this:: Bases preceding removed adapters: A: 95.5% C: 1.0% G: 1.6% T: 1.6% none/other: 0.3% WARNING: The adapter is preceded by "A" extremely often. The provided adapter sequence may be incomplete. To fix the problem, add "A" to the beginning of the adapter sequence. This means that in 95.5% of the cases in which an adapter was removed from a read, the base coming *before* that was an ``A``. If your DNA fragments are not random, such as in amplicon sequencing, then this is to be expected and the warning can be ignored. If the DNA fragments are supposed to be random, then the message may be genuine: The adapter sequence may be incomplete and should include an additional ``A`` in the beginning. This warning exists because some documents list the Illumina TruSeq adapters as starting with ``GATCGGA...``. While that is technically correct, the library preparation actually results in an additional ``A`` before that sequence, which also needs to be removed. See the :ref:`previous section ` for the correct sequence. .. _dealing-with-ns: Dealing with ``N`` bases ======================== Cutadapt supports the following options to deal with ``N`` bases in your reads: ``--max-n COUNT`` Discard reads containing more than *COUNT* ``N`` bases. A fractional *COUNT* between 0 and 1 can also be given and will be treated as the proportion of maximally allowed ``N`` bases in the read. ``--trim-n`` Remove flanking ``N`` bases from each read. That is, a read such as this:: NNACGTACGTNNNN Is trimmed to just ``ACGTACGT``. This option is applied *after* adapter trimming. If you want to get rid of ``N`` bases before adapter removal, use quality trimming: ``N`` bases typically also have a low quality value associated with them. .. _bisulfite: Bisulfite sequencing (RRBS) =========================== When trimming reads that come from a library prepared with the RRBS (reduced representation bisulfit sequencing) protocol, the last two 3' bases must be removed in addition to the adapter itself. This can be achieved by using not the adapter sequence itself, but by adding two wildcard characters to its beginning. If the adapter sequence is ``ADAPTER``, the command for trimming should be:: cutadapt -a NNADAPTER -o output.fastq input.fastq Details can be found in `Babraham bioinformatics' "Brief guide to RRBS" `_. A summary follows. During RRBS library preparation, DNA is digested with the restriction enzyme MspI, generating a two-base overhang on the 5' end (``CG``). MspI recognizes the sequence ``CCGG`` and cuts between ``C`` and ``CGG``. A double-stranded DNA fragment is cut in this way:: 5'-NNNC|CGGNNN-3' 3'-NNNGGC|CNNN-5' The fragment between two MspI restriction sites looks like this:: 5'-CGGNNN...NNNC-3' 3'-CNNN...NNNGGC-5' Before sequencing (or PCR) adapters can be ligated, the missing base positions must be filled in with GTP and CTP:: 5'-ADAPTER-CGGNNN...NNNCcg-ADAPTER-3' 3'-ADAPTER-gcCNNN...NNNGGC-ADAPTER-5' The filled-in bases, marked in lowercase above, do not contain any original methylation information, and must therefore not be used for methylation calling. By prefixing the adapter sequence with ``NN``, the bases will be automatically stripped during adapter trimming. Cutadapt's output ================= How to read the report ---------------------- After every run, cutadapt prints out per-adapter statistics. The output starts with something like this:: Sequence: 'ACGTACGTACGTTAGCTAGC'; Length: 20; Trimmed: 2402 times. The meaning of this should be obvious. The next piece of information is this:: No. of allowed errors: 0-9 bp: 0; 10-19 bp: 1; 20 bp: 2 The adapter has, as was shown above, has a length of 20 characters. We are using the default error rate of 0.1. What this implies is shown above: Matches up to a length of 9 bp are allowed to have no errors. Matches of lengths 10-19 bp are allowd to have 1 error and matches of length 20 can have 2 errors. See also :ref:`the section about error-tolerant matching `. Finally, a table is output that gives more detailed information about the lengths of the removed sequences. The following is only an excerpt; some rows are left out:: Overview of removed sequences length count expect max.err error counts 3 140 156.2 0 140 4 57 39.1 0 57 5 50 9.8 0 50 6 35 2.4 0 35 ... 100 397 0.0 3 358 36 3 The first row tells us the following: Three bases were removed in 140 reads; randomly, one would expect this to occur 156.2 times; the maximum number of errors at that match length is 0 (this is actually redundant since we know already that no errors are allowed at lengths 0-9 bp). The last column shows the number of reads that had 0, 1, 2 ... errors. In the last row, for example, 358 reads matched the adapter with zero errors, 36 with 1 error, and 3 matched with 2 errors. The "expect" column gives only a rough estimate of the number of sequences that is expected to match randomly (it assumes a GC content of 50%, for example), but it can help to estimate whether the matches that were found are true adapter matches or if they are due to chance. At lengths 6, for example, only 2.4 reads are expected, but 35 do match, which hints that most of these matches are due to actual adapters. Note that the "length" column refers to the length of the removed sequence. That is, the actual length of the match in the above row at length 100 is 20 since that is the adapter length. Assuming the read length is 100, the adapter was found in the beginning of 397 reads and therefore those reads were trimmed to a length of zero. The table may also be useful in case the given adapter sequence contains an error. In that case, it may look like this:: ... length count expect max.err error counts 10 53 0.0 1 51 2 11 45 0.0 1 42 3 12 51 0.0 1 48 3 13 39 0.0 1 0 39 14 40 0.0 1 0 40 15 36 0.0 1 0 36 ... We can see that no matches longer than 12 have zero errors. In this case, it indicates that the 13th base of the given adapter sequence is incorrect. .. _info-file: Format of the info file ----------------------- When the ``--info-file`` command-line parameter is given, detailed information about the found adapters is written to the given file. The output is a tab-separated text file. Each line corresponds to one read of the input file (unless `--times` is used, see below). The fields are: 1. Read name 2. Number of errors 3. 0-based start coordinate of the adapter match 4. 0-based end coordinate of the adapter match 5. Sequence of the read to the left of the adapter match (can be empty) 6. Sequence of the read that was matched to the adapter 7. Sequence of the read to the right of the adapter match (can be empty) 8. Name of the found adapter. 9. Quality values corresponding to sequence left of the adapter match (can be empty) 10. Quality values corresponding to sequence matched to the adapter (can be empty) 11. Quality values corresponding to sequence to the right of the adapter match (can be empty) The concatenation of the fields 5-7 yields the full read sequence. Column 8 identifies the found adapter. `The section about named adapters ` describes how to give a name to an adapter. Adapters without a name are numbered starting from 1. Fields 9-11 are empty if quality values are not available. Concatenating them yields the full sequence of quality values. If no adapter was found, the format is as follows: 1. Read name 2. The value -1 3. The read sequence 4. Quality values When parsing the file, be aware that additional columns may be added in the future. Note also that some fields can be empty, resulting in consecutive tabs within a line. If the ``--times`` option is used and greater than 1, each read can appear more than once in the info file. There will be one line for each found adapter, all with identical read names. Only for the first of those lines will the concatenation of columns 5-7 be identical to the original read sequence (and accordingly for columns 9-11). For subsequent lines, the shown sequence are the ones that were used in subsequent rounds of adapter trimming, that is, they get successively shorter. Columns 9-11 have been added in cutadapt version 1.9. .. _algorithm: The alignment algorithm ======================= Since the publication of the `EMBnet journal application note about cutadapt `_, the alignment algorithm used for finding adapters has changed significantly. An overview of this new algorithm is given in this section. An even more detailed description is available in Chapter 2 of my PhD thesis `Algorithms and tools for the analysis of high-throughput DNA sequencing data `_. The algorithm is based on *semiglobal alignment*, also called *free-shift*, *ends-free* or *overlap* alignment. In a regular (global) alignment, the two sequences are compared from end to end and all differences occuring over that length are counted. In semiglobal alignment, the sequences are allowed to freely shift relative to each other and differences are only penalized in the overlapping region between them:: FANTASTIC ELEFANT The prefix ``ELE`` and the suffix ``ASTIC`` do not have a counterpart in the respective other row, but this is not counted as an error. The overlap ``FANT`` has a length of four characters. Traditionally, *alignment scores* are used to find an optimal overlap aligment: This means that the scoring function assigns a positive value to matches, while mismatches, insertions and deletions get negative values. The optimal alignment is then the one that has the maximal total score. Usage of scores has the disadvantage that they are not at all intuitive: What does a total score of *x* mean? Is that good or bad? How should a threshold be chosen in order to avoid finding alignments with too many errors? For cutadapt, the adapter alignment algorithm uses *unit costs* instead. This means that mismatches, insertions and deletions are counted as one error, which is easier to understand and allows to specify a single parameter for the algorithm (the maximum error rate) in order to describe how many errors are acceptable. There is a problem with this: When using costs instead of scores, we would like to minimize the total costs in order to find an optimal alignment. But then the best alignment would always be the one in which the two sequences do not overlap at all! This would be correct, but meaningless for the purpose of finding an adapter sequence. The optimization criteria are therefore a bit different. The basic idea is to consider the alignment optimal that maximizes the overlap between the two sequences, as long as the allowed error rate is not exceeded. Conceptually, the procedure is as follows: 1. Consider all possible overlaps between the two sequences and compute an alignment for each, minimizing the total number of errors in each one. 2. Keep only those alignments that do not exceed the specified maximum error rate. 3. Then, keep only those alignments that have a maximal number of matches (that is, there is no alignment with more matches). 4. If there are multiple alignments with the same number of matches, then keep only those that have the smallest error rate. 5. If there are still multiple candidates left, choose the alignment that starts at the leftmost position within the read. In Step 1, the different adapter types are taken into account: Only those overlaps that are actually allowed by the adapter type are actually considered. cutadapt-1.9.1/LICENSE0000664000175000017500000000210412575761274015103 0ustar marcelmarcel00000000000000Copyright (c) 2010-2015 Marcel Martin 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. cutadapt-1.9.1/CITATION0000664000175000017500000000105212575761274015234 0ustar marcelmarcel00000000000000Marcel Martin. Cutadapt removes adapter sequences from high-throughput sequencing reads. EMBnet.journal, 17(1):10-12, May 2011. DOI: http://dx.doi.org/10.14806/ej.17.1.200 @ARTICLE{Martin2011Cutadapt, author = {Marcel Martin}, title = {Cutadapt removes adapter sequences from high-throughput sequencing reads}, journal = {EMBnet.journal}, year = 2011, month = may, volume = 17, pages = {10--12}, number = 1, doi = {http://dx.doi.org/10.14806/ej.17.1.200}, url = {http://journal.embnet.org/index.php/embnetjournal/article/view/200} } cutadapt-1.9.1/bin/0000775000175000017500000000000012627541606014642 5ustar marcelmarcel00000000000000cutadapt-1.9.1/bin/cutadapt0000775000175000017500000000021212575761274016377 0ustar marcelmarcel00000000000000#!/usr/bin/env python import sys try: import _preamble except ImportError: pass from cutadapt.scripts import cutadapt cutadapt.main() cutadapt-1.9.1/bin/_preamble.py0000664000175000017500000000147212575761274017155 0ustar marcelmarcel00000000000000# Copyright (c) Twisted Matrix Laboratories. # # Copied from Twisted (http://twistedmatrix.com/), see # http://twistedmatrix.com/trac/browser/trunk/LICENSE for the license. # # This makes sure that users don't have to set up their environment # specially in order to run these programs from bin/. # This helper is shared by many different actual scripts. It is not intended to # be packaged or installed, it is only a developer convenience. By the time # the package is actually installed somewhere, the environment should already be set # up properly without the help of this tool. import sys, os path = os.path.abspath(sys.argv[0]) while os.path.dirname(path) != path: if os.path.exists(os.path.join(path, 'cutadapt', '__init__.py')): sys.path.insert(0, path) break path = os.path.dirname(path)