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', |
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
// example code for "hand-drawing the d3-hierarchy on a canvas" | |
for (const { source, target } of hierarchy.links()) { | |
const { x: sy, y: sx } = source | |
const { x: ty, y: tx } = target | |
ctx.beginPath() | |
ctx.moveTo(sx, sy) | |
ctx.lineTo(sx, ty) | |
ctx.lineTo(tx, ty) | |
ctx.stroke() |
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
#full google drive | |
#https://docs.google.com/spreadsheets/d/1ZpqZ3vVJ3ZIfdENLjeK0O7AYPewleSQ7ybT7DtotLK0/edit#gid=0 | |
#this list slightly enriched for "weird names" by filtering out some not as interesting names using grep | |
#grep -v lncRNA|grep -v snoRNA|grep -v Su\(Ste\)|grep -v Male-specific|grep -v receptor|grep -v Zinc|grep -v antisense|grep -v ase|grep -v chain|grep -v factor|grep -v nuclear|grep -v loop|grep -v -i protein|grep -v RNA|grep -v Cell|grep -v Ste:|grep -v domain|grep -v Cytochrome|grep -v polypep|less|grep -v His | |
211000022279188:1449-2180 shortname=SteXh:CG42398 fullname=SteXh:CG42398 | |
2L:10032690-10038954 shortname=obst-B fullname=obstructor-B | |
2L:10056900-10060095 shortname=Pen fullname=Pendulin | |
2L:10060816-10063925 shortname=Spn31A fullname=Serpin 31A | |
2L:10204757-10206961 shortname=Snx17 fullname=Sorting nexin 17 | |
2L:10211143-10213721 shortname=ath fullname=athos |
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
/* eslint-disable no-restricted-globals */ | |
;(function () { | |
class UMDLocPlugin { | |
name = 'UMDLocPlugin' | |
version = '1.0' | |
install(pluginManager) { | |
/* do nothing */ | |
} |
NewerOlder