Bioinformatics Programming Using Python

发布时间:2019-08-05 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了Bioinformatics Programming Using Python脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。

Bioinformatics PRogramming Using Python

Chapter 6

Working wITh Text: textwrap

# Returns a copy of the string text with whitespace common to all of its lines re- moved
textwrap.dedent(text)

## useful in dealing with FASTA files
# break up seq to a list of 80-line strings 
textwrap.wrap(seq, 80)

# insert newlines every 80 characters
textwrap.fill(seq, 80)

PErsistent Storage

The dbm module provides an interface to the Unix “(n)dbm” library. Dbm objects behave like mappings (dictionaries), except that keys and values are always strings.

  • 'r' Open existing database for reading only (default)
  • 'w' Open existing database for reading and writing
  • 'c' Open database for reading and writing, creating it if it doesn’t exist
  • 'n' Always create a new, empty database, open for reading and writing

脚本宝典总结

以上是脚本宝典为你收集整理的Bioinformatics Programming Using Python全部内容,希望文章能够帮你解决Bioinformatics Programming Using Python所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。