{ "info": { "author": "Andrew Rambaut and Aine O Toole", "author_email": "a.rambaut@ed.ac.uk", "bugtrack_url": null, "classifiers": [], "description": "# BinLorry\n\nBinLorry is a flexible tool for binning and filtering sequencing reads into distinct files. Reads can be binned and filtered by any attributes encoded in their headers, documented in a CSV file or by length.\n\n## Installing\n\nSimply install with pip:\n\n```\npip3 install binlorry\n```\n\nRun:\n```\nbinlorry --help\n```\n\n### Install from repository\n\nClone the repository:\n```\ngit clone https://github.com/rambaut/binlorry.git\n```\n\nInstall:\n```\npip3 install ./binlorry\n```\n\n### Run without installation\n\nBinLorry can also be run directly from the repository clone, without installation:\n```\ngit clone https://github.com/rambaut/binlorry.git\npython binlorry/binlorry-runner.py -h\n```\nHowever, ensure that the ``pandas`` package is installed before use.\n\n\n## Quick Usage Examples\n\n```\nbinlorry -i reads/ -o barcode --bin-by barcode --filter-by barcode BC01 BC02 -n 550 -x 750\n```\n\nThis would read all FASTQ or FASTA files in the directory `reads`, bin by the header field `barcode`, but only if this is `BC01` or `BC02` and if the length is between 550 and 750 nucleotides.\nIt would use the file name prefix `barcode` resulting in the files: `barcode_BC01.fastq` and `barcode_BC02.fastq`\n\n```\nbinlorry -i my_file.fastq -t my_file.csv --out-report -o filtered --filter-by reference Type_1 -n 550 -x 750\n```\n\nThe above example will take in reads from ``my_file.fastq`` and a csv report ``my_file.csv``. Assuming that ``my_file.csv`` has at least the structure shown below, and that the read names in the csv match those in the input read file, BinLorry will filter reads and output only those with Type_1 reference between 550 and 750 bases in length.\n\n| read_name | reference | \n|:--------------------------------------|-----------:| \n| f66db89e-de96-4fa7-813a-6c5a89586100 | Type_1 | \n| a39069c5-c493-45f8-9fa8-49eccb5c1807 | Type_1 | \n| 868efa99-f4c1-4a68-87a9-196a44b997e0 | Type_2 | \n\n\n```\nbinlorry -i path/to/my_fastq_dir -t path/to/my_csv_dir \\\n--out-report -o path/to/binned/barcode \\\n--filter-by barcode BC01 --bin-by barcode -n 1000 -x 2000\n```\n\nAssuming you have reports in the csv dir corresponding to the read files in the fastq dir, binlorry will recursively search both directories, matching the csv and fastq files based on filename stem. This command will then filter reads only containing BC01 and output a csv report corresponding to the reads presented in the output fastq file.\n\n## Command line interface\n```\nusage: binlorry -i INPUT [-t CSV_FILE] -o OUTPUT [-v VERBOSITY]\n [--bin-by FIELD [FIELD ...]]\n [--filter-by FILTER [FILTER ...]] [-n MIN] [-x MAX]\n [-h] [--version]\n\nMain options:\n -i INPUT, --input INPUT\n FASTA/FASTQ of input reads or a directory which will\n be recursively searched for FASTQ files (required)\n -t INPUT_CSV, --index-table INPUT_CSV\n A CSV file with metadata fields for reads (otherwise these are assumed\n to be in the read headers). This can also include a file and line number to improve performance. Assumes read name is first column of the csv.'\n -o OUTPUT, --output OUTPUT\n Output filename (or filename prefix)\n -r REPORT, --out-report REPORT\n Output a subsetted csv report along with the fastq. (Default: False)\n Only implemented for use in conjunction with -t option.\n -f FORCE_OUTFILES, --force-output FORCE_OUTFILES\n Output binned/ filtered files even if empty. (default: False)\n Usage: only a single binning factor with a corresponding filter factor.\n -v VERBOSITY, --verbosity VERBOSITY\n Level of progress information: 0 = none, 1 = some, 2\n = lots, 3 = full - output will go to stdout if reads\n are saved to a file and stderr if reads are printed\n to stdout (default: 1)\n\nBinning/Filtering options:\n --bin-by FIELD [FIELD ...]\n Specify header field(s) to bin the reads by. For\n multiple fields these will be nested in order\n specified.\n --filter-by FILTER [FILTER ...]\n Specify header field and accepted values to filter\n the reads by. Multiple filter-by options can be\n specified.\n -n MIN, --min-length MIN\n Filter the reads by their length, specifying the\n minimum length.\n -x MAX, --max-length MAX\n Filter the reads by their length, specifying the\n maximum length.\n\nHelp:\n -h, --help Show this help message and exit\n --version Show program's version number and exit\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/rambaut/binlorry", "keywords": "", "license": "GPL", "maintainer": "", "maintainer_email": "", "name": "binlorry", "package_url": "https://pypi.org/project/binlorry/", "platform": "", "project_url": "https://pypi.org/project/binlorry/", "project_urls": { "Homepage": "http://github.com/rambaut/binlorry" }, "release_url": "https://pypi.org/project/binlorry/1.1.0/", "requires_dist": [ "pandas" ], "requires_python": "", "summary": "BinLorry: a flexible tool for binning and filtering sequencing reads", "version": "1.1.0" }, "last_serial": 5713945, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "7280b5940d8487824dc737d181d2b40c", "sha256": "e875c888879e77deedc14c22121390429f753997c04bfe6b1bc07b05c93b961f" }, "downloads": -1, "filename": "binlorry-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "7280b5940d8487824dc737d181d2b40c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 25944, "upload_time": "2019-08-14T11:23:09", "url": "https://files.pythonhosted.org/packages/0d/44/dd9f30055af495c61dc9dcc4e744bf16d7755c77b4a5b92e9fc7451675c8/binlorry-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bc418167ffc5b01b592b9970e914589e", "sha256": "298cc3b66630e6059ba18b70f04c864afcdb6ebd2d5a9574c32a5dc04a48de40" }, "downloads": -1, "filename": "binlorry-0.1.0.tar.gz", "has_sig": false, "md5_digest": "bc418167ffc5b01b592b9970e914589e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26834, "upload_time": "2019-08-14T11:23:12", "url": "https://files.pythonhosted.org/packages/3e/57/3c88e9ebc53648d5b9c762951063243252bf55cf6fe26dca8e9e696ba3f8/binlorry-0.1.0.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "1974ff128baa718748e5c8d52074f87c", "sha256": "46506ea838787f9586c9eb974ba07ac9657bfba8205f90915ab7e94884107bc4" }, "downloads": -1, "filename": "binlorry-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "1974ff128baa718748e5c8d52074f87c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 25932, "upload_time": "2019-08-16T11:30:13", "url": "https://files.pythonhosted.org/packages/1b/4e/0f0e825daa4881be18380c06dc2e3ce4c2d9754ce3268c37c280c1d6a1a2/binlorry-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "de5e05b862ff278ddf49ba104a08ba87", "sha256": "cdf57e833a8203d4e7afe8e0b31df4f75d062dc9f4e620ff318fdf9beca43887" }, "downloads": -1, "filename": "binlorry-1.0.0.tar.gz", "has_sig": false, "md5_digest": "de5e05b862ff278ddf49ba104a08ba87", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26032, "upload_time": "2019-08-16T11:30:15", "url": "https://files.pythonhosted.org/packages/33/ed/4910c213d4f30a670b6b036dae3c4627fd866b4981427125f20054888455/binlorry-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "e4547a045475b062b5ae358192642fc3", "sha256": "98986bb38f73263c8359348a36c87c114ec81b258395b76e722556cee74e0851" }, "downloads": -1, "filename": "binlorry-1.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e4547a045475b062b5ae358192642fc3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 25701, "upload_time": "2019-08-22T08:37:49", "url": "https://files.pythonhosted.org/packages/ae/1c/9250d1d3f208c29e0bc50872cb8df60e47e5b39d54709f29abe5463ca9c3/binlorry-1.1.0-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e4547a045475b062b5ae358192642fc3", "sha256": "98986bb38f73263c8359348a36c87c114ec81b258395b76e722556cee74e0851" }, "downloads": -1, "filename": "binlorry-1.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e4547a045475b062b5ae358192642fc3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 25701, "upload_time": "2019-08-22T08:37:49", "url": "https://files.pythonhosted.org/packages/ae/1c/9250d1d3f208c29e0bc50872cb8df60e47e5b39d54709f29abe5463ca9c3/binlorry-1.1.0-py2.py3-none-any.whl" } ] }