Skip to content

Instantly share code, notes, and snippets.


André F. Rendeiro afrendeiro

View GitHub Profile

IGV Batch Screenshots

IGV provides functionality that allows a user to create a script to take screenshots of regions of interest.

Table of Contents

  1. Requirements
  2. Workflow
  3. Create BED File
karpathy /
Last active Jun 30, 2022
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
informationsea /
Created Jun 28, 2015
Convert USCS refFlat.txt to BED format
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import csv
def _main():
parser = argparse.ArgumentParser(description="Convert RefFlat to BED format")
parser.add_argument('refFlat', type=argparse.FileType('r'))
parser.add_argument('outputBed', type=argparse.FileType('w'))
keithshep /
Created Dec 3, 2013
A small example for how to create XML queries for biomart using python
import requests
def main():
exampleTaxonomy = "mmusculus_gene_ensembl"
exampleGene = "ENSMUSG00000086981"
urlTemplate = \
'''''' \
'''<?xml version="1.0" encoding="UTF-8"?>''' \
'''<!DOCTYPE Query>''' \
benbalter /
Last active Jun 14, 2022
Example of how to embed a Gist on GitHub Pages using Jekyll.

Here's an example of how to embed a Gist on GitHub Pages:

{% gist 5555251 %}

All you need to do is copy and paste the Gist's ID from the URL (here 5555251), and add it to a gist tag surrounded by {% and %}.

vgoklani /
Last active Apr 17, 2022
Using Flask to output Python data to High Charts
from flask import Flask, render_template
app = Flask(__name__)
def index(chartID = 'chart_ID', chart_type = 'bar', chart_height = 350):
chart = {"renderTo": chartID, "type": chart_type, "height": chart_height,}
series = [{"name": 'Label1', "data": [1,2,3]}, {"name": 'Label2', "data": [4, 5, 6]}]
title = {"text": 'My Title'}