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
.CodeMirror, div.prompt.input_prompt, div.prompt.output_prompt, pre { | |
font-family: "Inconsolata for Powerline"; | |
font-size: 100%; | |
} |
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
<style> | |
html { | |
font-size: 62.5% !important; } | |
body { | |
font-size: 1.5em !important; /* currently ems cause chrome bug misinterpreting rems on body element */ | |
line-height: 1.6 !important; | |
font-weight: 400 !important; | |
font-family: "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif !important; | |
color: #222 !important; } |
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
import pandas as pd | |
import sys | |
import re | |
tcga_tsv = sys.argv[1] | |
tcga = pd.read_table(tcga_tsv, sep='\t', index_col=0) | |
oldcolumns = tcga.columns.tolist() | |
newcolumns = ['-'.join(re.findall(r'TCGA[^_]*', oc)[0].split('-')[:4]) |
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
import pandas as pd | |
import numpy as np | |
import sys | |
import random as rnd | |
csv = sys.argv[1] | |
out = sys.argv[2] | |
df = pd.read_table(csv, sep='\t', index_col=0) |
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
import pandas as pd | |
import sys | |
import glob | |
import os | |
# input / output directory | |
input_dir = sys.argv[1] | |
# input file extension | |
input_ext = sys.argv[2] | |
# cardinality of index columns (rownames) |
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
# 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" |
NewerOlder