How to name the genome in karyoploteR ?
2
1
Entering edit mode
7.1 years ago
kirannbishwa01 ★ 1.6k

I really like the features that are provided in karyoploteR. https://bioconductor.org/packages/release/bioc/html/karyoploteR.html

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

available.genomes()

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

biocLite("BSgenome.Alyrata.JGI.v1")

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?

karyoploteR genome RNA-Seq software error • 3.0k views
ADD COMMENT
1
Entering edit mode
7.1 years ago
VHahaut ★ 1.2k

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

https://bernatgel.github.io/karyoploter_tutorial//Tutorial/CustomGenomes/CustomGenomes.html

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

ADD COMMENT
1
Entering edit mode
7.1 years ago
bernatgel ★ 3.4k

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:

getBSgenome("BSgenome.Alyrata.JGI.v1")
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:

library(BSgenome.Alyrata.JGI.v1)
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, chr.name, start and end) then you can load it into R (for example using toGRanges("file.name")) and use it in the genome parameter of plotKaryotype.

As @VHahaut said, you can find more information at https://bernatgel.github.io/karyoploter_tutorial//Tutorial/CustomGenomes/CustomGenomes.html.

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.

ADD COMMENT
1
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. https://bioconductor.org/packages/release/BiocViews.html#___TxDb

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

ADD REPLY
0
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

library(karyoploteR)
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

library(karyoploteR)
library(BSgenome.Athaliana.TAIR.TAIR9)
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.

ADD REPLY

Login before adding your answer.

Traffic: 1467 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6