<div dir="ltr">Hi, <div><br></div><div>what you describe sounds like a complete linkage clustering. What you wanna do is:</div><div><br></div><div>1) get hamming distances using dist.dna (you got that already)</div><div>2) use hclust specifying the right method for complete linkage clustering</div><div>3) use cutree on the resulting dendrogram for a given threshold</div><div><br></div><div>Cheers</div><div>Thibaut</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><div><div><br>--<br>Dr Thibaut Jombart</div><div style="font-size:small">Lecturer, Department of Infectious Disease Epidemiology, Imperial College London</div></div><div><span style="font-size:12.8px">Head of RECON: </span><span style="font-size:12.8px"><a href="http://repidemicsconsortium.org" target="_blank">repidemicsconsortium.org</a></span><br></div></div><div><a href="http://sites.google.com/site/thibautjombart/" style="font-size:12.8px" target="_blank">sites.google.com/site/thibautjombart/</a><br></div><div><a href="http://github.com/thibautjombart" target="_blank">github.com/thibautjombart</a></div>Twitter: <a href="http://twitter.com/TeebzR" target="_blank">@TeebzR</a><br></div><div dir="ltr">+44(0)20 7594 3658</div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On 10 January 2017 at 13:39, Hiren Ghosh <span dir="ltr"><<a href="mailto:hiren.ghosh@gmail.com" target="_blank">hiren.ghosh@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">My data set like this : I have a core genome alignment of 240 e coli genome, which are varying number of snps from ~0-44200. Now i would like to clustered all them according to number of snps. Suppose all the genome share bellow 100 snps will be one cluster so on all bellow 500 will be one cluster so on.....<div>Can anyone suggest some idea. how to proceed.</div><div>Thanks</div><span class=""><div> <br><br><br><br><div class="m_-8586520226052380067mt-signature"><img src="https://s3-eu-west-1.amazonaws.com/mailtrack-crx/icon-signature.png" width="16" height="14"> <font color="#999999" class="m_-8586520226052380067mt-signature-text">Sent with <a href="https://mailtrack.io/install?source=signature&lang=en&referral=hiren.ghosh@gmail.com&idSignature=22" class="m_-8586520226052380067mt-install" target="_blank">Mailtrack</a></font></div></div><img width="0" height="0" class="m_-8586520226052380067mailtrack-img" src="https://mailtrack.io/trace/mail/d37487883ed6b8ccc9d786d91837c5ad06bfe935.png?u=1066922"></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On 10 January 2017 at 13:43, Roman Luštrik <span dir="ltr"><<a href="mailto:roman.lustrik@biolitika.si" target="_blank">roman.lustrik@biolitika.si</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:trebuchet ms,sans-serif;font-size:12pt;color:#000000"><div>Forwarding this to the list.</div><div><br></div><div>It's not clear to me what you would like to measure. Would like to see, given a constant cutoff, when clusters don't change much as you add SNPs?</div><span><div><br></div><div>Cheers,</div><div>Roman</div><div><br></div><div><br></div><div></div><div><br></div><div>----<br>In god we trust, all others bring data.</div><br><hr id="m_-8586520226052380067m_-8355167247967144992zwchr"></span><div><b>From: </b>"Hiren Ghosh" <<a href="mailto:hiren.ghosh@gmail.com" target="_blank">hiren.ghosh@gmail.com</a>><br><b>To: </b>"Roman Luštrik" <<a href="mailto:roman.lustrik@biolitika.si" target="_blank">roman.lustrik@biolitika.si</a>><br><b>Sent: </b>Tuesday, January 10, 2017 1:33:52 PM<br><b>Subject: </b>Re: [adegenet-forum] Query about Adegene : How to get snp position plateau curve<br></div><div><div class="m_-8586520226052380067h5"><br><div><div dir="ltr">Hello, <div>I am very new to such analysis. Mainly my aim is to cluster based on the number of mutations
separating sequences, classifying them in the same cluster if their distance is less
than a given threshold. </div><div>Thanks For reply.</div><div>Kind</div><div>Hiren<br><br><br><br><div class="m_-8586520226052380067m_-8355167247967144992mt-signature"><img width="16" height="14" src="https://s3-eu-west-1.amazonaws.com/mailtrack-crx/icon-signature.png"> <span color="#999999" class="m_-8586520226052380067m_-8355167247967144992mt-signature-text" style="color:#999999">Sent with <a href="https://mailtrack.io/install?source=signature&lang=en&referral=hiren.ghosh@gmail.com&idSignature=22" class="m_-8586520226052380067m_-8355167247967144992mt-install" target="_blank">Mailtrack</a></span></div></div><img width="0" height="0" class="m_-8586520226052380067m_-8355167247967144992mailtrack-img"></div><div class="gmail_extra"><br><div class="gmail_quote">On 10 January 2017 at 13:25, Roman Luštrik <span dir="ltr"><<a href="mailto:roman.lustrik@biolitika.si" target="_blank">roman.lustrik@biolitika.si</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid #cccccc;padding-left:1ex"><div><div style="font-family:'trebuchet ms',sans-serif;font-size:12pt;color:#000000"><div>What statistic are you trying to square off against number of SNPs?</div><br><div>Cheers,</div><div>Roman</div><br><div>----<br>In god we trust, all others bring data.</div><br><hr id="m_-8586520226052380067m_-8355167247967144992m_6421904135783778661zwchr"><div><b>From: </b>"Hiren Ghosh" <<a href="mailto:hiren.ghosh@gmail.com" target="_blank">hiren.ghosh@gmail.com</a>><br><b>To: </b><a href="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank">adegenet-forum@lists.r-forge.r<wbr>-project.org</a><br><b>Sent: </b>Tuesday, January 10, 2017 12:04:25 PM<br><b>Subject: </b>[adegenet-forum] Query about Adegene : How to get snp position plateau curve<br></div><br><div><div><div class="m_-8586520226052380067m_-8355167247967144992h5"><div dir="ltr"><span style="font-size:12.8px">Hello Developer, Currently i am using your adegent package, in this way :</span><div>#data input from multi-genome-alignment file<br style="font-size:12.8px"><span style="font-size:12.8px">dna <- fasta2DNAbin(".</span><span style="font-size:12.8px">/core_gene_alig<wbr>nment.</span><span style="font-size:12.8px">fasta")</span><br style="font-size:12.8px"><span style="font-size:12.8px">D <- dist.dna(dna, model="N")</span><br style="font-size:12.8px"><span style="font-size:12.8px">clust <- gengraph(D)</span><br style="font-size:12.8px"><br style="font-size:12.8px"><br style="font-size:12.8px"><span style="font-size:12.8px">I would like to have a look how many snps position is there until my data will be a plateau curve. . Could you please help me out.</span></div><br><div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Thanks Advance. </div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><br></div><br><img width="0" height="0" class="m_-8586520226052380067m_-8355167247967144992m_6421904135783778661mailtrack-img" id="m_-8586520226052380067m_-8355167247967144992DWT1641"><br>-- <br><div class="m_-8586520226052380067m_-8355167247967144992m_6421904135783778661gmail_signature"><div dir="ltr"><div><span style="background-color:#0b5394"><span style="color:#073763"><span style="font-family:arial,helvetica,sans-serif"></span></span></span><span style="color:#0b5394"><i><span></span></i></span><span style="color:#0b5394"></span><span></span><p style="margin-bottom:0in;font-weight:normal" align="LEFT"><span style="color:#073763"><span style="font-family:'bitstream charter',serif"><span style="font-size:medium"><i><span style="font-weight:normal">Hiren
Ghosh, Doctoral Research Scholar <br>Biomedizinisches
Forschungszentrum Seltersberg<br>Institut für Medizinische
Mikrobiologie<br>Justus-Liebig-Universität<br>Schubertstr. 81<br>35392
Gießen , Germany</span></i></span></span></span></p><p style="margin-bottom:0in;font-weight:normal" align="LEFT"><span style="color:#073763"><span style="font-family:'bitstream charter',serif"><span style="font-size:medium"><i>Mobile
No: 017672157634</i></span></span></span></p><span style="color:#073763">
</span><p style="margin-bottom:0in" align="LEFT"><span style="color:#073763"><a href="mailto:Email%3Ahiren.ghosh@med.uni-giessen.de" target="_blank"><span style="font-family:'bitstream charter',serif"><span style="font-size:medium"><i><span style="font-weight:normal">Email:hiren.ghosh@med.uni-gies<wbr>sen.de</span></i></span></span></a></span></p>
</div></div></div>
<br><br><br><div class="m_-8586520226052380067m_-8355167247967144992m_6421904135783778661mt-signature"><img width="16" height="14" src="https://s3-eu-west-1.amazonaws.com/mailtrack-crx/icon-signature.png"> <span class="m_-8586520226052380067m_-8355167247967144992m_6421904135783778661mt-signature-text" style="color:#999999">Sent with <a href="https://mailtrack.io/install?source=signature&lang=en&referral=hiren.ghosh@gmail.com&idSignature=22" class="m_-8586520226052380067m_-8355167247967144992m_6421904135783778661mt-install" target="_blank">Mailtrack</a></span></div></div></div>
<br></div></div>______________________________<wbr>_________________<br>adegenet-forum mailing list<br><a href="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank">adegenet-forum@lists.r-forge.r<wbr>-project.org</a><br><a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum" target="_blank">https://lists.r-forge.r-projec<wbr>t.org/cgi-bin/mailman/listinfo<wbr>/adegenet-forum</a><br></div></div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="m_-8586520226052380067m_-8355167247967144992gmail_signature"><div dir="ltr"><div><span style="background-color:#0b5394"><span style="color:#073763"><span style="font-family:arial,helvetica,sans-serif"></span></span></span><span style="color:#0b5394"><i><span></span></i></span><span style="color:#0b5394"></span><span></span><p style="margin-bottom:0in;font-weight:normal" align="LEFT"><span style="color:#073763"><span face="Bitstream Charter, serif" style="font-family:'Bitstream Charter',serif"><span size="3" style="font-size:medium"><i><span style="font-weight:normal">Hiren
Ghosh, Doctoral Research Scholar <br>Biomedizinisches
Forschungszentrum Seltersberg<br>Institut für Medizinische
Mikrobiologie<br>Justus-Liebig-Universität<br>Schubertstr. 81<br>35392
Gießen , Germany</span></i></span></span></span></p><p style="margin-bottom:0in;font-weight:normal" align="LEFT"><span style="color:#073763"><span face="Bitstream Charter, serif" style="font-family:'Bitstream Charter',serif"><span size="3" style="font-size:medium"><i>Mobile
No: 017672157634</i></span></span></span></p><span style="color:#073763">
</span><p style="margin-bottom:0in" align="LEFT"><span style="color:#073763"><a href="mailto:Email%3Ahiren.ghosh@med.uni-giessen.de" target="_blank"><span face="Bitstream Charter, serif" style="font-family:'Bitstream Charter',serif"><span size="3" style="font-size:medium"><i><span style="font-weight:normal">Email:hiren.ghosh@med.uni-gies<wbr>sen.de</span></i></span></span></a></span></p>
</div></div></div>
</div><br></div></div></div></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="m_-8586520226052380067gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><span style="background-color:rgb(11,83,148)"><span style="color:rgb(7,55,99)"><span style="font-family:arial,helvetica,sans-serif"></span></span></span><span style="color:rgb(11,83,148)"><i><span></span></i></span><span style="color:rgb(11,83,148)"></span><span></span><p style="margin-bottom:0in;font-weight:normal" align="LEFT"><span style="color:rgb(7,55,99)"><font face="Bitstream Charter, serif"><font size="3"><i><span style="font-weight:normal">Hiren
Ghosh, Doctoral Research Scholar <br>Biomedizinisches
Forschungszentrum Seltersberg<br>Institut für Medizinische
Mikrobiologie<br>Justus-Liebig-Universität<br>Schubertstr. 81<br>35392
Gießen , Germany</span></i></font></font></span></p><p style="margin-bottom:0in;font-weight:normal" align="LEFT"><span style="color:rgb(7,55,99)"><font face="Bitstream Charter, serif"><font size="3"><i>Mobile
No: 017672157634</i></font></font></span></p><span style="color:rgb(7,55,99)">
</span><p style="margin-bottom:0in" align="LEFT"><span style="color:rgb(7,55,99)"><a href="mailto:Email%3Ahiren.ghosh@med.uni-giessen.de" target="_blank"><font face="Bitstream Charter, serif"><font size="3"><i><span style="font-weight:normal">Email:hiren.ghosh@med.uni-<wbr>giessen.de</span></i></font></font></a></span></p>
</div></div></div>
</div>
</div></div><br>______________________________<wbr>_________________<br>
adegenet-forum mailing list<br>
<a href="mailto:adegenet-forum@lists.r-forge.r-project.org">adegenet-forum@lists.r-forge.<wbr>r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum" rel="noreferrer" target="_blank">https://lists.r-forge.r-<wbr>project.org/cgi-bin/mailman/<wbr>listinfo/adegenet-forum</a><br></blockquote></div><br></div>