This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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)}/> | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
## uses home directory to avoid git clean in repo clearing files | |
touch ~/lines | |
## choice 1. for all commits | |
git log --pretty=format:'%h %as'|sed 's/ /\t/' >! ~/commitlog | |
## choice 2. for all tags | |
git for-each-ref --sort=creatordate --format '%(refname) %(creatordate:short)' refs/tags|sed -e 's/refs\/tags\///'|sed 's/ /\t/' >! ~/commitlog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
testing | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { LocalFile } from 'generic-filehandle' | |
import NCList from '@gmod/nclist' | |
const filter = new Set([ | |
'Start', | |
'End', | |
'Strand', | |
'Source', | |
'Seq_id', | |
'Name', | |
'Score', |
NewerOlder