problem in vcf to genlight conversion
0
0
Entering edit mode
3.7 years ago
ravihansa82 ▴ 130

Hi , I have a file with snp data in vcf format. I need to do population genetics studies. Therefore, I installed the Adegenet package into R. Also I installed the vcfR package as well. I read the vcf file as My_vcf<- read.vcfR(). then I tried to convert imported vcf file to genlight as vcf_gl <- vcfR2genlight(My_vcf). however, when I run vcf_gl, it gives me en error mentioning no object found as vcf_gl. can someone help me to find out what is wrong in the script? here is the R output

My_vcf

Object of Class vcfR 0 samples 42 CHROMs 15000 variants Object size: 1.4 Mb NaN percent missing data *

vcf_gl <- vcfR2genlight(My_vcf)

Error in input$gen[i, ] : subscript out of bounds In addition: Warning message: In vcfR2genlight(My_vcf) : Found 611 loci with more than two alleles. Objects of class genlight only support loci with two alleles. 611 loci will be omitted from the genlight object.

vcf_gl

Error: object 'vcf_gl' not found

SNP software error R next-gen • 1.0k views
ADD COMMENT

Login before adding your answer.

Traffic: 2559 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6