|
运行环境:centos
语言:python3
相关程序包:argparse、Bio
|
程序:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
from Bio import SeqIO
from Bio.Data import CodonTable
from Bio.Seq import Seq
# 获取密码子表全部分类
def check_codon_table_type():
table_names = list(CodonTable.unambiguous_dna_by_name.keys())
names_idx = []
for name in table_names:
names_idx.append("{}:{} ".format(str(table_names.index(name)), str(name)))
names_idx = str(names_idx).replace("', '", " | ").replace("['", "").replace("']", "")
return [names_idx, table_names]
def trans(prefix, fa_file, gff_file, codon_table_id):
# table_id to nam