Comments (5)
Hi,
Thanks for your reply.
It's working when adjusting the scripts sequence. The kpPlotDensity function should be followed to plotKaryotype.
from karyoploter.
Hi @tiramisutes,
I'll take a look at it.
Could it be that you closed the plot created by plotKaryotype before executing kpPlotDensity? all plottig functions assume that a plot is active and they never create a new one.
And could you tell if you are using Bioconductor 3.7 or the 3.8 released just yesterday? (the ouput from sessionInfo() would be perfect)
from karyoploter.
Hi,
I find in the mycytobands.txt file the only accepted colors are gneg, gpos25, gpos75, gpos100, gvar, acen and stalk. How can I set the color by myself?
from karyoploter.
If you want to change the color of the standard cytobands you can use the color.table
argument in kpAddCytobands
to give a named vector of colors.
Using custom named cytobands is not supported in the current version but it's in the TODO list. Meanwhile, you can force it in a not very elegant way:
- The cytoband names MUST be in a column called gieStain, but they can actually be whatever you want
- Build a color table matching your names
Something like this will create a ranbow colored genome
library(karyoploteR)
kp <- plotKaryotype(ideogram.plotter = NULL)
cytobands <- unlist(tileGenome(tilewidth = 10e6, seqlengths = kp$chromosome.lengths))
cytobands$gieStain <- paste0("color", as.character(seq_along(cytobands)))
color.table <- rainbow(length(cytobands))
names(color.table) <- paste0("color", as.character(seq_along(cytobands)))
kp$cytobands <- cytobands #This is needed because kpAddCytobands does not accept a cytobands parameter
kpAddCytobands(kp, color.table = color.table)
If what you actually want is to highlight certain regions in the genome, you can combine kpRect
with the new (released last week with Bioconductor 3.8) data.panel="ideogram"
to plot anything ON the ideogram itself
Hope this helps
from karyoploter.
@bernatgel I am really sorry but I can't quite figure this out. I am trying to color a specific cytoband and the color would depend on the cytoband names. I tried making a cytoband color dataframe that would match a color to a given cytoband name. I also did not catch why we need to paste color values under the gieStain column; particularly this line of code cytobands$gieStain <- paste0("color", as.character(seq_along(cytobands)))
? What should i do if I want a particular color for a specific cytoband present in multiple chromosomes? Sorry if this comes as stupid.
from karyoploter.
Related Issues (20)
- plots bams that have no "chr" HOT 2
- Blue bands on ideogram HOT 1
- How to use karyoploteR for non-model species? HOT 1
- Change y-axis values
- How would I use kpLines with kpPlotGenes? HOT 1
- kpPlotGenes: Overlapping gene names margin increase HOT 3
- plotting bedgraph data for all chromosome at once HOT 6
- highlighting telomeres (adding custom symbols to chromosome ends) HOT 3
- Error in graphics::par HOT 3
- Borders of chromosomes in plot type 6 are not all the same HOT 1
- installation fail HOT 1
- CNV heatmap clustering and metadata HOT 1
- Overlapping labels and huge gap between them HOT 1
- Individual Colors for Histone Tracks HOT 5
- kpAddCytobandLabels with custom genome and cytoband file fails HOT 3
- kpHeatmap Fails when only one y value that is not 1
- Merge kpPoints and kpPlotBigWig, the r0 r1 of kpPoints cannot be set correctly
- Calculate gene densities seperately from plotting
- documentation of kpAxis
- makeGenesDataFromTxDb did not pick up gene in some region HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from karyoploter.