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

Ploting gene density on my custom chromosomes #117

Open
cell-c opened this issue Mar 2, 2022 · 1 comment
Open

Ploting gene density on my custom chromosomes #117

cell-c opened this issue Mar 2, 2022 · 1 comment
Assignees
Labels
usage question User question about how to use the package

Comments

@cell-c
Copy link

cell-c commented Mar 2, 2022

Hi,

Thank you for your excellent work. I am new in R. I met with difficulties when I used karyoploteR to plot gene density on chromosomes. Coud you provide some examples about ploting gene densitywith gene bed file and chromosome size file ?

Thank you for your help.

@bernatgel bernatgel self-assigned this Mar 2, 2022
@bernatgel bernatgel added the usage question User question about how to use the package label Mar 2, 2022
@bernatgel
Copy link
Owner

Hi @cell-c

You should be able to find the code you need at the tutorial page (https://bernatgel.github.io/karyoploter_tutorial/). The idea is that you should combine the code to use a custom genome (https://bernatgel.github.io/karyoploter_tutorial//Tutorial/CustomGenomes/CustomGenomes.html) with the code to plot the density from a GRanges object at the Gene Density example (https://bernatgel.github.io/karyoploter_tutorial//Examples/GeneDensity/GeneDensity.html). The only missing piece for you would be how to use a bed file instead of a GRanges object and for that you can either use toGRanges as in

my.genes <- toGRanges("my.bed.file")

or simply use the path to your bed file in the kpPlotDensity call

kpPlotDensity(kp, "my.bed.file")

If you need more help or you encounter specific problems, just comment on this issue and I'll be happy to help.

Bernat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
usage question User question about how to use the package
Projects
None yet
Development

No branches or pull requests

2 participants