@transform( os.path.join( PARAMS["scratchdir"], "malis.dir", "*", "*.gtf"), 
            suffix(".gtf"), 
            ".mali")
def buildMultipleAlignments( infile, outfile ):

    track = infile[:-len(".gtf")]
    filename_cds = track + "_cds.fasta"
    filename_pep = track + "_pep.fasta"

    to_cluster = True

    statement = '''
	python %(scriptsdir)s/align_transcripts.py \
		--gtf=%(infile)s \
		--cds=%(filename_cds)s \
		--force-map \
		--verbose=2 \
		--output-filename-pattern=%(track)s_%%s.fasta \
		--output=final_aa \
		--output=final_na \
		--output=aligned_aa \
		--output=aligned_na \
		--output-format="plain-fasta" \
	< %(filename_pep)s > %(outfile)s
      '''

    P.run()
build multiple alignments.
dataset/ETHPy150Open CGATOxford/cgat/obsolete/pipeline_snps.py/buildMultipleAlignments