Question: How to draw a chromosome graph with only selected genes marked in it
0
gravatar for aiswaryabioinfo
5 weeks ago by
aiswaryabioinfo20 wrote:

Dear all,

I need to draw a linear chromosome graph for a specific chromosome with marking selected genes segments instead of the whole chromosome. My chromosome is having a size of 135.06mb (genbank file size: 181mb)

I could find online tools like "ogdraw" which are specific for organelles like chloroplast and mitochondrial genome. But these tools couldn't give output for my chromosome as its nuclear genome part

What packages or tools should I use to get this graph? Could anyone help to solve this problem?

ADD COMMENTlink modified 5 weeks ago by bernatgel2.0k • written 5 weeks ago by aiswaryabioinfo20
1

Have you looked at karyoploteR?

ADD REPLYlink written 5 weeks ago by RamRS23k

I have checked karyoploteR but it is not serving my purpose

my data is like this

gene    chromosome  start   end
gene1   4           20      3000
gene2   4           4000    5000
gene3   4           6000    7000

I want to mark this genes in corresponding chromosome and make a graph. There are many tools for organelle genomes like ogdraw. But as my genes are not oriented to any organelle i am finding it difficult to make. Kindly suggest me any other tools or packages

ADD REPLYlink modified 5 weeks ago by RamRS23k • written 5 weeks ago by aiswaryabioinfo20

Might have a look at this: Creating chromosome karyotype plot with R and ggplot2

ADD REPLYlink written 5 weeks ago by steve2.2k
0
gravatar for bernatgel
5 weeks ago by
bernatgel2.0k
Barcelona, Spain
bernatgel2.0k wrote:

Hi @aiswaryabioinfo

You can use karyoploteR as @RamRS has suggested with this data and it can do what I think you are requesting.

The first you need is to read the data and make a GRanges with the genes

library(karyoploteR)

#read the genes data
genes.to.plot <- read.table("genes.txt", header=TRUE, sep="\t", stringsAsFactors=FALSE)
#change to order of columns and create a GRanges
genes.to.plot <- toGRanges(genes.to.plot[c(2,3,4,1)])

Since I don't know the species you are working with, we can just create a custom genome with a size of 135.06Mb size.

#Create a custom genome with only your chromosome
custom.genome <- toGRanges("4:1-135060000")

And finally, we can plot the chromosomes with the genes. There are multiple ways of plotting them, in this code we'll be plotting them as rectangles (with kpPlotRegions) and as markers (with kpPlotMarkers).

#start plotting
kp <- plotKaryotype(genome = custom.genome)

#plot genes as rectangles
kpPlotRegions(kp, data = genes.to.plot, r0=0, r1=0.1)

#and as "markers"
kpPlotMarkers(kp, data = genes.to.plot, labels = genes.to.plot$gene, r0=0.15, r1=1)

enter image description here

If you want to plot only a part of the chromosome we only need to set the zoom parameter in plotKaryotype.

#start plotting
kp <- plotKaryotype(genome = custom.genome, zoom="4:1-10000")

#plot genes as rectangles
kpPlotRegions(kp, data = genes.to.plot, r0=0, r1=0.1)
kpPlotNames(kp, data = genes.to.plot, y0=0, y1=1, labels = genes.to.plot$gene, position = "top", r0=0, r1=0.1)

#and as "markers"
kpPlotMarkers(kp, data = genes.to.plot, labels = genes.to.plot$gene, r0=0.25, r1=0.8)

enter image description here

Once you are here you can customize your plot in many ways or add other data in addition to the gene positions. You can find all the information in the karyoploteR tutorial

Hope this helps

Bernat

ADD COMMENTlink written 5 weeks ago by bernatgel2.0k
1

Thank you sir, this will really help me. I only want to make the map of one single chromosome with highlighting certain specific genes in that chromosome. I will try your suggestions.

ADD REPLYlink written 5 weeks ago by aiswaryabioinfo20
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 851 users visited in the last hour