Skip to content

Instantly share code, notes, and snippets.

@cmdcolin
cmdcolin / tiberius_conda_install.txt
Last active September 25, 2024 19:19
Tiberius installation procedure
## step 1, get miniconda
./Miniconda3-latest-Linux-x86_64.sh # follow a bunch of y/n questions in here
## for me, i did not activate it by default so i manually activate it like this in zsh shell
eval "$(/home/cdiesh/miniconda3/bin/conda shell.zsh hook)"
## then activate environment
conda create -n tf2_10 python=3.9
conda activate tf2_10
@cmdcolin
cmdcolin / gist:87d4c81b3719b399d454987eb35f8d18
Last active September 25, 2024 18:52
using Tiberius with conda still error's out
~/Downloads ❯❯❯ eval "$(/home/cdiesh/miniconda3/bin/conda shell.zsh hook)"
(base) ~/Downloads ❯❯❯ conda activate tf2_10 ✘ 1
(tf2_10) ~/Downloads ❯❯❯ python3 -m pip install tensorflow==2.10 numpy==1.24
Collecting tensorflow==2.10
Using cached tensorflow-2.10.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (3.1 kB)
Collecting numpy==1.24
Using cached numpy-1.24.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (5.6 kB)
Collecting absl-py>=1.0.0 (from tensorflow==2.10)
@cmdcolin
cmdcolin / gist:7bf3661b24f6baadba37866af885e8a6
Last active September 25, 2024 19:04
attempts at using Tiberius
~/Tiberius ❯❯❯ python3 -m venv .venv ✘ 130
~/Tiberius ❯❯❯ .venv/bin/activate
zsh: command not found: .venv/bin/activate
~/Tiberius ❯❯❯ source .venv/bin/activate ✘ 127
(.venv) ~/Tiberius ❯❯❯ pip install tensorflow_probability==0.18.0 transformers pyBigWig bio scikit-learn biopython bcbio-gff requests
Collecting tensorflow_probability==0.18.0
Downloading tensorflow_probability-0.18.0-py2.py3-none-any.whl.metadata (13 kB)
Collecting transformers
Downloading transformers-4.44.2-py3-none-any.whl.metadata (43 kB)
Collecting pyBigWig
// usage:
// download this file to a file unprepare_seqs.js
// then run:
// node unprepare_seqs.js /path/to/seq/dir output_file.fa
// after that, fold the lines to a constant line length with:
// fold output_file.fa > output_file2.fa
const fs = require('fs')
const path = require('path')
const dir = process.argv[2] || '.'
const output = process.argv[3] || 'out.fa'
#!/bin/bash
# gen_data.sh
# tags.txt is a list of git tags for a repo
cat tags.txt|while read p; do
## visit our specific JBrowse URL containing tag name in URL
echo -n "$p"$'\t'; node get_page_size.js "https://jbrowse.org/code/jb2/$p/?config=test_data%2Fvolvox%2Fconfig.json&session=share-9NPMoB3dtz&password=aCI2W";
done;
Tomasz Bednarczyk - I see you (Official Video) 2006 https://www.youtube.com/watch?v=lOx6fqT7Cys
Emily Berregaard - A Poem [Strange Rules] https://www.youtube.com/watch?v=liW_749IQ1U&
Olympisk Løft - Tvillingeseglet (Full Album) [Janushoved] 2017 https://www.youtube.com/watch?v=-nMN7ZlUEj8
angelo harmsworth and theodore cale schafer https://www.youtube.com/watch?v=60UiqNli2vs
the yellow book https://www.youtube.com/watch?v=21S18AxFbjg
@cmdcolin
cmdcolin / cpu.R
Last active April 19, 2024 00:34
visualization of dan luu website data https://genomic.social/@cmdcolin/112294679289295864
#!/usr/bin/env Rscript
library(reshape2)
library(ggplot2)
library(tidytext)
x <- read.csv("cpu.csv")
y <- melt(x)
colnames(y) <- c("site", "variable", "s")
y$s <- y$s / 1000
function TranscriptSelector() {
const [error, setError] = useState();
const [transcripts, setTranscripts] = useState();
const [selection, setSelection] = useState();
useEffect(() => {
async () => {
try {
const result = await loadTranscripts(); // imagine this just returned a list of strings
setTranscripts(result);
setSelection(result[0]); // set the initial selection to the first transcript
function MySelectBox() {
const opts = ["apple", "banana", "orange"];
const [mySelection, setMySelection] = useState("apple");
return (
<select
value={mySelection}
onChange={event => setMySelection(event.target.value)}
>
{opts.map(o => (
<option key={o} value={o}>
// this is a controlled component
function MyTextBox() {
const [myValue, setMyValue] = useState('initial value')
return <input type="text" value={myValue} onChange={event=>setMyValue(event.target.value)}/>
}