Skip to content

Instantly share code, notes, and snippets.

@dpryan79
dpryan79 / subsetBigWig.py
Created July 31, 2019 16:18
Subset a bigwig file
#!/usr/bin/env python
import pyBigWig
import argparse
import os.path
import sys
parser = argparse.ArgumentParser(description="Subset a single chromosome from a bigWig file.")
parser.add_argument("--headerToo", action="store_true", help="Subset the header too, which can expedite some downstream programs but possibly cause problems for others.")
parser.add_argument("input", help="Input bigWig file.")
parser.add_argument("output", help="Output bigWig file.")
@clairemcwhite
clairemcwhite / simplified_dendrogram_to_circlepack.R
Last active March 18, 2023 16:53
Demo of going from an igraph dendrogram to a simplified view as a ggraph circlepack as in https://twitter.com/clairemcwhite/status/1079895521446293505
library(tidygraph)
library(tidyverse)
library(ggraph)
library(dendextend)
library(igraph)
palette_OkabeIto <- c("#E69F00", "#56B4E9", "#009E73", "#F0E442", "#0072B2", "#D55E00", "#CC79A7", "#999999")
cut_df <- function(dendrogram, height, c){
## devtools::install_github("stephenturner/msigdf")
library(msigdf)
library(dplyr)
library(clusterProfiler)
c2 <- msigdf.human %>%
filter(collection == "c2") %>% select(geneset, entrez) %>% as.data.frame
data(geneList)
de <- names(geneList)[1:100]
@fchollet
fchollet / classifier_from_little_data_script_1.py
Last active February 26, 2025 01:37
Updated to the Keras 2.0 API.
'''This script goes along the blog post
"Building powerful image classification models using very little data"
from blog.keras.io.
It uses data that can be downloaded at:
https://www.kaggle.com/c/dogs-vs-cats/data
In our setup, we:
- created a data/ folder
- created train/ and validation/ subfolders inside data/
- created cats/ and dogs/ subfolders inside train/ and validation/
- put the cat pictures index 0-999 in data/train/cats