Answers.Body: <p>Yes, it's easy.</p>
  <pre><code>#nexus  
  BEGIN SETS;
  
  charset atp6.fasta = 1-651\3, 2-651\3;  
  charset atp8.fasta = 652-729\3, 653-729\3;  
  charset cob.fasta = 730-1749\3, 731-1749\3;  
  # ... so on for every gene
  END;
  </code></pre>
  <p>So for atp6 you will get 1,2,4,5,7,8,10,11 .... up to 651, and so on for each gene. Thus the residues at position 3, 6, 9, 12 are excluded.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-19T09:02:23.863Z
Answers.Text: Thank you very much, but by using the above charsets I get  "ERROR: Range 1-651\3, 2-651\3 is not multiple of 3 (necessary for codon data)". It's the same error that I get using other solutions suggested on the web; I don't understand why, using regular charsets without removing the third bases everything runs smoothly.
Answers.UserDisplayName: Francesco De Giglio
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-12T17:15:39.790Z
Answers.LastActivityDate: 2023-12-15T16:25:55.133Z
Answers.LastEditDate: 2023-12-15T16:25:55.133Z
Answers.UserDisplayName: M__
Body: <p>I need to build a phylogenetic tree using IQ-TREE, starting from a sequence alignment in CODON format of several invertebrate mitochondrial genes. These are my charsets:</p>
  <pre><code>nexus  
  BEGIN SETS;
  
  charset atp6.fasta = 1-651;  
  charset atp8.fasta = 652-729;  
  charset cob.fasta = 730-1749;  
  charset cox1.fasta = 1750-3237;  
  charset cox2.fasta = 3238-3858;  
  charset cox3.fasta = 3859-4632;  
  charset nad1.fasta = 4633-5484;  
  charset nad2.fasta = 5485-6156;  
  charset nad3.fasta = 6157-6459;  
  charset nad4.fasta = 6460-7683;  
  charset nad4L.fasta = 7684-7899;  
  charset nad5.fasta = 7900-9294;  
  charset nad6.fasta = 9295-9663;  
  END;
  </code></pre>
  <p>I would need to remove the third bases, how should I write them? These are the commands with which I would launch IQ-TREE:</p>
  <pre><code>iqtree -s &quot;fasta_file&quot; -bb 1000 -alrt 1000 -m MFP+MERGE -spp &quot;charset.nexus&quot; -st CODON5
  </code></pre>
  <p>Please, any suggestions would be very helpful.</p>
  
Tags: <phylogenetics><phylogeny><fasta><mtdna>
Title: How to remove third codon positions from a charset in iqtree?
ThreadText: # How to remove third codon positions from a charset in iqtree?
  
  (Asked by: username_0 on 2023-12-12)
  
  I need to build a phylogenetic tree using IQ-TREE, starting from a sequence alignment in CODON format of several invertebrate mitochondrial genes. These are my charsets:
  
  ```
  nexus  
  BEGIN SETS;
  
  charset atp6.fasta = 1-651;  
  charset atp8.fasta = 652-729;  
  charset cob.fasta = 730-1749;  
  charset cox1.fasta = 1750-3237;  
  charset cox2.fasta = 3238-3858;  
  charset cox3.fasta = 3859-4632;  
  charset nad1.fasta = 4633-5484;  
  charset nad2.fasta = 5485-6156;  
  charset nad3.fasta = 6157-6459;  
  charset nad4.fasta = 6460-7683;  
  charset nad4L.fasta = 7684-7899;  
  charset nad5.fasta = 7900-9294;  
  charset nad6.fasta = 9295-9663;  
  END;
  
  ```
  
  I would need to remove the third bases, how should I write them? These are the commands with which I would launch IQ-TREE:
  
  ```
  iqtree -s "fasta_file" -bb 1000 -alrt 1000 -m MFP+MERGE -spp "charset.nexus" -st CODON5
  
  ```
  
  Please, any suggestions would be very helpful.
  
  **Tags:** phylogenetics, phylogeny, fasta, mtdna
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-12-12. Score: 0
  
  Yes, it's easy.
  
  ```
  #nexus  
  BEGIN SETS;
  
  charset atp6.fasta = 1-651\3, 2-651\3;  
  charset atp8.fasta = 652-729\3, 653-729\3;  
  charset cob.fasta = 730-1749\3, 731-1749\3;  
  # ... so on for every gene
  END;
  
  ```
  
  So for atp6 you will get 1,2,4,5,7,8,10,11 .... up to 651, and so on for each gene. Thus the residues at position 3, 6, 9, 12 are excluded.
  
  > **Comments:**
  > **username_0**: Thank you very much, but by using the above charsets I get  "ERROR: Range 1-651\3, 2-651\3 is not multiple of 3 (necessary for codon data)". It's the same error that I get using other solutions suggested on the web; I don't understand why, using regular charsets without removing the third bases everything runs smoothly.  
  
  ---
  
  