library(data.table)
library(tidyverse)
anscombe
#> x1 x2 x3 x4 y1 y2 y3 y4
#> 1 10 10 10 8 8.04 9.14 7.46 6.58
#> 2 8 8 8 8 6.95 8.14 6.77 5.76
#> 3 13 13 13 8 7.58 8.74 12.74 7.71
This file contains hidden or 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
<html> | |
<head> | |
<title>Unix Lab Web Page Example</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> | |
<meta name="keywords" content="Bioinformatics, Fiona Brinkman, course"> | |
<meta name="description" content="This is a template file to help you learn about HTML."> | |
</head> | |
<body bgcolor="#FFFFFF" text="#000000"> | |
<p><b><font size="+2" color="#0000FF"> |
This file contains hidden or 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
gender | eat_out | weight | |
---|---|---|---|
F | 0 | 110 | |
F | 0 | 114 | |
F | 0 | 115 | |
F | 0 | 110 | |
F | 0 | 125 | |
F | 0 | 140 | |
F | 0 | 130 | |
F | 0 | 145 | |
F | 0 | 158 |
This file contains hidden or 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
FROM ubuntu:latest | |
RUN apt-get update | |
RUN apt-get install -y vim wget git htop tmux | |
RUN apt-get install -y openssh-client default-jre default-jdk | |
RUN apt-get install -y python2.7 | |
RUN ln -s /usr/bin/python2.7 /usr/bin/python | |
RUN wget https://bootstrap.pypa.io/get-pip.py | |
RUN python get-pip.py | |
RUN pip2.7 install numpy | |
RUN pip2.7 install pandas |
This file contains hidden or 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
# The commands below are a guide to remove a large file that has been | |
# accidentally committed to a Git repository's history. If the file is | |
# larger than 100 MB, GitHub will prevent you from pushing your latest | |
# commits. The annotated steps below should help you remove the large | |
# file from your commit history, even if you've made new commit since. | |
# Some Git users advise against rebasing. You can safely use it here | |
# because you haven't published your changes yet. | |
# So, you first need to rebase your current branch onto the point that |
This file contains hidden or 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
## GGplot2 workshop Sciprog October 24 2016 | |
# Author: Michelle Jones | |
library(ggplot2) | |
#install the packages for the workshop | |
#install.packages(c("tidyverse","ggthemes","cowplot")) | |
#install.packages("gapminder") | |
#Load packages | |
library(tidyverse) | |
library(ggthemes) |
This file contains hidden or 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
git branch new-master # Assumption: HEAD is pointing to the new commits | |
git checkout master | |
git branch before-revert | |
git revert --no-edit commit_X..master # Revert the commits you want to discard | |
git rebase -i before-revert # Optional: squash all commits except top one to create one revert commit | |
git checkout new-master | |
git rebase master | |
git checkout master | |
git merge new-master | |
git branch -D new-master before-revert |
This file contains hidden or 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
# Input: | |
# - exons.bed: Exons BED file with the fourth column containing the gene name for gene coverage summarizing | |
# - sample.bam: BAM file using the same genome build (aka chromosome names and coordinate system) as exons.bed | |
# Output: | |
# - Tab-delimited file with two columns: gene name and average coverage | |
samtools bedcov exons.bed sample.bam \ | |
| awk ' \ | |
BEGIN { \ | |
FS=OFS="\t"} \ |
This file contains hidden or 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
# Ensure that fonts are embedded in a PDF file for correct printing | |
# Credit: http://stackoverflow.com/a/4234150 | |
function fixpdf { | |
# Print usage is no arguments are given | |
if [ "$#" -eq 0 ]; then | |
echo "Usage: fixpdf PDF_FILE [PDF_FILE ...]" | |
fi | |
# Check if ghostscript is installed | |
if ! type gs >/dev/null 2>&1; then | |
echo 'Error: ghostscript is either not installed or not in your PATH.' |
This file contains hidden or 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
suppressPackageStartupMessages({ | |
library(readr) | |
library(dplyr) | |
}) | |
maf_cols <- c( | |
"Hugo_Symbol","Entrez_Gene_Id","Center","NCBI_Build","Chromosome","Start_Position", | |
"End_Position","Strand","Variant_Classification","Variant_Type","Reference_Allele", | |
"Tumor_Seq_Allele1","Tumor_Seq_Allele2","dbSNP_RS","dbSNP_Val_Status","Tumor_Sample_Barcode", | |
"Matched_Norm_Sample_Barcode","Match_Norm_Seq_Allele1","Match_Norm_Seq_Allele2", |