{ "info": { "author": "Tjelvar Olsson", "author_email": "tjelvar.olsson@jic.ac.uk", "bugtrack_url": null, "classifiers": [], "description": "dtool CLI commands for working with per item metadata\n=====================================================\n\n.. image:: https://badge.fury.io/py/dtool-overlay.svg\n :target: http://badge.fury.io/py/dtool-overlay\n :alt: PyPi package\n\n.. image:: https://travis-ci.org/jic-dtool/dtool-overlay.svg?branch=master\n :target: https://travis-ci.org/jic-dtool/dtool-overlay\n :alt: Travis CI build status (Linux)\n\n.. image:: https://codecov.io/github/jic-dtool/dtool-overlay/coverage.svg?branch=master\n :target: https://codecov.io/github/jic-dtool/dtool-overlay?branch=master\n :alt: Code Coverage\n\nInstallation\n------------\n\n::\n\n pip install dtool-overlay\n\nExample usage\n-------------\n\nGet a dataset to play with::\n\n LOCAL_DS_URI=$(dtool cp -q http://bit.ly/Ecoli-ref-genome .)\n\nShow the existing overlays::\n\n $ dtool overlays show $LOCAL_DS_URI\n identifiers,relpaths\n 23ebd7cd21a905d5f255919ca1d0491901cb8718,reference.4.bt2\n 37e2d68bb38271036d96b6979d24666e0d4fd814,reference.rev.1.bt2\n 41fb9ae5d4f6c37226ff324c701b84bc3110709e,reference.1.bt2\n 828ebf503926b7c1b8b07c1995b4ca818814b404,reference.rev.2.bt2\n b445ff5a1e468ab48628a00a944cac2e007fb9bc,U00096.3.fasta\n d21454a7338c53eabc8d8ed7c2f9c3ff4585c4cf,reference.3.bt2\n dda8452b346d51b9cf60f0662ef3d6e3b6da2e74,reference.2.bt2\n\nThe output above show that there are no overlays on this dataset. (The\n\"identifiers\" and \"relpaths\" columns are there for bookkeeping).\n\nCreate a \"is_fasta\" boolean overlay template by using a glob pattern::\n\n $ dtool overlays template glob $LOCAL_DS_URI is_fasta '*.fasta' > is_fasta.csv\n $ cat is_fasta.csv\n identifiers,is_fasta,relpaths\n 23ebd7cd21a905d5f255919ca1d0491901cb8718,False,reference.4.bt2\n 37e2d68bb38271036d96b6979d24666e0d4fd814,False,reference.rev.1.bt2\n 41fb9ae5d4f6c37226ff324c701b84bc3110709e,False,reference.1.bt2\n 828ebf503926b7c1b8b07c1995b4ca818814b404,False,reference.rev.2.bt2\n b445ff5a1e468ab48628a00a944cac2e007fb9bc,True,U00096.3.fasta\n d21454a7338c53eabc8d8ed7c2f9c3ff4585c4cf,False,reference.3.bt2\n dda8452b346d51b9cf60f0662ef3d6e3b6da2e74,False,reference.2.bt2\n\nWrite the overlay template to the dataset::\n\n $ dtool overlays write $LOCAL_DS_URI is_fasta.csv\n \nShow the newly created overlay::\n\n $ dtool overlays show $LOCAL_DS_URI\n identifiers,is_fasta,relpaths\n 23ebd7cd21a905d5f255919ca1d0491901cb8718,False,reference.4.bt2\n 37e2d68bb38271036d96b6979d24666e0d4fd814,False,reference.rev.1.bt2\n 41fb9ae5d4f6c37226ff324c701b84bc3110709e,False,reference.1.bt2\n 828ebf503926b7c1b8b07c1995b4ca818814b404,False,reference.rev.2.bt2\n b445ff5a1e468ab48628a00a944cac2e007fb9bc,True,U00096.3.fasta\n d21454a7338c53eabc8d8ed7c2f9c3ff4585c4cf,False,reference.3.bt2\n dda8452b346d51b9cf60f0662ef3d6e3b6da2e74,False,reference.2.bt2\n\nTo extract multiple pieces of metadata from the items' relpath one can use the\n``dtool overlays template parse`` command. This takes as input a dataset URI, a\nparse rule (see https://pypi.org/project/parse/ for more details) and a glob\nrule. The latter decides which relpaths to apply the parsing to.\n\nConsider for example the dataset below::\n\n $ dtool ls http://bit.ly/Ecoli-reads-minified\n 8bda245a8cd526673aab775f90206c8b67d196af ERR022075_2.fastq.gz\n 9760280dc6313d3bb598fa03c5931a7f037d7ffc ERR022075_1.fastq.gz\n\n\nThe command below could be used to generate a template for the overlays\n\"useful_name\" and \"read\"::\n\n $ dtool overlays template parse \\\n http://bit.ly/Ecoli-reads-minified \\\n '{useful_name}_{read:d}.fastq.gz'\n\nResults in the CSV output below::\n\n identifiers,read,useful_name,relpaths\n 8bda245a8cd526673aab775f90206c8b67d196af,2,ERR022075,ERR022075_2.fastq.gz\n 9760280dc6313d3bb598fa03c5931a7f037d7ffc,1,ERR022075,ERR022075_1.fastq.gz\n\nTo ignore a variable element when parsing one can use unnamed curly braces. The\ncommand below for example only generates the overlay \"useful_name\"::\n\n $ dtool overlays template parse \\\n http://bit.ly/Ecoli-reads-minified \\\n '{useful_name}_{:d}.fastq.gz'\n identifiers,useful_name,relpaths\n 8bda245a8cd526673aab775f90206c8b67d196af,ERR022075,ERR022075_2.fastq.gz\n 9760280dc6313d3bb598fa03c5931a7f037d7ffc,ERR022075,ERR022075_1.fastq.gz\n\n \nSometimes it is useful to be able to find pairs of items. For example when\ndealing with genomic sequencing data that has forward and reverse reads.\n\nOne can create a \"pair_id\" overlay CSV template for this dataset using the\ncommand below::\n\n $ dtool overlays template pairs http://bit.ly/Ecoli-reads-minified .fastq.gz\n identifiers,pair_id,relpaths\n 8bda245a8cd526673aab775f90206c8b67d196af,9760280dc6313d3bb598fa03c5931a7f037d7ffc,ERR022075_2.fastq.gz\n 9760280dc6313d3bb598fa03c5931a7f037d7ffc,8bda245a8cd526673aab775f90206c8b67d196af,ERR022075_1.fastq.gz\n\nIn the above the suffix \".fastq.gz\" is used to extract the prefix ``ERR022075_``\nthat is used to find matching pairs.\n\n\nRelated packages\n----------------\n\n- `dtoolcore `_\n- `dtool-cli `_\n- `dtool-create `_\n", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/jic-dtool/dtool-overlay/tarball/0.3.0", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jic-dtool/dtool-overlay", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "dtool-overlay", "package_url": "https://pypi.org/project/dtool-overlay/", "platform": "", "project_url": "https://pypi.org/project/dtool-overlay/", "project_urls": { "Download": "https://github.com/jic-dtool/dtool-overlay/tarball/0.3.0", "Homepage": "https://github.com/jic-dtool/dtool-overlay" }, "release_url": "https://pypi.org/project/dtool-overlay/0.3.0/", "requires_dist": null, "requires_python": "", "summary": "dtool CLI utilities for working with per item metadata", "version": "0.3.0" }, "last_serial": 5821263, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "f1818b3aef87ca1b584b070640a34304", "sha256": "de601eac3028a8134cf1f3d7fdb51e146cafec157af37a4d0f3a23599a70ba7a" }, "downloads": -1, "filename": "dtool-overlay-0.1.0.tar.gz", "has_sig": false, "md5_digest": "f1818b3aef87ca1b584b070640a34304", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5694, "upload_time": "2019-09-04T13:16:46", "url": "https://files.pythonhosted.org/packages/e6/31/ec8b24723e668ad8a17c245821a2dbfd8ac2a208c2b28ce12ea3092d29f0/dtool-overlay-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "51e78fcc0f85624266454f0d0f816be1", "sha256": "7f5bcb5e8810af5f3319fbd7429d9a64777651d9c9d7ac55b0e8ae1a48c54c29" }, "downloads": -1, "filename": "dtool-overlay-0.2.0.tar.gz", "has_sig": false, "md5_digest": "51e78fcc0f85624266454f0d0f816be1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5999, "upload_time": "2019-09-06T09:02:03", "url": "https://files.pythonhosted.org/packages/4e/bb/09efb5e097322ed9ab1f2ed0e41c00849c60f8930552ba53a5d31dd68332/dtool-overlay-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "6413dd9e2f0b3890b6546b249a149b07", "sha256": "0d33df8cd45a786ce93b551a3f37be039e1ce13c04c278cfbbede88f4add2ba8" }, "downloads": -1, "filename": "dtool-overlay-0.3.0.tar.gz", "has_sig": false, "md5_digest": "6413dd9e2f0b3890b6546b249a149b07", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6137, "upload_time": "2019-09-12T15:57:51", "url": "https://files.pythonhosted.org/packages/88/6b/eb87d9d8c86f782ab9e9d66ad95c18863aa7a5e3262b74f5e4b66a260777/dtool-overlay-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6413dd9e2f0b3890b6546b249a149b07", "sha256": "0d33df8cd45a786ce93b551a3f37be039e1ce13c04c278cfbbede88f4add2ba8" }, "downloads": -1, "filename": "dtool-overlay-0.3.0.tar.gz", "has_sig": false, "md5_digest": "6413dd9e2f0b3890b6546b249a149b07", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6137, "upload_time": "2019-09-12T15:57:51", "url": "https://files.pythonhosted.org/packages/88/6b/eb87d9d8c86f782ab9e9d66ad95c18863aa7a5e3262b74f5e4b66a260777/dtool-overlay-0.3.0.tar.gz" } ] }