Closed eryntw closed 3 years ago
Hi, the genlight2sambar function normally generates all (empty) output folders, including the QC folder. Note: the name of the folder is QC (for quality control), not 'Data_quality'. If the QC folder has not been generated, then the genlight2sambar must have run into an error and aborted prematurely. What does the screen output tell you? Best, Menno
Hi Menno,
I see what you mean! Yes I do have a QC folder from running genlight2sambar()
, but I couldn't find the ‘Data_quality’ plot and Heterozygosity_vs_missingness’ plot in your paper's figure (Fig. 1A, 1B).
Are these two figures produced by the filter function? I got a minor error after running the filter:
... FILTERS HAVE BEEN SUCCESFULLY SET. ANY ERRORS OCCURRING AFTER THIS LINE ARE (MOSTLY) RELATED TO CREATING QUALITY CONTROL TABLES AND PLOTS AND WILL NOT DENY YOU FROM RUNNING SUBSEQUENT FUNCTIONS. Step 6 out of 7: Generating summary table... Step 7 out of 7: Generating summary plots... Error in plot.window(xlim, ylim, log = log, ...) : need finite 'xlim' values
The codes for the filter I used:
filterdata(indmiss = 0.25, snpmiss = 0.1, min_mac = 1, dohefilter = TRUE, min_spacing = 500, nchroms = 13, paralog_threshold1 = 0.5, paralog_threshold2 = 0.05 )
Is that the reason why I couldn't see the plots? If so, could you please guide me how I can fix the problem of plot.window
inside the function? Thank you!
Eryn
Hi Eryn, I uploaded a new version (SambaR_v1.02) which should create the data quality plots when running the genlight2sambar function. Thanks for the suggestion. Concerning the error: could you rerun the filterdata() function with the flag silent=FALSE and then show the screen output? This will make it easier for me to locate the error.
Hi Menno,
Thanks a lot for the update! I rerun the genlight2sambar
and indeed got something new! However it's a text file, not plots, is this correct? I could guess what are the numbers but I am not completely sure if I could create the plots based on the table:
As for the filtering function, the screen output with silent=FALSE
is like below:
And the QC folder output after running the filtering function is like this:
Thank you in advance! Eryn
Hi Eryn, Strange that the text file has been generated but not the plots itself. Did the genlight2sambar() function finish completely? The last lines of the screen output should be:
'New inds, snps and mygenlight objects, as well as data quality plots have been succesfully created. You can proceed with running the filterdata function.'
I uploaded yet another version of the SambaR source script to Github just now. Hopefully with this one you will not run into the error with the filterdata function. If so, you could try with the flag nchrom set to NULL (default).
Hi Menno,
Both of the functions are now working perfect with many informative plots generated. Thanks a lot!!
Eryn
Hi,
Thanks for the package! When following the manual, I found that I couldn't produce the folder "Data_quality" to examine my data for filtering. I guess it's because I directly convert a genlight object to sambaR, instead of using importdata() to import RAW/BIM files (My data comes directly from DArT and is in 2row format). Would it be possible for genlight object to have Data_quality folder as well?