This may assert, for example, the original author's right to publish the data first.
@@ -1221,7 +1230,7 @@ export default {
targetGeneIdentifierSuggestions[dbName] = useItems({ itemTypeName: `${dbName.toLowerCase()}-identifier-search` })
}
- const licenses = useItems({itemTypeName: 'license'})
+ const licenses = useItems({itemTypeName: 'active-license'})
const taxonomies = useItems({itemTypeName: 'taxonomy'})
const taxonomySuggestions = useItems({itemTypeName: 'taxonomy-search'})
const geneNames = useItems({ itemTypeName: 'gene-names' })
@@ -1284,6 +1293,7 @@ export default {
abstractText: null,
methodText: null,
licenseId: null,
+ hasCustomUsagePolicy: false,
dataUsagePolicy: null,
contributors: [],
@@ -2093,6 +2103,7 @@ export default {
this.methodText = this.item.methodText
this.licenseId = this.item.license.id
this.dataUsagePolicy = this.item.dataUsagePolicy
+ this.hasCustomUsagePolicy = this.dataUsagePolicy ? true : false
this.contributors = _.sortBy(this.item.contributors, ['familyName', 'givenName', 'orcidId'])
this.doiIdentifiers = this.item.doiIdentifiers
@@ -2129,6 +2140,7 @@ export default {
this.abstractText = null
this.methodText = null
this.licenseId = this.defaultLicenseId
+ this.hasCustomUsagePolicy = false
this.dataUsagePolicy = null
this.contributors = []
@@ -2168,7 +2180,7 @@ export default {
).filter(
secondary => !primaryPublicationIdentifiers.some(primary => primary.identifier == secondary.identifier && primary.dbName == secondary.dbName)
)
- console.log(this.scoreRanges)
+
const editedFields = {
experimentUrn: this.experimentUrn ? this.experimentUrn : this.experiment?.urn,
title: this.title,
@@ -2181,7 +2193,7 @@ export default {
doiIdentifiers: this.doiIdentifiers.map((identifier) => _.pick(identifier, 'identifier')),
primaryPublicationIdentifiers: primaryPublicationIdentifiers,
secondaryPublicationIdentifiers: secondaryPublicationIdentifiers,
- dataUsagePolicy: this.dataUsagePolicy,
+ dataUsagePolicy: this.hasCustomUsagePolicy ? this.dataUsagePolicy : null,
extraMetadata: {},
scoreRanges: {
diff --git a/src/components/screens/ScoreSetEditor.vue b/src/components/screens/ScoreSetEditor.vue
index 3efe6311..4ddb6700 100644
--- a/src/components/screens/ScoreSetEditor.vue
+++ b/src/components/screens/ScoreSetEditor.vue
@@ -158,17 +158,24 @@
-
+
License
- {{validationErrors['targetSequence.taxonomy']}}
+ {{validationErrors.licenseId}}
+
+
+
+ The currently selected license is outdated and no longer supported for new score sets. We highly recommend switching to an updated license
+ to ensure your dataset is not excluded from data federation and aggregation by MaveDB collaborators.
+
+
+
+
+ Choosing a license with these restrictions may cause your dataset to be excluded from data federation
+ and aggregation by MaveDB collaborators.
+
-
- Choosing a license with these restrictions may cause your dataset to be excluded from data federation
- and aggregation by MaveDB collaborators.
-
license.shortName == 'CC0')?.id : null
},
+ selectableLicenses: function () {
+ return this.licenses ? this.licenses.filter((license) => this.licenseIsSelectable(license)) : []
+ },
geneNamesAsObject: function () {
// Heinous workaround for string filtration, see: https://github.com/primefaces/primevue/issues/2059
// When this is fixed, we'll need to also remove object accessors in other miscellaneous helpers below.
@@ -1403,6 +1413,16 @@
this.setTaxonomySearch(event.query)
},
+ // A license is selectable if it is the active license for a score set or if it is marked as active
+ // in the backend.
+ licenseIsSelectable: function(license) {
+ if (this.item?.license.id === license.id) {
+ return true
+ } else {
+ return license.active
+ }
+ },
+
targetsCleared: function () {
this.targetGenes = [];
},
diff --git a/src/lib/item-types.js b/src/lib/item-types.js
index 79e0b01f..9bf6189f 100644
--- a/src/lib/item-types.js
+++ b/src/lib/item-types.js
@@ -11,7 +11,7 @@ const itemTypes = {
}
},
'controlled-keywords-variant-search': {
- name: 'controlled-keywords-variant-library-search',
+ name: 'controlled-keywords-variant-library-search',
restCollectionName: 'controlled-keywords',
httpOptions: {
list: {
@@ -21,7 +21,7 @@ const itemTypes = {
}
},
'controlled-keywords-endo-system-search': {
- name: 'controlled-keyword-endogenous-locus-library-method-system',
+ name: 'controlled-keyword-endogenous-locus-library-method-system',
restCollectionName: 'controlled-keywords',
httpOptions: {
list: {
@@ -31,7 +31,7 @@ const itemTypes = {
}
},
'controlled-keywords-endo-mechanism-search': {
- name: 'controlled-keywords-endogenous-locus-library-method-mechanism',
+ name: 'controlled-keywords-endogenous-locus-library-method-mechanism',
restCollectionName: 'controlled-keywords',
httpOptions: {
list: {
@@ -41,7 +41,7 @@ const itemTypes = {
}
},
'controlled-keywords-in-vitro-system-search': {
- name: 'controlled-keywords-in-vitro-construct-library-method-system',
+ name: 'controlled-keywords-in-vitro-construct-library-method-system',
restCollectionName: 'controlled-keywords',
httpOptions: {
list: {
@@ -51,7 +51,7 @@ const itemTypes = {
}
},
'controlled-keywords-in-vitro-mechanism-search': {
- name: 'controlled-keywords-in-vitro-construct-library-method-mechanism',
+ name: 'controlled-keywords-in-vitro-construct-library-method-mechanism',
restCollectionName: 'controlled-keywords',
httpOptions: {
list: {
@@ -61,7 +61,7 @@ const itemTypes = {
}
},
'controlled-keywords-delivery-search': {
- name: 'controlled-keywords-delivery-method',
+ name: 'controlled-keywords-delivery-method',
restCollectionName: 'controlled-keywords',
httpOptions: {
list: {
@@ -71,7 +71,7 @@ const itemTypes = {
}
},
'controlled-keywords-phenotypic-dimensionality-search': {
- name: 'controlled-keywords-phenotypic-assay-dimensionality',
+ name: 'controlled-keywords-phenotypic-assay-dimensionality',
restCollectionName: 'controlled-keywords',
httpOptions: {
list: {
@@ -81,7 +81,7 @@ const itemTypes = {
}
},
'controlled-keywords-phenotypic-method-search': {
- name: 'controlled-keywords-phenotypic-assay-method',
+ name: 'controlled-keywords-phenotypic-assay-method',
restCollectionName: 'controlled-keywords',
httpOptions: {
list: {
@@ -91,7 +91,7 @@ const itemTypes = {
}
},
'controlled-keywords-phenotypic-modle-system-search': {
- name: 'controlled-keywords-phenotypic-assay-model-system',
+ name: 'controlled-keywords-phenotypic-assay-model-system',
restCollectionName: 'controlled-keywords',
httpOptions: {
list: {
@@ -101,7 +101,7 @@ const itemTypes = {
}
},
'controlled-keywords-phenotypic-profiling-strategy-search': {
- name: 'controlled-keywords-phenotypic-assay-profiling-strategy',
+ name: 'controlled-keywords-phenotypic-assay-profiling-strategy',
restCollectionName: 'controlled-keywords',
httpOptions: {
list: {
@@ -111,7 +111,7 @@ const itemTypes = {
}
},
'controlled-keywords-phenotypic-sequencing-type-search': {
- name: 'controlled-keywords-phenotypic-assay-sequencing-read-type',
+ name: 'controlled-keywords-phenotypic-assay-sequencing-read-type',
restCollectionName: 'controlled-keywords',
httpOptions: {
list: {
@@ -144,6 +144,16 @@ const itemTypes = {
name: 'license', // TODO Redundant, change this structure
restCollectionName: 'licenses'
},
+ 'active-license': {
+ name: 'active-license', // TODO Redundant, change this structure
+ restCollectionName: 'active-licenses',
+ httpOptions: {
+ list: {
+ method: 'get',
+ url: `${config.apiBaseUrl}/licenses/active`
+ }
+ }
+ },
'pubmedPublicationIdentifier': {
name: 'pubmedPublicationIdentifier', // TODO Redundant, change this structure
restCollectionName: 'publication-identifiers',