用于制作和跟踪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使Eclipse在其控制台中显示最顶层的异常,而不是完整的堆栈跟踪   java如何为一个组件提供多个DropTargetListener?   在Eclipse包资源管理器中,有些文件不可见?   java在Spring Boot中使用@Bean配置设置类属性的默认值   在JTextPane中使用#链接的Java HTML?   java当应用程序打开时,如何将通知内容发送给活动?   java Android ROOM如何编写包含多个实体的查询,这是在哪里完成的?   Play Framework的java登录/注销问题?   java如何从安卓 Cordova/Phonegap调用javascript函数   JavaFX8如何在Java8中显示上次修改的LocalDateTime?   javabean验证中的多个约束注释   java使用JSTL设置请求属性   java在Android启动的服务中调用函数   用于检查xml是否包含键和值的java XPath表达式   在java游戏中使用斜坡因子挥杆   Java文件:尝试使用FileWriter将结果附加到已经存在的文件中   bootclasspath Java Xbootclasspath,相对路径   java我如何让这个“怪物战斗模拟器”工作?   swing使用动作侦听器隐藏和显示java桌面应用程序