Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
# 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%/*}" |
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
WITH | |
-- | |
-- | |
-- | |
geneList AS ( | |
SELECT | |
a.entrez AS Entrez, | |
Symbol AS HGNC_gene_symbol | |
FROM | |
`isb-cgc.QotM.Reactome_a1` a |
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
/*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 |
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 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 |
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
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]]) |
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
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 |
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
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' |
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
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 ( |