This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Arranging plots with patchwork. For details see this manual page: https://ggplot2-book.org/arranging-plots.html | |
## Load libraries and create some sample data | |
library(ggplot2); library(reshape2); library(patchwork) | |
iris_mean <- aggregate(iris[,1:4], by=list(Species=iris$Species), FUN=mean) | |
df_mean <- melt(iris_mean, id.vars=c("Species"), variable.name = "Samples", value.name="Values") | |
## Create lots of plots | |
p1 <- ggplot(cbind(iris, Samples="Sepal.Length"), aes(Species, Sepal.Length)) + geom_boxplot(aes(fill = Species)) + ylim(4, 8) + theme(axis.title.x=element_blank(), axis.title.y=element_blank(), legend.position = "none") + facet_grid(rows = ~Samples) + ggtitle("(A)") + theme(plot.title = element_text(hjust=-0.3)) | |
p2 <- ggplot(df_mean[df_mean$Samples=="Sepal.Width",], aes(Species, Values)) + geom_bar(position="dodge", aes(fill = Species), stat="identity") + yli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################ | |
## Streaming through large tabular files in R ## | |
################################################ | |
## Author: Thomas Girke | |
## Last update: 21-Dec-2018 | |
## Utility: the function 'processFileInLineChunks' streams through a file in | |
## batches of lines and applies to each imported line batch a function assigned | |
## to the 'myFct' argument. The number of lines processed in each iteration can | |
## be defined under the 'n_rows' argument. As importer functions, both 'fread' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################### | |
## PWM matching in sequences ## | |
############################### | |
## Date: May 22, 2020 | |
## Starter code for ChIP-Seq1 project | |
library(MotifDb) | |
as.list(query(MotifDb, 'athaliana')) | |
as.list(query(MotifDb, 'hsapiens')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################## | |
## Map Pfam Domains to Proteins with HMMER3 ## | |
############################################## | |
## Author: Thomas Girke | |
## Date: May 11, 2018 | |
## Utility: mapping of Pfam domains to protein sequences. | |
## The module load and Pfam database paths given below are specific to the HPCC/biocluster system. | |
## For details consult the man page for hmmscan from the command-line with 'hmmscan -h' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#################################################### | |
## Import of KEGG Compounds into SDFset Container ## | |
#################################################### | |
## Date: March 07, 2018 | |
## Motivation: response to request on Bioc support list: https://support.bioconductor.org/p/106712/ | |
################################ | |
## Download KEGG CMPs via URL ## | |
################################ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################################### | |
## Alignment Stats with Support for FASTQ Files with >500M Reads ## | |
################################################################### | |
alignStats <- function(args) { | |
fqpaths <- infile1(args) | |
bampaths <- outpaths(args) | |
bamexists <- file.exists(bampaths) | |
fqpaths <- fqpaths[bamexists] | |
bampaths <- bampaths[bamexists] | |
## Obtain total read number from FASTQ files |
!!! This Gist tutorial is deprecated. Its new version is available here !!!
This is some red text.
- Author: Thomas Girke
- Last update: 18-Nov-2020
This page outlines how to maintain and sync R packages to both GitHub and Bioconductor's git source control system.
Note: the master
branch was renamed to devel
branch following the instructions here (Mar-2023).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################### | |
## Shiny App Example with Reactive URL Input ## | |
############################################### | |
## Author: Yuzhu Duan & Thomas Girke | |
## Last update: 06-Jul-17 | |
## Usage: save this file under name app.R to your shiny app directory, e.g. reactiveUrl | |
## Run in parent directory the following from within R: | |
## > library(shiny) | |
## > runApp(reactiveUrl) |
NewerOlder