View check_unique.sh
# line number after == | |
# change \\t with the delimiter you want to use instead of tab for splitting to words | |
words_count=$(awk 'NR==5{print}' data.csv | tr \\t \\n | wc -l) | |
unique_words_count=$(awk 'NR==5{print}' data.csv | tr \\t \\n | uniq | wc -l) | |
if [[ "$words_count" -ne "$unique_words_counts" ]]; then | |
echo "Not unique" | |
else | |
echo "Unique" |
View .vimrc
" no vi-compatible | |
set nocompatible | |
let g:python_host_prog=$HOME.'/.pyenv/versions/neovim2/bin/python' | |
let g:python3_host_prog=$HOME.'/.pyenv/versions/neovim3/bin/python' | |
" Setting up Vundle - the vim plugin bundler | |
let iCanHazVundle=1 | |
let vundle_readme=expand('~/.vim/bundle/vundle/README.md') | |
if !filereadable(vundle_readme) |
View jprob_cmatrix.py
import numpy as np | |
import pandas as pd | |
# load data | |
mat = pd.read_table('matrix.txt', index_col=0) | |
# get classes | |
classes = np.unique(mat.values) | |
classes = classes[~np.isnan(classes)] |
View consensus_array.py
import pandas as pd | |
# load data | |
mat = pd.read_table('class_matrix.txt', index_col=0) | |
# initialize consensus array | |
consensus_a = pd.Series(index=mat.index) | |
# define columns subset on which compute consensus | |
# in this case all columns are used |
View fastcluster_to_k.py
import fastcluster as fc | |
import pandas as pd | |
import scipy.cluster.hierarchy as sch | |
# define total number of cluster to obtain | |
k = 5 | |
# define matrix path | |
mat_path = 'matrix.txt' |
NewerOlder