- set up a new host in your
~/.ssh/configfile (changerorydmto your own username):
Host tartarus
HostName n70
ProxyJump qmaster
User rorydm
LocalForward 9999 localhost:9999
| #install ubuntu things | |
| sudo apt-get update -y | |
| sudo apt-get upgrade -y | |
| sudo apt-get install -y build-essential libfreetype6-dev libxft-dev libncurses-dev libopenblas-dev gfortran libblas-dev liblapack-dev libatlas-base-dev linux-headers-generic linux-image-extra-virtual unzip unzip wget pkg-config zip g++ zlib1g-dev libcurl3-dev | |
| sudo apt-get install -y vim | |
| sudo apt-get install nvidia-375 | |
| # wget http://us.download.nvidia.com/XFree86/Linux-x86_64/375.39/NVIDIA-Linux-x86_64-375.39.run | |
| # sudo chmod ugo+rwx NVIDIA-Linux-x86_64-375.39.run | |
| # sudo ./NVIDIA-Linux-x86_64-375.39.run -a |
| function [ cumLatent, score ] = plotPCA3D(data, labels, project, cm_handle) | |
| %Z-scores and plots the first 3 prinicple componenets | |
| %gregory johnson | |
| %gregjohnso@gmail.com | |
| if ~exist('project', 'var') | isempty(project) | |
| project = false; |
| from anndata._io import h5ad | |
| import h5py | |
| import pandas as pd | |
| def read_obs(hdf5_path: str) -> pd.DataFrame: | |
| hdf5_file = h5py.File(hdf5_path, 'r') | |
| df_obs = h5ad.read_dataframe(hdf5_file['obs']) | |
| return df_obs | |
| df = read_obs(hdf5_path = "/my/andata/path/file.h5ad") |
| """From: https://github.com/scverse/scanpy/issues/1508#issuecomment-734657400""" | |
| from matplotlib import pyplot as plt | |
| with plt.rc_context(): # Use this to set figure params like size and dpi | |
| sc.pl.plotting_function(..., show=False) | |
| plt.savefig("path/to/file.extension", bbox_inches="tight") |