Python bindings to scrappie basecaller
Scrappy provides a minimal python binding to some of the core functionality of the scrappie raw basecaller. The performance of scrappy should be comparable (if not essentially identical) to scrappie.
Scrappy is available on pypi. For linux it is available as a pre-compiled wheel, for MacOS the distribution will be built from source. Scrappy can be installed simply as:
pip install scrappie
Note the spelling! The above may fail on MacOS, due to various compiler and library versions which might be present. In this case please report an issue on github.
Building from the source is also supported, providing one has met the requirements for building the scrappie itself. It is recommended to first ensure scrappie builds cleanly before attempting to build it’s python counterpart. To build from the source, run:
pip install -r requirements python setup.py install
The second command may be modified as appropriate (perhaps by adding –user for non-root installations).
Scrappy directly exposes the key parts of scrappie’s “from raw” basecalling pipeline. The steps are:
- scrappy.trim_raw: attempt to remove data points corresponding to adapters,
- scrappy.scale_raw: perform a robust normalization of the data,
- scrappy.calc_post: calculate time-resolved label probabilties (“posterior probabilities”),
- scrappy.decode_post: a Viterbi decoding to obtain optimal base sequence.
The above is illustrated in scrappy.basecall_raw.
Additionally the squiggle simulation and alignment functionality is exposed via:
- scrappy.sequence_to_squiggle: simulate a squiggle from a base sequence,
- scrappy.map_signal_to_squiggle: align raw data to a simulated sequence.
After installation the scrappy program can be run to demonstrate the API’s function. The program takes one or more filepaths to .fast5 files and outputs FASTA formatted basecalls to stdout, e.g.:
scrappy file1.fast5 <file2.fast5> <file3.fast5> …
As with scrappie to achieve best performance it is recommended to disable threading in your BLAS library (this is true also if building an application using the API).
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size & hash SHA256 hash help||File type||Python version||Upload date|
|scrappie-1.4.1-cp27-cp27m-manylinux1_x86_64.whl (19.1 MB) Copy SHA256 hash SHA256||Wheel||cp27|
|scrappie-1.4.1-cp27-cp27mu-manylinux1_x86_64.whl (19.1 MB) Copy SHA256 hash SHA256||Wheel||cp27|
|scrappie-1.4.1-cp34-cp34m-manylinux1_x86_64.whl (19.1 MB) Copy SHA256 hash SHA256||Wheel||cp34|
|scrappie-1.4.1-cp35-cp35m-manylinux1_x86_64.whl (19.1 MB) Copy SHA256 hash SHA256||Wheel||cp35|
|scrappie-1.4.1-cp36-cp36m-manylinux1_x86_64.whl (19.1 MB) Copy SHA256 hash SHA256||Wheel||cp36|
|scrappie-1.4.1.tar.gz (24.0 MB) Copy SHA256 hash SHA256||Source||None|