commfish / GCLr

Gene Conservation Lab R package repository
3 stars 0 forks source link

update plot_allele_freq? bubble plots are horrible for SNPs #19

Closed krshedd closed 1 year ago

krshedd commented 1 year ago

Who is actively using plot_allele_freq? I do not find the bubble plots generated to be particularly informative for SNPs. I suppose they could be helpful for uSATs or microhaps. I'm wondering if we should change the default behavior for n_alleles == 2 to show a line chart? Or is this just redundant since we have plot_freq_fis_4snps?

csjalbert commented 1 year ago

I agree it doesn't seem informative for SNPs. The last time I used Plot_Allele_Freq.GCL for SNPs, I added a note to the script that says "Re-run this using a better function - FreqFisPlot4SNPs.GCL". It may be redundant to include n_alleles == 2 argument, since we have the other function and seems to work well. What about changing the name to something like plot_allele_freq_usat, or simply adding a note or description saying this is not designed for SNPs?

krshedd commented 1 year ago

Good point. I think that changing the name (plot_allele_freq_bubble?) is probably the easiest route or perhaps adding a message when n_alleles == 2. I already added language in the @details and @seealso recommending plot_freq_fis_4snps for SNP data.

csjalbert commented 1 year ago

Thanks, I like the suggested name change - @awbarclay , any objections to renaming this plot_allele_freq_bubble? Also, appreciate the additional tags. Details tag lays it out clearly.

awbarclay commented 1 year ago

@csjalbert I have no objections to renaming the function. I think the function was originally intended to look at frequencies for loci with > 2 alleles.

awbarclay commented 1 year ago

The function has been renamed plot_allele_freq_bubble