Skip to content

Instantly share code, notes, and snippets.

@cmdcolin
cmdcolin / eslint.config.mjs
Last active May 20, 2025 23:16
example eslint v9 config for a vite app
import eslint from '@eslint/js'
import importPlugin from 'eslint-plugin-import'
import eslintPluginReact from 'eslint-plugin-react'
import eslintPluginReactHooks from 'eslint-plugin-react-hooks'
import tseslint from 'typescript-eslint'
export default tseslint.config(
{
// might be able to find a way to not ignore some of these but i just ignore them
ignores: [
@cmdcolin
cmdcolin / breakpoints.md
Last active January 3, 2025 17:30
How to access breakpoint split view in jbrowse 2

JBrowse 2 has a special "view type" called the "breakpoint split view" that allows you to see the connection between split long reads (e.g. SA tag) and paired-end reads

Ways to access the breakpoint split view

Using the SV inspector to launch a breakpoint split view

The SV inspector lets you load a VCF containing SV calls and then will launch a "breakpoint split view". Note that the breakpoint split view that it launches will be empty but you can then add your BAM or CRAM reads to it (on both top and bottom levels sometimes is needed)

@cmdcolin
cmdcolin / gist:f8dae7f7232c7260edb52b62e0222207
Created January 2, 2025 22:15
posts i made to /r/experimental_ambient
jason lescalleet - the pilgrim https://www.youtube.com/watch?v=lU6PbEg6YRk (dedicated to his dad, over an hour of morbid ambience and then harsh noise)
j peterson https://www.youtube.com/watch?v=eVX7DkYr_oA (weird ambient that also explores morbid themes in his other works)
mattias gustaffson https://youtu.be/0pxzWUbuzYo (dark tape manipulations)
morgan hall - skid row palace https://youtu.be/2gfBktiURew (muted dark ambient power electronics)
all of korea undok group stuff https://soundcloud.com/korea-undok-group
work/death - mulberries ripen and rot side b midway thru particularly dragging
hazl fog https://youtu.be/zjqZWejfOmE (everything makade star and b.p.)
prurient - sexual magic (erik satie reinterpreted by prurient. also entire prurient backcatalog)
the humble bee - morning music https://youtu.be/leu6YmRWS2s (soft tape music for healing)
gordan wilson - https://iatrogenesis.bandcamp.com/track/american-ulterior (and entire gordon/oscillating innards backcatalog)
@cmdcolin
cmdcolin / nightcoffee.md
Created January 2, 2025 17:40
a list of shows and films that involve drinking coffee at night
  • Jaws 2 - 0:38:00
  • Jaws 2 - 0:54:00
  • Beverley hills cop - 0:55:00
  • Twister - 0:01:51
  • Twister - 1:09:00
  • Walton Christmas - 1:28:40
  • Don't Look Up - end of movie
- Hugo Maillard - Tas de Foin https://www.youtube.com/watch?v=3owkg4wGw9o
@cmdcolin
cmdcolin / jb1tojb2.js
Last active November 27, 2024 01:46
jbrowse 1 to jbrowse 2 nodejs script
const fs = require("fs");
const trackList = JSON.parse(fs.readFileSync("./trackList.json", "utf8"));
const newTracks = [];
const unconverted = [];
function basicData(track) {
return {
name: track.key || track.label,
trackId: track.label,
This file has been truncated, but you can view the full file.
src/App.tsx(21,24): error TS2339: Property 'showTrack' does not exist on type 'IModelType<{ id: IOptionalIType<ISimpleType<string>, [undefined]>; displayName: IMaybe<ISimpleType<string>>; minimized: IType<boolean | undefined, boolean, boolean>; } & { id: IOptionalIType<ISimpleType<string>, [undefined]>; type: ISimpleType<"LinearGenomeView">; offsetPx: IType<number | undefined, number, number>; bpPerPx: IType<number | undefined, number, number>; displayedRegions: IOptionalIType<IType<Region[], Region[], Region[]>, [undefined]>; tracks: IArrayType<IAnyType>; hideHeader: IType<boolean | undefined, boolean, boolean>; hideHeaderOverview: IType<boolean | undefined, boolean, boolean>; hideNoTracksActive: IType<boolean | undefined, boolean, boolean>; trackSelectorType: IOptionalIType<ISimpleType<string>, [undefined]>; showCenterLine: IOptionalIType<ISimpleType<boolean>, [undefined]>; showCytobandsSetting: IOptionalIType<ISimpleType<boolean>, [undefined]>; trackLabels: IOptionalIType<ISimpleType<string>, [undefined]>
@cmdcolin
cmdcolin / data.tsv
Last active November 22, 2024 04:34
example
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
@cmdcolin
cmdcolin / gist:62db32a8a9a7c95d50fdf11009c9e87e
Last active November 8, 2024 01:34
trying to run lorna-sh
$ git clone https://github.com/goodarzilab/lorna-sh
$ cd lorna-sh
## look around...i decided to try starting in processing_seqs
$ find .
$ cd processing_seqs
## in R repl, install dependencies
## data.table
## optparse
@cmdcolin
cmdcolin / gist:66a06f935d2638f10ad994c31192a833
Last active November 7, 2024 22:48
a short "hands-on" with RNA-seq in the genome browser

What does RNA-seq look like in the genome browser?

here is a picture of a "RNA-seq BAM file" in JBrowse 2

image

(live link https://jbrowse.org/code/jb2/v2.16.1/?config=test_data%2Fconfig_demo.json&session=share-i3nrunRxkg&password=S1tAc)

you can see that there are all these little grey boxes and the black lines connecting them. These are the so-called "reads" in the RNA-seq BAM file! there is also a little "histogram" along the top. This is showing how many "reads" mapped to a given position in the genome