Skip to content

Instantly share code, notes, and snippets.

View SimonLarsen's full-sized avatar

Simon Larsen SimonLarsen

View GitHub Profile
@SimonLarsen
SimonLarsen / galmetal_patterns.md
Last active December 20, 2020 00:37
Gal Metal drum patterns

Gal Metal drum patterns

Metal

EnterSand

|🔴⚪️⚪️⚪️|🔵⚪️⚪️⚪️|🔴⚪️⚪️⚪️|🔵⚪️⚪️⚪️|

Battery

@SimonLarsen
SimonLarsen / parse_geo_series_matrix.r
Last active January 18, 2022 12:25
R script for reading GEO series matrix file, parsing characteristics and mapping probes to gene IDs
library(data.table)
library(foreach)
args <- commandArgs(TRUE)
#### Input files ####
# Series Matrix File
SERIES_FILE <- args[1]
# Platform data table obtained from GEO.
PLATFORM_FILE <- args[2]
@SimonLarsen
SimonLarsen / iid_filter.r
Created February 27, 2018 19:13
Filter IID network
library(data.table)
library(org.Hs.eg.db)
extract <- function(D, exp.only=FALSE, tissue=NULL, evidence=c("G","P")) {
if(exp.only) {
D <- D[grepl("exp", D$`evidence type`),]
}
if(!is.null(tissue)) {
keep <- sapply(D[[tissue]], function(x) any(evidence %in% x))
D <- D[keep,]