getExprForRxnScore Converts a reaction score to the gene expression (CPM or TPM) required to get that reaction score, if the GPR is only a single gene. Useful function primarily in test cases, where you want to be able to define the reaction scores of rxns, but need to send in gene expression. scores Vector of scores to convert threshold Gene threshold (optional, default 1) expr The resulting gene expression vector. Usage: expr = getExprForRxnScore(scores, threshold)
0001 function expr = getExprForRxnScore(scores, threshold) 0002 % getExprForRxnScore 0003 % Converts a reaction score to the gene expression (CPM or TPM) required 0004 % to get that reaction score, if the GPR is only a single gene. 0005 % Useful function primarily in test cases, where you want to be able to 0006 % define the reaction scores of rxns, but need to send in gene expression. 0007 % 0008 % scores Vector of scores to convert 0009 % threshold Gene threshold (optional, default 1) 0010 % 0011 % expr The resulting gene expression vector. 0012 % 0013 % Usage: expr = getExprForRxnScore(scores, threshold) 0014 0015 if nargin < 2 0016 threshold = 1; 0017 end 0018 0019 %This is how the score is calculated: 5*log(expression./threshold) 0020 %expression = threshold*10.^(scores/5) 0021 %This is a bit confusing - it seems that it is threshold*e.^(scores/5) 0022 %This is probably what is being used in scoreComplexModel, this code 0023 %negates that perfectly, see the T0009 test case. 0024 0025 expr = threshold*exp(scores/5); 0026 0027 end