@nfdi4plants/arctrl 2.0.0-alpha.2 → 2.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Core/ArcTypes.js +1 -1
- package/Core/OntologyAnnotation.js +3 -2
- package/Json/Process/PropertyValue.js +4 -3
- package/Json/Study.js +2 -2
- package/package.json +1 -1
package/Core/ArcTypes.js
CHANGED
|
@@ -2167,7 +2167,7 @@ export class ArcInvestigation {
|
|
|
2167
2167
|
const arg_10 = this$.RegisteredStudyIdentifiers;
|
|
2168
2168
|
const arg_11 = this$.Comments;
|
|
2169
2169
|
const arg_12 = this$.Remarks;
|
|
2170
|
-
return toText(printf("
|
|
2170
|
+
return toText(printf("ArcInvestigation {\r\n Identifier = %A,\r\n Title = %A,\r\n Description = %A,\r\n SubmissionDate = %A,\r\n PublicReleaseDate = %A,\r\n OntologySourceReferences = %A,\r\n Publications = %A,\r\n Contacts = %A,\r\n Assays = %A,\r\n Studies = %A,\r\n RegisteredStudyIdentifiers = %A,\r\n Comments = %A,\r\n Remarks = %A,\r\n}"))(arg)(arg_1)(arg_2)(arg_3)(arg_4)(arg_5)(arg_6)(arg_7)(arg_8)(arg_9)(arg_10)(arg_11)(arg_12);
|
|
2171
2171
|
}
|
|
2172
2172
|
Equals(other) {
|
|
2173
2173
|
let i;
|
|
@@ -66,10 +66,11 @@ export class OntologyAnnotation {
|
|
|
66
66
|
static createUriAnnotation(termSourceRef, localTAN) {
|
|
67
67
|
return `${"http://purl.obolibrary.org/obo/"}${termSourceRef}_${localTAN}`;
|
|
68
68
|
}
|
|
69
|
-
static fromTermAnnotation(tan) {
|
|
69
|
+
static fromTermAnnotation(tan, name) {
|
|
70
|
+
const name_1 = defaultArg(name, "");
|
|
70
71
|
const r = value_4(tryParseTermAnnotation(tan));
|
|
71
72
|
const accession = (r.IDSpace + ":") + r.LocalID;
|
|
72
|
-
return OntologyAnnotation.create(
|
|
73
|
+
return OntologyAnnotation.create(name_1, r.IDSpace, accession);
|
|
73
74
|
}
|
|
74
75
|
get TermAccessionShort() {
|
|
75
76
|
const this$ = this;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Json } from "../../fable_modules/Thoth.Json.Core.0.2.1/Types.fs.js";
|
|
2
|
-
import { map } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
2
|
+
import { unwrap, map } from "../../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
3
3
|
import { ofArray, choose } from "../../fable_modules/fable-library-js.4.16.0/List.js";
|
|
4
4
|
import { equals } from "../../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
5
5
|
import { tryInclude } from "../Encode.js";
|
|
6
6
|
import { context_jsonvalue } from "../context/rocrate/property_value_context.js";
|
|
7
7
|
import { string, object } from "../../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
8
8
|
import { OntologyAnnotation } from "../../Core/OntologyAnnotation.js";
|
|
9
|
+
import { AnnotationValue_decoder } from "../OntologyAnnotation.js";
|
|
9
10
|
import { Value } from "../../Core/Process/Value.js";
|
|
10
11
|
|
|
11
12
|
export function genID(p) {
|
|
@@ -75,8 +76,8 @@ export function encoder(pv) {
|
|
|
75
76
|
|
|
76
77
|
export function decoder(create) {
|
|
77
78
|
return object((get$) => {
|
|
78
|
-
let name, objectArg, code, objectArg_1, value, objectArg_2,
|
|
79
|
-
return create((name = ((objectArg = get$.Optional, objectArg.Field("category", string))), (code = ((objectArg_1 = get$.Optional, objectArg_1.Field("categoryCode", string))), (
|
|
79
|
+
let name, objectArg, code, objectArg_1, code_1, value, objectArg_2, code_2, objectArg_3, name_1, objectArg_4, code_3, objectArg_5, code_4;
|
|
80
|
+
return create((name = ((objectArg = get$.Optional, objectArg.Field("category", string))), (code = ((objectArg_1 = get$.Optional, objectArg_1.Field("categoryCode", string))), (name == null) ? ((code != null) ? ((code_1 = code, OntologyAnnotation.fromTermAnnotation(code_1, unwrap(name)))) : void 0) : ((code != null) ? ((code_1 = code, OntologyAnnotation.fromTermAnnotation(code_1, unwrap(name)))) : OntologyAnnotation.create(name)))), (value = ((objectArg_2 = get$.Optional, objectArg_2.Field("value", AnnotationValue_decoder))), (code_2 = ((objectArg_3 = get$.Optional, objectArg_3.Field("valueCode", string))), ((value == null) && (code_2 == null)) ? void 0 : Value.fromOptions(value, void 0, code_2))), (name_1 = ((objectArg_4 = get$.Optional, objectArg_4.Field("unit", string))), (code_3 = ((objectArg_5 = get$.Optional, objectArg_5.Field("unitCode", string))), (name_1 == null) ? ((code_3 != null) ? ((code_4 = code_3, OntologyAnnotation.fromTermAnnotation(code_4, unwrap(name_1)))) : void 0) : ((code_3 != null) ? ((code_4 = code_3, OntologyAnnotation.fromTermAnnotation(code_4, unwrap(name_1)))) : OntologyAnnotation.create(name_1)))));
|
|
80
81
|
});
|
|
81
82
|
}
|
|
82
83
|
|
package/Json/Study.js
CHANGED
|
@@ -13,7 +13,7 @@ import { Comment_ISAJson_decoder, Comment_ISAJson_encoder, Comment_ROCrate_decod
|
|
|
13
13
|
import { list as list_2, string, object } from "../fable_modules/Thoth.Json.Core.0.2.1/Decode.fs.js";
|
|
14
14
|
import { Decode_objectNoAdditionalProperties, Decode_resizeArray } from "./Decode.js";
|
|
15
15
|
import { toFail, printf, toText, replace } from "../fable_modules/fable-library-js.4.16.0/String.js";
|
|
16
|
-
import {
|
|
16
|
+
import { Study_fileNameFromIdentifier, createMissingIdentifier, Study_tryIdentifierFromFileName, Study_tryFileNameFromIdentifier } from "../Core/Helper/Identifier.js";
|
|
17
17
|
import { Person_removeSourceAssayComments, Person_getSourceAssayIdentifiersFromComments, Person_setSourceAssayComment, ARCtrl_ArcTables__ArcTables_fromProcesses_Static_62A3309D, ARCtrl_ArcTables__ArcTables_GetProcesses } from "../Core/Conversion.js";
|
|
18
18
|
import { list as list_1 } from "../fable_modules/Thoth.Json.Core.0.2.1/Encode.fs.js";
|
|
19
19
|
import { Process_ISAJson_decoder, Process_ISAJson_encoder, Process_ROCrate_decoder, Process_ROCrate_encoder } from "./Process/Process.js";
|
|
@@ -123,7 +123,7 @@ export const Study_ROCrate_decoder = object((get$) => {
|
|
|
123
123
|
*/
|
|
124
124
|
export function Study_ISAJson_encoder(assays, s) {
|
|
125
125
|
const study = s.Copy(true);
|
|
126
|
-
const fileName =
|
|
126
|
+
const fileName = Study_fileNameFromIdentifier(study.Identifier);
|
|
127
127
|
let assays_1;
|
|
128
128
|
const n = [];
|
|
129
129
|
let enumerator = getEnumerator(Study_Helper_getAssayInformation(assays, study));
|