@@ -0,0 +1,1221 @@
+from sequana import KronaMerger, KrakenResults, KrakenTaxon, KrakenBuilder%0Afrom sequana import sequana_data%0Afrom easydev import TempFile, execute%0Afrom nose.plugins.attrib import attr%0A%0Adef test_krona_merger():%0A%0A    k1 = KronaMerger(sequana_data(%22test_krona_k1.tsv%22, %22testing%22))%0A    k2 = KronaMerger(sequana_data(%22test_krona_k2.tsv%22, %22testing%22))%0A    k1 += k2%0A %0A    with TempFile(suffix='.tsv') as fh:%0A        df = k1.to_tsv(fh.name) %0A    assert all(df%5B'count'%5D == %5B14043,591,184,132%5D)%0A    assert k1%5B'Bacteria%5CtProteobacteria%5Ctspecies1%5Cn'%5D == 14043%0A%0A%0A@attr('skip')%0Adef test_kraken_taxon():%0A%0A    from easydev import execute%0A    import tempfile%0A%0A    tmpdir = tempfile.mkdtemp()%0A    execute(%22git clone http://github.com/sequana/data %25s%22 %25 tmpdir)%0A%0A%0A    file1 = sequana_data(%22Hm2_GTGAAA_L005_R1_001.fastq.gz%22, %22testing%22)%0A    file2 = sequana_data(%22Hm2_GTGAAA_L005_R2_001.fastq.gz%22, %22testing%22)%0A%0A    kt = KrakenTaxon(%5Bfile1, file2%5D, database=%22%25s/kraken_toydb%22 %25 tmpdir)%0A    kt.run()%0A%0A    kt = KrakenTaxon(file2, database=%22%25s/kraken_toydb%22 %25 tmpdir)%0A    kt.run()%0A%0A    #Clean the kraken db%0A    import shutil%0A    shutil.rmtree(tmpdir)%0A%0A%0Adef _test_kraken_builder():%0A%0A%0A    k = KrakenBuilder(download_taxon=True)%0A    k.run(%5B'viroids'%5D)%0A%0A

add new tests