用于制作和跟踪dna组件的突变拷贝的python库

co的Python项目详细描述


一氧化碳

travis

co是一个用于更改带注释的dna序列的python库。它跟踪部件和升降机 当一个组件通过应用一系列的变异而“变异”时,超过了特征注释。使用co您可以 为克隆生物建立新的一致性序列,并跟踪一个谱系内特征的变化。

有关详细信息,请查看Documentation

你好,CO!

>>> from co import Component
>>> from co.mutation import *
>>> hello = Component('Hello X!')
>>> hello.seq
Seq('Hello X!', Alphabet())
>>> hello_world = hello.mutate([Mutation(6, 1, 'world')])
>>> hello_world.seq
Seq('Hello world!', Alphabet())

使用功能注释

组件是根据Biopython的SeqRecord建模的,它们既有序列,又有特性:

>>>fromBio.SeqFeatureimport*>>>slogan=Component('CoPy is for DNA components',features=[...SeqFeature(FeatureLocation(0,4),type='name'),...SeqFeature(FeatureLocation(12,15),id='DNA')])>>>>>># features are bound to components -- and you can always access their DNA sequence...>>>slogan.features.add(FeatureLocation(16,26)).seqSeq('components',Alphabet())>>>[f.seqforfinslogan.features][Seq('CoPy',Alphabet()),Seq('DNA',Alphabet()),Seq('components',Alphabet())]>>>>>># New Components are made through series of mutations...# You not only get the new sequence but a mutated component: Features are translated to the...# new sequence as well....>>>new_slogan=slogan.mutate([DEL(2,2),DEL(12,4)])>>>new_slogan.seqSeq('Co is for components',Alphabet())>>>new_slogan.featuresComponentFeatureSet([Feature(FeatureLocation(ExactPosition(0),ExactPosition(2)),type='name'),Feature(FeatureLocation(ExactPosition(10),ExactPosition(20)))])>>>[f.seqforfinnew_slogan.features][Seq('Co',Alphabet()),Seq('components',Alphabet())]>>>list(new_slogan.features.find(type='name'))# features can be filtered by type, id, strand, position, and qualifiers[Feature(FeatureLocation(ExactPosition(0),ExactPosition(2)),type='name')]>>>>>># Using Component.fdiff you can get a summary of what features where affected by mutation. (Unchanged features...# that have a new coordinate -- e.g. the 'components' feature in this example -- are not included)....>>>slogan.fdiff(new_slogan)Diff(added=(Feature(FeatureLocation(ExactPosition(12),ExactPosition(15)),id='DNA'),Feature(FeatureLocation(ExactPosition(0),ExactPosition(4)),type='name')),removed=(Feature(FeatureLocation(ExactPosition(0),ExactPosition(2)),type='name'),))

作者

Lars Schöning已经创建了co。非常欢迎您的贡献。 请与主要作者联系以获取更大的更改。

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

推荐PyPI第三方库


热门话题
java使用CSPRNG中的序列种子PRNG安全吗?   java如何使JTable列大小与内容精确(或紧密)匹配?   java Android textview具有两种不同大小的文本   java在任意事物的列表(数组)中创建关联的最佳方法是什么?   java保存可扩展字符串?   java成员类(内部类)如何访问外部类的实例变量?   java使用Android 6.0(API级别23)使用rest的最佳方式是什么   java为什么我会收到“学习记录”。Student@25a43blb'尝试显示链接列表中的所有对象时?   java如何将SVG文本转换为SVG路径?   java Paypal返回URL参数支付状态   java Libgdx:导出到可运行Jar   java JPA获取连接实体的最小/最大属性   附加到类型变量的java编号?   java Object[]到底是什么?   java如何在安卓中的片段和活动之间共享数据   java使用MinGW为windows构建linux库   java将变量值传递给eval函数   java仅在转换完成时使方法返回   Java二维数组对角线