Dear Jose,
I am encountering a significant issue with the VCF file generated from my genlight object. Despite my expectations, the file appears to contain only Chromosome 1 and '0' as the positions for all SNPs. This limitation severely hinders any subsequent analysis. I have attached a screenshot of the file format for your review. Could you please provide guidance on the potential cause and a solution for this problem?
Regards
Thank you, Luis and Renee. I successfully converted my genlight object into a VCF file. Initially, I used the following code, specifying the chromosome and SNP position information:
gl2vcf( + gl, + plink.bin.path = getwd(), + snp.pos = "ChromPosSnp_Rice_RGAP_v7", + snp.chr = "Chrom_Rice_RGAP_v7", + outfile = "gl_vcf", + outpath = getwd() + )However, this attempt resulted in the following error:
Error in checkSlotAssignment(object, name, value) : assignment of an object of class “numeric” is not valid for slot ‘position’ in an object of class “dartR”; is(value, "intOrNULL") is not TRUETo resolve this, I converted the SNP position information to an integer data type, and then reran the gl2vcf function:
gl$other$loc.metrics$Chrom_Rice_RGAP_v7
gl$other$loc.metrics$ChromPosSnp_Rice_RGAP_v7
gl$other$loc.metrics$ChromPosSnp_Rice_RGAP_v7 <- as.integer(gl$other$loc.metrics$ChromPosSnp_Rice_RGAP_v7)
--
You received this message because you are subscribed to the Google Groups "dartR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dartr+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/dartr/4e4be040-4f4a-442e-81d9-df8358bd2f5en%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/dartr/00030A49-CC43-4D58-8B97-10A65BFA7715%40gmail.com.