{"id":20624873,"url":"https://github.com/danderson123/amira","last_synced_at":"2025-04-15T15:05:08.765Z","repository":{"id":261401681,"uuid":"572999296","full_name":"Danderson123/Amira","owner":"Danderson123","description":"A tool to detect acquired AMR genes directly from long read sequencing data.","archived":false,"fork":false,"pushed_at":"2025-04-10T17:06:16.000Z","size":15923,"stargazers_count":8,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-15T15:04:52.780Z","etag":null,"topics":["amr","assembly","bacteria","bacterial-genome-analysis","epidemiology","genotyping","graph"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Danderson123.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-01T13:40:28.000Z","updated_at":"2025-03-25T13:58:28.000Z","dependencies_parsed_at":"2024-11-06T11:44:36.337Z","dependency_job_id":"fb1632b9-d396-45f5-aa44-556e34e51296","html_url":"https://github.com/Danderson123/Amira","commit_stats":null,"previous_names":["danderson123/amira"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Danderson123%2FAmira","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Danderson123%2FAmira/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Danderson123%2FAmira/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Danderson123%2FAmira/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Danderson123","download_url":"https://codeload.github.com/Danderson123/Amira/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249094932,"owners_count":21211837,"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":["amr","assembly","bacteria","bacterial-genome-analysis","epidemiology","genotyping","graph"],"created_at":"2024-11-16T13:07:11.031Z","updated_at":"2025-04-15T15:05:08.759Z","avatar_url":"https://github.com/Danderson123.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Amira\n\n## Introduction\n\nAmira is an AMR gene detection tool designed to work directly from bacterial long read sequences. Amira makes it easy to reliably identify the AMR genes in a bacterial sample, reduces the time taken to get meaningful results and allows more accurate detection of AMR genes than assembly.\n\n## Overview\n\nAmira leverages the full length of long read sequences to differentiate multi-copy genes by their local genomic context. This is done by first identifying the genes on each sequencing read and using the gene calls to construct a *de Bruijn* graph (DBG) in gene space. Following error correction, the reads containing different copies of multi-copy AMR genes can be clustered together based on their path in the graph, then assembled to obtain the nucleotide sequence.\n\n## Prerequisites\n\nAmira requires Python and three additional non-Python tools for optimal functionality:\n\n- **Python \u003e=3.9,\u003c3.13**.\n- **Poetry** to manage the Python dependencies.\n- **Pandora** to identify the genes on each sequencing read.\n- **minimap2** for sequence alignment.\n- **samtools** for processing alignments.\n- **racon** for allele polishing.\n- **Jellyfish** for cellular copy number estimation.\n\n## Installation\n\nFollow these steps to install Amira and its dependencies.\n\n### With Singularity (preferred method)\n\nAmira and its dependencies can be run through Singularity. First build the container with:\n\n```bash\nsudo singularity build amira.img Singularity.def\n```\n\nYou can then run amira with:\n```bash\nsingularity exec amira.img amira --help\n```\n### With PyPI\n\nAmira can be installed from PyPI. You will need to install the non-Python dependencies separately if you opt for this method.\n```bash\npip install amira-amr\n```\nAmira can then be run with:\n```bash\namira --help\n```\n\n### From source\n\n#### Step 1: Clone the Amira Repository\n\nOpen a terminal and run the following command to clone the repository and navigate into it:\n```bash\ngit clone https://github.com/Danderson123/Amira \u0026\u0026 cd Amira\n```\n#### Step 2: Install Poetry\nAmira’s dependencies are managed with Poetry. Install Poetry by running:\n```bash\npip install poetry\n```\n#### Step 3: Install Python Dependencies\nOnce Poetry is installed, use it to set up Amira’s python dependencies.\n```bash\npoetry install\n```\nYou will need to install the non-Python dependencies separately if you opt for this method.\n\n### Installing Non-Python Dependencies\nAmira requires Pandora, minimap2 and racon. Follow the links below for instructions on building binaries for each tool:\n\n- [Pandora installation guide](https://github.com/iqbal-lab-org/pandora?tab=readme-ov-file#installation)\n- [minimap2 installation guide](https://github.com/lh3/minimap2)\n- [samtools installation guide](https://www.htslib.org/download/)\n- [racon installation guide](https://github.com/isovic/racon)\n- [Jellyfish installation guide](https://github.com/gmarcais/Jellyfish)\n\nAfter installation, make a note of the paths to these binaries as they will be required when running Amira.\n\n## Pre-built species-specific panRGs\n[Pandora](https://github.com/iqbal-lab-org/pandora) uses species-specific reference pan-genomes (panRGs) to identify the genes on each sequencing read (see above for instructions to install Pandora). Click the relevant link below to download a panRG to run Amira on your favorite bacterial species. If we do not currently support a species you are interested in then we are more than happy to build one, please let us know via a GitHub issue!\n* [*Escherichia coli*](https://drive.google.com/file/d/13c_bUXnBEs9iEPPobou7-xEgkz_t08YP/view?usp=sharing)\n* [*Klebsiella pneumoniae*](https://drive.google.com/file/d/1DYG3QW3nrQfSckIX9Vjbhbqz5bRd9W3j/view?usp=drive_link)\n* [*Enterococcus faecium*](https://drive.google.com/file/d/1AzzFNRbH6VXPj5CX2txlcxhW8AhL9HSh/view?usp=sharing)\n\n**Note**: These panRGs can currently detect all acquired AMR genes in the NCBI Bacterial Antimicrobial Resistance Reference Gene Database as of 21st August 2024.\n\n## Running Amira\n\nOnce you have installed the Python dependencies, Pandora, Racon and Minimap2, and downloaded the panRG for the species you interested in, Amira can be run with this command.\n\n```bash\namira --reads \u003cPATH TO READ FASTQ\u003e --output \u003cOUTPUT_DIR\u003e --species \u003cSPECIES\u003e --panRG-path \u003cPANRG PATH\u003e --pandora-path \u003cPATH TO PANDORA BINARY --racon-path \u003cPATH TO RACON BINARY\u003e --minimap2-path \u003cPATH TO MINIMAP2 BINARY\u003e --samtools-path \u003cPATH TO SAMTOOLS BINARY\u003e --cores \u003cCPUS\u003e\n```\n\n## For developers\n\nAmira can also be run on the output of Pandora directly, or from JSON files listing the genes and gene positions on each sequencing read.\n\n### Running with Pandora\nAfter installing Pandora, you can call the genes on your sequencing reads using this command:\n```bash\npandora map -t \u003cTHREADS\u003e --min-gene-coverage-proportion 0.5 --max-covg 10000 -o pandora_map_output \u003cPANRG PATH\u003e \u003cPATH TO READ FASTQ\u003e\n```\nAmira can then be run directly on the output of Pandora using this command:\n```bash\namira --pandoraSam pandora_map_output/*.sam --pandoraConsensus pandora_map_output/pandora.consensus.fq.gz --panRG-path \u003cPANRG PATH\u003e --reads \u003cPATH TO READ FASTQ\u003e --output amira_output --species \u003cSPECIES\u003e --minimum-length-proportion 0.5 --maximum-length-proportion 1.5 --cores \u003cCPUS\u003e --racon-path \u003cPATH TO RACON BINARY\u003e --minimap2-path \u003cPATH TO MINIMAP2 BINARY\u003e --samtools-path \u003cPATH TO SAMTOOLS BINARY\u003e\n ```\n\n### Running from JSON\nTo run Amira from the JSON files, you can use this command:\n```\namira --pandoraJSON \u003cPATH TO GENE CALL JSON\u003e --gene-positions \u003cPATH TO GENE POSITION JSON\u003e --pandoraConsensus \u003cPATH TO PANDORA CONSENSUS FASTQ\u003e --reads \u003cPATH TO READ FASTQ\u003e --output \u003cOUTPUT DIRECTORY\u003e --panRG-path \u003cPANRG PATH\u003e --species \u003cSPECIES\u003e --racon-path \u003cPATH TO RACON BINARY\u003e --minimap2-path \u003cPATH TO MINIMAP2 BINARY\u003e --cores \u003cCPUS\u003e\n```\n\n####  JSON example\n\nSome example JSON data can be downloaded from [here](https://drive.google.com/drive/folders/1mQ8JmzVhFiNkgRy5_1iFQrqV2TLNnlQ4). Amira can then be run using this command:\n```\namira --pandoraJSON test_data/gene_calls_with_gene_filtering.json --gene-positions test_data/gene_positions_with_gene_filtering.json --pandoraConsensus test_data/pandora.consensus.fq.gz --reads test_data/SRR23044220_1.fastq.gz --output amira_output --species Escherichia_coli --panRG-path . --racon-path \u003cPATH TO RACON BINARY\u003e --minimap2-path \u003cPATH TO MINIMAP2 BINARY\u003e --samtools-path \u003cPATH TO SAMTOOLS BINARY\u003e --debug --cores \u003cCPUS\u003e\n```\n\n### Additional options\nFor additional options and configurations, run:\n```bash\namira --help\n```\n## Citation\nTBD\n\n## Contributing\nIf you’d like to contribute to Amira, please follow these steps:\n\n1. Fork the repository.\n2. Create a new branch for your feature or bugfix (git checkout -b feature-name).\n3. Commit your changes (git commit -m \"Description of feature\").\n4. Push to the branch (git push origin feature-name).\n5. Submit a pull request.\n\n## License\nThis project is licensed under the Apache License 2.0 License. See the LICENSE file for details.\n\n## Contact\nFor questions, feedback, or issues, please open an issue on GitHub or contact [Daniel Anderson](\u003cmailto:dander@ebi.ac.uk\u003e).\n\n## Additional Resources\n* [Pandora Documentation](https://github.com/iqbal-lab-org/pandora/wiki/Usage)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanderson123%2Famira","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanderson123%2Famira","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanderson123%2Famira/lists"}