[adegenet-forum] read.PLINK error
ADAM PETER CARDILINI
apcar at deakin.edu.au
Fri Jun 6 04:44:07 CEST 2014
G'day Everyone,
I have recently produced a .vcf file for a set of SNPs obtained using Genotype-by-sequencing. The .vcf file is the final output from the TASSEL pipeline which takes in fastq sequence files. I converted my .vcf file to a .ped and .map files using vcftools and then converted the .ped file to .raw so that I could load it into R using 'adegenet' function 'read.PLINK'. The linux vcftools and plink code was as follows:
vcftools --vcf myfile.vcf --out myfile.plink --plink
plink --file myfile.plink --out myfile.plink --recodeA
I successfully loaded my unaltered file into R using 'adegenet', however it has way many SNPs that I am not interested in (because it has only been sequenced for a couple of individuals) so I thought I would filter my .vcf snp file using vcftools. I filtered my original file so that only SNPs that were sequenced from >90% of samples remained. This significantly reduced the number of SNPs I had and produced a new .vcf file. I then converted this file to .ped and .map, and then .ped to .raw so I could bring it into R and have a quick look.
When I tried to import the new, filtered .raw file using 'read.PLINK' I got the following error:
Reading PLINK raw format into a genlight object...
Reading loci information...
Reading and converting genotypes...
.Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function 'nLoc' for signature '"try-error"'
In addition: Warning message:
In mclapply(txt, function(e) new("SNPbin", snp = e, ploidy = 2), :
9 function calls resulted in an error
It seems as if something has gone wrong when I have produced the new .vcf file during filtering. I was wondering if anyone might know what I have done wrong, what these error messages mean and whether there is a fix I can try?
Thanks in advance for your time and help, I appreciate it.
Kind regards,
Adam Cardilini
PhD Candidate
Schools of Life and Environmental Sciences,
Deakin University, 75 Pigdons Rd,
Waurn Ponds, Vic, Australia, 3217
Mob: 0431 566 340
Email: apcar at deakin.edu.au
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20140606/dc91a576/attachment.html>
More information about the adegenet-forum
mailing list