{"id":25608369,"url":"https://github.com/antonkulaga/genotations","last_synced_at":"2025-09-07T04:32:49.775Z","repository":{"id":73827488,"uuid":"558379011","full_name":"antonkulaga/genotations","owner":"antonkulaga","description":"A small library to work with ensembl and other annotations in python","archived":false,"fork":false,"pushed_at":"2023-09-06T00:03:50.000Z","size":3826,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-27T13:52:25.365Z","etag":null,"topics":["annotations","bioinformatics","ensembl","genes","genomics","gtf","polars","transcriptomics"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/antonkulaga.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2022-10-27T12:39:01.000Z","updated_at":"2024-05-09T04:20:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"d1ce480e-80e7-43e6-8adf-ef90e23a2bae","html_url":"https://github.com/antonkulaga/genotations","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/antonkulaga/genotations","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonkulaga%2Fgenotations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonkulaga%2Fgenotations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonkulaga%2Fgenotations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonkulaga%2Fgenotations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antonkulaga","download_url":"https://codeload.github.com/antonkulaga/genotations/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antonkulaga%2Fgenotations/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273996771,"owners_count":25204472,"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","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["annotations","bioinformatics","ensembl","genes","genomics","gtf","polars","transcriptomics"],"created_at":"2025-02-21T20:29:05.652Z","updated_at":"2025-09-07T04:32:49.766Z","avatar_url":"https://github.com/antonkulaga.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Genotations\n===========\n\nPython library to work with genomes and annotations, mostly Ensembl genomes. Also supports visualization of transcripts/gene features and primer selection.\nAs pandas and polars are libraries of everyday use for many python developers this library focus on annotations representation in a dataframe way.\n\n\nThe library allows:\n* downloading Ensembl annotations and genomes (uses genomepy under the hood)\n* working with genomic annotations like with polars dataframes\n* getting sequences for selected genes\n* visualizing the genes features\n* designing primers for selected transcripts with Primer3 python wrapper\n \nUsage\n=====\n\nInstall with pip:\n```bash\npip install genotations\n```\nIn some cases you may also need to install ucsc annotation tools, you can add them to your micromamba/conda environment as they are installed from bioconda channel.\nHere how it may look in your environment file:\n```yaml\nname: genotations\nchannels:\n  - conda-forge\n  - BjornFJohansson\n  - bioconda\n  - defaults\ndependencies:\n  - python=3.10\n  - ucsc-bedtogenepred\n  - ucsc-genepredtobed\n  - ucsc-genepredtogtf\n  - ucsc-gff3togenepred\n  - ucsc-gtftogenepred\n  - pip\n  - pip:\n      - genotations\n```\n\nNow you can start using it, for example:\n```python\nfrom genotations import ensembl\nhuman = ensembl.human # getting human genome\nmouse = ensembl.mouse # getting mosue genome\nmouse.annotations.exons().annotations_df # getting exons as DataFrame\nmouse.annotations.protein_coding().exons().annotations_df # getting exons of protein coding genes\nmouse.annotations.transcript_gene_names_df # getting transcript gene names\nmouse.annotations.with_gene_name_contains(\"Foxo1\").protein_coding().transcripts() #getting only coding Foxo1 transcripts\nmouse.annotations.with_gene_name_contains(\"Foxo1\").genes_visual(mouse.genome)[0].plot() # plotting features of the Foxo1 gene\ncow_assemblies = ensembl.search_assemblies(\"Bos taurus\") # you can also search genomes by species name if it exists in Ensembl\ncow1 = ensembl.SpeciesInfo(\"Cow\", cow_assemblies[-1][0]) # selecting one of several cow assemblies\ncow1.annotations.annotations_df # getting annotations as dataframe\n```\n\nYou can also use the library to annotate existing gene expression data with gene and transcript symbols and features.\nFor example\n```python\nfrom genotations.quantification import *\nfrom genotations import ensembl\nbase = \".\"\nexamples = base / \"examples\"\ndata = examples / \"data\"\nexpressions = pl.read_parquet(str(data / \"PRJNA543661_transcripts.parquet\"))\nwith_expressions_summaries(expressions, min_avg_value = 1)\nexpressions_ext = ensembl.mouse.annotations.extend_with_annotations_and_sequences(expressions, ensembl.mouse.genome) # extend expression data with annotations and sequences\n```\n\nFor more examples, check [example notebook](https://github.com/antonkulaga/genotations/blob/main/examples/explore_mouse.ipynb) to see the usage and API\n\n\nWorking with the library code\n=====\n\nUse micromamba (or conda) and environment.yaml to install the dependencies\n```\nmicromamba create -f environment.yaml\nmicromamba activate genotations\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonkulaga%2Fgenotations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantonkulaga%2Fgenotations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonkulaga%2Fgenotations/lists"}