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
# Place this in your .bashrc | |
# Covers several corner cases such as nested apostrophes, history extraction in screens/subshells, Slack being down, etc. | |
# Strings to replace with your own credentials: | |
## {your email address} (1 instance) | |
## {slack webhook url} (1 instance) (see guide below) | |
## {your computer name} (2 instances) | |
# How to set up a Slack webhook (as of Jul 2019): | |
## Go here: https://api.slack.com/apps?new_app=1. | |
## Click “incoming webhooks” and turn the slider on |
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
cat rtable_raw.txt | grep '^R' | sed 's/R\(.\{1,2\}\)/\1/g; s/\([0-9]\.\).*$//g; s/( + M)//g; s/\([a-zA-Z]*\) \([1-9]\)\( \)\?\(-[1-9]\)\?/\1\2\4/g; s/\([+=]\)/ \1 /g' > rxns.txt | |
cat rxns.txt | sed 's/^[0-9]\{1,2\}//g; s/^\(.*\)=\(.*\)/\1\n\2/g' | awk '{ for(i = 1; i <= NF; i++) { if ($i!="+") {print tolower($i)} } }' | sed 's/^[0-9]//g' | sort -u > species.txt | |
cat rxns.txt | sed 's/^..\? //g; s/ [0-9]\(.*\)/ \1 + \1/g' | awk '{print tolower($0)}' > rxns_refined.txt |