Skip to content

Instantly share code, notes, and snippets.

View jvwong's full-sized avatar
💭
Generally confused.

Jeffrey jvwong

💭
Generally confused.
View GitHub Profile
@jvwong
jvwong / java_switch.md
Last active June 22, 2016 10:18
Switching Java on OSX

List the current installed Java versions

$ /usr/libexec/java_home -V

Install the version desired

Apple provides their own version of 6 (Java for OS X 2015-001)

List the current installed Java versions

You should see the version installed

@jvwong
jvwong / README.md
Last active April 7, 2016 16:21
How do I retrieve a graph diagram and source description from an EXTENDED_BINARY_SIF interaction?

Tracing from SIF to Source

Goal

Trace an interaction declared in EXTENDED_BINARY_SIF to the BioPAX description, visualize the BioPAX representation in the form of a network, and identify the source database record. This gist crosses many aspects of the tools and services offered through Pathway Commons.

Audience

This is aimed at a computational audience. If you know what SIF is and you have used curl you should be fine. It would help if you are familiar with BioPAX although this is not essential.

What You Need

  • Access to a command line terminal to run curl
@jvwong
jvwong / README.md
Last active April 6, 2016 15:14
Tracking a gist in repo

You can add the github repository as a remote to your checked out gist repository.

$ git clone git://gist.github.com/1234.git
$ git remote add github git@github.com:ChrisJamesC/myNewProject.git

Push it to initialize the git on github

$ git push -u github master

This will also change the upstream of the branch, so github will be default.

@jvwong
jvwong / README.md
Last active August 7, 2016 18:30
Pathway Commons Web Service Test Suite

Pathway Commons Web Service Test Suite

This is a sample test suite for the Pathway Commons web service written in python.

Description

Each example query on the web service description page is called programmatically and a sanity test is performed on each response. A .csv report summarizing these responses is dumped to the parent directory:

@jvwong
jvwong / README.md
Last active August 8, 2016 18:46
OSX virtualenv

virtualenv on OSX El-capitan

$ usr/bin/python2.7 /Users/jeffreywong/anaconda/lib/python3.5/site-packages/virtualenv.py venv
$ source ./venv/bin/activate
@jvwong
jvwong / README.md
Created August 9, 2016 19:19
Data munging for the TCGAOv data set

GDC Data Munging Scripts

This is for use in the Pathway Commons Guide TCGA Ovarian Cancer data set description.

Setup

  1. Install conda

  2. Create a conda environment named tcgaov. You can use the supplied environments.yml to quickly get started.

@jvwong
jvwong / get_counts.py
Last active September 1, 2016 20:51
Merge TCGA data in separate files sourced from Genomic Data Commons
import os
import fnmatch
import json
import pandas as pd
def writeout(output_path, df):
"""
Write dataframe (df) to output path (output_path)
"""
directory = os.path.dirname(output_path)
@jvwong
jvwong / get_subtypes.py
Last active September 1, 2016 20:51
Obtain subtypes
import os
import fnmatch
import json
import pandas as pd
def writeout(output_path, df):
"""
Write dataframe (df) to output path (output_path)
"""
directory = os.path.dirname(output_path)
@jvwong
jvwong / README.md
Last active November 11, 2016 01:06
Pathway Commons Guide: Workflow -- Process data
@jvwong
jvwong / README.md
Last active November 3, 2016 18:54
Pathway Commons Guide: Workflow -- Get Data