biostuff /

Filename Size Date modified Message
55 B
323 B
2.2 KB



find runs (non-randomness) in sequences

>>> from skidmarks import gap_test, wald_wolfowitz, auto_correlation, serial_test
>>> serial_test('110000000000000111111111111')
{'chi': 18.615384615384617, 'p': 0.00032831021826061683}


fast Needleman-Wunsch global alignment in cython. command-line and python usage

>>> import nwalign as nw
>>> nw.global_align("CEELECANTH", "PELICAN", matrix='PAM250')


pythonic access to fasta sequence files

>>> from pyfasta import Fasta
>>> f = Fasta('some.fasta')
>>> f.keys()
['chr1', 'chr2', 'chr3']

>>> f['chr1'][10:20]


pytables wrapper for easy access to s structured data.

>>> class ATable(SimpleTable):
...     x = tables.Float32Col()
...     y = tables.Float32Col()
...     name = tables.StringCol(16)

>>> tbl = ATable('test_docs.h5', 'atable1')

# insert as with pytables.
>>> row = tbl.row
>>> for i in range(50):
...    row['x'], row['y'] = i, i * 10
...    row['name'] = "name_%i" % i
...    row.append()
>>> tbl.flush()

#access the entire array via the numpy array interface
>>> import numpy as np
>>> np.asarray(tbl)

#query the data (query() alias of tables' readWhere()
>>> tbl.query('(x > 4) & (y < 70)') #doctest: +NORMALIZE_WHITESPACE
array([('name_5', 5.0, 50.0), ('name_6', 6.0, 60.0)],
    dtype=[('name', '|S16'), ('x', '<f4'), ('y', '<f4')])
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.