Hi, I'm using SNPrelate to calculate IBS values for all pairs of individuals from my vcf sample. However, I am unable to include sample ids or even export the results in text format. Is there a way to do this ? My code is below
library(gdsfmt)
library(SNPRelate)
input_genotype <- "input_genotype.vcf"
snpgdsVCF2GDS(input_genotype, "test.gds", method="biallelic.only")
snpgdsSummary("test.gds")
genofile <- snpgdsOpen("test.gds")
ibs <- snpgdsIBS(genofile)
write.table(ibs, file="ibs.txt", sep="\t", col.names=TRUE, row.names=TRUE)
Error in as.data.frame.default(x[[i]], optional = TRUE, stringsAsFactors = stringsAsFactors) :
cannot coerce class ""snpgdsIBSClass"" to a data.frame
Hi, I'm using SNPrelate to calculate IBS values for all pairs of individuals from my vcf sample. However, I am unable to include sample ids or even export the results in text format. Is there a way to do this ? My code is below