Biostar Beta. Not for public use.
How to name the genome in karyoploteR ?
Entering edit mode
16 months ago
kirannbishwa01 • 1000
United States

I really like the features that are provided in karyoploteR.

But, I am working with different organisms. I am able to find the organisms of interest using:


My organisms of interest is Arabdidopsis lyrata and I installed it using.


But, when I try to plot the genome I get error message.

karyoploteR::plotKaryotype(genome = "BSgenome.Alyrata.JGI.v1")

    Error in .getInstalledPkgnameFromProviderVersion(genome, masked = masked) : 
  Couldn't find a BSgenome data package that matches genome assembly
  (a.k.a. provider version): Alyrata.JGI.v1

  Please use 'available.genomes()' (or 'available.genomes(type="source")')
  to check the list of BSgenome data packages that are available in the
  Bioconductor repositories for your version of R/Bioconductor.
  If you don't find what you are looking for, please see the BSgenomeForge
  vignette in the BSgenome software package for how to forge a BSgenome
  data package for your organism of interest.

But, I am not able to load this genome. I am tried using different genome names like Alyr, Alv1 and also tried looking what acronym is set for lyrata. But I can't find it.

Another question: How do I plot the karyotype if I don't have a BsGenome but a GTF, GFF file.

Any suggestions?

Entering edit mode
17 months ago
VHahaut ♦ 1.1k

Regarding your second question the github of karyoplotR is extremely well done:

You can find "how to plot a custom genome" using a GRanges object (easely constructed using a GTF/GFF file)

Entering edit mode
18 months ago
bernatgel ♦ 1.9k
Barcelona, Spain

Hi @kirannbishwa01,

It should work as you are doing but it for some reason it does not work with this BSgenome. karyoploteR ultimately relies on the function getBSgenome from BSgenome to load the necessary BSgenomes on the fly. As an example I tried downloading and installing "BSgenome.Vvinifera.URGI.IGGP12Xv2" and loading with getBSgenome("BSgenome.Vvinifera.URGI.IGGP12Xv2") and it worked perfectly. However, doing the same with your genome results in an error:

Error in .getBSgenomeObjectFromInstalledPkgname(genome) : 
  BSgenome.Alyrata.JGI.v1 doesn't look like a valid BSgenome data package

All this to tell you that there seems to be an error in the genome package you are using and the problem is not in your code or karyoploteR's code,

Now, is there a workaround. Absolutely. The genome parameter of plotKaryotype also accepts GRanges and BSgenome objects.

Therefore, you can simply load the BSgenome with library and use the object it creates to start your plot:

kp <- plotKaryotype(genome=Alyrata)

Note that Alyrata is not quoted, since you are passing in the actual BSgenome object.

This would be useful too for your second question. As far as I know, GTF files are not suposed to contain the genome information but features mapped onto a genome. In any case, If you are able to get the names and lengths of your chromosomes into a BED file (simply a tab separated file with three columns,, start and end) then you can load it into R (for example using toGRanges("")) and use it in the genome parameter of plotKaryotype.

As @VHahaut said, you can find more information at

PS: I'm copying the answer to the question you have posted in the bioconductor support site. In general is better if you do not post the same question in both sites.

Entering edit mode

It worked for lyrata the way you explained. Now, again it doesn't work for thaliana.

> karyoploteR::plotKaryotype(genome = Athaliana)
Error in is(genome, "GRanges") : object 'thaliana' not found

I think the problem is with the naming, and I cannot find the right way. Why is there different way of naming different organism?

Also, I realized that I don't have transcription database for lyrata.

What is my option to plot my RNAseq data counts for lyrata then?

Entering edit mode

Have you loaded the BSgenome before calling karyoploteR?

You can either pass karyoploteR the name of the genome (in this case "TAIR9") and it will try to find and load the genome

kp <- karyoploteR::plotKaryotype(genome = "TAIR9")

(in this case it will give you some notes and warnings, because it does'nt know how to filter the chromosomes to keep the canonical ones only and it fails to load the cytobands from UCSC)

or you can explicitly load the BSgenome package and then give karyoploteR the object to work with

kp <- karyoploteR::plotKaryotype(genome = Athaliana)

As for the transcription database for lyrata, I'm afraid I'm not an expert in plant bioinformatics and I won't be able to help. I think your best bet is to ask to Bioconductor support site for some guidance.


Login before adding your answer.

Similar Posts
Loading Similar Posts
Powered by the version 2.3