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
function xls_to_sql(input,sheet,outfile,database,table) | |
% This script reads in an excel sheet and converts it into sql insert | |
% statements. The first row is expected to be the titles for the tables, | |
% followed by rows of raw data. | |
%------------------------------------------------------------------------- | |
% INPUT | |
% input ----- input excel file should be excel file, .xls or .xlsx | |
% sheet ----- name of sheet to read from | |
% outfile ----- name of output file (without extension) |
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
function covcheck_free() | |
% COVERAGE CHECKING for SPM ANALYSIS (covcheck_free.m) | |
% Vanessa Sochat | |
% | |
% This script takes in a list of subjects processed in SPM, an ROI mask | |
% that will be used for group analysis, and a user specified coverage | |
% percentage. It will calculate the size of a single subject mask and | |
% determine if the subject has that percentage coverage. | |
%__________________________________________________________________________ | |
% |
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
%% GRAB TIMESERIES: | |
% Creates a matrix of average mean timeseries for each VOI in individual subject folders, separating out VOI name and number of subjects included | |
% This data is then formatted into a csv file to be used to create an interactive chart with Google Charts (Gapminder) | |
%% GET DATA TIMESERIES | |
% Get list of all subjects in Analyzed Folder | |
anadir = 'path/path/path'; cd(anadir); all = dir; | |
% These are set in advance so we have control over our charts |
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
#!/usr/bin/python | |
import sys | |
import os.path | |
import re | |
import datetime | |
#-MADLIB--------------------------------------------------------------------- |
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
function beerrank() | |
%------------------------------------------------------------------------- | |
% beerrank(): takes in a list of beers, ranking criteria, and allows the | |
% user to enter rankings and produce a chart of averages and winners! | |
% Created on December 14, 2010 for the LoNG annual Tasting Party! | |
%------------------------------------------------------------------------- | |
% RUNNING: | |
% - should be run with no input arguments | |
% - will take in a number of beers, and output file name | |
% if outfile already exists, will append data to next empty row |
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
function confirmation_email(contactemail) | |
% CONFIRMATION_EMAIL | |
% Vanessa Sochat | |
% | |
% This script sends confirmation emails for imaging and battery appointments | |
% added to the calendar the previous day. | |
% | |
% ------------------------------------------------------------------------- | |
% VARIABLES: |
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
# This script will read in individual brain datasets | |
# (a MNI coordinate file, and a structure ID file) | |
# compile into one matrix, and save to both text and Rdata file | |
# Read in data for each brain, save to matrix | |
filenames = c("H0351.2002","H0351.2001","H0351.1009","H0351.1012","H0351.1015","H0351.1016") | |
filey = filenames[1] | |
MNI = read.csv(paste('data/human_ma_samples_MNI_',filey,'.txt',sep=""),head=FALSE,sep="") | |
STRUC = read.csv(paste('data/human_ma_samples_region_',filey,'.txt',sep=""),head=FALSE,sep="") |
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
# foursquareASD will create a map of ASD locations across the United States | |
library(RJSONIO) | |
library(RCurl) | |
options(RCurlOptions = list(cainfo = system.file("CurlSSL", "cacert.pem", package = "RCurl"))) | |
# First, read in file with latitudes and longitudes of major cities | |
# Obtained from http://notebook.gaslampmedia.com/download-zip-code-latitude-longitude-city-state-county-csv/ | |
ll = read.csv('zip_codes_states.csv',sep=",",head=TRUE) |
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
#!/bin/bash | |
# Key off existence of the "data" mount point to determine whether | |
# this is the first boot. | |
if [[ ! -e /mnt/data ]]; then | |
# Basic setup - get the JRE installed | |
apt-get update | |
apt-get install --fix-broken | |
mkdir -p /mnt/data | |
fi |
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
# This script will convert a list of gene symbols to kegg (KO) identifiers | |
# We need libraries to read and parse URL | |
library(RCurl) | |
options(RCurlOptions = list(cainfo = system.file("CurlSSL", "cacert.pem", package = "RCurl"))) | |
# Read in file with Gene Symbols | |
# This is tab separated file with Id, Label, color from Geshi | |
infile = '/home/vanessa/Desktop/group5[Nodes].csv' | |
data = read.table(infile,sep="\t",head=TRUE) |