@transform( (TRACKS, exportIntrons, exportSequences), 
            regex("(.*).fasta"), 
            inputs( (r"\1.gtf.gz", r"\1.fasta", PARAMS["rates_alignment"]) ),
            r"\1.rates.gz")
def makeRates( infiles, outfile ):


    infile_gtf, infile_sequences, alignment = infiles

    track = infile_gtf[:len(".gtf.gz")]
    
    if infile_gtf in CONTROL_TRACKS:
        # when aligning repeats, do not mask lower case characters
        mask = ""
    else:
        mask = "--mask-lowercase"

    statement = '''gunzip 
        < %(infile_gtf)s 
	| %(scriptsdir)s/gff_sort gene 
	| python %(scriptsdir)s/gff2psl.py 
               --is-gtf 
               --genome-file=%(genome)s 
               --log=%(outfile)s.log 
	| pslMap stdin <(gunzip < %(alignment)s ) stdout 
	| sort -k10,10 -k14,14 -k9,9 -k12,12n 
	| python %(scriptsdir)s/psl2psl.py 
                --method=merge 
                --log=%(outfile)s.log 
	| python %(scriptsdir)s/psl2psl.py 
                --method=select-query 
                --select=most-nmatches 
                --log=%(outfile)s.log 
	| python %(scriptsdir)s/psl2psl.py 
                --method=add-sequence 
                --filename-target=%(rates_genome)s
                --filename-queries=%(infile_sequences)s
                --log=%(outfile)s.log 
	| %(cmd-farm)s 
                --split-at-lines=10000 
                --output-header 
                --log=%(outfile)s.log 
	   "python %(scriptsdir)s/psl2table.py 
                %(mask)s
                --method=counts 
                --method=baseml 
                --baseml-model=REV" 
	| gzip 
        > %(outfile)s
    '''
    
    P.run()

############################################################
Finds a list of elements within the children of this element 
dataset/ETHPy150Open CGATOxford/cgat/obsolete/pipeline_kamilah.py/makeRates--crossover with--dataset/ETHPy150Open apiad/sublime-browser-integration/selenium/webdriver/remote/webelement.py/WebElement.find_elements_by_id