Question: Looking For Tools Tp Draw Motif Logo
4
gravatar for Yunfei Li
7.2 years ago by
Yunfei Li290
ThermoFisher Scientific
Yunfei Li290 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]:
        m.add_instance(Seq(i,m.alphabet))
    print >>fao, m.format("transfac") #PWM
    pic=motif+".png"
    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 • 7.5k views
ADD COMMENTlink modified 7.2 years ago • written 7.2 years ago by Yunfei Li290
7
gravatar for Gjain
7.2 years ago by
Gjain5.3k
Göttingen, Germany
Gjain5.3k 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 7.2 years ago by Gjain5.3k
4
gravatar for SES
7.2 years ago by
SES8.2k
Vancouver, BC
SES8.2k 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 7.2 years ago by SES8.2k
3
gravatar for Yunfei Li
7.2 years ago by
Yunfei Li290
ThermoFisher Scientific
Yunfei Li290 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
    dic={}
    for seq in tot[key]:
        if re.search("N",seq): continue
        for pos in range(len(seq)):
            dic.setdefault(pos,[]).append(seq[pos])
    #PWM
    print  >> fao, ">%s" % (key)
    for pos in range(len(tot[key][0])):
        posc={'A': 0,'C': 0,'G': 0,'T': 0}
        dic[pos].sort()
        tmp=[(x,len(list(y))) for x, y in groupby(dic[pos])]
        for base,count in tmp: 
            posc[base]+=count
        print >> fao, "%d %d %d %d" % (posc["A"],posc["C"],posc["G"],posc["T"])
    print  >> fao
ADD COMMENTlink written 7.2 years ago by Yunfei Li290

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 17 months ago by Leszek4.0k
Please log in to add an answer.

Help
Access

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