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
/* | |
d3.phylogram.js | |
Wrapper around a d3-based phylogram (tree where branch lengths are scaled) | |
Also includes a radial dendrogram visualization (branch lengths not scaled) | |
along with some helper methods for building angled-branch trees. | |
d3.phylogram.build(selector, nodes, options) | |
Creates a phylogram. | |
Arguments: | |
selector: selector of an element that will contain the SVG |
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
/* | |
d3.phylogram.js | |
Wrapper around a d3-based phylogram (tree where branch lengths are scaled) | |
Also includes a radial dendrogram visualization (branch lengths not scaled) | |
along with some helper methods for building angled-branch trees. | |
d3.phylogram.build(selector, nodes, options) | |
Creates a phylogram. | |
Arguments: | |
selector: selector of an element that will contain the SVG |
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
# load required libraries | |
library(tm) | |
library(ggplot2) | |
library(lsa) | |
# 1. Prepare mock data | |
text <- c("transporting food by cars will cause global warming. so we should go local.", | |
"we should try to convince our parents to stop using cars because it will cause global warming.", | |
"some food, such as mongo, requires a warm weather to grow. so they have to be transported to canada.", | |
"a typical electronic circuit can be built with a battery, a bulb, and a switch.", |
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
Q&A |
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
while read line; do title=`echo $line | sed 's/ /+/g'`; curl -s https://api.crossref.org/works?query.title=$title&rows=1 | tr ',' '\n' | tr -d '"\' | grep ^DOI | cut -f2- -d':'; done < titles.txt > titles.bib |
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
while read line; do curl -LH "Accept: application/x-bibtex" https://doi.org/$line | grep -v '^\s*[<"]'; done < dois.txt > dois.bib |
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
while read line; do curl -s "https ://api.crossref.org/works?query=`echo $line | tr -sC '[^a-zA-Z]' '+'`" | tr "," "\n" | tr -d '"\' | grep ^DOI | cut -f2- -d':' | head -n1 | xargs -I{} curl -sLH "Accept: application/x-bibtex" https ://doi.org/{} | grep -v '^\s*[<"]'; done < file |
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/sh | |
# run hmmer using hmm files | |
#INDIR=$1 #directory to search for .fastq.gz files | |
INDIR=~/work/NPRB | |
cd ~/work/hmm | |
for hmmfile in *.hmm; do | |
hmm=`basename $hmmfile .hmm`; |
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 | |
NODE=bio | |
THREADS=7 #7 for bio, 24 for t1small | |
MEM=200 #128 max for t1small, 200+ for bio | |
mkdir -p spades-assembly | |
DIR='.' | |
#NPRB_meta_TBS.04.MEIO.R1.trimmed.fastq.gz | |
for PREFIX in `ls *.trimmed.fastq.gz | cut -f1-3 -d'.' | sort -u `; do |
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
head -n1000 18*R1.fastq | grep -v -e '==> 18' -e '^$' | paste - - - - | cut -f2 | sort | uniq -c | sort -rn | head -n1000 | catg > 18s-top1000f.fa |
OlderNewer