Random selection of useful code chunks and examples for bioinformatics.
- Author: Michael Jahn, PhD
- Affiliation: Max Planck Unit for the Science of Pathogens (MPUSP), Berlin, Germany
- License: GPL-v3
This repository is a collection of reusable, self-contained code chunks and examples. The goal is to provide code examples for recurring tasks, that require mostly existing packages and therefore do not fulfill the requirements to become a new package.
data: raw data tables or files used for examplesdocs: rendered notebooks inhtmlformat, for example from R markdownoutput: output files saved for future reference or testspipeline: R markdown or jupyter notebooks with examplessource: script files
- Fast gene set enrichment (R)
- Hypergeotric test for gene enrichment (R)
- Quantify overlap between pathways (R)
- Retrieve KEGG pathway information (R)
- Plot sequence logos with
logomaker(python) - Plot coverage tracks (R)
- Plot Circos genomes with
pycircos(python)
The pipelines collected in this repository are self-contained and executable. For R markdown and jupyter notebooks, the code and the documentation are part of one and the same document. If you want to run the examples yourself, there are two possibilities:
- copy and paste code chunks from the documents in
source/orpipeline/ - clone/download the repository, open and re-run notebooks in
pipeline/(see below)
To download the repository on your local drive use git clone in a (linux) terminal:
cd /your-target-folder
git clone https://github.com/m-jahn/bioinfo-code-chunks.gitOpen a pipeline with your favorite IDE (Rstudio, jupyterlab, ...) and execute code (chunks) with the Run button. For R markdown notebooks, you can also open an interactive R session and render the document like this:
require(rmarkdown)
rmarkdown::render("document.Rmd")It's possible to directly import functions from a github repo into running code.
For R code, simply source a function from github like this:
source("https://raw.githubusercontent.com/MPUSP/bioinfo-code-chunks/main/source/get_kegg_pathways.R")