Open wangfan860 opened 6 years ago
Hi, I guess your copy number data are "relative" and not "absolute", meaning that diploidy is 0 ? If this is the case, you can use the argument CNscale.
Nevertheless, it's true that when performing a CN frequency plot, we can select the tresholds below or above which we consider a copy number a loss or a gain. It would be great if we could do the same in CNspec. Any chance this would be possible in an update ?
Thanks for this amazing package!
That should be fairly easy to add, I'm actively working on an update to this package now, will be sure to incorporate this feature into cnSpec
Is this problem solved already? So the range for relative scale is always -2 to 4; And for absolute is 0 to 4. I hope this range can change according to the real data. Is that possible? Thanks again!
I have not got around to refactoring this function yet, though the CN plots are next on my list when I get the time.
Hello all, I guess this hasn't been solved yet.
When it happens could you tell us please?
Thank you for developing this fantastic tool by the way!
yes, am hoping to make a genvisr push in feb.
Thats great!
By the way, Is there any way I can make the colors look stronger? turns out when I try to pick any other html color, the default colors doesn't change, like this would not have any effect:
cnSpec(arrays, genome="hg19", CN_Loss_colour = "#044DEA", CN_Gain_colour = "#CB4335", CNscale = "relative")
In the range -2 to 4, samples with value of 1, have a very weak red color
Hello all, I am wondering whether this issue has been solved. There is a way to change the range for relative scale?
Thank you
Yes could you please update this! It would be very helpful! Also is it possible to add a clustering feature as well!
I tried one work around, basically run all the functions in R yourself and then edit range here (in bold) (in cnSpec_buildMain_2)
facet <- facet_grid(sample ~ chromosome, scales='free', space='free')
if(CNscale == "absolute")
{
fill_gradient <- scale_fill_gradientn("Copy Number",
colours=c(CN_low_colour,
'white',
CN_high_colour),
**values=scales::rescale(c(0, 1, 20))**,
limits=c(0, 20),
oob=scales::squish)
} else if(CNscale == "relative") {
fill_gradient <- scale_fill_gradientn("Copy Number",
colours=c(CN_low_colour,
"white",
CN_high_colour),
values=scales::rescale(c(-2, 0, 4)),
limits=c(-2, 4),
oob=scales::squish)
}``
I found the color key range is always from -2 to 4. However, the copy number range of my data is from -1 to 2. How can I customize the range of color key? Many thanks in advance!