This is a test version of Biostars. For the public version, visit https://www.biostars.org.
issue while converting vcf file to genind with vcfR

I am using vcfR for several analysis. It works for a previous vcf file. But actually I got the following message while converting a vcf version 4.2 file to genind object with vcfR2genind:

Warning message:

In adegenet::df2genind(t(x), sep = sep) : entirely non-type individual(s) deleted

Could anyone help with this issue?

My script:

library(vcfR)

#Import vcf File:

vcf<-read.vcfR("my.vcf")

a<-vcfR2genind(vcf)

snp r vcf

2 answers

Hi,

I don't really know the meaning of this error, but maybe you should try using a gzip vcf file :

vcf <- read.vcfR("my.vcf.gz", verbose = FALSE)
x <- vcfR2genind(vcf)

I did it this way and it's working fine for me.

Hi, the warning you are getting here is from the adegenet package. It's indicating that you have samples in your data that are being removed because they contain entirely missing data.

You can check the number of samples in your genind object by typing nInd(a) and compare that with the number of samples in your VCF data.

Log in to answer this question.