<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 <h1>MEME Wrapper Example</h1>
Step1:  <h3>E-value of each motif</h3>
Step2:  <h2>fit_predict() and fit_transform() example</h2>
Step3:  <h3>Print motives as lists</h3>
Step4:  <h3>Display Sequence logo of un-aligned motives</h3>
Step5:  <h3>Display Logo of specified motif</h3>
Step6:  <h3>Multiple Sequence Alignment of motives with Muscle</h3>
Note
Step7:  <h3>Display sequence logo of aligned motives</h3>
Step8:  <h3>Position Weight Matrices for motifs</h3>
Step9:  <h4>Display PWM of single motif</h4>
Step10:  <h4>Scoring a sequence w.r.t a motif</h4>
Step11:  <h3> Transform with HMM as scoring criteria</h3>
<ASSISTANT_TASK:>
Python Code:
# Meme().display_meme_help()
from eden.util import configure_logging
import logging
configure_logging(logging.getLogger(),verbosity=2)
from utilities import Weblogo
wl = Weblogo(color_scheme='classic')
meme1 = Meme(alphabet="dna",    # {ACGT}
             gap_in_alphabet=False,
             mod="anr",     # Any number of repititions
             output_dir="meme_anr", 
             nmotifs=3,    # Number of motives to be found
             
             weblogo_obj = wl
            )
meme1.fit(fasta_file="seq18.fa")
predictions = meme1.predict(input_seqs=test, return_list=True)
for p in predictions: print p
predictions = meme1.predict(input_seqs="seq9.fa", return_list=False)
for p in predictions: print p
match = meme1.transform(input_seqs=test, return_match=True)
for m in match: print m
match = meme1.transform(input_seqs=test, return_match=False)
for m in match: print m
Explanation: <h1>MEME Wrapper Example</h1>
End of explanation
print meme1.e_values
Explanation: <h3>E-value of each motif</h3>
End of explanation
meme2 = Meme(alphabet="dna", mod="anr", nmotifs=3)
predictions = meme2.fit_predict(fasta_file="seq18.fa", return_list=True)
for p in predictions: print p
matches = meme2.fit_transform(fasta_file="seq18.fa", return_match=True)
for m in matches: print m
Explanation: <h2>fit_predict() and fit_transform() example</h2>
End of explanation
#printing motives as lists
for motif in meme1.motives_list:
    for m in motif:
        print m
    print
Explanation: <h3>Print motives as lists</h3>
End of explanation
meme1.display_logo(do_alignment=False)
Explanation: <h3>Display Sequence logo of un-aligned motives</h3>
End of explanation
meme1.display_logo(motif_num=1)
Explanation: <h3>Display Logo of specified motif</h3>
End of explanation
meme1.align_motives()    #MSA with Muscle
motives1=meme1.aligned_motives_list
for m in motives1:
    for i in m:
        print i
    print
Explanation: <h3>Multiple Sequence Alignment of motives with Muscle</h3>
Note: Motives in this example were already aligned, hence no dashes appear in the alignment
End of explanation
meme1.display_logo(do_alignment=True)
Explanation: <h3>Display sequence logo of aligned motives</h3>
End of explanation
meme1.display()
meme1.matrix()
Explanation: <h3>Position Weight Matrices for motifs</h3>
End of explanation
meme1.display(motif_num=3)
Explanation: <h4>Display PWM of single motif</h4>
End of explanation
test_seq = 'GGAGAAAATACCGC' * 10
seq_score = meme1.score(motif_num=2, seq=test_seq)
print seq_score
Explanation: <h4>Scoring a sequence w.r.t a motif</h4>
End of explanation
meme2 = Meme(alphabet="dna", scoring_criteria="hmm", k=1, threshold=1.0,mod="anr", nmotifs=3, minw=7, maxw=9)
matches = meme2.fit_transform(fasta_file="seq9.fa", return_match=True)
for m in matches: print m
%%time
# Markov Model score
mm_score = meme2.score(motif_num=2, seq="ACGT"*10)
print mm_score
Explanation: <h3> Transform with HMM as scoring criteria</h3>
End of explanation
<END_TASK>