This is a test version of Biostars. For the public version, visit https://www.biostars.org.
plotTracks - empty plot and custom genomes

Hi all!

I am having trouble with Gvis library and plotTracks function. Here is my code:

ideogram <- IdeogramTrack(chromosome = "chr4",genome="hg38")
axis <- GenomeAxisTrack()
plotTracks(list(ideogram, axis),from=189233986,to=189234447)

Unfortunately, it is not plotting anything. Do you have any idea why?

My second question include custom genome. If new genome is not available through UCSC (or is modified), how can I use it in this example? When I use my custom hg38_clean.fa file I have an error:

ideogram <- IdeogramTrack(chromosome = "chr4",genome="../hg38_clean.fa")
axis <- GenomeAxisTrack()
plotTracks(list(ideogram, axis),from=189233986,to=189234447)

    'hg38_clean.fa' is not a valid UCSC genome.

Many thanks for any suggestions,

Best, Agata

r gviz

1 answer

When I run your first block of code I am able to produce the following plot as expected (R version 3.6.0; Gviz version 1.28.0): gviz plot

An earlier R install gave me an error: There doesn't seem to be any cytoband data available for genome 'hg38' at UCSC or the service is temporarily down. Trying to fetch the chromosome length data. So perhaps you need to update your packages.

In regards to your second question see the following posts:

In general what you want to do should be possible... but acquiring the Ideogram information is going to be relatively difficult or you will have to generate it yourself.

I am also running R version 3.6.0 and Gviz 1.28.0, so I don't know why this is not working for me... For second question, thank you for tips! I will dig a little more. Best, Agata

Log in to answer this question.