{"id":25282486,"url":"https://github.com/ngless-toolkit/nglesspy","last_synced_at":"2025-04-06T13:19:39.318Z","repository":{"id":66806327,"uuid":"101777822","full_name":"ngless-toolkit/nglesspy","owner":"ngless-toolkit","description":"NGLess as a Python embedded language (experimental)","archived":false,"fork":false,"pushed_at":"2020-07-16T19:57:43.000Z","size":50,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-22T08:18:09.583Z","etag":null,"topics":["domain-specific-language","embedded-language","experimental","genomics","metagenomics","next-generation-sequencing","ngless","python","python-embedded-language"],"latest_commit_sha":null,"homepage":"http://ngless.embl.de","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ngless-toolkit.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-08-29T15:39:11.000Z","updated_at":"2020-07-16T19:57:46.000Z","dependencies_parsed_at":"2023-03-08T01:00:30.747Z","dependency_job_id":null,"html_url":"https://github.com/ngless-toolkit/nglesspy","commit_stats":null,"previous_names":["luispedro/nglesspy"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngless-toolkit%2Fnglesspy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngless-toolkit%2Fnglesspy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngless-toolkit%2Fnglesspy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngless-toolkit%2Fnglesspy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ngless-toolkit","download_url":"https://codeload.github.com/ngless-toolkit/nglesspy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247485355,"owners_count":20946408,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["domain-specific-language","embedded-language","experimental","genomics","metagenomics","next-generation-sequencing","ngless","python","python-embedded-language"],"created_at":"2025-02-12T19:34:34.886Z","updated_at":"2025-04-06T13:19:39.298Z","avatar_url":"https://github.com/ngless-toolkit.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NGLessPy: NGLess as a Python Embedded Language\n\nThis is a variation of [NGLess](http://ngless.embl.de) as an embedded language\nin Python, thus enabling processing of next generation data through a Python\nAPI. See the example below.\n\n[![Build Status](https://travis-ci.org/ngless-toolkit/nglesspy.svg?branch=master)](https://travis-ci.org/ngless-toolkit/nglesspy)\n[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/hyperium/hyper/master/LICENSE)\n\nThis is **very experimental** and can change at any time. Please [get in\ntouch](mailto:coelho@embl.de) if you want to use it in your work. For\nquestions, you can also use the [ngless mailing\nlist](https://groups.google.com/forum/#!forum/ngless).\n\n## Dependencies\n\n- [requests](http://docs.python-requests.org/)\n- [NGLess](http://ngless.embl.de)\n\nNGLesspy can auto-install ngless if it needs to.\n\nNGLesspy is compatible with Python 2.7 and 3.4+.\n\n## Example\n\n\nInside the [bin/](https://github.com/luispedro/nglesspy/tree/master/bin)\ndirectory, you will find several simple scripts exposing NGLess functionality\nas command line tools. These are also simple examples of how NGLessPy can be\nused.\n\nSee the [tutorial](http://ngless.embl.de/nglesspy.html) for a more thorough\nexplanation of what is going on in the example below.\n\n```python\n    from ngless import NGLess\n\n    sc = NGLess.NGLess('0.8')\n\n    sc.import_('mocat', '0.0')\n    e = sc.env\n\n    e.sample = sc.load_mocat_sample_('testing')\n\n    @sc.preprocess_(e.sample, using='r')\n    def proc(bk):\n        bk.r = sc.substrim_(bk.r, min_quality=25)\n\n    e.mapped = sc.map_(e.sample, reference='hg19')\n    e.mapped = sc.select_(e.mapped, keep_if=['{mapped}'])\n\n    sc.write_(e.mapped, ofile='ofile.sam')\n\n    sc.run()\n```\n\nThis is equivalent to the NGLess script\n\n\n    ngless '0.8'\n    import 'mocat' version '0.0'\n\n    sample = load_mocat_sample('testing')\n\n    sample = preprocess(sample) using='r':\n        r = substrim(r, min_quality=25)\n\n    mapped = map(sample, reference='hg19')\n    mapped = select(mapped, keep_if=[{mapped}])\n\n    write(mapped, ofile='ofile.sam')\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngless-toolkit%2Fnglesspy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fngless-toolkit%2Fnglesspy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngless-toolkit%2Fnglesspy/lists"}