text: user285: Im trying to find the out-group in the alignment my data files file a and  file b both the case i'm getting NA when i run this     pars.a$tip.label[pars.a$edge[which.max(pars.a$edge.length),2]]
  I tried NJ instead of upgma i do still get NA not sure what is the issue ,but at the same time when i used other alignment file with 50 sequence  works fine.
  a<-read.alignment("abhi_seq/final_abhi_tempa1.fas", format="fasta")
  a.phydat<-as.phyDat(a)
  dist.a.phydat<-dist.dna(as.DNAbin(a.phydat))
  upgma.a<-upgma(dist.a.phydat)
  parsimony(upgma.a,a.phydat)
  pars.a <- optim.parsimony(upgma.a, a.phydat)
  pars.a<-acctran(pars.a, a.phydat)
  pars.a$tip.label[pars.a$edge[which.max(pars.a$edge.length),2]]
  
  
  user8749: the fact is that the present upgma tree as a midpoint rooting here, corresponding to node 46.
  getRoot(upgma.a)
  
  so for this kind of tree, I recommend you to use the midpoint() rooting function.
  pars.a <- optim.parsimony(upgma.a, a.phydat)
  pars.a<-acctran(pars.a, a.phydat)
  plot(midpoint(pars.a))
  
  
original_text: 285: <p>Im trying to find the out-group in the alignment my data files <a href="https://drive.google.com/file/d/1N60Va-smHbsmCePOnkVL_jjAaxCagZWf/view?usp=sharing" rel="nofollow noreferrer">file a</a> and  <a href="https://drive.google.com/file/d/1_E0Ozgv_7Wtxr9AKPrvW606IWH99hIPb/view?usp=sharing" rel="nofollow noreferrer">file b</a> both the case i'm getting NA when i run this     <code>pars.a$tip.label[pars.a$edge[which.max(pars.a$edge.length),2]]</code></p>
  
  <p>I tried NJ instead of upgma i do still get NA not sure what is the issue ,but at the same time when i used other alignment file <a href="https://drive.google.com/file/d/10P6qF3nrXlnm-tUONK5bTAPqR4wapX-q/view?usp=sharing" rel="nofollow noreferrer">with 50 sequence </a> works fine.</p>
  
  <pre><code>a&lt;-read.alignment("abhi_seq/final_abhi_tempa1.fas", format="fasta")
  a.phydat&lt;-as.phyDat(a)
  dist.a.phydat&lt;-dist.dna(as.DNAbin(a.phydat))
  upgma.a&lt;-upgma(dist.a.phydat)
  parsimony(upgma.a,a.phydat)
  pars.a &lt;- optim.parsimony(upgma.a, a.phydat)
  pars.a&lt;-acctran(pars.a, a.phydat)
  pars.a<span class="math-container">$tip.label[pars.a$</span>edge[which.max(pars.a$edge.length),2]]
  </code></pre>
   8749: <p>the fact is that the present upgma tree as a midpoint rooting here, corresponding to node 46.</p>
  
  <pre><code>getRoot(upgma.a)
  </code></pre>
  
  <p>so for this kind of tree, I recommend you to use the midpoint() rooting function.</p>
  
  <pre><code>pars.a &lt;- optim.parsimony(upgma.a, a.phydat)
  pars.a&lt;-acctran(pars.a, a.phydat)
  plot(midpoint(pars.a))
  </code></pre>
  