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

Miriam annotation #1266

Merged
merged 8 commits into from
Jun 27, 2018
Merged

Miriam annotation #1266

merged 8 commits into from
Jun 27, 2018

Conversation

tpfau
Copy link
Contributor

@tpfau tpfau commented Jun 25, 2018

This pr adds functionality to add MIRIAM annotations to the model.

I hereby confirm that I have:

  • Tested my code on my own machine
  • Followed the guidelines in the Contributing Guide
  • Selected develop as a target branch (top left drop-down menu)

(Note: You may replace [ ] with [X] to check the box)

@codecov-io
Copy link

codecov-io commented Jun 25, 2018

Codecov Report

❗ No coverage uploaded for pull request base (develop@d7a3db8). Click here to learn what that means.
The diff coverage is 91.17%.

Impacted file tree graph

@@            Coverage Diff             @@
##             develop    #1266   +/-   ##
==========================================
  Coverage           ?   43.09%           
==========================================
  Files              ?      869           
  Lines              ?    63541           
  Branches           ?        0           
==========================================
  Hits               ?    27380           
  Misses             ?    36161           
  Partials           ?        0
Impacted Files Coverage Δ
src/base/io/utilities/SBML/getBioQualifiers.m 100% <ø> (ø)
src/base/io/utilities/getDatabaseMappings.m 85.71% <ø> (ø)
src/base/io/utilities/getDefinedFieldProperties.m 97.75% <100%> (ø)
...rc/base/io/utilities/SBML/mapAnnotationsToFields.m 94.73% <100%> (ø)
src/base/io/definitions/getRegisteredDatabases.m 81.81% <81.81%> (ø)
src/analysis/exploration/getMIRIAMAnnotations.m 90.62% <90.62%> (ø)
...c/reconstruction/refinement/addMIRIAMAnnotations.m 91.66% <91.66%> (ø)
src/base/io/definitions/getAnnotationFieldName.m 94.44% <94.44%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d7a3db8...ccc9e4c. Read the comment docs.

@rmtfleming
Copy link
Member

merge

% invertSelection: Invert the qualifierSelection i.e. use
% only those specified (default: false);
%
% OUTPUT:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OUTPUTS:

arrayDim2Pos = arrayDim2Pos + 1;
end

%Now, build a struct out of this cell array.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May you format all comments as % now, ... (space and lowercase) ?

% only a single element is annotated, or a cell array of
% chars if multiple elements are annotated.
%
% OPTIONAL INPUT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OPTIONAL INPUTS:


%Get the defined databases
try
dbs = getRegisteredDatabases();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this error be thrown inside of getRegisteredDatabases?

databases = repmat({databases},numel(ids),1);
end


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May you add here a few more comments?

annotationQualifier = columnVector(annotationQualifier);



Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also here, a few more comments would be nice.

annotationQualifiers = unique(annotationQualifier);
udatabases = unique(databases);


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any more comments that you could add?



%Now, we have to go through all base Fields
for field = 1 : numel(usedFields)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add more comments here to make this part more readable.

assert(all(strcmp(modelWithID.rxnisbrendaID(2:end),'')));
assert(strcmp(modelWithID.rxnisbrendaID{1},validBrendaID));
additionalIDs = {validBrendaID, '2.3.4.5', '5.6.7.8'};
%Add multiple additional IDs (we need the ID 3 times.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May you add a blank line before each comment to improve readability?

assert(strcmp(annotations.cvterms(1).qualifierType,'bioQualifier'))
%It contains all those IDs.
assert(isempty(setxor({annotations.cvterms(1).ressources(:).id},additionalIDs)));
%And its the brenda database
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The format of the comments is not consistent (see my comments above).

@laurentheirendt
Copy link
Contributor

Thanks @tpfau 👍

@laurentheirendt laurentheirendt merged commit 23a83f7 into opencobra:develop Jun 27, 2018
@tpfau tpfau deleted the MIRIAMAnnotation branch September 4, 2018 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants