gl.report.heterozygosity function not working

43 views
Skip to first unread message

pkri...@cesaraustralia.com

unread,
Jun 24, 2020, 3:20:02 AM6/24/20
to dartR
Hi folks,

I'm fairly new to using the dartR package, but I'm having trouble obtaining a report on heterozygosity for the populations in my data.

I've tried running the gl.report.heterozygosity() function.
I'm using the latest version of RStudio, R v4.0.0, and have updated all packages. I was initially using the current CRAN version of dartR. The gl.report.heterozygosity() function would just hang and produce no output. Then I switched to the current development version of dartR - the function thenworked for a brief time, but now, for some reason which I cannot fathom it no longer works, but instead of hanging it gives the following error:

> x1 <- gl.report.heterozygosity(testset.gl, + method="pop",boxplot="standard", verbose = 5)

Starting gl.report.heterozygosity [ Build = Jacob ]
   Processing a SNP dataset
   Warning: genlight object contains monomorphic loci which will be factored into heterozygosity estimates
   Calculating Observed Heterozygosities, averaged across loci, for each population
   Calculating Expected Heterozygosities
Error in plot.new() : figure margins too large

I've tried changing plot margins [e.g. par(mar = c(0.1, 0.1, 0.1, 0.1))], but this has no effect. I also found some previous discussion on this forum about this function but this hasn't helped - I'm not sure I can install a previous version of adegenet as this apparently requires a previous version of Rtools.

Cheers,
Peter

Bernd.Gruber

unread,
Jun 24, 2020, 3:50:07 AM6/24/20
to da...@googlegroups.com

Hi,

 

This could be an rstudio problem (the plot area is too small in your setting. Either enlarge the plot window of click on zoom to create an independent plotting window. If this does not work please let me know. The current way of plotting is not ideal (one big thing to work on is to convert to ggplot type plots as they are much easier to handle.

 

Cheers, Bernd

--
You received this message because you are subscribed to the Google Groups "dartR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dartr+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dartr/9a068f0e-3b88-40f8-b3fa-025bb96b24f2n%40googlegroups.com.

Peter Kriesner

unread,
Jun 24, 2020, 3:56:22 AM6/24/20
to da...@googlegroups.com
Thanks very much Bernd for responding so quickly. Yes, that indeed worked!

Cheers,
Peter



Reply all
Reply to author
Forward
0 new messages