Skip to content

brentp/fastahack-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastaHack

python/cython wrapper for fastahack library The c++ library, fastahack, reads .fai files files for an index, as created by e.g. samtools and the fastahack commandline interface. Currently, the index (chr => (position, line length)) is read into memory.

>>> from fastahack import FastaHack
>>> f = FastaHack('fastahack/tests/correct.fasta')
>>> f['1:1-10']
'TAACCCTAAC'
>>> f.get_sub_sequence('1', 0, 10)
'TAACCCTAACC'
>>> f.get_sequence('1')[1:11]
'AACCCTAACC'
>>> f.get_sequence_length('1')
630L
>>> f.names
['1', '2', '3']

Installation

If python setup.py install gives an error, you may need to run cython fastahack/cfastahack.pyx

About

cython wrapper to fastahack

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published