Skip to content

Instantly share code, notes, and snippets.

@cmdcolin
cmdcolin / prepare.sh
Last active September 16, 2025 13:39
prepare_cancer_giab
#!/bin/bash
export OUT=/var/www/html/jbrowse2
sudo apt-get update
sudo apt-get install nodejs wget apache2 tabix samtools minimap2
sudo service apache2 start
## confirm node.js greater than or equal to v18 is installed
node --version
sudo npm install -g @jbrowse/cli
## confirm that the jbrowse CLI is installed
jbrowse --version
@cmdcolin
cmdcolin / prepare_sv.sh
Last active October 15, 2025 19:38
prepare_sv.sh
#!/bin/bash
export OUT=/var/www/html/jbrowse2
sudo apt-get update
sudo apt-get install nodejs wget apache2 tabix samtools minimap2
sudo service apache2 start
## confirm node.js greater than or equal to v18 is installed
node --version
sudo npm install -g @jbrowse/cli
@cmdcolin
cmdcolin / prepare.sh
Last active August 27, 2025 20:23
current protocols synteny
#!/bin/bash
## this should be an absolute path. this one is a web accessible directory for apache2
export OUT=/var/www/html/jbrowse2
## download and unzip NCBI genomes
datasets download genome accession GCF_000307795.1 --include gff3,genome --filename hpylori_j99.zip
datasets download genome accession GCF_000982695.1 --include gff3,genome --filename hpylori_26695.zip
datasets download genome accession GCF_025998455.1 --include gff3,genome --filename hpylori_chc155.zip
unzip -o hpylori_j99.zip
@cmdcolin
cmdcolin / split_stockholm_msa.py
Created July 3, 2025 17:11
Split large multi-stockholm file into different entries
import os
import re
import sys
# Check if command line argument is provided
if len(sys.argv) < 2:
print("Usage: python script.py <input_file> [output_directory]")
sys.exit(1)
input_file = sys.argv[1]
@cmdcolin
cmdcolin / gist:ac2d61cf17ea0077e9bd73d83e26da9e
Created June 2, 2025 00:31
avante.nvim+claude chat log from chakra->vanilla rewrite

can you remove all chakra styles and just use unstyled divs for example

I'll help you remove all Chakra UI styles from the small-card.tsx file and replace them with unstyled divs. Let me analyze what needs to be changed.

I need to check the util.ts file first to understand the arePropsEqual function that's being used in the component.

╭─  view  succeeded
│ running tool
@cmdcolin
cmdcolin / rifts.md
Last active May 26, 2025 14:06
Examples of rifts in software ecosystems

GTF to GFF conversion in bioinformatics

These are two very similar formats. But some people are still just very stuck on GTF, despite being less well defined than GFF.

CJS (commonjs) to ESM (ecmascript modules) in javascript

Just replace your require with import right? Sometimes it works, sometimes it doesn't. There is a lot of insanity that goes on, and it is really hard to do a proper technical analysis because ESM is pretty strict while CJS and the

@cmdcolin
cmdcolin / changes.md
Last active May 3, 2025 17:49
changes.md

Text-editor saturday

My text editor avante.nvim is just going crazy. Previously it dumped diffs into the 'chat sidebar', and I'd accept them with "A" in the sidebar then accept all with "ca" in the main area...vibe coding. But the avante.nvim switched to running tools that run the edits instead, and is just going crazy with tool usage despite me having disable_tools enabled. I dunno. Maybe I should file a bug. But this spurred me to try to work holistically on my editing skills this morning. I just looked at my config and tweaked a million things...

Trying out rose-pine

Trying rose-pine color scheme. It is kinda funny with tons of italic but it's cute

@cmdcolin
cmdcolin / b73_converter.ts
Created April 22, 2025 17:02
b73_converter.ts
import fs from 'fs'
const tracks = JSON.parse(fs.readFileSync(process.argv[2], 'utf8')) as {
tracks: any[]
}
const asm = 'B73'
const assemblyNames = [asm]
const base = 'https://jbrowse.maizegdb.org/B73/'
console.log(
@cmdcolin
cmdcolin / gist:d18669f9b7467d55239ec3d9a7115f52
Last active April 25, 2025 15:16
the json version of an agentic ai discussion some user had
[
{ "role": "user", "type": "message", "content": "hello" },
{
"role": "assistant",
"type": "message",
"content": "Hello! How can I help you today?\n"
},
{
"role": "user",
"type": "message",
@cmdcolin
cmdcolin / out.tsv
Last active March 9, 2025 17:24
plot.R
program size time mean sd
biojsmsa 1024 1.7980085814 1.7634212551000001 0.054614392814706154
biojsmsa 1024 1.7561014924 1.7634212551000001 0.054614392814706154
biojsmsa 1024 1.7711577354 1.7634212551000001 0.054614392814706154
biojsmsa 1024 1.6753254374000002 1.7634212551000001 0.054614392814706154
biojsmsa 1024 1.7957582314 1.7634212551000001 0.054614392814706154
biojsmsa 1024 1.8305949124 1.7634212551000001 0.054614392814706154
biojsmsa 1024 1.8173887264 1.7634212551000001 0.054614392814706154
biojsmsa 1024 1.7924422974 1.7634212551000001 0.054614392814706154
biojsmsa 1024 1.6920777054 1.7634212551000001 0.054614392814706154