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

Add option to use single genome color #13

Open
koalive opened this issue Mar 6, 2020 · 0 comments
Open

Add option to use single genome color #13

koalive opened this issue Mar 6, 2020 · 0 comments

Comments

@koalive
Copy link
Contributor

koalive commented Mar 6, 2020

My name is X. I am currently taking bioinformatics and have been doing research. I am interested in using BioCircos to display custom plant genomes with some tracks. This is the script I am trying, and it seems to be working fine until the last script line, as the script outcome does not seem right. May you please help me? I am guessing it is because the default genome being used is the human genome.

Thank you! Looking forward to your response!
X.

Script:

library(BioCircos)
myGenome = list ("1" = 30427671, "2" =19698289, "3" =23459830, "4" =18585056, "5" = 26975502)
BioCircos(genome = myGenome, genomeFillColor = c("Reds"), chrPad = 0, genomeTicksScale = FALSE, genomeLabelDy = 0)

arcs_chromosomes = c('2', '2', '2', '2', '2', '2', '3', '3', '3', '4', '5')
arcs_begin = c(3186720, 3239038, 3259634, 5430970, 7960236, 10470123, 13534058, 13536429, 8503816, 8133439)
arcs_end = c(3189953, 3258528, 3509765, 5431263, 7960701, 10470564, 13534276, 13541507, 8503994, 8134044)
tracklist = BioCircosArcTrack('myAcrTrack', arcs_chromosomes, arcs_begin, arcs_end, minRadius= 1.18, maxRadius= 1.25, opacities= FALSE)
BioCircos(tracklist, genomeFillColor= "tomato2", chrPad=0.02, displayGenomeBorder=FALSE, genomeTicksDisplay=FALSE, genomeLabelTextSize=0)

Dear X,

Glad you are interested in BioCircos visualizations.
You are indeed missing the 'genome' argument in your second call to 'BioCircos'.
Moreover, if only one value is given for the 'genomeFillColor' it is interpreted as the name of a color palette. Thanks for pointing out that this is a bit misleading in the case in which you only want a single color for the whole genome. A workaround here is simply to give your color twice but this could definitely be improved in the package. Here is how the last line would look like:

BioCircos(tracklist, genome = myGenome, genomeFillColor= c("tomato2", "tomato2"), chrPad=0.02, displayGenomeBorder=FALSE, genomeTicksDisplay=FALSE, genomeLabelTextSize=0)

Please note that your arcs are quite narrow so hard to spot (by eye I only see bands on the chromosome 2).

Cheers!

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

No branches or pull requests

1 participant