Skip to content

Instantly share code, notes, and snippets.

Ino de Bruijn inodb

Block or report user

Report or block inodb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View test_iframe.html
<html>
<body>
I'm on github
</body>
</html>
View mrna_distribution_cbioportal.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View hotspots_categories.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View WorldPopulations.html
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<link rel='stylesheet' href='data:text/css;base64,Ci8qKioqKioqKioqKioqKioqKioqKgogKiBIVE1MIENTUwogKi8KCgouY2hhcnRXcmFwIHsKICBtYXJnaW46IDA7CiAgcGFkZGluZzogMDsKICBvdmVyZmxvdzogaGlkZGVuOwp9CgoKLyoqKioqKioqKioqKioqKioqKioqCiAqIFRPT0xUSVAgQ1NTCiAqLwoKLm52dG9vbHRpcCB7CiAgcG9zaXRpb246IGFic29sdXRlOwogIGJhY2tncm91bmQtY29sb3I6IHJnYmEoMjU1LDI1NSwyNTUsMSk7CiAgcGFkZGluZzogMXB4OwogIGJvcmRlcjogMXB4IHNvbGlkIHJnYmEoMCwwLDAsLjIpOwogIHotaW5kZXg6IDEwMDAwOwoKICBmb250LWZhbWlseTogQXJpYWw7CiAgZm9udC1zaXplOiAxM3B4OwoKICB0cmFuc2l0aW9uOiBvcGFjaXR5IDUwMG1zIGxpbmVhcjsKICAtbW96LXRyYW5zaXRpb246IG9wYWNpdHkgNTAwbXMgbGluZWFyOwogIC13ZWJraXQtdHJhbnNpdGlvbjogb3BhY2l0eSA1MDBtcyBsaW5lYXI7CgogIHRyYW5zaXRpb24tZGVsYXk6IDUwMG1zOwogIC1tb3otdHJhbnNpdGlvbi1kZWxheTogNTAwbXM7CiAgLXdlYmtpdC10cmFuc2l0aW9uLWRlbGF5OiA1MDBtczsKCiAgLW1vei1ib3gtc2hhZG93OiAwIDVweCAxMHB4IHJnYmEoMCwwLDAsLjIpOwogIC13ZWJraXQtYm94LXNoYWRvdzogMCA1cHggMTBweCByZ2JhKDAsMCwwLC4yKTsKICBib3gtc2hhZG93OiAwIDVweCAxMHB4IHJnYmEoMCwwLDAsL
View show_missing_rows_between_2_tables.py
"""
Output rows from table1 that are missing from table2 i.e. table1 - table2, use
given columns to determine 'missing'
"""
import argparse
import pandas as pd
import sys
def output_missing_rows(t1, t2, join_columns, delimiter, output_only_columns):
@inodb
inodb / gene_lengths.md
Last active Dec 22, 2016
Gene lengths in Jupyter notebook
View gene_lengths.md

Gene lenghts from ENSEMBL REST API

Use inside notebook (uses ! syntax):

import json
import pandas as pd

def get_gene_length(gene):
    gene_info = \
        !curl -s "http://grch37.rest.ensembl.org/xrefs/symbol/homo_sapiens/"{gene} -H 'Content-type:application/json' | \
            jq '.[0].id' | tr -d '"' | \
@inodb
inodb / 20161012_frontend_dev_workshop.md
Last active Oct 12, 2016
Frontend dev workshop 20161012
View 20161012_frontend_dev_workshop.md

20161002 Frontend dev workshop

Set up cbioportal-frontend

Check out the README at https://github.com/cBioPortal/cbioportal-frontend/ for up to date info

Try to make a component

Make a new component that show the Patient Information on a single line, instead of in a table. We would like that line to be in the PatientHeader component. You could name it PatientInline similar to SampleInline.

@inodb
inodb / deletion_fastq_simulation_ensembl_api.md
Last active Jun 3, 2016
Generate deletions of arbitrary length in hg19 using ensembl rest api
View deletion_fastq_simulation_ensembl_api.md

Generate reads with deletions of arbitrary length using ensembl rest api

for del_size in 10 30 50 70 90 150 300 600
do
  chr=17
  start_pos=4126000
  read_length=100
  ens_url="http://grch37.rest.ensembl.org/sequence/region/human/"
  qual=$(python -c "print 'A'*${read_length}")
  (
@inodb
inodb / grep_color_barcodes.sh
Created May 25, 2016
Use grep --color=always to color a file by another file of patterns. Pretty useful for sequencing analysis
View grep_color_barcodes.sh
color_grep_file() {
COLOR_CMD="cat $1"
echo $COLOR_CMD
local i=31;
while read line; do
echo $line
COLOR_CMD="$COLOR_CMD | GREP_COLOR='01;$i' grep --color=always -E '$line|$'"
i=$(( $i + 1 ))
done < $2
COLOR_CMD="$COLOR_CMD | less -RS"
You can’t perform that action at this time.