{"id":23361,"library":"bio-grumpy","title":"bio-grumpy","description":"Grumpy is a Python library for genomic manipulation, reimplemented in Rust for performance. It provides tools for working with VCF, FASTA, and GenBank files, including slicing, filtering, and reverse complement operations. Current version is 1.1.4, supporting Python >=3.8, <3.13. Release cadence is irregular, with several bug fix releases in 2024-2025.","status":"active","version":"1.1.4","language":"python","source_language":"en","source_url":"https://github.com/oxfordmmm/grumpy","tags":["bioinformatics","genomics","rust","vcf","genbank"],"install":[{"cmd":"pip install bio-grumpy","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"Typical usage imports the Grumpy class, not the module directly.","wrong":"import grumpy","symbol":"Grumpy","correct":"from grumpy import Grumpy"},{"note":"get_sequence is exposed at the top level, not in a submodule.","wrong":"from grumpy.sequence import get_sequence","symbol":"get_sequence","correct":"from grumpy import get_sequence"}],"quickstart":{"code":"from grumpy import Grumpy\nfrom pathlib import Path\n\n# Initialize with a GenBank file\ngrumpy = Grumpy(Path('example.gb'))\n\n# Get sequence slice\nseq = grumpy.get_sequence(100, 200)\nprint(seq)\n\n# Check if VCF filter works\nvcf_path = Path('input.vcf')\nfiltered = grumpy.filter_vcf(vcf_path, min_quality=30)\nprint(len(filtered))","lang":"python","description":"Basic usage: create a Grumpy object from a GenBank file, extract a sequence slice, and demonstrate VCF filtering. Requires Python 3.8+ and a GenBank file."},"warnings":[{"fix":"Use Python 3.8 to 3.12.","message":"Python 3.13 not supported: requires Python <3.13.0a0, so cannot install on Python 3.13+.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Use Linux or macOS, or run in a Docker container. For advanced users, compile from source with Rust toolchain.","message":"Windows wheels removed starting from v1.1.0: library only available on Linux and macOS. Attempting pip install on Windows may fail or require building from source.","severity":"gotcha","affected_versions":">=1.1.0"},{"fix":"Review GenBank files for non-standard locations. If reproducibility is critical, pin to v1.0.1.","message":"GenBank location parsing changed in v1.1.0, which may break existing code that relied on older parsing behavior.","severity":"gotcha","affected_versions":">=1.1.0"},{"fix":"Upgrade to >=0.2.6 and adapt any VCF filtering scripts that depend on null call behaviour.","message":"VCF null calls handling changed in v0.2.6: filter behavior differs. Ensure VCF filtering logic accounts for null calls.","severity":"gotcha","affected_versions":"<0.2.6"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install bio-grumpy' and then use 'import grumpy'.","cause":"Library is installed as 'bio-grumpy' but imported as 'grumpy'. If installed with pip install bio-grumpy, the import is 'grumpy' - ensure the package is correctly installed.","error":"ModuleNotFoundError: No module named 'grumpy'"},{"fix":"Use 'from grumpy import get_sequence' directly.","cause":"Trying to import from a submodule that does not exist.","error":"ImportError: cannot import name 'get_sequence' from 'grumpy' (unknown location)"},{"fix":"Use Linux/macOS or compile from source. See https://github.com/oxfordmmm/grumpy for build instructions.","cause":"Trying to install on Windows without precompiled wheels (removed in v1.1.0) or on unsupported architecture.","error":"RuntimeError: Grumpy binary not compiled for this platform"},{"fix":"Preprocess GenBank files to ensure locations are standard, or pin grumpy to v1.0.1 (pip install bio-grumpy==1.0.1).","cause":"GenBank files with non-standard locations may fail after the parsing change in v1.1.0.","error":"ValueError: Invalid GenBank location string"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}