Closed frederikvand closed 3 years ago
Dear Frederik Sorry for the bug you're experiencing
I'll have a look in a couple of hours
Thierry
Thank you! Included you can find a subset of my vcf and .bed dataset to reproduce the issue.
As I was unable to get my files converted to a bayescan format, I wrote a script to extract the neccesary information from my genlight objects. As radiator is also unable to read the text file as input I made a .bat script for windows to run BayeScan command line in parallel. The .bat script can then run on powershell in R with system("powershell -command E:/02_R/11_windows_shell/B_02_bayescan_powershell.bat").
On it today...
So the problem was from SeqArray not reading correctly the VCF file produced by freeBayes, it's now fixed and will be in the next release today (v. 1.1.9)
Re-open if after testing you still have an issue
Keep in mind that to use for bayescan you need to supply a strata file that highlight the grouping of the data (populations, etc.)
I tested this with the data you sent:
data <- radiator::read_vcf(data = "08_GMCF5_subset5_2020_11_23.vcf")
test1 <- radiator::detect_duplicate_genomes(data)
test2 <- radiator::detect_mixed_genomes(data)
I couldn't test the bed
file because I didn't have the corresponding fam
and bim
files.
You might want to do the same and look at the figures produced by test1 and test2... don't waist your time with BayeScan with this current dataset, very basically:
This will bias everything in downstream analysis...
Look at this function to filter your dataset
Best Thierry
Dear radiator admins,
currently I am unable to use any of my snp formats in radiator. Other outlier analyses from other packages work fine on my vcf, plink (.bed), genlight and genind formats. However, I would like to perform a bayescan in radiator.
Would you have any clue on why the radiator package is unable to read or transform my data formats?
from vcf
These errors are the same when I use read_vcf but I never have a problem when I ready my data with the vcfR package.
from genind
My genind and genlight formats work fine in the adegenet package.
from genlight
from .bed
My .bed files work fine in the PCAdapt package.
Would you have any insights on how to transform my data to the bayescan format? I would prefer to stay within R.
With kind regards, Frederik Van Daele