Question: Looking For Tools Tp Draw Motif Logo
gravatar for Yunfei Li
8.4 years ago by
Yunfei Li310
ThermoFisher Scientific
Yunfei Li310 wrote:

I try to create some motif logos. Now I follow biopython example and write script like following, it works well when dataset is small, but fails for large dataset. And there are several web tools can create motif logo, but, still, they has input limitation. Any suggestions?

for motif in tot:
    m = Motif.Motif(alphabet=IUPAC.unambiguous_dna)
    for i in tot[motif]:
    print >>fao, m.format("transfac") #PWM
    m.weblogo(pic) #logo

"tot" is a dictionary, "motif" are keys of "tot", which are different motif(such as "TANNTA") I am looking for, and key values are list, which have exact motif sequence as elements (["TATTTA","TAGGTA",.....]).

motif biopython • 8.3k views
ADD COMMENTlink modified 8.4 years ago • written 8.4 years ago by Yunfei Li310
gravatar for Gjain
8.4 years ago by
Munich, Germany
Gjain5.5k wrote:

hi Yunfei Li,

you can use the following tools to draw motif logos:

  • WebLogo: A Sequence Logo Generator: is a tool for creating sequence logos from biological sequence alignments. It can be run on the command line, as a standalone webserver, as a CGI webapp, or as a python library.

  • website

    alt text

  • MoRAine is a tool for the reannotation of transcription factor binding motifs and the creation of sequence logos.

  • GENIO/logo: Positional dependent information contents of aligned RNA/DNA or amino acid sequences are useful for the display of consensus sequences and for finding optimal search windows used in sequence analysis. alt text

  • CorreLogo: An online server for 3D sequence logos of RNA and DNA alignments

I hope this helps.

ADD COMMENTlink written 8.4 years ago by Gjain5.5k
gravatar for SES
8.4 years ago by
Vancouver, BC
SES8.4k wrote:

The sublogo R package can plot sequence logos and construct a dendogram with a threshold that you can change. It only works well with very short motifs in my experience, but this may be a solution based on your question.

alt text

ADD COMMENTlink written 8.4 years ago by SES8.4k
gravatar for Yunfei Li
8.4 years ago by
Yunfei Li310
ThermoFisher Scientific
Yunfei Li310 wrote:

I also think about solutions during waiting for suggestions. This part can create PWM directly, then use STAMP to plot logo.

for key in tot:
    #num report
    print "motif: %s, count: %d" % (key, len(tot[key]))
    #read in by postion
    for seq in tot[key]:
        if"N",seq): continue
        for pos in range(len(seq)):
    print  >> fao, ">%s" % (key)
    for pos in range(len(tot[key][0])):
        posc={'A': 0,'C': 0,'G': 0,'T': 0}
        tmp=[(x,len(list(y))) for x, y in groupby(dic[pos])]
        for base,count in tmp: 
        print >> fao, "%d %d %d %d" % (posc["A"],posc["C"],posc["G"],posc["T"])
    print  >> fao
ADD COMMENTlink written 8.4 years ago by Yunfei Li310

What's STAMP? I'm trying to plot weblogo from count dictionary ie. {'A': [3, 7, 0, 2, 1], 'C': [0, 0, 5, 2, 6], 'G': [0, 0, 0, 3, 0], 'T': [4, 0, 2, 0, 0]}

ADD REPLYlink written 2.7 years ago by Leszek4.0k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 610 users visited in the last hour