Skip to content

Commit

Permalink
r246: all translation tables
Browse files Browse the repository at this point in the history
Thanks to @giacomomutti in #57
  • Loading branch information
lh3 committed Mar 6, 2024
1 parent f5cc291 commit 120e856
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 4 deletions.
2 changes: 1 addition & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static void print_usage(FILE *fp, const mp_idxopt_t *io, const mp_mapopt_t *mo,
fprintf(fp, " -k INT k-mer size [%d]\n", io->kmer);
fprintf(fp, " -M INT modimisers bit (sample rate = 1/2**M) [%d]\n", io->mod_bit);
fprintf(fp, " -L INT min ORF length to index [%d]\n", io->min_aa_len);
fprintf(fp, " -T INT NCBI translation table (from 1 to 5) [%d]\n", io->trans_code);
fprintf(fp, " -T INT NCBI translation table (1 through 33) [%d]\n", io->trans_code);
fprintf(fp, " -b INT bits per block [%d]\n", io->bbit);
fprintf(fp, " -d FILE save index to FILE []\n");
fprintf(fp, " Mapping:\n");
Expand Down
2 changes: 1 addition & 1 deletion miniprot.1
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Sample k-mers at a rate
Minimum ORF length to index [30]
.TP
.BI -T \ INT
NCBI translation table (1 through 5) [1]
NCBI translation table (1 through 33 except 7-8 and 17-20) [1]
.TP
.BI -b \ INT
Number of bits per bin [8]. Miniprot splits the genome into non-overlapping bins of 2^8 bp in size.
Expand Down
2 changes: 1 addition & 1 deletion miniprot.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include <stdint.h>

#define MP_VERSION "0.12-r245-dirty"
#define MP_VERSION "0.12-r246-dirty"

#define MP_F_NO_SPLICE 0x1
#define MP_F_NO_ALIGN 0x2
Expand Down
30 changes: 29 additions & 1 deletion nasw-tab.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ char *ns_tab_aa_i2c = "ARNDCQEGHILKMFPSTWYV*X";
uint8_t ns_tab_a2r[22] = { 0, 2, 4, 4, 6, 5, 5, 8, 3, 10, 11, 2, 11, 12, 7, 1, 1, 13, 12, 10, 14, 15 };
// A R N D C Q E G H I L K M F P S T W Y V * X

#define NS_MAX_TRANS_CODE 5
#define NS_MAX_TRANS_CODE 33
static const char *ns_tab_codon_all[NS_MAX_TRANS_CODE + 1] = {
0,
// 0123456789012345678901234567890123456789012345678901234567890123
Expand All @@ -24,6 +24,34 @@ static const char *ns_tab_codon_all[NS_MAX_TRANS_CODE + 1] = {
"KNKNTTTTRSRSMIMIQHQHPPPPRRRRTTTTEDEDAAAAGGGGVVVV*Y*YSSSSWCWCLFLFX", // 3: The Yeast Mitochondrial Code
"KNKNTTTTRSRSIIMIQHQHPPPPRRRRLLLLEDEDAAAAGGGGVVVV*Y*YSSSSWCWCLFLFX", // 4: The Mold, Protozoan, and Coelenterate Mitochondrial Code and the Mycoplasma/Spiroplasma Code
"KNKNTTTTSSSSMIMIQHQHPPPPRRRRLLLLEDEDAAAAGGGGVVVV*Y*YSSSSWCWCLFLFX" // 5: The Invertebrate Mitochondrial Code
"KNKNTTTTRSRSIIMIQHQHPPPPRRRRLLLLEDEDAAAAGGGGVVVVQYQYSSSS*CWCLFLFX", // 6: Ciliate Nuclear; Dasycladacean Nuclear; Hexamita Nuclear
0, // 7
0, // 8
"NNKNTTTTSSSSIIMIQHQHPPPPRRRRLLLLEDEDAAAAGGGGVVVV*Y*YSSSSWCWCLFLFX", // 9: Echinoderm Mitochondrial; Flatworm Mitochondrial
"KNKNTTTTRSRSIIMIQHQHPPPPRRRRLLLLEDEDAAAAGGGGVVVV*Y*YSSSSCCWCLFLFX", // 10: Euplotid Nuclear
"KNKNTTTTRSRSIIMIQHQHPPPPRRRRLLLLEDEDAAAAGGGGVVVV*Y*YSSSS*CWCLFLFX", // 11: Bacterial, Archaeal and Plant Plastid
"KNKNTTTTRSRSIIMIQHQHPPPPRRRRLLSLEDEDAAAAGGGGVVVV*Y*YSSSS*CWCLFLFX", // 12: Alternative Yeast Nuclear
"KNKNTTTTGSGSMIMIQHQHPPPPRRRRLLLLEDEDAAAAGGGGVVVV*Y*YSSSSWCWCLFLFX", // 13: Ascidian Mitochondrial
"NNKNTTTTSSSSIIMIQHQHPPPPRRRRLLLLEDEDAAAAGGGGVVVVYY*YSSSSWCWCLFLFX", // 14: Alternative Flatworm Mitochondrial
"KNKNTTTTRSRSIIMIQHQHPPPPRRRRLLLLEDEDAAAAGGGGVVVV*YQYSSSS*CWCLFLFX", // 15: Blepharisma Macronuclear
"KNKNTTTTRSRSIIMIQHQHPPPPRRRRLLLLEDEDAAAAGGGGVVVV*YLYSSSS*CWCLFLFX", // 16: Chlorophycean Mitochondrial
0, // 17
0, // 18
0, // 19
0, // 20
"NNKNTTTTSSSSMIMIQHQHPPPPRRRRLLLLEDEDAAAAGGGGVVVV*Y*YSSSSWCWCLFLFX", // 21: Trematode Mitochondrial
"KNKNTTTTRSRSIIMIQHQHPPPPRRRRLLLLEDEDAAAAGGGGVVVV*YLY*SSS*CWCLFLFX", // 22: Scenedesmus obliquus Mitochondrial
"KNKNTTTTRSRSIIMIQHQHPPPPRRRRLLLLEDEDAAAAGGGGVVVV*Y*YSSSS*CWC*FLFX", // 23: Thraustochytrium Mitochondrial
"KNKNTTTTSSKSIIMIQHQHPPPPRRRRLLLLEDEDAAAAGGGGVVVV*Y*YSSSSWCWCLFLFX", // 24: Rhabdopleuridae Mitochondrial
"KNKNTTTTRSRSIIMIQHQHPPPPRRRRLLLLEDEDAAAAGGGGVVVV*Y*YSSSSGCWCLFLFX", // 25: Candidate Division SR1 and Gracilibacteria
"KNKNTTTTRSRSIIMIQHQHPPPPRRRRLLALEDEDAAAAGGGGVVVV*Y*YSSSS*CWCLFLFX", // 26: Pachysolen tannophilus Nuclear
"KNKNTTTTRSRSIIMIQHQHPPPPRRRRLLLLEDEDAAAAGGGGVVVVQYQYSSSSWCWCLFLFX", // 27: Karyorelict Nuclear
"KNKNTTTTRSRSIIMIQHQHPPPPRRRRLLLLEDEDAAAAGGGGVVVVQYQYSSSSWCWCLFLFX", // 28: Condylostoma Nuclear
"KNKNTTTTRSRSIIMIQHQHPPPPRRRRLLLLEDEDAAAAGGGGVVVVYYYYSSSS*CWCLFLFX", // 29: Mesodinium Nuclear
"KNKNTTTTRSRSIIMIQHQHPPPPRRRRLLLLEDEDAAAAGGGGVVVVEYEYSSSS*CWCLFLFX", // 30: Peritrich Nuclear
"KNKNTTTTRSRSIIMIQHQHPPPPRRRRLLLLEDEDAAAAGGGGVVVVEYEYSSSSWCWCLFLFX", // 31: Blastocrithidia Nuclear
"KNKNTTTTRSRSIIMIQHQHPPPPRRRRLLLLEDEDAAAAGGGGVVVV*YWYSSSS*CWCLFLFX", // 32: Balanophoraceae Plastid
"KNKNTTTTSSKSIIMIQHQHPPPPRRRRLLLLEDEDAAAAGGGGVVVVYY*YSSSSWCWCLFLFX", // 33: Cephalodiscidae Mitochondrial
};

uint8_t ns_tab_nt4[256], ns_tab_aa20[256], ns_tab_aa13[256], ns_tab_codon[64], ns_tab_codon13[64];
Expand Down

0 comments on commit 120e856

Please sign in to comment.