Name | spritefridge JSON |
Version |
1.3.4
JSON |
| download |
home_page | None |
Summary | A python toolbox for processing SPRITE-seq within the cooler universe |
upload_time | 2025-01-19 12:59:35 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | MIT License Copyright (c) 2024 Daniel Malzl Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
bioinformatics
sprite sequencing
sequencing
ngs
cooler
barcode extraction
pairs file generation
4dn
3d genome
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# spritefridge
A python toolbox for processing SPRITEseq data
## Installation
To be able to run everything correctly we need a few prerequisits installed especially bedtools.
Furthermore, at the time of writing this some dependencies refused to compile when installing with pip (`krbalancing`).
Installing these is easiest done using conda. For convenience we provide an environment file (`env.yml`) with this package
Installation thus works like
```
conda env create -f env.yml
conda activate sprite
pip install spritefridge
```
## Usage
`spritefridge` comprises five tools to process and annotate SPRITE-seq data and results. Below are some example commands. For more details please
refer to the generated help messages `spritefridge <subcommand> -h`
### extractbc
`extractbc` aims to extract barcodes from reads according to a list of used barcodes and barcode layouts (i.e. how the barcodes are aranged in read sequence)
A typical command looks like this
```
spritefridge extractbc \
-r1 r1.fq.gz \
-r2 r2.fq.gz \
-bc barcodes.tsv \
-l1 DPM \
-l2 'Y|SPACER|ODD|SPACER|EVEN|SPACER|ODD' \
-m 'DPM:0,Y:0,EVEN:2,ODD:2' \
-o out.bcextract.fq.gz \
-p 4
```
This command will read in the barcodes and the try to find barcodes in the respective read sequence in the order given by the layouts starting from 5' end.
`-m` gives the allowed mismatches for the barcode identification. In addition to `out.bcextract.fq.gz` which contains reads with the extracted barcodes appended to their names, the tool also outputs statistics for how many reads were found with 1, 2, 3, ... barcodes. `-p` specifies the number of processes to use for extraction.
### pairs
`pairs` identifies barcode clusters from aligned reads and writes them into pairs files for each cluster size
```
spritefridge pairs \
-b in.bam \
-o pairs/out \
-cl 2 \
-ch 1000 \
--separator '['
```
This command will read in alignments from `in.bam` (needs to be filtered for multimappers and quality) groups the reads by barcodes and then writes all possible pairs for each cluster of sizes between 2 and 1000 reads to a file named `pairs/out_<clustersize>.pairs`. This tool also outputs a dedicated bedfile containing all reads from each cluster to be used to annotated the Cooler bins later on (see `annotate`)
### combine
`combine` merges cool files generated from cluster pairs files according to the SPRITE-seq recommendation by multiplying the counts of each Cooler by 2/n,
where n is the cluster size, before merging. The cluster size is inferred from the file name which needs to be of the pattern `<name>_<clustersize>.cool`
```
spritefridge combine \
-i coolers/* \
-o merged.cool \
--floatcounts
```
`--floatcounts` ensures that merged counts are stored as float and not be casted to int
### annotate
`annotate` takes in a bedfile (see `pairs`) and annotated each bin with the overlapping reads of each cluster.
```
spritefridge annotate \
-i merged.mcool \
-b clusters.bed
```
`merged.mcool` is a zoomified version of the `merged.cool` file
### balance
`balance` is used to balance the contact matrices of the resulting mcool file using iterative correction and Knight-Ruiz matrix balancing
genomewide and per chromosome
```
spritefridge balance \
-m testdata/sprite.new.mcool \
-p 2 \
--overwrite
```
`-p` specifies the number of processes to use for iterative correction and `--overwrite` will overwrite any existing weights with the same name in the Cooler
Raw data
{
"_id": null,
"home_page": null,
"name": "spritefridge",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "bioinformatics, SPRITE sequencing, sequencing, NGS, cooler, barcode extraction, pairs file generation, 4DN, 3D genome",
"author": null,
"author_email": "Daniel Malzl <daniel@menchelab.com>",
"download_url": "https://files.pythonhosted.org/packages/ca/c4/24ade4e961fe459c7affa06158fb0770132faa59efd15726c7de81b8fd29/spritefridge-1.3.4.tar.gz",
"platform": null,
"description": "# spritefridge\nA python toolbox for processing SPRITEseq data\n\n## Installation\nTo be able to run everything correctly we need a few prerequisits installed especially bedtools. \nFurthermore, at the time of writing this some dependencies refused to compile when installing with pip (`krbalancing`).\nInstalling these is easiest done using conda. For convenience we provide an environment file (`env.yml`) with this package\nInstallation thus works like\n```\nconda env create -f env.yml\nconda activate sprite\npip install spritefridge\n```\n\n## Usage\n`spritefridge` comprises five tools to process and annotate SPRITE-seq data and results. Below are some example commands. For more details please\nrefer to the generated help messages `spritefridge <subcommand> -h`\n\n### extractbc\n`extractbc` aims to extract barcodes from reads according to a list of used barcodes and barcode layouts (i.e. how the barcodes are aranged in read sequence)\nA typical command looks like this\n```\nspritefridge extractbc \\\n -r1 r1.fq.gz \\\n -r2 r2.fq.gz \\\n -bc barcodes.tsv \\\n -l1 DPM \\\n -l2 'Y|SPACER|ODD|SPACER|EVEN|SPACER|ODD' \\\n -m 'DPM:0,Y:0,EVEN:2,ODD:2' \\\n -o out.bcextract.fq.gz \\\n -p 4\n```\nThis command will read in the barcodes and the try to find barcodes in the respective read sequence in the order given by the layouts starting from 5' end.\n`-m` gives the allowed mismatches for the barcode identification. In addition to `out.bcextract.fq.gz` which contains reads with the extracted barcodes appended to their names, the tool also outputs statistics for how many reads were found with 1, 2, 3, ... barcodes. `-p` specifies the number of processes to use for extraction.\n\n### pairs\n`pairs` identifies barcode clusters from aligned reads and writes them into pairs files for each cluster size\n```\nspritefridge pairs \\\n -b in.bam \\\n -o pairs/out \\\n -cl 2 \\\n -ch 1000 \\\n --separator '['\n```\nThis command will read in alignments from `in.bam` (needs to be filtered for multimappers and quality) groups the reads by barcodes and then writes all possible pairs for each cluster of sizes between 2 and 1000 reads to a file named `pairs/out_<clustersize>.pairs`. This tool also outputs a dedicated bedfile containing all reads from each cluster to be used to annotated the Cooler bins later on (see `annotate`)\n\n### combine\n`combine` merges cool files generated from cluster pairs files according to the SPRITE-seq recommendation by multiplying the counts of each Cooler by 2/n,\nwhere n is the cluster size, before merging. The cluster size is inferred from the file name which needs to be of the pattern `<name>_<clustersize>.cool`\n```\nspritefridge combine \\\n -i coolers/* \\\n -o merged.cool \\\n --floatcounts\n```\n`--floatcounts` ensures that merged counts are stored as float and not be casted to int\n\n### annotate\n`annotate` takes in a bedfile (see `pairs`) and annotated each bin with the overlapping reads of each cluster.\n```\nspritefridge annotate \\\n -i merged.mcool \\\n -b clusters.bed\n```\n`merged.mcool` is a zoomified version of the `merged.cool` file\n\n### balance\n`balance` is used to balance the contact matrices of the resulting mcool file using iterative correction and Knight-Ruiz matrix balancing\ngenomewide and per chromosome\n```\nspritefridge balance \\\n -m testdata/sprite.new.mcool \\\n -p 2 \\\n --overwrite\n```\n`-p` specifies the number of processes to use for iterative correction and `--overwrite` will overwrite any existing weights with the same name in the Cooler\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 Daniel Malzl Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "A python toolbox for processing SPRITE-seq within the cooler universe",
"version": "1.3.4",
"project_urls": {
"Homepage": "https://github.com/dmalzl/spritefridge"
},
"split_keywords": [
"bioinformatics",
" sprite sequencing",
" sequencing",
" ngs",
" cooler",
" barcode extraction",
" pairs file generation",
" 4dn",
" 3d genome"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d3ccb41e9951e3973c48739229bd78820080c474e44c604c74c9526a1b064459",
"md5": "c5719dc1ec412673d565dc353cf6e962",
"sha256": "7317d9f0069f09349d9f0a48edd0aa6225207ddce961b5b9949e91af4c18b6e4"
},
"downloads": -1,
"filename": "spritefridge-1.3.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c5719dc1ec412673d565dc353cf6e962",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 25216,
"upload_time": "2025-01-19T12:59:34",
"upload_time_iso_8601": "2025-01-19T12:59:34.658606Z",
"url": "https://files.pythonhosted.org/packages/d3/cc/b41e9951e3973c48739229bd78820080c474e44c604c74c9526a1b064459/spritefridge-1.3.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "cac424ade4e961fe459c7affa06158fb0770132faa59efd15726c7de81b8fd29",
"md5": "82cb6b96abb17a39161467795c70b94c",
"sha256": "9e0dbd301c09d97b7bc8069dc5e6fe976857137f48aa70e5714b666c73ab1273"
},
"downloads": -1,
"filename": "spritefridge-1.3.4.tar.gz",
"has_sig": false,
"md5_digest": "82cb6b96abb17a39161467795c70b94c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 20724,
"upload_time": "2025-01-19T12:59:35",
"upload_time_iso_8601": "2025-01-19T12:59:35.733530Z",
"url": "https://files.pythonhosted.org/packages/ca/c4/24ade4e961fe459c7affa06158fb0770132faa59efd15726c7de81b8fd29/spritefridge-1.3.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-19 12:59:35",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "dmalzl",
"github_project": "spritefridge",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "spritefridge"
}