Skip to content

Instantly share code, notes, and snippets.

David L Gibbs Gibbsdavidl

Block or report user

Report or block Gibbsdavidl

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Gibbsdavidl
Gibbsdavidl / isb-cgc-query_of_the_month-november-2018.ipynb
Last active Dec 6, 2018
ISB-CGC-Query_of_the_Month-November-2018.ipynb
View isb-cgc-query_of_the_month-november-2018.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Gibbsdavidl
Gibbsdavidl / launch_jupyter_interface.sh
Created Oct 23, 2018
Launch Jupyter Interface fix
View launch_jupyter_interface.sh
#!/bin/bash
# Made a tiny change to allow me to run it on Mac OS 10.11.6 #
# This script sets SSH tunnel and opens Chrome Browser with SOCKS proxy
# configured for direct access to the Jupyter cluster.
set -euo pipefail
DIR="${BASH_SOURCE%/*}"
@Gibbsdavidl
Gibbsdavidl / gist:5580a4cb7834e2658613bb7bec07ae49
Created Feb 27, 2018
BigQuery to perform Spearman's correlation over all pairs of genes given Reactome pathway definitions.
View gist:5580a4cb7834e2658613bb7bec07ae49
WITH
--
--
--
geneList AS (
SELECT
a.entrez AS Entrez,
Symbol AS HGNC_gene_symbol
FROM
`isb-cgc.QotM.Reactome_a1` a
@Gibbsdavidl
Gibbsdavidl / sift.cpp
Created Oct 2, 2017 — forked from lxc-xx/sift.cpp
OpenCV's SIFT implementation
View sift.cpp
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
@Gibbsdavidl
Gibbsdavidl / gist:8a20097aaf8bece8fc586310795b54da
Last active Sep 26, 2017
ANOVA comparing expression values between samples with and without a SNP.
View gist:8a20097aaf8bece8fc586310795b54da
# This shows the contents of my global.R file, that contains the BigQuery SQL, googleAuthR code, and plots.
# global.R
#http://www.cookbook-r.com/Graphs/Multiple_graphs_on_one_page_(ggplot2)/
multiplot <- function(..., plotlist=NULL, file, cols=1, layout=NULL) {
library(grid)
# Make a list from the ... arguments and plotlist
@Gibbsdavidl
Gibbsdavidl / gist:72941f4f58c740d603c266f04939dadd
Created May 23, 2017
BigQuery_Linear_Regression_Library.sql
View gist:72941f4f58c740d603c266f04939dadd
CREATE TEMP FUNCTION
bq_linear(x ARRAY<FLOAT64>, y ARRAY<FLOAT64>)
RETURNS FLOAT64
LANGUAGE js AS """
// http://tom-alexander.github.io/regression-js/
var data = [];
// Our data list is list of lists. The small list being each (x,y) point
for (var i = 0; i < x.length; i++) {
data.push([x[i],y[i]])
View gist:2de9e15afe2005a8bde393471c17db8c
SELECT
project_short_name,
STDDEV_SAMP( protein_expression ) / AVG( protein_expression ) AS CoV
FROM
[isb-cgc:TCGA_hg19_data_v0.Protein_Expression]
group by
project_short_name
order by
CoV DESC
View gist:d5956363e9289418caf065b551b94094
WITH
mutatedSamples AS (
SELECT
project_short_name,
sample_barcode_tumor
FROM
`isb-cgc.TCGA_hg19_data_v0.Somatic_Mutation_MC3`
WHERE
Hugo_Symbol = 'EGFR'
AND Variant_Type = 'SNP'
View gist:f72b66a3ede779c7cf3672e721baaeae
WITH
--
-- we start by translating the correlations that we got to ranks,
-- based on sorting the genes on corrByGene "DESC"
-- this will result in the highest positive correlation getting
-- rank #1, etc
-- we also lightly filter the genes by excluding any with near-zero
-- or negative correlation coefficients, and the result is a list
-- of approx 9000 genes with symbol, correlation, and rank
geneScoresT AS (
You can’t perform that action at this time.