SambaR icon indicating copy to clipboard operation
SambaR copied to clipboard

using the selectionanalyses function

Open davecarlon opened this issue 1 year ago • 1 comments

Hi there. I'm attempting to run the selection analyses function with the command:

selectionanalyses(do_meta=FALSE,do_pairwise=TRUE,export='pdf', do_fsthet=FALSE, do_pcadapt=FALSE, do_outflank=FALSE, dopiechart=FALSE)

I have to turn off a number of flags (as recommended in the comments while running) to get this to work on my machine. I get output for the first pair of populations, a few of the plots, then this error message:

Error in round(snps$HWEchi2[snps$name %in% myloci], myround) : non-numeric argument to mathematical function

Here's the progress until then.

Sc_Sg Creating output folder called Sc_Sg. Running genome wide differentiation scan (GWDS)... Using bonferroni method to correct for multiple testing. The flag 'dothin' is set to FALSE (default). SambaR will infer neutral distribution from unthinned dataset. Fitting exponential distribution... Number of SNPs used to infer neutral distribution: 644806 out of 644806. Testing which loci are outliers using Bonferroni correction... Correcting GWDS p-values using the bonferroni method. Found 0 outlier loci. Creating Manhattan plot showing -ln(Fisher exact test p-values)... Creating Manhattan plot showing -log(GWDS p-values)... Skipping PCadapt because dopcadapt flag is set to FALSE. Skipping piecharts because the flag 'do_piechart' is set to FALSE. Creating Venn diagram... No outliers. Skipping Venn diagram. 2D-plots pairwise comparison... Executed one selection scan (not multiple selection scans). Skipping 2D plots. ERROR: scores for OutFLANK not present in SNPs dataframe. Writing outliers to bed files... BED-files with outliers have been written to the selection subdirectory Writing outlier info... Error in round(snps$HWEchi2[snps$name %in% myloci], myround) : non-numeric argument to mathematical function

Thanks for any help! Dave

davecarlon avatar Apr 11 '23 13:04 davecarlon

Apologies for the superlate reply. Your message somehow completely escaped my attention. In case it is still useful, I made a small change to the source script, although I am not sure if this indeed addresses the error. In case you still would like to try to rerun the analyses, feel free to let me know if the error persists. Best, Menno

mennodejong1986 avatar Oct 30 '23 13:10 mennodejong1986