Skip to content

Instantly share code, notes, and snippets.

@gireeshkbogu
gireeshkbogu / convert_GTF_to_BED12.sh
Last active June 10, 2025 11:56
How to convert GTF format into BED12 or BIGBED format?
# see below for UPDATES that include more shorter ways of conversions
# How to convert GTF format into BED12 format (Human-hg19)?
# How to convert GTF or BED format into BIGBED format?
# Why BIGBED (If GTF or BED file is very large to upload in UCSC, you can use trackHubs. However trackHubs do not accept either of the formats. Therefore you would need bigBed format)
# First, download UCSC scripts
wget http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/gtfToGenePred
wget http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/genePredToBed
wget http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/bedToBigBed
@fabiovalse
fabiovalse / README.md
Last active November 15, 2024 02:35
Dijkstra on node-link diagram

A node-link diagram running a javascript implementation of the Dijkstra algorithm. Every time the visualization is refreshed two nodes are selected as start (in red) and end point (in blue). Then the shortest path is computed and shown on the diagram by highlighting the edges.

Just some notes and references for myself.

  • In bash, you can access your C:\ drive via /mnt/c/
  • ~ = C:\Users\MLM\AppData\Local\lxss\home\mlm and is different from your Windows user directory C:\Users\MLM

How to google things

@runspired
runspired / rIC.js
Created July 12, 2016 19:34
requestIdleCallback timing guarantees
var lastFlushed = undefined;
function floodScheduler(n) {
for (var i = 0; i < 10; i++) {
for (var j = 0; j < n; j++) {
var fn = function logPos(i, j) {
var thisFlush = (i * n) + j;
if (lastFlushed || lastFlushed === 0) {
if (lastFlushed + 1 !== thisFlush) {
console.error('Order MisMatch', lastFlushed, thisFlush, i, j);
@sestaton
sestaton / fmtDetailValue_Dbxref.js
Last active July 4, 2018 04:56
create dbxref links for jbrowse
fmtDetailValue_Dbxref : function(dbxref) {
if (typeof dbxref != 'string') {
return dbxref;
}
var dbid = dbxref.split(':');
var prefix = '';
switch (dbid[0]) {
case 'InterPro':
prefix = 'http://www.ebi.ac.uk/interpro/entry/';
break;
@jexp
jexp / bulk-neo4j-import-original.sh
Last active May 10, 2021 20:29
Panama Papers Import Scripts for Neo4j
export NEO4J_HOME=${NEO4J_HOME-~/Downloads/neo4j-community-3.0.1}
if [ ! -f data-csv.zip ]; then
curl -OL https://cloudfront-files-1.publicintegrity.org/offshoreleaks/data-csv.zip
fi
export DATA=${PWD}/import
rm -rf $DATA
@lh3
lh3 / fq_download.md
Last active December 30, 2017 22:22
Downloading gzip'd fastq
Source Dst. file type Protocol Time (s) Command Line
NCBI .sra ftp 296 wget
NCBI .fastq.gz sra toolkit ~23000 fastq-dump -Z --gzip --split-spot
local file sra=>fastq.gz sra toolkit ~15000 fastq-dump --gzip --split-spot --split-3
EBI .fastq.gz aspera 513+492 aspera -QT -l 300m
EBI .fastq.gz ftp 1876+1946 wget

Notes:

@superbobry
superbobry / tdf.rst
Last active April 23, 2023 05:22
TDF format spec

TDF

TDF is a binary format developed by the IGV team at Broad Institute.

Overview

Concepts

@alphapapa
alphapapa / mangle
Last active June 21, 2021 16:03
Mangle man pages to show just the parts you need (suitable for aliasing to "man")
#!/bin/bash
less_command='| less $less_no_init -aiF -Ps"Manual page\: $man_page (?ltline %lt?L/%L.:byte %bB?s/%s..? (END):?pB %pB\%..)"'
# Get section
if [[ $1 =~ [0-9]+ ]]
then
section=$1
shift
fi
@audy
audy / weather
Last active January 5, 2016 05:49
#!/bin/bash
export PATH='/usr/local/bin:$PATH'
ansiweather -a off -l 'San Francisco' \
| cut -d '>' -f 2 \
| cut -d '-' -f1 \
| awk '{ print $1 $2 }' \
| tr -d 'C'