gecrooks / weblogo

WebLogo 3: Sequence Logos redrawn
weblogo.threeplusone.com
Other
146 stars 39 forks source link

Incorrect character size? #133

Closed jhfoxliu closed 2 years ago

jhfoxliu commented 2 years ago

Hi,

I am drawing RNA base frequencies with weblogo==3.7.9 (and also other versions). I am confused that the character sizes/positions of some bases in low frequency are very strange in many output format like png, pdf, and svg. I tried weblogo on both CentOS and Ubuntu 18 and I got the same problem. The sequences in fasta file are in the same length and all in upper-case.

Here is my cmd (bits and probability work the same):

weblogo -A rna -D fasta -F pdf --resolution 1000 --color-scheme classic --composition none -i -10 -P S_9 -f temp.fa

未标题-1

jhfoxliu commented 2 years ago

This bug only happens under some condition... I plot the logos again today and everything seems fine.

This time I got errors like Error: ('sequences', 'Sequence number 3409 differs in length from the previous sequences'). However, I am sure that the sequences should be OK.

I guess this problem might come from os.system() I used in my script. There might be something not in sync and result in a conflict between weblogo and my cache.

jhfoxliu commented 2 years ago

I reopen this issue because I encounter the same issue in a new environment.

I am sure that the file is intact (sequences in the same length, no other characters out of AGCT). I run with CMD rather than call it with Python. Then I get the same problem when I am drawing the logo with bits as unit. I try it various version (3.5.0, 3.6.0, 3.7+), but I get the same issue.

Bits Probability

My environment is Ubuntu 20.04 LTS (WSL2). Exactly, I have the same issue in some cases on another computer with native Ubuntu 20.04.

jhfoxliu commented 2 years ago

I read other closed issues. Guess this issue is from gs. So which version of gs should I swtich to?

gecrooks commented 2 years ago

9.23 works fine.

jhfoxliu commented 2 years ago

9.23 works fine.

Solved!