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

Error in getModelFromHomology function #533

Closed
SANDRA-ui-rgp opened this issue Mar 12, 2024 · 3 comments
Closed

Error in getModelFromHomology function #533

SANDRA-ui-rgp opened this issue Mar 12, 2024 · 3 comments
Labels
bug Bug that needs fixing. fixed in develop This issue is fixed and pushed to develop branch. Will be closed when fix appears in master branch.

Comments

@SANDRA-ui-rgp
Copy link

Description of the issue:

An existing function, "getModelFromHomology," is not working. I am attempting to create a draft metabolic model of Plasmodium vivax. I have conducted BLAST searches on the sequences of P. berghei and P. vivax, which I have saved as "blast." "ipbeliver" is my reference model, with 'pberg' and 'pvp01' serving as the reference model and target model IDs, respectively.

Code:

modelpviv = getModelFromHomology({ipbeliver}, blast, 'pvp01',{'pberg'})

Error:
Standardizing grRules of template model with ID "pberg" ... done
The logical indices contain a true value outside of the array bounds.

Error in deleteUnusedGenes (line 45)
reducedModel.geneFrom=reducedModel.geneFrom(toKeep);

Error in getModelFromHomology (line 541)
draftModel=deleteUnusedGenes(draftModel,0);

System information

Installing from location C:\Users\Swapnam\AppData\Roaming\MathWorks\MATLAB Add-Ons\Collections\RAVEN Toolbox
Checking RAVEN release 2.8.6
Latest RAVEN release available 2.8.7
Instructions on how to upgrade here
Checking MATLAB release 2023b
Checking system architecture win64
Set RAVEN in MATLAB path Pass
Save MATLAB path Pass

@edkerk
Copy link
Member

edkerk commented Mar 12, 2024

To troubleshoot this, please do the following:

  • Run open getModelFromHomology
  • Add %-symbols in the beginning of lines 541 to 544 (commenting out the commands on those lines)
  • Save getModelFromHomology
  • Rerun your code
  • Once finished, run save('troubleshoot.mat','modelpviv')
  • Post the generated mat file in a comment in this issue (you can remove it again later)

We can then try to replicate where the error is encountered.

@edkerk edkerk added the bug Bug that needs fixing. label Mar 12, 2024
@SANDRA-ui-rgp
Copy link
Author

Thank you for your response, here is the mat file.
troubleshoot.zip

@edkerk
Copy link
Member

edkerk commented Mar 14, 2024

I'm not sure why, but the geneFrom field (which is inherited from the template model) has less entries than the number of genes in the new model. Regardless, the geneFrom has lost its meaning after running getModelFromHomology, as the original genes are replaced by their orthologs. It is therefore most sensible to remove this field.

I will modify getModelFromHomology to remove the geneFrom field automatically, but as a workaround you should run this line of code before running getModelFromHomology:

ipbeliver = rmfield(ipbeliver,'geneFrom');

@edkerk edkerk mentioned this issue Mar 14, 2024
2 tasks
@edkerk edkerk added the fixed in develop This issue is fixed and pushed to develop branch. Will be closed when fix appears in master branch. label Apr 26, 2024
@edkerk edkerk mentioned this issue May 2, 2024
2 tasks
@edkerk edkerk closed this as completed May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug that needs fixing. fixed in develop This issue is fixed and pushed to develop branch. Will be closed when fix appears in master branch.
Projects
None yet
Development

No branches or pull requests

2 participants