{"id":32110802,"url":"https://github.com/markziemann/mitch","last_synced_at":"2026-02-18T07:32:35.895Z","repository":{"id":43715127,"uuid":"213260708","full_name":"markziemann/mitch","owner":"markziemann","description":"An R package for multi-dimensional pathway enrichment analysis","archived":false,"fork":false,"pushed_at":"2025-04-16T02:50:06.000Z","size":10531,"stargazers_count":16,"open_issues_count":5,"forks_count":4,"subscribers_count":1,"default_branch":"devel","last_synced_at":"2025-11-27T15:14:28.748Z","etag":null,"topics":["gene-regulation","gene-seq-analysis","pathway-analysis"],"latest_commit_sha":null,"homepage":"https://bioconductor.org/packages/mitch","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/markziemann.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-10-06T23:40:59.000Z","updated_at":"2025-04-16T02:50:10.000Z","dependencies_parsed_at":"2023-11-22T00:58:32.925Z","dependency_job_id":"2fa38154-f10d-4873-8f96-0453ac1e556d","html_url":"https://github.com/markziemann/mitch","commit_stats":{"total_commits":101,"total_committers":4,"mean_commits":25.25,"dds":"0.14851485148514854","last_synced_commit":"0fa996264a426415a07a1534c8730c40d260bcef"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/markziemann/mitch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markziemann%2Fmitch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markziemann%2Fmitch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markziemann%2Fmitch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markziemann%2Fmitch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markziemann","download_url":"https://codeload.github.com/markziemann/mitch/tar.gz/refs/heads/devel","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markziemann%2Fmitch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29572419,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T06:19:27.422Z","status":"ssl_error","status_checked_at":"2026-02-18T06:18:44.348Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["gene-regulation","gene-seq-analysis","pathway-analysis"],"created_at":"2025-10-20T14:03:40.658Z","updated_at":"2026-02-18T07:32:35.883Z","avatar_url":"https://github.com/markziemann.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mitch\n\nmitch is an R package for multi-dimensional enrichment analysis. At it's heart, it uses a rank-MANOVA based statistical approach to detect sets of genes that exhibit enrichment in the multidimensional space as compared to the background. Mitch is useful for pathway analysis of profiling studies with two to or more contrasts, or in studies with multiple omics profiling, for example proteomic, transcriptomic, epigenomic analysis of the same samples. Mitch is perfectly suited for pathway level differential analysis of scRNA-seq data.\n\n\u003cimg align=\"center\" width=\"160\" height=\"200\" src=\"https://github.com/markziemann/mitch_paper/blob/master/figs/mitch.png\"\u003e\n\n## Installation\n\n```\nif(!requireNamespace(\"BiocManager\", quietly = TRUE))\n    install.packages(\"BiocManager\")\nBiocManager::install(\"mitch\")\n\nlibrary(\"mitch\")\n```\n\n## Workflow overview\n\n### Importing gene sets\n\nmitch has a function to import GMT files to R lists (adapted from [Yu et al, 2012](https://dx.doi.org/10.1089%2Fomi.2011.0118) in the [clusterProfiler](http://bioconductor.org/packages/release/bioc/html/clusterProfiler.html) package). For example:\n\n```\ndownload.file(\"https://reactome.org/download/current/ReactomePathways.gmt.zip\", destfile=\"ReactomePathways.gmt.zip\")\nunzip(\"ReactomePathways.gmt.zip\")\ngenesets \u003c- gmt_import(\"ReactomePathways.gmt\")\n```\n\n### Importing profiling data\n\nmitch accepts pre-ranked data supplied by the user, but also has a function called `mitch_import` for importing tables generated by Limma, edgeR, DESeq2, ABSSeq, Sleuth, Seurat and Muscat. By default, only the genes that are detected in all contrasts are included, but this behaviour can be modified. The below example imports two edgeR tables called \"dge1\" and \"dge2\". Where gene identifiers are coded in the row names.\n\n```\nx \u003c- list(\"dge1\"=dge1, \"dge2\"=dge2)\ny \u003c- mitch_import(x, DEtype=\"edger\")\n```\n\nmitch can do unidimensional analysis if you provide it a single profile as a dataframe. \n\n```\ny \u003c- mitch_import(df, DEtype=\"edger\")\n```\n\nIf the gene identifiers are not given in the rownames, then the column can be specified with the `geneIDcol` parameter like this:\n\n```\ny \u003c- mitch_import(df, DEtype=\"edger\", geneIDcol=\"MyGeneIDs\")\n```\n\nFor edgeR, differential gene expression is scored using the directional nominal p-value.\n\nS = -log10(p-value) * sgn(logFC)\n\nFor DESeq2, the test statistic is used.\nIf this is not desired, then users can perform their own custom scoring procedure.\n\nThere are many cases where the gene IDs don't match the gene sets. To overcome this, `mitch_import` also accepts a two-column table that relates gene identifiers in the profiling data to those in the gene sets. \n\n`?mitch_import` provides more instructions on using this feature.\n\n### Calculating enrichment\n\nThe `mitch_calc` function performs multivariate enrichment analysis of the supplied gene sets in the scored profiling data.  At its simpest form `mitch_calc` function accepts the scored data as the first argument and the genesets as the second argument. Users can prioritise enrichments based on small adjusted p-values, or by the observed effect size (magnitude of the enrichment score).\n\nIn general, effect size prioritisation will give you more specific and actionable results, that\nhighlights relatively small gene sets with large magnitude of change.\nIf you prioritise by significance, you will highlight larger gene sets with more subtle expression\nchanges.\nAs a general rule, our group typically presents enrichment results prioritised by effect size after\nexcluding gene sets with FDR\u003e0.05.\n\n```\nres \u003c- mitch_calc(y, genesets, priority=\"significance\")\nres \u003c- mitch_calc(y, genesets, priority=\"effect\")\n```\n\nIn some cases, you may want to prioritise the results based on the diversity of gene expression\ndifferences across multiple contrasts.\nThis will highlight gene sets that have opposite and diverse s.dist scores across contrasts.\nThis is particularly interesting for scRNA-seq analysis where you may want to know how different cell\ntypes respond to a stimulus, so you are interested in the gene sets with the biggest variation in\ns.dist scores across the contrasts.\n\n```\nres \u003c- mitch_calc(y, genesets, priority=\"SD\")\n```\n\nNote that SD prioritisation won't work for 1D analysis.\n\nOne `mitch_calc()` is finished, you can peek at the top results with `head` like this:\n\n```\nhead(res$enrichment_result)\n```\n\nBy default, `mitch_calc` uses only thread for calculation, but you can speed it up using more\nparallel threads, by setting the `cores` option.\nWe suggest 8-12 parallel threads for returning results the fastest.\nUsing more than 12 doesn't yield faster results typically.\nKeep in mind that the more parallel threads used, the more RAM is required.\n\n```\nres \u003c- mitch_calc(y, genesets, priority=\"significance\", cores=4)\n```\n\nBy default, gene sets with fewer than 10 members present in the profiling data are discarded. This threshold can be modified using the `minsetsize` option. There is no upper limit of gene set size.\n\n```\nres \u003c- mitch_calc(y, genesets, priority=\"significance\", minsetsize=5)\n```\n\nBy default, in downstream visualisation steps, charts are made from the top 50 gene sets, but this can be modified using the `resrows` option. \n\n```\nres \u003c- mitch_calc(y, genesets, priority=\"significance\", resrows=100)\n```\n\n### Generate a HTML report\n\nCan be done like this:\n\n```\nmitch_report(res, \"myreport.html\")\n```\n\nTake a look at an [example report](https://github.com/markziemann/mitch_paper/blob/master/figs/myreport.html).\n\n### Generate high resolution plots\n\nIn case you want the charts in PDF format, these can be generated as such:\n\n```\nmitch_plots(res, outfile=\"mycharts.pdf\")\n```\n\nTake a look at an [example plot set](https://github.com/markziemann/mitch_paper/blob/master/figs/mycharts.pdf).\n\n\n### Network plot\n\nFor one-dimensional analysis, you can generate a network plot to visualise the similarity of the driver gene members for the top (20) up- and downregulated sets meeting a significance cut-off (FDR\u003c0.05).\nThese cut-offs can be altrered.\n\n```\nnetworkplot(res,FDR=0.05,n_sets=20)\n```\n\nSee `?networkplot()` for more details.\n\nIf you want to see which genes are contributing to the network chart, use the `network_genes()` function.\n\n```\nnetwork_genes(FDR=0.05,n_sets=20)\n```\n\n### scRNA-seq\n\nThis type of data is notoriously sparse, so pseudobulk aggregation is recommended.\nMitch works best if there are \u003e1000 genes detected in each cell type (contrast).\nIf there are \u003c400 genes present it may cause mitch to run into an error in the MANOVA test due to insufficient degrees of freedom.\nIt is recommended to run the analysis with all three prioritisation schemes (significance, effect and\nSD) to interpret the data.\n\n### Infinium DNA methylation data\n\nMitch can be applied to Infinium Beadarray methylation data if you have limma results for probes.\nPlease see our solution workflow on [Bioconductor](https://www.bioconductor.org/packages/devel/bioc/vignettes/mitch/inst/doc/infiniumMethArrayWorkflow.html).\n\n### Contrbutions\n\nIf you have questions or need help with applying mitch to your work, please raise an issue.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkziemann%2Fmitch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkziemann%2Fmitch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkziemann%2Fmitch/lists"}