This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error in extract.gt(vcf) - ID column contains non-unique names

Hi,

I am trying to extract the GT from a vcf file for few specific populations and everytime, I am getting error as

Error in extract.gt(vcf10pop1, element = "GT", as.numeric = TRUE, IDtoRowNames = TRUE) : 
  ID column contains non-unique names

How do we make the ID column unique - is there any easy R code to assign unique name for ID so that I wont get this error please. I am not an expert in R and starting to work with vcf file since this summer only.

command was:

vcf1  <- extract.gt(vcf, element = 'GT', as.numeric = TRUE, IDtoRowNames = TRUE) 
error: Error in extract.gt(vcf10pop1, element = "GT", as.numeric = TRUE, IDtoRowNames = TRUE) : 
  ID column contains non-unique names

data: is from 1000genome file for 2 populations from each super population, between the snips from 17500001-20000000

non-unique vcf id column extract.gt

0 answers

No answers yet.

Log in to answer this question.