Closed jcaccavo closed 1 year ago
Will have a look at it tomorrow
did you have all those warning generated by SeqArray the first time you read the vcf ?
Warning in SeqArray::seqVCF_Header(vcf.fn = vcf) :
There are too many lines in the header (>= 10000). In order not to slow down the conversion, please consider deleting unnecessary annotations (like contig).
I see from the other post that you did, ignore this. I removed all the lines in the VCF with contig...
Should work with v.1.2.6
You can use the separate writing functions instead of specifying radiator::genomic_converter
separately:
?radiator::write_genlight
?radiator::write_pcadapt
?radiator::write_bayescan
data.gl <- radiator::write_genlight(data = dm_data_filtered)
data.pc <- radiator::write_pcadapt(data = dm_data_filtered)
data.bs <- radiator::write_bayescan(data = dm_data_filtered)
All at once:
test1 <- radiator::genomic_converter(data = dm_data_filtered, output = c("genlight", "pcadapt", "bayescan"))
re-open the issue if you're still having problem
I am experiencing errors using the genomic_converter function to convert to genlight, bayescan, and pcadapt from a tidy data frame (tbl_df) produced from a .vcf file using filter_rad. I have the same problem when trying to convert to these formats from the original .vcf file, and also when trying to use the write_genlight, write_bayescan, or write_pcadapt functions. I have also reviewed multiple github issues related to the genomic_converted function (#103, #111, #145, #154, and #162), but could not find a solution to this issue there.
The following files can be downloaded to reproduce this error: Rdata file (output from the filter_rad of the original .vcf file) Original .vcf file Strata file
Below are the commands, errors, and session report. I am happy to provide more info as needed. Thanks in advance for your help.
dm_all_convert_genlight <- radiator::genomic_converter(dm_data_filtered, output = c("genlight"))
dm_all_convert_bayescan <- radiator::genomic_converter(dm_data_filtered, output = c("bayescan"))
dm_all_convert_pcadapt <- radiator::genomic_converter(dm_data_filtered, output = c("pcadapt"))
devtools::session_info()