Skip to content

Commit

Permalink
Use GNU Make
Browse files Browse the repository at this point in the history
  • Loading branch information
kozo2 committed Jun 14, 2022
1 parent 21b1aca commit fce1248
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
scripts/bigg_models_metabolites.txt
scripts/bigg.metabolite.csv
scripts/bigg_models_reactions.txt
scripts/reac_xref.tsv
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pandas
requests
2 changes: 2 additions & 0 deletions scripts/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bigg.metabolite.csv: bigg_models_metabolites.txt
python bigg.metabolite.py
2 changes: 1 addition & 1 deletion scripts/bigg.reaction.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pandas as pd
df = pd.read_table("http://bigg.ucsd.edu/static/namespace/bigg_models_reactions.txt")
df = pd.read_table("bigg_models_reactions.txt")
df2 = df.drop(columns=['name', 'reaction_string', 'model_list', 'old_bigg_ids'])
df2['database_links'] = df2['database_links'].str.split('; ')
df2 = df2.explode('database_links')
Expand Down
3 changes: 3 additions & 0 deletions scripts/download.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
wget http://bigg.ucsd.edu/static/namespace/bigg_models_metabolites.txt
wget http://bigg.ucsd.edu/static/namespace/bigg_models_reactions.txt
wget https://www.metanetx.org/cgi-bin/mnxget/mnxref/reac_xref.tsv
2 changes: 1 addition & 1 deletion scripts/metanetx.reaction.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pandas as pd
import requests

df = pd.read_table("https://www.metanetx.org/cgi-bin/mnxget/mnxref/reac_xref.tsv", skiprows=351)
df = pd.read_table("reac_xref.tsv", skiprows=351)
df2 = df.drop(columns=['description'])
df3 = df2['#source'].str.split(':', expand=True)

Expand Down

0 comments on commit fce1248

Please sign in to comment.