View gist:d3462ad653e3d9ca546a082e90656594
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
ps -axeo pid,etime,command | awk '$2~/^0[1234]-/ && $0~/COMMAND/ { print $1 }' | xargs kill |
View foamcount.sh
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
for FILE in *.tsv; do | |
LI=`grep -v '^#' $FILE | wc -l`; | |
SEQS=`gunzip -c ./../NPRB/$F1.faa.gz | grep -c '^>'`; | |
BP=`gunzip -c ./../NPRB/$F1.faa.gz | grep -v '^>' | wc -b`; | |
echo -e "$FILE\t$LI" >> target_hits.txt; | |
done | |
rm target_hits2.txt; | |
for FILE in *.tsv; do |
View get-kos.sh
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 | |
Search=$1 | |
grep -i $Search FOAM-onto_rel1.tsv > $Search.ont | |
grep -i $Search FOAM-onto_rel1.tsv | cut -f5 > $Search.ko | |
wc -l $Search.ko | |
rm $Search.acc | |
grep -A1 -f $Search.ko ./../FOAM/FOAM-hmm_rel1a_switch.hmm | grep NAME | tr -s ' ' | cut -f2 -d' ' | sort -u > $Search.acc | |
wc -l $Search.acc |
View gist:4c2cadec8e62683636d32ab52146bd7f
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 |
View srun-metaspades.sh
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 |
View run-hmmer.sh
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`; |
View gist:24090e42b4487635e8ac9f5c566ff417
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 |
View gist:c6f318ae79e9695af6af14d04963f554
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 |
View gist:b2cc9d192d214687b575ab0cce02f5f8
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 |
View forum
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 |
NewerOlder