@transform(runBlastOnRawSequences, suffix(".blast.gz"), ".lca.gz")
def runLCA(infile, outfile):
    track = P.snip(outfile, ".lca.gz")
    outf_tax = P.snip(outfile, ".gz")
    outf_kegg = P.snip(outfile, ".lca.gz") + ".kegg.gz"
    statement = '''lcamapper.sh 
                   -k
                   -i %(infile)s
                   -o %(outf_tax)s > %(outfile)s.log
                   ; gzip %(track)s.blast-kegg.txt
                   ; gzip %(outf_tax)s
                   ; mv %(track)s.blast-kegg.txt.gz %(outf_kegg)s'''
    P.run()

###################################################################
###################################################################
###################################################################
run the lowest common ancestor algorithm
dataset/ETHPy150Open CGATOxford/cgat/obsolete/pipeline_metagenomecommunities.py/runLCA