Skip to content

Instantly share code, notes, and snippets.

View stevekm's full-sized avatar

Stephen Kelly stevekm

View GitHub Profile
@stevekm
stevekm / new_PC.md
Last active December 31, 2017 04:23
Stuff to install on new computer (Ubuntu 16.04)
@stevekm
stevekm / git_basic_usage.md
Last active September 21, 2016 18:25
A quick guide on how to commit changes to a git repository

Set up a new git repository (if it doesn't already exist, otherwise skip this step)

$ cd git_test/

$ ll
total 36K
drwxr-s--- 2 kellys04 kellys04   0 Sep 21 13:43 .
drwxr-s--- 4 kellys04 kellys04 350 Sep 21 13:43 ..
@stevekm
stevekm / DiffBind_Volcano_Plotly.md
Created September 24, 2016 21:45
How to use R and Plot.ly to create a Volcano Plot from DiffBind data

Plot.ly Volcano Plot Example

Stephen Kelly
9/24/2016

# install.packages("plotly")
# install.packages("ggplot2")
@stevekm
stevekm / find_file.py
Last active September 26, 2016 19:35
finding files in Python
#!/usr/bin/env python
# python 2.7
# various ways to try to find and return the files in a given directory
# some of these are ok, some are bad, some are real real bad
import os
import re
import glob
@stevekm
stevekm / Volcano_Plotly.md
Last active June 6, 2020 03:31
How to make a volcano plot of differentially bound genes using R and Plot.ly

Plot.ly Volcano Plot Example

Stephen Kelly
9/24/2016

In this example, I will demonstrate how to use gene differential binding data to create a volcano plot using R and Plot.ly. This dataset was generated by DiffBind during the analysis of a ChIP-Seq experiment. Each entry represents a bound peak that was differentially expressed between groups of samples.

First, install any libraries you might not have, load the Plot.ly library, and load the file containing your differential binding data.

@stevekm
stevekm / rubby.md
Last active November 3, 2016 17:09
OS X El Capitan installation of Ruby gems for Jekyll setup
@stevekm
stevekm / docker_galaxy_commands.md
Last active October 6, 2016 13:21
commands I used to install Galaxy Docker on a fresh computer, pulled straight from my bash history

I think this is where I was trying to get Docker installed

[2016-10-06 09:14:50]
steve@quark2:~$ grep -i 'docker' ~/.bash_history 
cat /etc/apt/sources.list.d/docker.list
touch /etc/apt/sources.list.d/docker.list
sudo touch /etc/apt/sources.list.d/docker.list
nano /etc/apt/sources.list.d/docker.list
sudo nano /etc/apt/sources.list.d/docker.list
@stevekm
stevekm / gist:dc9687be27c777979786b7a1e0546c29
Last active October 26, 2016 19:40
quickly print out chr chromosome names in a format for easy conversion to R character vector
$ cat data/depth13Genome.depth.summary2.averages_sd.txt | cut -f1
chr1
chr10
chr11
chr12
chr13
chr14
chr15
chr16
@stevekm
stevekm / py.md
Created October 27, 2016 04:31
Ordered default dict in Python 2.7 (and maybe 3)

http://stackoverflow.com/questions/6190331/can-i-do-an-ordered-default-dict-in-python

# from collections import OrderedDict, defaultdict
import collections
class OrderedDefaultDict(collections.OrderedDict, collections.defaultdict):
    def __init__(self, default_factory=None, *args, **kwargs):
        #in python3 you can omit the args to super
        super(OrderedDefaultDict, self).__init__(*args, **kwargs)
 self.default_factory = default_factory
@stevekm
stevekm / pdf_conversions.md
Last active May 3, 2024 19:33
Commands to convert multi-page PDF to/from multiple PNG files with GhostScript & ImageMagick