NGLessPy: NGLess as a Python Embedded Language
This is a variation of NGLess as an embedded language in Python, thus enabling processing of next generation data through a Python API. See the example below.
This is very experimental and can change at any time. Please get in touch if you want to use it in your work. For questions, you can also use the ngless mailing list.
Dependencies
NGLesspy can auto-install ngless if it needs to.
NGLesspy is compatible with Python 2.7 and 3.4+.
Example
Inside the bin/ directory, you will find several simple scripts exposing NGLess functionality as command line tools. These are also simple examples of how NGLessPy can be used.
See the tutorial for a more thorough explanation of what is going on in the example below.
from ngless import NGLess
sc = NGLess.NGLess('0.8')
sc.import_('mocat', '0.0')
e = sc.env
e.sample = sc.load_mocat_sample_('testing')
@sc.preprocess_(e.sample, using='r')
def proc(bk):
bk.r = sc.substrim_(bk.r, min_quality=25)
e.mapped = sc.map_(e.sample, reference='hg19')
e.mapped = sc.select_(e.mapped, keep_if=['{mapped}'])
sc.write_(e.mapped, ofile='ofile.sam')
sc.run()
This is equivalent to the NGLess script
ngless '0.8'
import 'mocat' version '0.0'
sample = load_mocat_sample('testing')
preprocess_(sample) using='r':
r = substrim(r, min_quality=25)
mapped = map(sample, reference='hg19')
mapped = select(mapped, keep_if=[{mapped}])
write(mapped, ofile='ofile.sam')
Metadata
Release files for NGLessPy 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| NGLessPy-0.2.2.tar.gz | 11.1 kB | Without provenance | Details for NGLessPy-0.2.2.tar.gz |
Release files / NGLessPy-0.2.2.tar.gz
| Download URL | NGLessPy-0.2.2.tar.gz |
|---|---|
| Size | 11.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
42e3e5df393209c3e55d8d9d6e7b0ec20a20e391a43ff8add054a98bcec50290
|
|
BLAKE2b-256 checksum How to use checksums |
701a96757923b90d659189e9bfbc9ff3a86a0799664ef7029cf275ab708ffc4f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for NGLessPy 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.