Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: prepHumanModelForftINIT with paths #422

Merged
merged 5 commits into from
Nov 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions code/tINIT/prepHumanModelForftINIT.m
Original file line number Diff line number Diff line change
@@ -1,22 +1,31 @@
function prepDataHumanGEM = prepHumanModelForftINIT(model, convertGenes)
function prepDataHumanGEM = prepHumanModelForftINIT(model, convertGenes, essentialTasksFilePath, rxnsFilePath)
mihai-sysbio marked this conversation as resolved.
Show resolved Hide resolved
% prepHumanModelForftINIT
% Generates a "standard" prepData structure from Human-GEM to be used in ftINIT.
% This function typically takes a couple of hours to run, so we recommend to only
% run this once and save the results to a .mat file.
%
% model Either Human-GEM or a GEM derived from Human-GEM,
% such as Mouse-GEM.
% convertGenes True if the genes should be converted to symbols
% ('CD8A' etc., and not ENSEMBL)
% essentialTasksFilePath Path to the metabolicTasks_Essential.txt
% file. This file can normally be found under
% HumanGEM/data/metabolicTasks/metabolicTasks_Essential.txt
% If using for example Mouse-GEM, supply another path.
% rxnsFilePath Path to the reactions.tsv
% file. This file can normally be found under
% HumanGEM/model/reactions.tsv
% If using for example Mouse-GEM, supply another path.
%
% Usage: prepDataHumanGEM = prepHumanModelForftINIT(convertGenes)
% Usage: prepDataHumanGEM = prepHumanModelForftINIT(model, convertGenes, essentialTasksFilePath, rxnsFilePath)
%




%load tasks
taskStruct = parseTaskList(which('metabolicTasks_Essential.txt'));
taskStruct = parseTaskList(essentialTasksFilePath);
%Spontaneous reactions:
rxns_tsv = importTsvFile(which('reactions.tsv'));
rxns_tsv = importTsvFile(rxnsFilePath);
spont = rxns_tsv.spontaneous;
spontRxnNames = rxns_tsv.rxns(spont == 1);%very few

Expand Down