<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-AU" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">G’day Everyone,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">vcftools --vcf myfile.vcf --out myfile.plink --plink<o:p></o:p></p>
<p class="MsoNormal">plink --file myfile.plink --out myfile.plink --recodeA<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">When I tried to import the new, filtered .raw file using ‘read.PLINK’ I got the following error:<o:p></o:p></p>
<div style="mso-element:para-border-div;border:none;border-bottom:double windowtext 6.75pt;padding:0cm 0cm 1.0pt 0cm">
<p class="MsoNormal" style="border:none;padding:0cm"><o:p> </o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Reading PLINK raw format into a genlight object...<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Reading loci information...<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Reading and converting genotypes...<o:p></o:p></p>
<p class="MsoNormal">.Error in (function (classes, fdef, mtable)  :<o:p></o:p></p>
<p class="MsoNormal">  unable to find an inherited method for function ‘nLoc’ for signature ‘"try-error"’<o:p></o:p></p>
<p class="MsoNormal">In addition: Warning message:<o:p></o:p></p>
<p class="MsoNormal">In mclapply(txt, function(e) new("SNPbin", snp = e, ploidy = 2),  :<o:p></o:p></p>
<div style="mso-element:para-border-div;border:none;border-bottom:double windowtext 6.75pt;padding:0cm 0cm 1.0pt 0cm">
<p class="MsoNormal" style="border:none;padding:0cm">  9 function calls resulted in an error<o:p></o:p></p>
<p class="MsoNormal" style="border:none;padding:0cm"><o:p> </o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks in advance for your time and help, I appreciate it.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-AU">Kind regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-AU"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-AU">Adam Cardilini<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-AU">PhD Candidate<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-AU">Schools of Life and Environmental Sciences,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-AU">Deakin University, 75 Pigdons Rd,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-AU">Waurn Ponds, Vic, Australia, 3217<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-AU">Mob: 0431 566 340<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-AU">Email: apcar@deakin.edu.au<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>