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
| #!pip install synapseclient | |
| import synapseclient, os | |
| from synapseclient import Project, Folder, File, Link | |
| syn = synapseclient.Synapse() | |
| def upload_files_create_folders(path=".",parent_id=""): | |
| """ upload_files_create_folders(path=".",parent_id="") | |
| Recursively uploads all files and folders to a Synapse Project or folder. | |
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: https://github.com/nfusi/qvalue | |
| ## edited to work in Python 3 by Ryan Neff, 4/19/18 | |
| import scipy as sp | |
| import numpy as np | |
| from scipy import interpolate | |
| def qvalue_estimate(pv, m=None, verbose=False, lowmem=False, pi0=None): | |
| """ | |
| Estimates q-values from p-values |
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
| import numpy as np | |
| import scipy as sp | |
| def acat_test(pvalues,weights=None): | |
| '''acat_test() | |
| Aggregated Cauchy Assocaition Test | |
| A p-value combination method using the Cauchy distribution. | |
| Inspired by: https://github.com/yaowuliu/ACAT/blob/master/R/ACAT.R | |
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
| import numpy as np | |
| import seaborn as sb | |
| import matplotlib.pyplot as plt | |
| import matplotlib as mpl | |
| from matplotlib.collections import PatchCollection | |
| #### heatmap_circle() | |
| ## | |
| ## Creates a heatmap of values, with size of the circle at a given (row,col) as a second dimension | |
| ## uses seaborn's clustermap to provide biclustering |
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
| #!/bin/bash | |
| input_file=$1; | |
| if unzip -l "${input_file}" | grep ".tiff" | |
| then | |
| echo "tiffs found, converting..." | |
| unzip -q "${input_file}" -d test | |
| for i in test/ppt/media/*.tiff; do sips -s format png "${i}" --out "${i%tiff}png"; rm $i; done | |
| for i in test/ppt/slides/_rels/*.rels; do echo $i; sed -i -e 's/.tiff/.png/g' $i; done |