-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add document header tags #35
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, comments are only suggestions
|
||
loop en [] [] 1 | ||
loop en terms (parsedTypeDef :: typedefs) formatVersion dataVersion ontology date savedBy autoGeneratedBy subsetdefs imports synonymtypedefs idSpaces defaultRelationshipIdPrefix idMappings remarks treatXrefsAsEquivalents treatXrefsAsGenusDifferentias treatXrefsAsRelationships treatXrefsAsIsAs relaxUniqueIdentifierAssumptionForNamespaces relaxUniqueLabelAssumptionForNamespaces lineNumber | ||
| x when (rxFormatVersion.Match x).Success -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rewriting these match cases as active patterns would severely increase the readability of this giant match case
/// Takes a list of OboEntries and the document header tags and returns the OboOntology based on them. | ||
static member FromOboEntries(entries, formatVersion, ?DataVersion, ?Ontology, ?Date, ?SavedBy, ?AutoGeneratedBy, ?Subsetdefs, ?Imports, ?Synonymtypedefs, ?Idspaces, ?DefaultRelationshipIdPrefix, ?IdMappings, ?Remarks, ?TreatXrefsAsEquivalents, ?TreatXrefsAsGenusDifferentias, ?TreatXrefsAsRelationships, ?TreatXrefsAsIsAs, ?RelaxUniqueIdentifierAssumptionForNamespaces, ?RelaxUniqueLabelAssumptionForNamespaces) = | ||
//let subsetdefs = match Subsetdefs with None -> [] | _ -> Subsetdefs.Value | ||
OboOntology.fromOboEntries formatVersion DataVersion Ontology Date SavedBy AutoGeneratedBy (defaultArg Subsetdefs []) (defaultArg Imports []) (defaultArg Synonymtypedefs []) (defaultArg Idspaces []) DefaultRelationshipIdPrefix (defaultArg IdMappings []) (defaultArg Remarks []) (defaultArg TreatXrefsAsEquivalents []) (defaultArg TreatXrefsAsGenusDifferentias []) (defaultArg TreatXrefsAsRelationships []) (defaultArg TreatXrefsAsIsAs []) (defaultArg RelaxUniqueIdentifierAssumptionForNamespaces []) (defaultArg RelaxUniqueLabelAssumptionForNamespaces []) entries | ||
|
||
/// Writes an OBO Ontology to term and type def stanzas in line form. | ||
static member toLines (oboOntology : OboOntology) = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should also reflect the new header additions, otherwise roundtrip tests will fail
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, comments are only suggestions
This PR
fromLines
function accordinglyOboEntries
function