This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Python sequence logo from manually calculated bits and proportions?

Hi there!

I've written a Python script which produces a dataframe for a motif which is 15 amino acids long (one column per position), which contains a row for every possible amino acid and the proportion that it's found there. I've also manually calculated the bits based on Shannon entropy. How do I make a sequence logo using this data?

I can't do it with the source sequences because there is a weighting algorithm applied to the proportions - they aren't true proportions, but have been adjusted based on some experimental results surrounding sequence binding affinity with the protein that binds the motif.

Does someone know how to do this?

pandas motif dataframe matplotlib

See my answer here about logomaker. It allows you to provide a matrix of the nucleotides at each position.

0 answers

No answers yet.

Log in to answer this question.