Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable changing of background color #56

Closed
mptrsen opened this issue Feb 23, 2017 · 11 comments
Closed

Enable changing of background color #56

mptrsen opened this issue Feb 23, 2017 · 11 comments

Comments

@mptrsen
Copy link

mptrsen commented Feb 23, 2017

Currently a white background is used for all text, which looks weird on terminals that have a different background color such as black (used by the super-hacker-y types). It would be great if the user could change the background color or set it to transparency.

@dariober
Copy link
Owner

Hi- Thanks for sending feedback. Would you mind explaining what makes the colouring scheme weird? It would be great if you could attach a screenshot of a weird view.

ASCIIGenome should use white background and the same colours regardless of the user's colouring scheme. In theory there should be no interference between ASCIIGenome's and user's colours. However since I almost always use black on white (i.e. MacOS default), it may well be that I missed something when other colour options are used.

(I could add the option of settings colours if that helps but first let's see if your issue is due to a bug)

@mptrsen
Copy link
Author

mptrsen commented Feb 23, 2017

With a black background, ASCIIGenome looks like this:

asciigenome-background

For me it seems that ASCIIGenome should fill empty "cells" with the background color as well. It would be great if users could change that, similar as in colorTrack.

@dariober
Copy link
Owner

Indeed, this is a bug. Empty cells should be painted white. Sorry about that and thanks for reporting it. I should be able to fix it quite soon and I'll post here as soon as the fix is done.

dariober added a commit that referenced this issue Feb 24, 2017
@dariober
Copy link
Owner

Hi- Would you mind trying the new version v1.2.1? It should have this bug fixed. The bioconda repository (if you use it) is not up to date just now. To download and use the new version, as per docs, you can do:

wget https://github.com/dariober/ASCIIGenome/releases/download/v1.2.1/ASCIIGenome-1.2.1.zip
unzip ASCIIGenome-1.2.1.zip
rm ASCIIGenome-1.2.1.zip

cd ASCIIGenome-1.2.1/
chmod a+x ASCIIGenome
cp ASCIIGenome.jar /usr/local/bin/ # Or else in your PATH e.g. ~/bin/
cp ASCIIGenome /usr/local/bin/     # Or else in your PATH e.g. ~/bin/

@mptrsen
Copy link
Author

mptrsen commented Feb 27, 2017

Thank you for your quick reaction! And sorry, but version 1.2.1 does not fix this issue on my end. It still looks the same.

Let me know if you need more information about my system to further investigate this.

@dariober
Copy link
Owner

Hi- Sorry about that. Could you post information on the operating system you are using (Mac, Linux, etc) and the terminal you use? Also, just checking, make sure you are running v1.2.1 instead of the previous installation (e.g. by ASCIIGenome -v or even better use the full explicit path as java -jar /path/to/ASCIIGenome.jar).

Finally, would you be able to send the minimal commands that generate the issue, like

ASCIIGenome aln.bam
goto chr1:1000-1100

(From your screenshot it appears your terminal is correctly interpreting the ansi escapes for colours, so I don't see why the fix doesn't work...)

At the moment I have only access to a Mac laptop and I can reproduce the issue with v1.2.0, but I get it fixed in 1.2.1.

Thank you!

@mptrsen
Copy link
Author

mptrsen commented Feb 27, 2017

I used your example:

$ java -jar ASCIIGenome.jar --version                                                   
ASCIIGenome 1.2.1
$ java -jar ASCIIGenome.jar -x "goto Scaffold1:1000-1100" -g genome.fa reads.bam TEs.bed

asciigenome

I am using Terminator 0.97-2ubuntu0.1 on Linux Mint 17.3 64 bit. I forgot to mention that I was starting ASCIIGenome from within tmux; outside of tmux the problem disappears with v1.2.1. tmux is set to "screen-256color".

Hope that helps. Looking forward to your response. Thank you!

@dariober
Copy link
Owner

Thanks for feedback - I'm not familiar with tmux but I will install it and try to reproduce the issue. For the time being, you could try to start tmux with -2 option. From http://unix.stackexchange.com/questions/1045/getting-256-colors-to-work-in-tmux:

The -2 flag tells tmux to force the usage of 256 colors

@dariober
Copy link
Owner

Hi- If you are still interested in this issue (and in ASCIIGenome in general), I uploaded version 1.3.0 which should fix some issues with tmux and most importantly allows custom configuration of the colours. See FAQ.

Version 1.3.0 also introduces the sys command to execute system commands (I find this quite useful to execute commands like pwd and ls).

Please let me know of any further issues.

@mptrsen
Copy link
Author

mptrsen commented Mar 20, 2017

Awesome! Thank you!

@dariober
Copy link
Owner

Ok, thanks! I'm going to close this issue but do get back if you have any troubles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants