ResearchSoftwareInstitute / CellFie

An alternative approach to capture the breadth of cellular functions by performing a functional analysis of existing biological networks.
1 stars 0 forks source link

Incompatibility with gene-name rules #8

Open bkellman opened 6 years ago

bkellman commented 6 years ago

@helenmasson found some incompatibility with the model.rules object. It is missing from the mouse models. We need to check naming conventions.

arichelle commented 6 years ago

Could you details the issue please?

helenmasson commented 5 years ago

When trying to use the iMM1415 model with CellFie, I receive the following error: Index exceeds array bounds.

Error in Node/getFunctionalGeneSets (line 232) geneSets{i} = geneNames(sort(pos));

Error in GPRparser (line 21) currentSets = head.getFunctionalGeneSets(model.genes)';

Error in CodeWebTool_HMedit (line 188) parsedGPR = GPRparser(model);% Extracting GPR data from model

The only input the function is the model. When exploring the fields within the mouse model, I notice that there is no model.rules object (only a model.grRules object), something that is called within the GPRparser function. I checked all the other models that are used in CellFie, and they all seem to have both a model.grRules and a model.rules field. I attempted to add a model.rules field to the mouse model, copying the grRules and modifying the syntax slightly to use & and | instead of "and" and "or", but this didn't work either (you get the same error message posted above). The only other difference I can find between the other models rules object and the object I created is that other models seem to have a coefficient x infront of every GPR number. I don't know how important this is, but my next move is to modify the rules object again to include a coefficient x infront of every value in the GPR rules.

Example of other models rules: '(x(7)) | (x(5)) | (x(6)) | (x(7))'

Example of the mouse model grRules: '269378 or 229709 or 229709'

Example of the the mouse model rules object I created thus far: '269378 | 229709 | 229709'

arichelle commented 5 years ago

Good catch ! There is actually a function in cobra to create grRules from model.rules. Just use that and check if it works. If yes, we need to update the version of iMM1415 available for Cellfie

helenmasson commented 5 years ago

I have a new iMM1415 model with a model.rules that matches the other model. However I am still getting the same error mentioned above when I try to run CellFie. Any other ideas?

arichelle commented 5 years ago

Do you have updated the parser with the last version available in cobra?

arichelle commented 5 years ago

First, we should add a folder with the model used by Cellfie, such as I can easily look at the version you mention in your comment. Note that ideally we should download them directly from their former repo to be sure we do not end end making our own repo of model... Second, I will need to have access to the same data set you use to try to debug ( to add in the test data)

arichelle commented 5 years ago

The problem is related to the missing model.rules field. Furthermore, I assume that when you transform the model.grRules to obtain model.rules, you used the entrez ID instead of the gene position in model. genes. Indeed let take the following example model.genes= [ 1234 453 786 967] % entrez ID for the 4 genes listed model.grRule= (1234 and 967) or 453 therefore model.rules=x(1) & x(4) | x(2) I think you did this way model.rule= (x(1234) & x(967)) | x(453). Am I right? you should submit an issue in cobra github by pointing to the fact that iMM1415 in Bigg repo (http://bigg.ucsd.edu/models/iMM1415) does not have any model.rules field and that a function should be created createRuleField.m (Note that creategrRulefield already exist). I strongly suggest you to submit the code you have used to create and transform the field (with update concerning my comment above). It will allow you to have feedback from the people from Cobra on how to implement this properly....

helenmasson commented 5 years ago

Oh you are totally right, I didn't realize model.rules is actually an index to reference the gene in model.genes. I've made the appropriate changes, however I'm still getting the same error message. I'll submit an issue in cobra github per your suggestion along with my code to transform the iMM1415 model, but maybe hold off until the issue with the model in CellFie is resolved (in case I need to make additional changes/alter my code).

New Model: iMM1415_11.29.18_HM https://github.com/LewisLabUCSD/CellfieWebsite/tree/master/resources/libraries