Using Weblogo in Biopython
1
0
Entering edit mode
9.9 years ago
surka • 0

Hello,

I have a very silly question. I am attempting to create weblogos from large numbers of sequences (I have formatted them so they are all the same length).

I'm having a beginners issue, which is I'm not sure what format is required by the motifs module of Biopython.

At the moment I have a fasta file which has sequences such as:

>nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnGGGAAACGG
>nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnAGACAAAG
>nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnCTCCAAGG
>nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnGACAACAGG
>nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnGAGAAGG
>nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnCCAGGACA
>nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnGCTGCCTA

How should I change this so the motifs.create() command is happy with them?

biopython weblogo • 5.0k views
ADD COMMENT
2
Entering edit mode
9.9 years ago
Peter 6.0k

The main problem could simply be that you do NOT have a FASTA file. You have something like this:

>sequence1
>sequence2
...

You should have something like this:

>identifier1
sequence1
>identifier2
sequence2
...

Have you read the examples in the Biopython Tutorial yet? e.g. Creating a motif from instances http://biopython.org/DIST/docs/tutorial/Tutorial.html

ADD COMMENT
0
Entering edit mode

Hello Peter,

Sorry I never thanked you. I did not see this answer and assumed no one had responded to me.

Thank you for your advice.

ADD REPLY
0
Entering edit mode

It is easy to overlook an email. Did you solve your original problem?

ADD REPLY
0
Entering edit mode

Yes, you were correct. I was having a massive brain dead moment...

ADD REPLY

Login before adding your answer.

Traffic: 2172 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6