把你的排列分成不同的密码子位置和非编码位置

beastif的Python项目详细描述


beastify:从全基因组比对中为beast生成输入文件

背景

有时你想把你的排列分成不同的密码子位置 (即1、2和3),并且您还希望在 野兽分析。

beastify是为你做的。它将:

  1. 找出参考文献中的所有密码子位置(包括重叠位置)
  2. 或者,用任何元数据(例如日期)标记序列
  3. (可选)允许您从对齐中删除一个或多个位置
  4. (可选)允许您从对齐中屏蔽位置
  5. 或者,允许您对对齐方式进行子采样(如果您希望在将整个厨房扔给Beast之前对较小的数据集进行测试)。
  6. 输出一个nexus文件,其中包含准备运行beauti的分区。

分区的标签是:

  1. 对于第一个密码子位置
  2. 对于第二个密码子位置
  3. 对于第三个密码子位置
  4. 对于任何重叠的密码子(有时cds注释重叠,因为有时细菌基因将共享密码子)
  5. 如果在CD中找不到位置。

安装

依赖性

  • python=3.6
  • 单击
  • 熊猫
  • 纽比
  • 生物圈

使用pip

pip3 install beastify

测试您的安装

beastify --test

输入

  1. genbank参考资料
  2. snippy*.consumoness.subs.fa文件
  3. 要包含在最终比对中的基因列表
  4. n(可选)--要选择和包含的基因的随机数

命令列表

  --out TEXT                Outfile name (default: out.nexus)
  --info TEXT               Path to a tab-delimited file with two or more
                            columns. The first column has the isolate ID, and
                            other columns have dates, location, etc. The
                            information will be added to the isolate ID in the
                            same order as the columns
  --inc_ref                 Whether to include the reference in the final out
                            file (default: False)
  --aln_file TEXT           A sequence alignment file to give in lieu of
                            folder with snippy output.
  --aln_file_format TEXT    If providing an alignment file with --aln_file,
                            set the format of the alignment. Any format
                            supported by BioPython:AlignIO could be valid.
                            Default: fasta. Tested: fasta.
  --subsample INTEGER       Subsample X number of bases at random from each
                            partition. default: all bases
  --subsample_seed INTEGER  Set the seed when subsampling sites. Default:42
  --parts TEXT              Comma-separated list of partitions to include.
                            default:1,2,3,4,5
  --test                    Run beastify tests and exit
  --mask TEXT               A BED file indicating regions to mask from the
                            genome
  --version                 Show the version and exit.
  --help                    Show this message and exit.

输出

一个nexus格式的文件,可供beast使用。

脚本大纲

  1. 将genbank中的基因坐标解析为Genes
    • 方法:
      • 加载特性:将genbank特性加载到 字典。方法应该检查 长度是3的倍数,并且 startend密码子已经就位。stop 密码子应该去掉。
      • parse_snippy core:加载snippy core.tab数据的方法 并识别数据中的所有可变snp 编码区域---有返回“随机”样本的选项 在大小N的基因中,单核苷酸多态性最高的基因, n具有大多数snp的顶级基因。
    • 数据:
      • 特点:一个key=genename和value的字典 由seqfeature对象设置---如果提供了n,则仅 保持一组随机的基因coords大小
  2. snippy对齐加载到Isolate类中
    • 方法:
      • load_fasta:将序列加载到对象中
      • cat_基因:给定一个分离的id和一个genes对象, 返回串联序列(尚未实现)
      • get_gene:返回指定基因序列的字符串 通过使用Genes对象的gene id
      • str:打印序列id和长度(如果有)。
      • getitem:返回与键关联的序列字符串
      • 添加日期:用户在 一种适合Beast的格式,脚本将它们添加到 标识符
    • 数据:
      • seq:a seq记录
      • id:隔离id
      • 基因:以“gene_name”为键,序列字符串为 值
  3. Collection类存储所有Isolate对象
    • 方法:
      • 加载隔离:给定一个隔离文件列表,创建 并为每个存储单独的Isolate对象。
      • gen_align:给定一个Genes对象,生成 对齐---使用cat_genes
      • getitem:给定一个隔离id作为键,返回Isolate 对象
    • 数据以下内容:
      • 孤立:一个以孤立id为键和 Isolate对象作为值

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
带有嵌套JAR的java RCP ClassNotFoundException   java在输入框中设置默认值,crud应用程序使用spring   java如何在Heroku中使用fs创建新文件   java将JPanel放在JFrame中   java这个正则表达式会匹配“i.imgur.com/xxx”吗?   java在片段内创建RecylerView,而无需在Android中设置片段   Android上Groovy导致java错误的双精度浮点精度损失   swing Java查找JFrame属于JPanel的内容   java Spring junit自连线自定义类本身必须有构造函数吗?   java textswitcher支持前面的文本   从Android客户端到JAXRS的java Post自定义对象   java如何检索JSON数据并使用MPAndroidChart绘制折线图,以及在安卓上的改进   拒绝用户“root”@“localhost”的java c3p0访问(使用密码“是”)   使用Selenium Webdriver自动化ExtJS应用程序时java面临的问题