Comments (7)
@BenjaSanchez Looking in the history of getModelFromHomology
it seems like that flag has been false
since it's been introduced (0c280e5).
When removeGenes
is called in getModelFromHomology
, it's in a loop with n = number of template models. Changing the standardizeRules
flag to true here would mean that if non-standard grRules would be encountered, it wouldn't necessarily be obvious for which of the models the grRules should be adjusted.
Instead, it might be better to run standardizeGrRules
near the beginning of getModelFromHomology
for all template models, like:
for i=1:length(models)
fprintf('Standardizing grRules of template model with ID %s:\n',models{i}.id);
[models{i}.grRules,models{i}.rxnGeneMat]=standardizeGrRules(models{i},false);
end
from raven.
@lucaz88 sounds like some grRule that the function canRxnCarryFlux
is receiving might be non-compliant, as the line canIt = eval(geneRule);
is failing. Have you tried as a first step in your pipeline running your old_model
through standardizeGrRules.m
to check if all rules are properly defined? The function should detect which rules are non-compliant and suggest you how to change them:
[grRules,rxnGeneMat,indexes2check] = standardizeGrRules(old_model);
If after changing those rules (if any) you still get the same error then please remove the final ;
in line 103 of removeGenes
and paste here which rule is creating the error. Let us know how it goes! :)
from raven.
Thanks a lot for the quick reply!!
So I ran the standardizeGrRules and it just throws me a warning for this rule:
grRule #4239: (311550) and (309435 or 311846) and (300949 or 307814) and (306012)
But it doesn't seem to be the problem. If I completely remove that rule and run the getModelFromHomology (without semicolon at line 103 of the removeGenes script) I got the following error:
....
geneRule ='(false && true)'
geneRule =
'(false && true)'
geneRule =
'(AEZ63317)'
Error using eval
Undefined function or variable 'AEZ63317'.Error in removeGenes>canRxnCarryFlux (line 104)
canIt = eval(geneRule);Error in removeGenes (line 62)
canCarryFlux(j) = canRxnCarryFlux(reducedModel,grRule,genes{i});Error in getModelFromHomology (line 312)
models{useOrderIndexes(i)}=removeGenes(models{useOrderIndexes(i)},~a,true,true,false);
So I looked into old_model.genes and I found this gene called 'AEZ63317'. There are also a bunch of other genes with non-numerical names (e.g. Phatr_10581, YP_874448.1,..) and they are of course included in the old_model.grRules so I cannot remove them. Do you think that if I change the gene IDs with new numeric-names I could bypass the issue?
from raven.
@lucaz88 no problem with having non-numerical gene IDs, I see the problem now. Your rule comes with extra parenthesis (AEZ63317)
, when it should be for proper parsing just AEZ63317
. removeGenes
requires for proper functioning that rules don't have those unnecessary parenthesis, and standardizeGrRules
actually can take care of those. So I would then recommend:
- Either delete grRule #4239 or make it compliant:
(311550 and 309435 and 300949 and 306012) or (311550 and 311846 and 300949 and 306012) or (311550 and 309435 and 307814 and 306012) or (311550 and 311846 and 307814 and 306012)
- Update the grRules in
old_model
to be compliant:
[grRules,rxnGeneMat,indexes2check] = standardizeGrRules(old_model);
old_model.grRules = grRules;
old_model.rxnGeneMat = rxnGeneMat;
And then run your pipeline. See how that goes :)
On a side note, @edkerk @simas232 @Hao-Chalmers I see that getModelFromHomology
calls removeGenes
with the flag standardizeRules = false
. Is there a specific reason for that? If we would make it true
then this problem would have been skipped and the function would have only errored at the conflicting grRule #4239
from raven.
@BenjaSanchez It worked! getModelFromHomology ran without problem, although the resulting draft model has no rxns or mets.
I saw in an old reply that you gave in gitter to @eileenhannas that gene IDs in the template model and in the related fasta file has to be identical. This means that the seq headers in the fasta have to match the template_model.genes field, right?
from raven.
@lucaz88 indeed, it is essential that the fasta seq headers match the template_model.genes
identifiers. If you pull the latest devel
version, getModelFromHomology
will check whether the gene IDs match (but you already self identified that this was not the case for you).
from raven.
The code from #120 (comment) has now been implemented in devel
PR #124.
from raven.
Related Issues (20)
- changeGeneAssoc not work if all the gene already are in the model
- bug: on Apple silicon CPU getDiamond fails HOT 4
- Failed to make blastp executable HOT 4
- fix: addRxns definition of `rev` field
- chore: update tINIT references HOT 3
- solveLP() does not work because of issue in code HOT 6
- RAVEN >= v2.7.7 getModelFromHomology generates invalid GPRs from Recon3D HOT 3
- Error: ftINIT - failed to find good enough solution within time frame HOT 14
- help: getKEGGModelForOrganism gives error when using dispEM HOT 1
- bug: RAVEN 2.8.2 checkInstallation on new install
- bug: model loaded from YAML has no c-field
- bug: soplex reported failure, even when functional
- SBO terms not exported properly to Excel format when they are within MIRIAM annotations HOT 5
- Can fast tINIT integrate data from bulk RNA-seq? HOT 8
- Unrecognized field name "compNames" with ravenCobraWrapper error
- bug: make binaries executable on Ubuntu
- bug: simplifyModel with irreversible backwards-only reactions
- Error in getModelFromHomology function HOT 3
- PredictLocalization issue
- Is ftINIT compatible with other solvers than Gurobi? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from raven.