diff --git a/cases/vueapp/src/api/cases.js b/cases/vueapp/src/api/cases.js index 41fb4b44f..76db90029 100644 --- a/cases/vueapp/src/api/cases.js +++ b/cases/vueapp/src/api/cases.js @@ -4,7 +4,7 @@ export default { async listCase( csrfToken, projectUuid, - { pageNo, pageSize, orderBy, orderDir, queryString } + { pageNo, pageSize, orderBy, orderDir, queryString }, ) { let queryArr = [] if (pageNo !== undefined) { @@ -29,7 +29,7 @@ export default { const queryStr = queryArr.length ? '?' + queryArr.join('&') : '' const response = await apiFetch( csrfToken, - `/cases/ajax/case/list/${projectUuid}/${queryStr}` + `/cases/ajax/case/list/${projectUuid}/${queryStr}`, ) return await response.json() }, @@ -39,7 +39,7 @@ export default { csrfToken, `/cases/ajax/case/retrieve-update/${caseUuid}/`, 'GET', - payload + payload, ) return await response.json() }, @@ -49,7 +49,7 @@ export default { csrfToken, `/cases/ajax/case/retrieve-update/${caseUuid}/`, 'PATCH', - payload + payload, ) return await response.json() }, @@ -57,7 +57,7 @@ export default { async loadProjectQcValues(csrfToken, projectUuid) { const response = await apiFetch( csrfToken, - `/variants/ajax/project/qc/${projectUuid}/` + `/variants/ajax/project/qc/${projectUuid}/`, ) return await response.json() }, @@ -86,7 +86,7 @@ export default { const response = await apiFetch( csrfToken, `/cases/ajax/case-comment/list-create/${caseUuid}/`, - 'GET' + 'GET', ) return await response.json() }, @@ -96,7 +96,7 @@ export default { csrfToken, `/cases/ajax/case-comment/list-create/${caseUuid}/`, 'POST', - payload + payload, ) return await response.json() }, @@ -105,7 +105,7 @@ export default { const response = await apiFetch( csrfToken, `/cases/ajax/case-comment/retrieve-update-destroy/${caseCommentUuid}/`, - 'GET' + 'GET', ) return await response.json() }, @@ -115,7 +115,7 @@ export default { csrfToken, `/cases/ajax/case-comment/retrieve-update-destroy/${caseCommentUuid}/`, 'PATCH', - payload + payload, ) return await response.json() }, @@ -124,7 +124,7 @@ export default { await apiFetch( csrfToken, `/cases/ajax/case-comment/retrieve-update-destroy/${caseCommentUuid}/`, - 'DELETE' + 'DELETE', ) }, @@ -132,7 +132,7 @@ export default { const response = await apiFetch( csrfToken, `/cases/ajax/case-phenotype-terms/list-create/${caseUuid}/`, - 'GET' + 'GET', ) return await response.json() }, @@ -142,7 +142,7 @@ export default { csrfToken, `/cases/ajax/case-phenotype-terms/list-create/${caseUuid}/`, 'POST', - payload + payload, ) return await response.json() }, @@ -151,7 +151,7 @@ export default { const response = await apiFetch( csrfToken, `/cases/ajax/case-phenotype-terms/retrieve-update-destroy/${casePhenotypeTermsUuid}/`, - 'GET' + 'GET', ) return await response.json() }, @@ -161,7 +161,7 @@ export default { csrfToken, `/cases/ajax/case-phenotype-terms/retrieve-update-destroy/${casePhenotypeTermsUuid}/`, 'PATCH', - payload + payload, ) return await response.json() }, @@ -170,14 +170,14 @@ export default { await apiFetch( csrfToken, `/cases/ajax/case-phenotype-terms/retrieve-update-destroy/${casePhenotypeTermsUuid}/`, - 'DELETE' + 'DELETE', ) }, async fetchAnnotationReleaseInfos(csrfToken, caseUuid) { const response = await apiFetch( csrfToken, - `/cases/api/annotation-release-info/list/${caseUuid}/` + `/cases/api/annotation-release-info/list/${caseUuid}/`, ) return await response.json() }, @@ -185,7 +185,7 @@ export default { async fetchSvAnnotationReleaseInfos(csrfToken, caseUuid) { const response = await apiFetch( csrfToken, - `/cases/api/sv-annotation-release-info/list/${caseUuid}/` + `/cases/api/sv-annotation-release-info/list/${caseUuid}/`, ) return await response.json() }, @@ -193,7 +193,7 @@ export default { async fetchCaseGeneAnnotation(csrfToken, caseUuid) { const response = await apiFetch( csrfToken, - `/cases/api/case-gene-annotation/list/${caseUuid}/` + `/cases/api/case-gene-annotation/list/${caseUuid}/`, ) return await response.json() }, @@ -201,7 +201,7 @@ export default { async fetchCaseAlignmentStats(csrfToken, caseUuid) { const response = await apiFetch( csrfToken, - `/cases/api/case-alignment-stats/list/${caseUuid}/` + `/cases/api/case-alignment-stats/list/${caseUuid}/`, ) return await response.json() }, @@ -209,7 +209,7 @@ export default { async fetchCaseVariantStats(csrfToken, caseUuid) { const response = await apiFetch( csrfToken, - `/cases/api/case-variant-stats/list/${caseUuid}/` + `/cases/api/case-variant-stats/list/${caseUuid}/`, ) return await response.json() }, @@ -217,7 +217,7 @@ export default { async fetchCaseRelatedness(csrfToken, caseUuid) { const response = await apiFetch( csrfToken, - `/cases/api/case-relatedness/list/${caseUuid}/` + `/cases/api/case-relatedness/list/${caseUuid}/`, ) return await response.json() }, @@ -225,7 +225,7 @@ export default { async fetchPermissions(csrfToken, projectUuid) { const response = await apiFetch( csrfToken, - `/cases/ajax/user-permissions/${projectUuid}/` + `/cases/ajax/user-permissions/${projectUuid}/`, ) return await response.json() }, diff --git a/cases/vueapp/src/common.js b/cases/vueapp/src/common.js index eb0673547..2a6a42d05 100644 --- a/cases/vueapp/src/common.js +++ b/cases/vueapp/src/common.js @@ -35,14 +35,14 @@ export const connectTopRowControls = () => { updateUserSetting( casesStore.appContext.csrf_token, 'vueapp.filtration_inline_help', - newValue + newValue, ) } const elem = $('#vueapp-filtration-inline-help') if (elem) { elem.prop('checked', newValue) } - } + }, ) watch( () => casesStore.complexityMode, @@ -51,14 +51,14 @@ export const connectTopRowControls = () => { updateUserSetting( casesStore.appContext.csrf_token, 'vueapp.filtration_complexity_mode', - newValue + newValue, ) } const elem = $('#vueapp-filtration-complexity-mode') if (elem && elem.val(newValue)) { elem.val(newValue).change() } - } + }, ) // Vice versa. @@ -66,7 +66,7 @@ export const connectTopRowControls = () => { const handleUpdate = () => { const casesStore = useCasesStore() casesStore.showInlineHelp = $('#vueapp-filtration-inline-help').prop( - 'checked' + 'checked', ) casesStore.complexityMode = $('#vueapp-filtration-complexity-mode').val() } @@ -89,7 +89,7 @@ export const tsTvRatio = (entry) => { export const downloadFile = ( filename, contents, - mimeType = 'application/octet-stream' + mimeType = 'application/octet-stream', ) => { const element = document.createElement('a') element.setAttribute('href', 'data:' + mimeType + ';base64,' + btoa(contents)) diff --git a/cases/vueapp/src/components/CaseDetail.vue b/cases/vueapp/src/components/CaseDetail.vue index edf116072..6ee4388a9 100644 --- a/cases/vueapp/src/components/CaseDetail.vue +++ b/cases/vueapp/src/components/CaseDetail.vue @@ -43,7 +43,7 @@ casesStore.initializeRes.then(() => { if (newParams.case && newParams.case !== oldParams.case) { caseDetailsStore.initialize(caseUuidRef.value) } - } + }, ) }) .catch((err) => { @@ -75,7 +75,7 @@ const handleEditQueryPresetsClicked = async () => { allPresets.map((p) => ({ value: p.sodar_uuid, label: p.label, - })) + })), ) try { @@ -301,11 +301,11 @@ const handleUpdateCasePhenotypeTermsClicked = async ({ let origTerms = [] if (casePhenotypeTermsUuid) { const casePhenotypeTerms = caseDetailsStore.getCasePhenotypeTerms( - casePhenotypeTermsUuid + casePhenotypeTermsUuid, ) if (!casePhenotypeTerms) { throw new Error( - `Could not fetch case phenotype terms ${casePhenotypeTermsUuid}` + `Could not fetch case phenotype terms ${casePhenotypeTermsUuid}`, ) } origTerms = casePhenotypeTerms.terms @@ -326,7 +326,7 @@ const handleUpdateCasePhenotypeTermsClicked = async ({ { individual, terms, - } + }, ) } diff --git a/cases/vueapp/src/components/CaseDetailCardAnnotations.vue b/cases/vueapp/src/components/CaseDetailCardAnnotations.vue index e42713802..8af9e0f2b 100644 --- a/cases/vueapp/src/components/CaseDetailCardAnnotations.vue +++ b/cases/vueapp/src/components/CaseDetailCardAnnotations.vue @@ -40,11 +40,11 @@ const buildComputedAnnoCountByFlag = (theList) => { } const varAnnoCountByFlag = buildComputedAnnoCountByFlag( - caseDetailsStore.varAnnoList + caseDetailsStore.varAnnoList, ) const svAnnoCountByFlag = buildComputedAnnoCountByFlag( - caseDetailsStore.svrAnnoList + caseDetailsStore.svrAnnoList, ) diff --git a/cases/vueapp/src/components/CaseDetailCardQueries.vue b/cases/vueapp/src/components/CaseDetailCardQueries.vue index c7f7b31fb..a4e845cc6 100644 --- a/cases/vueapp/src/components/CaseDetailCardQueries.vue +++ b/cases/vueapp/src/components/CaseDetailCardQueries.vue @@ -28,7 +28,7 @@ watch( try { const presetSet = await queryPresetsApi.retrievePresetSet( csrfToken, - newValue + newValue, ) presetSetLabel.value = presetSet.label } catch (err) { @@ -36,7 +36,7 @@ watch( } finally { presetSetLoading.value = false } - } + }, ) diff --git a/cases/vueapp/src/components/CaseDetailCardTerms.vue b/cases/vueapp/src/components/CaseDetailCardTerms.vue index eaeb5cf4f..830692b70 100644 --- a/cases/vueapp/src/components/CaseDetailCardTerms.vue +++ b/cases/vueapp/src/components/CaseDetailCardTerms.vue @@ -74,7 +74,7 @@ watch( () => termLabels.value, (_newValue, _oldValue) => { fetchTermLabels() - } + }, ) onMounted(() => { diff --git a/cases/vueapp/src/components/CaseDetailCardVariantQc.vue b/cases/vueapp/src/components/CaseDetailCardVariantQc.vue index 153bbe6ce..9fae8c142 100644 --- a/cases/vueapp/src/components/CaseDetailCardVariantQc.vue +++ b/cases/vueapp/src/components/CaseDetailCardVariantQc.vue @@ -14,7 +14,7 @@ const tsTv = (member) => { ) { const stats = caseDetailsStore.caseVariantStats[member.name] return (stats.ontarget_transitions / stats.ontarget_transversions).toFixed( - 2 + 2, ) } else { return 0 @@ -49,7 +49,7 @@ const tsTv = (member) => { {{ formatLargeInt( caseDetailsStore.caseVariantStats[member.name] - .ontarget_transitions + .ontarget_transitions, ) }} @@ -57,7 +57,7 @@ const tsTv = (member) => { {{ formatLargeInt( caseDetailsStore.caseVariantStats[member.name] - .ontarget_transversions + .ontarget_transversions, ) }} @@ -71,7 +71,7 @@ const tsTv = (member) => { v-else class="text-right text-danger font-weight-bold" :title="`Ts/Tv ratio should be within 2.0-2.9 but is ${tsTv( - member + member, )}`" > diff --git a/cases/vueapp/src/components/CaseDetailContent.vue b/cases/vueapp/src/components/CaseDetailContent.vue index 698d8b033..5d98d6bb6 100644 --- a/cases/vueapp/src/components/CaseDetailContent.vue +++ b/cases/vueapp/src/components/CaseDetailContent.vue @@ -31,7 +31,7 @@ const currentTab = ref('overview') const caseDetailsStore = useCaseDetailsStore() const annosLoading = computed( - () => caseDetailsStore.varAnnos === null || caseDetailsStore.svAnnos === null + () => caseDetailsStore.varAnnos === null || caseDetailsStore.svAnnos === null, ) const annoCount = computed(() => { if (annosLoading) { diff --git a/cases/vueapp/src/components/CaseDetailPaneAnnotations.vue b/cases/vueapp/src/components/CaseDetailPaneAnnotations.vue index 7d7b91438..d753f387d 100644 --- a/cases/vueapp/src/components/CaseDetailPaneAnnotations.vue +++ b/cases/vueapp/src/components/CaseDetailPaneAnnotations.vue @@ -45,7 +45,7 @@ const showModal = ({ gridRow, gridApi, smallVariant }) => { gridRow, gridApi, smallVariant, - 'refseq' + 'refseq', ) } @@ -55,7 +55,7 @@ onMounted(async () => { const csrfToken = casesStore.appContext.csrfToken const apiQueryResults = await variantsApi.listCaseVariantsUserAnnotated( csrfToken, - caseDetailsStore.caseObj.sodar_uuid + caseDetailsStore.caseObj.sodar_uuid, ) filterQueryStore.queryResults = apiQueryResults.rows }) diff --git a/cases/vueapp/src/components/CaseDetailPaneQc.vue b/cases/vueapp/src/components/CaseDetailPaneQc.vue index 560543c38..daea43a10 100644 --- a/cases/vueapp/src/components/CaseDetailPaneQc.vue +++ b/cases/vueapp/src/components/CaseDetailPaneQc.vue @@ -23,7 +23,7 @@ const relData = computed(() => { } const pedigree = caseDetailsStore.caseObj.pedigree const pedLineBySample = Object.fromEntries( - pedigree.map((line) => [line.name, line]) + pedigree.map((line) => [line.name, line]), ) const getRel = (sample1, sample2) => { @@ -68,7 +68,7 @@ const relData = computed(() => { sample1: sample1$, ...relationship, } - } + }, ) }) @@ -83,7 +83,7 @@ const dpHetData = computed(() => { y: het_ratio, sample: displayName(sample), } - } + }, ) } }) @@ -91,14 +91,14 @@ const dpHetData = computed(() => { const hetRatioQuantiles = computed(() => { return quantiles( dpHetData.value.map(({ y }) => y), - [0.0, 0.25, 0.5, 0.75, 1.0] + [0.0, 0.25, 0.5, 0.75, 1.0], ) }) const dpQuantiles = computed(() => { return quantiles( dpHetData.value.map(({ x }) => x), - [0.0, 0.25, 0.5, 0.75, 1.0] + [0.0, 0.25, 0.5, 0.75, 1.0], ) }) @@ -116,7 +116,7 @@ const chrXHetHomRatio = computed(() => { return null } else { const resultEntries = Object.entries(caseDetailsStore.caseVariantStats).map( - ([name, stats]) => [name, stats.chrx_het_hom] + ([name, stats]) => [name, stats.chrx_het_hom], ) return reactive(Object.fromEntries(resultEntries)) } @@ -132,7 +132,7 @@ const varStats = computed(() => { sample_name: displayName(name), ...stats, } - } + }, ) } }) diff --git a/cases/vueapp/src/components/CaseListHeader.vue b/cases/vueapp/src/components/CaseListHeader.vue index 413298eba..57198b52e 100644 --- a/cases/vueapp/src/components/CaseListHeader.vue +++ b/cases/vueapp/src/components/CaseListHeader.vue @@ -5,11 +5,11 @@ import { useCasesStore } from '../stores/cases.js' const casesStore = useCasesStore() const projectTitle = computed(() => - casesStore.project ? casesStore.project.title : 'PROJECT MISSING' + casesStore.project ? casesStore.project.title : 'PROJECT MISSING', ) const projectUuid = computed(() => - casesStore.project ? casesStore.project.sodar_uuid : 'no-uuid' + casesStore.project ? casesStore.project.sodar_uuid : 'no-uuid', ) diff --git a/cases/vueapp/src/components/CaseListPaneCases.vue b/cases/vueapp/src/components/CaseListPaneCases.vue index aa66c23b2..bd43a8905 100644 --- a/cases/vueapp/src/components/CaseListPaneCases.vue +++ b/cases/vueapp/src/components/CaseListPaneCases.vue @@ -34,7 +34,7 @@ const tableServerOptions = ref( rowsPerPage: 20, sortBy: null, sortType: 'asc', - }) + }), ) /** The current search term. */ const searchTerm = ref('') @@ -57,7 +57,7 @@ const loadFromServer = async () => { orderBy: tableServerOptions.value.sortBy, orderDir: tableServerOptions.value.sortType, queryString: searchTerm.value, - } + }, ) tableRows.value = response.results.map((row) => transmogrify(row)) tableLoading.value = false @@ -73,8 +73,8 @@ watch( ], ( [_newPageNo, _newRowsPerPage, _newSortBy, _newSortType], - [_oldPageNo, _oldRowsPerPage, _oldSortBy, _oldSortType] - ) => loadFromServer() + [_oldPageNo, _oldRowsPerPage, _oldSortBy, _oldSortType], + ) => loadFromServer(), ) const getIndividuals = (pedigree) => { @@ -103,7 +103,7 @@ const debouncedLoadFromServer = debounce(loadFromServer, 1000, { /** Update display when search term changed. */ watch( () => searchTerm.value, - (_newSearchTerm, _oldSearchTerm) => debouncedLoadFromServer() + (_newSearchTerm, _oldSearchTerm) => debouncedLoadFromServer(), ) /** Load from server when mounted. */ diff --git a/cases/vueapp/src/components/ModalPedigreeEditorRow.vue b/cases/vueapp/src/components/ModalPedigreeEditorRow.vue index 30b40aa3a..28042dfa2 100644 --- a/cases/vueapp/src/components/ModalPedigreeEditorRow.vue +++ b/cases/vueapp/src/components/ModalPedigreeEditorRow.vue @@ -51,24 +51,24 @@ const formState = { /** The names of male individuals. */ const males = computed(() => - props.pedigree.filter((entry) => entry.sex === 1).map((entry) => entry.name) + props.pedigree.filter((entry) => entry.sex === 1).map((entry) => entry.name), ) const females = computed(() => - props.pedigree.filter((entry) => entry.sex === 2).map((entry) => entry.name) + props.pedigree.filter((entry) => entry.sex === 2).map((entry) => entry.name), ) /** Custom validators. */ const selfCannotBeParent = helpers.withMessage( 'Cannot be their own parent', - (value) => value !== props.name + (value) => value !== props.name, ) const fatherSexFits = helpers.withMessage( `Sex of father must be male`, - (value) => value === '0' || males.value.includes(value) + (value) => value === '0' || males.value.includes(value), ) const motherSexFits = helpers.withMessage( `Sex of mother must be female`, - (value) => value === '0' || females.value.includes(value) + (value) => value === '0' || females.value.includes(value), ) /** Single-row validation roles. */ diff --git a/cases/vueapp/src/components/QcPlotRelatedness.vue b/cases/vueapp/src/components/QcPlotRelatedness.vue index 1d6b65a52..2e80c13de 100644 --- a/cases/vueapp/src/components/QcPlotRelatedness.vue +++ b/cases/vueapp/src/components/QcPlotRelatedness.vue @@ -65,7 +65,7 @@ const relatednessData = computed(() => { label: `${sample0} - ${sample1}`, relationship: getRel(parentChild, sibSib), } - } + }, ) } }) diff --git a/cases/vueapp/src/components/QcPlotVarEffect.vue b/cases/vueapp/src/components/QcPlotVarEffect.vue index 6f50bba0a..cf1075520 100644 --- a/cases/vueapp/src/components/QcPlotVarEffect.vue +++ b/cases/vueapp/src/components/QcPlotVarEffect.vue @@ -57,7 +57,7 @@ const vegaData = computed(() => { const result = [] for (const [sampleName, stats] of Object.entries(props.variantStats)) { for (const [variantEffect, variantCount] of Object.entries( - stats.ontarget_effect_counts + stats.ontarget_effect_counts, )) { const variantCountLabel = variantCount.toLocaleString('en-US') if (variantCount > 0) { diff --git a/cases/vueapp/src/components/QcTableVarStats.vue b/cases/vueapp/src/components/QcTableVarStats.vue index fcf40de1f..6017a56cd 100644 --- a/cases/vueapp/src/components/QcTableVarStats.vue +++ b/cases/vueapp/src/components/QcTableVarStats.vue @@ -38,7 +38,7 @@ const props = defineProps({ > {{ tsTvRatio(entry).toFixed(2) }} diff --git a/cases/vueapp/src/components/VegaPlot.vue b/cases/vueapp/src/components/VegaPlot.vue index 5ae0f9bbc..4ada4fb1f 100644 --- a/cases/vueapp/src/components/VegaPlot.vue +++ b/cases/vueapp/src/components/VegaPlot.vue @@ -74,7 +74,7 @@ watch( vegaViewRef.value.change(props.dataName, changeset).run() vegaViewRef.value.resize() } - } + }, ) /** `ref` to `vegaEmbed()` result so we can `await` the rendering. */ @@ -88,7 +88,7 @@ onMounted(() => { vegaEmbedPromiseRef.value = vegaEmbed( plotDivRef.value, vegaLiteSpec.value, - vegaOpts + vegaOpts, ) vegaEmbedPromiseRef.value.then(({ view }) => { vegaViewRef.value = view diff --git a/cases/vueapp/src/main.js b/cases/vueapp/src/main.js index 211694272..dea53c162 100644 --- a/cases/vueapp/src/main.js +++ b/cases/vueapp/src/main.js @@ -106,7 +106,7 @@ app.mount('#app') const rawAppContext = JSON.parse( document.getElementById('sodar-ss-app-context').getAttribute('app-context') || - '{}' + '{}', ) const casesStore = useCasesStore() diff --git a/cases/vueapp/src/stores/case-details.js b/cases/vueapp/src/stores/case-details.js index 5f6f784af..63f48ed68 100644 --- a/cases/vueapp/src/stores/case-details.js +++ b/cases/vueapp/src/stores/case-details.js @@ -115,7 +115,7 @@ export const useCaseDetailsStore = defineStore( }), casesApi.fetchCaseVariantStats(csrfToken, caseUuid$).then((res) => { caseVariantStats.value = Object.fromEntries( - res.map((line) => [line.sample_name, line]) + res.map((line) => [line.sample_name, line]), ) }), casesApi.fetchCaseRelatedness(csrfToken, caseUuid$).then((res) => { @@ -165,7 +165,7 @@ export const useCaseDetailsStore = defineStore( caseObj.value = await casesApi.updateCase( csrfToken, caseObj.value.sodar_uuid, - payload + payload, ) } finally { casesStore.serverInteractions -= 1 @@ -191,7 +191,7 @@ export const useCaseDetailsStore = defineStore( const apiCaseComment = await casesApi.createCaseComment( csrfToken, caseObj.value.sodar_uuid, - payload + payload, ) caseComments.value.push(apiCaseComment) } finally { @@ -208,7 +208,7 @@ export const useCaseDetailsStore = defineStore( const apiCaseComment = await casesApi.updateCaseComment( csrfToken, caseCommentUuid, - payload + payload, ) for (let i = 0; i < caseComments.value.length; ++i) { if (caseComments.value[i].sodar_uuid === apiCaseComment.sodar_uuid) { @@ -251,7 +251,7 @@ export const useCaseDetailsStore = defineStore( /** Update case phenotype terms via API and in store. */ const updateCasePhenotypeTerms = async ( casePhenotypeTermsUuid, - payload + payload, ) => { const casesStore = useCasesStore() const csrfToken = casesStore.appContext.csrf_token @@ -260,7 +260,7 @@ export const useCaseDetailsStore = defineStore( const apiCasePhenotypeTerms = await casesApi.updateCasePhenotypeTerms( csrfToken, casePhenotypeTermsUuid, - payload + payload, ) for (let i = 0; i < casePhenotypeTerms.value.length; ++i) { if ( @@ -284,7 +284,7 @@ export const useCaseDetailsStore = defineStore( const apiCasePhenotypeTerms = await casesApi.createCasePhenotypeTerms( csrfToken, caseUuid, - payload + payload, ) casePhenotypeTerms.value.push(apiCasePhenotypeTerms) } finally { @@ -323,5 +323,5 @@ export const useCaseDetailsStore = defineStore( updateCasePhenotypeTerms, createCasePhenotypeTerms, } - } + }, ) diff --git a/cases/vueapp/src/stores/cases-qc.js b/cases/vueapp/src/stores/cases-qc.js index d2fd0e648..c0a7ee136 100644 --- a/cases/vueapp/src/stores/cases-qc.js +++ b/cases/vueapp/src/stores/cases-qc.js @@ -15,7 +15,7 @@ export const useCasesQcStore = defineStore('casesQc', () => { if (qcValues.value === null) { qcValues.value = await casesApi.loadProjectQcValues( casesStore.appContext.csrf_token, - casesStore.project.sodar_uuid + casesStore.project.sodar_uuid, ) } } diff --git a/clinvar_export/vueapp/src/api/clinvarExport.js b/clinvar_export/vueapp/src/api/clinvarExport.js index b79d71cf7..2d95d5a21 100644 --- a/clinvar_export/vueapp/src/api/clinvarExport.js +++ b/clinvar_export/vueapp/src/api/clinvarExport.js @@ -13,7 +13,7 @@ async function apiFetch( { baseUrl, csrfToken }, { entity, uuid }, method, - payload + payload, ) { const url = `${baseUrl}/${entity}/${uuid ? uuid + '/' : ''}` const response = await fetch(url, { @@ -41,12 +41,12 @@ async function apiDelete(entity, uuid, appContext) { const response = await apiFetch( appContext, { entity: entityToken, uuid }, - 'DELETE' + 'DELETE', ) /* istanbul ignore next */ if (!response.ok) { throw new Error( - `Problem with request: ${response.status} ${response.statusText}` + `Problem with request: ${response.status} ${response.statusText}`, ) } } @@ -61,12 +61,12 @@ async function _apiCreateUpdate(create, entity, uuid, payload, appContext) { appContext, { entity: entityToken, uuid: create ? undefined : uuid }, method, - payload + payload, ) /* istanbul ignore next */ if (!response.ok) { throw new Error( - `Problem with request: ${response.status} ${response.statusText}` + `Problem with request: ${response.status} ${response.statusText}`, ) } else { return await response.json() @@ -113,7 +113,7 @@ async function genericTermQueryImpl( { baseUrl, csrfToken }, name, label, - termId + termId, ) { const response = await fetch( `${baseUrl}/query-${name}/?query=${encodeURIComponent(termId)}`, @@ -126,7 +126,7 @@ async function genericTermQueryImpl( 'X-CSRFToken': csrfToken, }, body: null, - } + }, ) return await response.json() } @@ -187,7 +187,7 @@ export default { 'submission_set', submissionSet.sodar_uuid, submissionSet, - appContext + appContext, ) }, @@ -195,7 +195,7 @@ export default { return await apiDelete( 'submission_set', submissionSet.sodar_uuid, - appContext + appContext, ) }, @@ -212,7 +212,7 @@ export default { 'submission', submission.sodar_uuid, submission, - appContext + appContext, ) }, @@ -232,7 +232,7 @@ export default { return await apiCreate( 'submission_individual', submissionIndividual, - appContext + appContext, ) }, @@ -241,7 +241,7 @@ export default { 'submission_individual', submissionIndividual.sodar_uuid, submissionIndividual, - appContext + appContext, ) }, @@ -249,7 +249,7 @@ export default { return await apiDelete( 'submission_individual', submissionIndividual.sodar_uuid, - appContext + appContext, ) }, @@ -266,7 +266,7 @@ export default { 'submitting_org', submittingOrg.sodar_uuid, submittingOrg, - appContext + appContext, ) }, @@ -274,7 +274,7 @@ export default { return await apiDelete( 'submitting_org', submittingOrg.sodar_uuid, - appContext + appContext, ) }, @@ -290,7 +290,7 @@ export default { 'X-CSRFToken': appContext.csrfToken, }, body: null, - } + }, ) return await response.json() }, @@ -319,7 +319,7 @@ export default { 'X-CSRFToken': appContext.csrfToken, }, body: JSON.stringify({ report_url: reportUrl }), - } + }, ) return response }, diff --git a/clinvar_export/vueapp/src/components/ClinvarExportApp.vue b/clinvar_export/vueapp/src/components/ClinvarExportApp.vue index 1ac4be88e..b54799a69 100644 --- a/clinvar_export/vueapp/src/components/ClinvarExportApp.vue +++ b/clinvar_export/vueapp/src/components/ClinvarExportApp.vue @@ -16,7 +16,7 @@ const store = useClinvarExportStore() const rawAppContext = JSON.parse( document.getElementById('sodar-ss-app-context').getAttribute('app-context') || - '{}' + '{}', ) store.initialize({ baseUrl: rawAppContext.base_url, @@ -24,7 +24,7 @@ store.initialize({ }) const showOverlay = computed( - () => store.appState === AppState.initializing || store.serverInteraction + () => store.appState === AppState.initializing || store.serverInteraction, ) diff --git a/clinvar_export/vueapp/src/components/FetchClinVarReport.vue b/clinvar_export/vueapp/src/components/FetchClinVarReport.vue index 1bcad7920..8fa035576 100644 --- a/clinvar_export/vueapp/src/components/FetchClinVarReport.vue +++ b/clinvar_export/vueapp/src/components/FetchClinVarReport.vue @@ -20,7 +20,7 @@ const doFetch = () => { .fetchClinVarReport( props.appContext, props.submissionSet.sodar_uuid, - clinVarReportUrl.value + clinVarReportUrl.value, ) .then(() => { isFetching.value = false diff --git a/clinvar_export/vueapp/src/components/SubmissionCaseList.vue b/clinvar_export/vueapp/src/components/SubmissionCaseList.vue index e65eda6ac..12ddad322 100644 --- a/clinvar_export/vueapp/src/components/SubmissionCaseList.vue +++ b/clinvar_export/vueapp/src/components/SubmissionCaseList.vue @@ -38,11 +38,11 @@ const caseSubmissionIndividuals = computed(() => { const getModalIndividualList = () => { const blockedIndividualUuids = new Set( store.currentSubmission.submission_individuals.map( - (uuid) => store.submissionIndividuals[uuid].individual - ) + (uuid) => store.submissionIndividuals[uuid].individual, + ), ) const result = Object.values(store.individuals).filter( - (obj) => !blockedIndividualUuids.has(obj.sodar_uuid) + (obj) => !blockedIndividualUuids.has(obj.sodar_uuid), ) return result } diff --git a/clinvar_export/vueapp/src/components/SubmissionCaseListEntry.vue b/clinvar_export/vueapp/src/components/SubmissionCaseListEntry.vue index a9ee86148..d6b652218 100644 --- a/clinvar_export/vueapp/src/components/SubmissionCaseListEntry.vue +++ b/clinvar_export/vueapp/src/components/SubmissionCaseListEntry.vue @@ -65,7 +65,7 @@ function _vuelidateWrappers(keys) { submissionIndividual[key] = newValue }, }), - ]) + ]), ) } diff --git a/clinvar_export/vueapp/src/components/SubmissionEditor.vue b/clinvar_export/vueapp/src/components/SubmissionEditor.vue index 44aaf6bac..f2e0cfe3b 100644 --- a/clinvar_export/vueapp/src/components/SubmissionEditor.vue +++ b/clinvar_export/vueapp/src/components/SubmissionEditor.vue @@ -67,7 +67,7 @@ const _vuelidateWrappers = (keys) => } }, }), - ]) + ]), ) // Define object with the data to edit in the form. We construct custom wrappers so we can easily pass this into vuelidate. const formState = { diff --git a/clinvar_export/vueapp/src/components/SubmissionList.vue b/clinvar_export/vueapp/src/components/SubmissionList.vue index ea384824d..7ffc986a7 100644 --- a/clinvar_export/vueapp/src/components/SubmissionList.vue +++ b/clinvar_export/vueapp/src/components/SubmissionList.vue @@ -66,7 +66,7 @@ export default { submissionList: { get() { const lst = this.currentSubmissionSet.submissions.map( - (k) => this.submissions[k] + (k) => this.submissions[k], ) lst.sort((lhs, rhs) => lhs.sort_order - rhs.sort_order) return lst @@ -118,7 +118,7 @@ export default { for (const smallVar of res.small_variants) { if (getVariantId(smallVar) in smallVariants) { smallVariants[getVariantId(smallVar)].caseNames.push( - smallVar.case_name + smallVar.case_name, ) smallVariants[getVariantId(smallVar)].genotype = { ...smallVariants[getVariantId(smallVar)].genotype, @@ -147,7 +147,7 @@ export default { this.rawModalUserAnnotationsCount = Object.keys(smallVariants).length this.modalUserAnnotations = this._computeUserAnnotations( - this.rawModalUserAnnotations + this.rawModalUserAnnotations, ) this.loadingVariants = false }) @@ -224,7 +224,7 @@ export default { }) smallVariants.sort( (a, b) => - a.chromosome_no * c + a.start - (b.chromosome_no * c + b.start) + a.chromosome_no * c + a.start - (b.chromosome_no * c + b.start), ) return smallVariants }, @@ -243,7 +243,7 @@ export default { let names = item.submission_individuals.map((uuid) => this.individuals[ this.submissionIndividuals[uuid].individual - ].name.replace(/-N.-DNA.-....$/, '') + ].name.replace(/-N.-DNA.-....$/, ''), ) if (names.length > 2) { names = names.slice(0, 2) + ['...'] @@ -270,7 +270,7 @@ export default { getAcmgRating(items) { const res = Math.max.apply( 0, - items.rating.map((x) => x.class_override || x.class_auto || 0) + items.rating.map((x) => x.class_override || x.class_auto || 0), ) if (isFinite(res)) { return res || 'N/A' @@ -308,7 +308,7 @@ export default { const variantDesc = this.getVariantDesc(smallVariant) if (this.selectedSmallVariants.includes(variantDesc)) { this.createSubmissionInCurrentSubmissionSet( - this.getSubmissionData(smallVariant) + this.getSubmissionData(smallVariant), ) } } @@ -752,10 +752,10 @@ export default { x.flag_candidate + (x) => x.flag_candidate, ), 'badge badge-light': !item.flags.some( - (x) => x.flag_candidate + (x) => x.flag_candidate, ), }" :title="`${ diff --git a/clinvar_export/vueapp/src/components/SubmissionSetEditor.vue b/clinvar_export/vueapp/src/components/SubmissionSetEditor.vue index 4047f5e74..45c79d6b6 100644 --- a/clinvar_export/vueapp/src/components/SubmissionSetEditor.vue +++ b/clinvar_export/vueapp/src/components/SubmissionSetEditor.vue @@ -18,11 +18,11 @@ const currentSubmissionSet = ref(store.currentSubmissionSet) // These values are used in the form and validation. const submitterUuids = computed(() => - Array.from(Object.values(store.submitters), (o) => o.sodar_uuid) + Array.from(Object.values(store.submitters), (o) => o.sodar_uuid), ) const orgOptions = computed(() => { let result = Object.fromEntries( - Object.values(store.organisations).map((o) => [o.sodar_uuid, o.name]) + Object.values(store.organisations).map((o) => [o.sodar_uuid, o.name]), ) return result }) @@ -44,7 +44,7 @@ const _vuelidateWrappers = (keys) => } }, }), - ]) + ]), ) // Define object with the data to edit in the form. We construct custom wrappers so we can easily pass this into vuelidate. @@ -61,7 +61,7 @@ const formState = { const result = currentSubmissionSet.value.submitting_orgs.map( (soUuid) => store.organisations[store.submittingOrgs[soUuid].organisation] - .sodar_uuid + .sodar_uuid, ) return result }, diff --git a/clinvar_export/vueapp/src/helpers.js b/clinvar_export/vueapp/src/helpers.js index b8b375146..31b722c18 100644 --- a/clinvar_export/vueapp/src/helpers.js +++ b/clinvar_export/vueapp/src/helpers.js @@ -64,7 +64,7 @@ export function removeItemAll(arr, value) { export function validConfirmed( isValid, cb, - message = 'Please fix the problems first.' + message = 'Please fix the problems first.', ) { if (!isValid()) { alert(message) @@ -112,7 +112,7 @@ export const HPO_INHERITANCE_MODE = Object.freeze( ['HP:0001423', 'X-linked dominant inheritance'], ['HP:0001417', 'X-linked inheritance'], ['HP:0001419', 'X-linked recessive inheritance'], - ]) + ]), ) export const HPO_AGE_OF_ONSET = Object.freeze( new Map([ @@ -129,5 +129,5 @@ export const HPO_AGE_OF_ONSET = Object.freeze( ['HP:0003596', 'Middle age'], ['HP:0003584', 'Late'], ['HP:0003577', 'Congenital'], - ]) + ]), ) diff --git a/clinvar_export/vueapp/src/stores/clinvar-export.js b/clinvar_export/vueapp/src/stores/clinvar-export.js index b6fff9fa3..15b450e1f 100644 --- a/clinvar_export/vueapp/src/stores/clinvar-export.js +++ b/clinvar_export/vueapp/src/stores/clinvar-export.js @@ -175,7 +175,7 @@ export const VARIANT_TYPE = Object.freeze([ export function extractVariantZygosity( smallVariant, individualUuids, - individuals + individuals, ) { function getVariantZygosity(variantAlleleCount, isRecessive) { if (variantAlleleCount === 2) { @@ -296,7 +296,7 @@ export const useClinvarExportStore = defineStore('clinvarExport', { clinvarExportApi .getAssertionMethods(this.appContext) .then( - (res) => (this.assertionMethods = sodarObjectListToObject(res)) + (res) => (this.assertionMethods = sodarObjectListToObject(res)), ), clinvarExportApi .getSubmissionSets(this.appContext) @@ -310,7 +310,8 @@ export const useClinvarExportStore = defineStore('clinvarExport', { clinvarExportApi .getSubmissionIndividuals(this.appContext) .then( - (res) => (this.submissionIndividuals = sodarObjectListToObject(res)) + (res) => + (this.submissionIndividuals = sodarObjectListToObject(res)), ), clinvarExportApi .getFamilies(this.appContext) @@ -322,7 +323,7 @@ export const useClinvarExportStore = defineStore('clinvarExport', { (_response) => { for (const submissionSet of Object.values(this.submissionSets)) { submissionSet.organisations = submissionSet.submitting_orgs.map( - (subOrgUuid) => this.submittingOrgs[subOrgUuid].organisation + (subOrgUuid) => this.submittingOrgs[subOrgUuid].organisation, ) } this.saveOldModel() @@ -331,9 +332,9 @@ export const useClinvarExportStore = defineStore('clinvarExport', { (error) => { /* istanbul ignore next */ throw new Error( - `Problem loading application this from API: ${error}\n\n${error.stack}` + `Problem loading application this from API: ${error}\n\n${error.stack}`, ) - } + }, ) }, /** @@ -350,7 +351,7 @@ export const useClinvarExportStore = defineStore('clinvarExport', { */ createNewSubmissionSet() { const titles = Object.values(this.submissionSets).map( - (submissionSet) => submissionSet.title + (submissionSet) => submissionSet.title, ) let title = 'New Submission Set' let i = 2 @@ -391,13 +392,13 @@ export const useClinvarExportStore = defineStore('clinvarExport', { if (submissionSetExists) { const res = await clinvarExportApi.updateSubmissionSet( this.currentSubmissionSet, - this.appContext + this.appContext, ) return res } else { const apiSet = await clinvarExportApi.createSubmissionSet( this.currentSubmissionSet, - this.appContext + this.appContext, ) // Add submission set from API. Then change the list to first remove the just added apiSet and replace the // old one with the one from the API. @@ -407,7 +408,7 @@ export const useClinvarExportStore = defineStore('clinvarExport', { .map((ss) => ss.sodar_uuid === this.currentSubmissionSet.sodar_uuid ? apiSet - : ss + : ss, ) return apiSet } @@ -423,14 +424,14 @@ export const useClinvarExportStore = defineStore('clinvarExport', { if (!(localSubmittingOrgUuid in this.submittingOrgs)) { await clinvarExportApi.deleteSubmittingOrg( this.oldModel.submittingOrgs[localSubmittingOrgUuid], - this.appContext + this.appContext, ) } } } // Create and update appropriate submitting orgs with API. const submitting_orgs = Array.from( - this.currentSubmissionSet.submitting_orgs + this.currentSubmissionSet.submitting_orgs, ) this.currentSubmissionSet.submitting_orgs = [] for (let i = 0; i < submitting_orgs.length; i++) { @@ -441,7 +442,7 @@ export const useClinvarExportStore = defineStore('clinvarExport', { ...JSON.parse(JSON.stringify(this.submittingOrgs[localUuid])), sort_order: i, }, - this.appContext + this.appContext, ) this.currentSubmissionSet.submitting_orgs.push(submitting_orgs[i]) } else { @@ -451,11 +452,11 @@ export const useClinvarExportStore = defineStore('clinvarExport', { sort_order: i, submission_set: apiSet.sodar_uuid, }, - this.appContext + this.appContext, ) this.submittingOrgs[apiSubmittingOrg.sodar_uuid] = apiSubmittingOrg this.submissionSets[apiSet.sodar_uuid].submitting_orgs.push( - apiSubmittingOrg.sodar_uuid + apiSubmittingOrg.sodar_uuid, ) delete this.submittingOrgs[localUuid] } @@ -465,7 +466,7 @@ export const useClinvarExportStore = defineStore('clinvarExport', { const _wizardSaveSubmission = async ( apiSet, sortOrder, - localSubmissionUuid + localSubmissionUuid, ) => { const submissionExists = localSubmissionUuid in this.oldModel.submissions @@ -477,7 +478,7 @@ export const useClinvarExportStore = defineStore('clinvarExport', { ...JSON.parse(JSON.stringify(localSubmission)), sort_order: sortOrder, }, - this.appContext + this.appContext, ) } else { apiSubmission = await clinvarExportApi.createSubmission( @@ -486,12 +487,12 @@ export const useClinvarExportStore = defineStore('clinvarExport', { sort_order: sortOrder, submission_set: apiSet.sodar_uuid, }, - this.appContext + this.appContext, ) // Register submission from API. this.submissions[apiSubmission.sodar_uuid] = apiSubmission this.submissionSets[apiSet.sodar_uuid].submissions.push( - apiSubmission.sodar_uuid + apiSubmission.sodar_uuid, ) } @@ -507,12 +508,12 @@ export const useClinvarExportStore = defineStore('clinvarExport', { const localIndividualUuid = oldSubmission.submission_individuals[i] if ( !localSubmission.submission_individuals.includes( - localIndividualUuid + localIndividualUuid, ) ) { await clinvarExportApi.deleteSubmissionIndividual( this.oldModel.submissionIndividuals[localIndividualUuid], - this.appContext + this.appContext, ) } } @@ -533,7 +534,7 @@ export const useClinvarExportStore = defineStore('clinvarExport', { ...JSON.parse(JSON.stringify(localSI)), sort_order: i, }, - this.appContext + this.appContext, ) } else { apiSubmissionIndividual = @@ -543,7 +544,7 @@ export const useClinvarExportStore = defineStore('clinvarExport', { sort_order: i, submission: apiSubmission.sodar_uuid, }, - this.appContext + this.appContext, ) // Register submission individual from API. @@ -589,13 +590,13 @@ export const useClinvarExportStore = defineStore('clinvarExport', { this.oldModel.submissionIndividuals[ oldSubmissionIndividualUuid ], - this.appContext + this.appContext, ) this.deleteSubmissionIndividual(oldSubmissionIndividualUuid) } await clinvarExportApi.deleteSubmission( oldSubmission, - this.appContext + this.appContext, ) this.deleteSubmission(oldSubmissionUuid) } @@ -627,7 +628,7 @@ export const useClinvarExportStore = defineStore('clinvarExport', { if (submittingOrgUuid in this.oldModel.submittingOrgs) { await clinvarExportApi.deleteSubmittingOrg( this.submittingOrgs[submittingOrgUuid], - this.appContext + this.appContext, ) } delete this.submittingOrgs[submittingOrgUuid] @@ -636,13 +637,13 @@ export const useClinvarExportStore = defineStore('clinvarExport', { const submissionUuids = Array.from(this.currentSubmissionSet.submissions) for (const submissionUuid of submissionUuids) { const submissionInvidualUuids = Array.from( - this.submissions[submissionUuid].submission_individuals + this.submissions[submissionUuid].submission_individuals, ) for (const submissionInvidualUuid of submissionInvidualUuids) { if (submissionInvidualUuid in this.oldModel.submissionIndividuals) { await clinvarExportApi.deleteSubmissionIndividual( this.submissionIndividuals[submissionInvidualUuid], - this.appContext + this.appContext, ) } this.deleteSubmissionIndividual(submissionInvidualUuid) @@ -650,7 +651,7 @@ export const useClinvarExportStore = defineStore('clinvarExport', { if (submissionUuid in this.oldModel.submissions) { await clinvarExportApi.deleteSubmission( this.submissions[submissionUuid], - this.appContext + this.appContext, ) } this.deleteSubmission(submissionUuid) @@ -661,7 +662,7 @@ export const useClinvarExportStore = defineStore('clinvarExport', { ) { await clinvarExportApi.deleteSubmissionSet( this.submissionSets[this.currentSubmissionSet.sodar_uuid], - this.appContext + this.appContext, ) } this.deleteSubmissionSet(this.currentSubmissionSet.sodar_uuid) @@ -730,7 +731,7 @@ export const useClinvarExportStore = defineStore('clinvarExport', { */ deleteCurrentSubmission() { const submissionInvidualUuids = Array.from( - this.currentSubmission.submission_individuals + this.currentSubmission.submission_individuals, ) for (const submissionInvidualUuid of submissionInvidualUuids) { this.deleteSubmissionIndividual(submissionInvidualUuid) @@ -745,10 +746,10 @@ export const useClinvarExportStore = defineStore('clinvarExport', { this.serverInteraction = true const res = await clinvarExportApi.getUserAnnotations( this.appContext, - individual.family + individual.family, ) const smallVariants = Object.fromEntries( - res.small_variants.map((v) => [getVariantId(v), v]) + res.small_variants.map((v) => [getVariantId(v), v]), ) this.addIndividualToCurrentSubmissionImpl({ individual, @@ -763,7 +764,7 @@ export const useClinvarExportStore = defineStore('clinvarExport', { console.assert( submissionIndividual.sodar_uuid in this.submissionIndividuals, this.submissionIndividuals, - submissionIndividual.sodar_uuid + submissionIndividual.sodar_uuid, ) const obj = this.submissionIndividuals[submissionIndividual.sodar_uuid] obj[key] = value @@ -795,14 +796,14 @@ export const useClinvarExportStore = defineStore('clinvarExport', { removeSubmissionIndividualFromCurrentSubmission(submissionIndividual) { this.currentSubmission.submission_individuals = this.currentSubmission.submission_individuals.filter( - (uuid) => uuid !== submissionIndividual.sodar_uuid + (uuid) => uuid !== submissionIndividual.sodar_uuid, ) }, setCurrentSubmissionSet(submissionSetUuid) { console.assert( submissionSetUuid === null || submissionSetUuid in this.submissionSets, submissionSetUuid, - this.submissionSets + this.submissionSets, ) if (submissionSetUuid === null) { this.currentSubmissionSet = null @@ -815,7 +816,7 @@ export const useClinvarExportStore = defineStore('clinvarExport', { */ saveOldModel() { this.oldModel = JSON.parse( - JSON.stringify(Object.fromEntries(MODEL_KEYS.map((k) => [k, this[k]]))) + JSON.stringify(Object.fromEntries(MODEL_KEYS.map((k) => [k, this[k]]))), ) }, /** @@ -846,7 +847,7 @@ export const useClinvarExportStore = defineStore('clinvarExport', { ) { submission.submission_individuals = submission.submission_individuals.filter( - (uuid) => uuid !== submissionInvidualUuid + (uuid) => uuid !== submissionInvidualUuid, ) } } @@ -855,7 +856,7 @@ export const useClinvarExportStore = defineStore('clinvarExport', { deleteSubmission(submissionUuid) { for (const submissionSet of Object.values(this.submissionSets)) { submissionSet.submissions = submissionSet.submissions.filter( - (o) => o !== submissionUuid + (o) => o !== submissionUuid, ) } if ( @@ -875,7 +876,7 @@ export const useClinvarExportStore = defineStore('clinvarExport', { } delete this.submissionSets[submissionSetUuid] this.submissionSetList = this.submissionSetList.filter( - (ss) => ss.sodar_uuid !== submissionSetUuid + (ss) => ss.sodar_uuid !== submissionSetUuid, ) }, setCurrentSubmission(submissionUuid) { @@ -907,17 +908,17 @@ export const useClinvarExportStore = defineStore('clinvarExport', { const { variantAlleleCount, variantZygosity } = extractVariantZygosity( smallVariant, individualUuids, - this.individuals + this.individuals, ) for (const individualUuid of individualUuids) { const individual = this.individuals[individualUuid] const phenotypes = JSON.parse( - JSON.stringify(individual.phenotype_terms || []) + JSON.stringify(individual.phenotype_terms || []), ).filter( (term) => !HPO_INHERITANCE_MODE.has(term.term_id) && - !isDiseaseTerm(term.term_id) + !isDiseaseTerm(term.term_id), ) const newSubmissionIndividual = { sodar_uuid: uuidv4(), @@ -934,7 +935,7 @@ export const useClinvarExportStore = defineStore('clinvarExport', { this.submissionIndividuals[newSubmissionIndividual.sodar_uuid] = newSubmissionIndividual newSubmission.submission_individuals.push( - newSubmissionIndividual.sodar_uuid + newSubmissionIndividual.sodar_uuid, ) } @@ -946,24 +947,24 @@ export const useClinvarExportStore = defineStore('clinvarExport', { // Build symmetric difference in terms of organisation UUIDs. const currUuids = new Set(this.currentSubmissionSet.organisations) const removeUuids = new Set( - Array.from(currUuids).filter((uuid) => !shouldUuids.includes(uuid)) + Array.from(currUuids).filter((uuid) => !shouldUuids.includes(uuid)), ) const addUuids = new Set( - Array.from(shouldUuids).filter((uuid) => !currUuids.has(uuid)) + Array.from(shouldUuids).filter((uuid) => !currUuids.has(uuid)), ) // Remove submitting orgs as needed. const removeSOUuids = new Set( this.currentSubmissionSet.submitting_orgs.filter((soUuid) => - removeUuids.has(this.submittingOrgs[soUuid].organisation) - ) + removeUuids.has(this.submittingOrgs[soUuid].organisation), + ), ) for (const uuid of removeSOUuids) { delete this.submittingOrgs[uuid] } this.currentSubmissionSet.submitting_orgs = this.currentSubmissionSet.submitting_orgs.filter( - (soUuid) => !removeSOUuids.has(soUuid) + (soUuid) => !removeSOUuids.has(soUuid), ) // Add submitting orgs as needed. @@ -976,7 +977,7 @@ export const useClinvarExportStore = defineStore('clinvarExport', { } this.submittingOrgs[newSubmittingOrg.sodar_uuid] = newSubmittingOrg this.currentSubmissionSet.submitting_orgs.push( - newSubmittingOrg.sodar_uuid + newSubmittingOrg.sodar_uuid, ) } @@ -984,7 +985,7 @@ export const useClinvarExportStore = defineStore('clinvarExport', { this.currentSubmissionSet.organisations = shouldUuids // Adjust the sort order. const orgUuidToSortOrder = Object.fromEntries( - shouldUuids.map((orgUuid, i) => [orgUuid, i]) + shouldUuids.map((orgUuid, i) => [orgUuid, i]), ) for (const soUuid of this.currentSubmissionSet.submitting_orgs) { this.submittingOrgs[soUuid].sort_order = @@ -1002,7 +1003,7 @@ export const useClinvarExportStore = defineStore('clinvarExport', { const { variantAlleleCount, variantZygosity } = extractVariantZygosity( smallVariant, [individual.sodar_uuid], - this.individuals + this.individuals, ) const newUuid = uuidv4() @@ -1014,8 +1015,8 @@ export const useClinvarExportStore = defineStore('clinvarExport', { submission: this.currentSubmission.sodar_uuid, phenotypes: JSON.parse( JSON.stringify( - this.individuals[individual.sodar_uuid].phenotype_terms - ) + this.individuals[individual.sodar_uuid].phenotype_terms, + ), ), variant_zygosity: variantZygosity, variant_allele_count: variantAlleleCount, diff --git a/cohorts/vueapp/src/api/cohorts.js b/cohorts/vueapp/src/api/cohorts.js index 74fb971f2..989431086 100644 --- a/cohorts/vueapp/src/api/cohorts.js +++ b/cohorts/vueapp/src/api/cohorts.js @@ -4,7 +4,7 @@ export default { async listCohort( csrfToken, projectUuid, - { pageNo, pageSize, orderBy, orderDir, queryString } + { pageNo, pageSize, orderBy, orderDir, queryString }, ) { let queryArr = [] if (pageNo !== undefined) { @@ -29,7 +29,7 @@ export default { const queryStr = queryArr.length ? '?' + queryArr.join('&') : '' const response = await apiFetch( csrfToken, - `/cohorts/ajax/cohort/list-create/${projectUuid}/${queryStr}` + `/cohorts/ajax/cohort/list-create/${projectUuid}/${queryStr}`, ) return await response.json() }, @@ -39,7 +39,7 @@ export default { csrfToken, `/cohorts/ajax/cohort/list-create/${projectUuid}/`, 'POST', - payload + payload, ) return await response.json() }, @@ -48,7 +48,7 @@ export default { const response = await apiFetch( null, `/cohorts/ajax/accessible-projects-cases/list/${projectUuid}/`, - 'GET' + 'GET', ) return await response.json() }, @@ -58,7 +58,7 @@ export default { csrfToken, `/cohorts/ajax/cohort/retrieve-update-destroy/${cohortUuid}/`, 'PUT', - payload + payload, ) return await response.json() }, @@ -67,7 +67,7 @@ export default { await apiFetch( csrfToken, `/cohorts/ajax/cohort/retrieve-update-destroy/${cohortUuid}/`, - 'DELETE' + 'DELETE', ) }, @@ -76,7 +76,7 @@ export default { csrfToken, `/cohorts/ajax/cohortcase/create/${projectUuid}/`, 'POST', - payload + payload, ) return await response.json() }, @@ -85,7 +85,7 @@ export default { const response = await apiFetch( csrfToken, `/cohorts/ajax/cohortcase/list/${cohortUuid}/`, - 'GET' + 'GET', ) return await response.json() }, @@ -94,14 +94,14 @@ export default { await apiFetch( csrfToken, `/cohorts/ajax/cohortcase/destroy/${cohortCaseUuid}/`, - 'DELETE' + 'DELETE', ) }, async fetchPermissions(csrfToken, projectUuid) { const response = await apiFetch( csrfToken, - `/cohorts/ajax/user-permissions/${projectUuid}/` + `/cohorts/ajax/user-permissions/${projectUuid}/`, ) return await response.json() }, diff --git a/cohorts/vueapp/src/common.js b/cohorts/vueapp/src/common.js index 4465f84af..f2c5f5399 100644 --- a/cohorts/vueapp/src/common.js +++ b/cohorts/vueapp/src/common.js @@ -35,14 +35,14 @@ export const connectTopRowControls = () => { updateUserSetting( cohortsStore.appContext.csrf_token, 'vueapp.filtration_inline_help', - newValue + newValue, ) } const elem = $('#vueapp-filtration-inline-help') if (elem) { elem.prop('checked', newValue) } - } + }, ) watch( () => cohortsStore.complexityMode, @@ -51,14 +51,14 @@ export const connectTopRowControls = () => { updateUserSetting( cohortsStore.appContext.csrf_token, 'vueapp.filtration_complexity_mode', - newValue + newValue, ) } const elem = $('#vueapp-filtration-complexity-mode') if (elem) { elem.val(newValue).change() } - } + }, ) // Vice versa. @@ -66,10 +66,10 @@ export const connectTopRowControls = () => { const handleUpdate = () => { const cohortsStore = useCohortsStore() cohortsStore.showInlineHelp = $('#vueapp-filtration-inline-help').prop( - 'checked' + 'checked', ) cohortsStore.complexityMode = $( - '#vueapp-filtration-complexity-mode' + '#vueapp-filtration-complexity-mode', ).val() } nextTick(() => { diff --git a/cohorts/vueapp/src/components/CohortListHeader.vue b/cohorts/vueapp/src/components/CohortListHeader.vue index 6f814b1df..2114a8c9f 100644 --- a/cohorts/vueapp/src/components/CohortListHeader.vue +++ b/cohorts/vueapp/src/components/CohortListHeader.vue @@ -6,11 +6,11 @@ import { useCohortsStore } from '@cohorts/stores/cohorts.js' const cohortsStore = useCohortsStore() const projectTitle = computed(() => - cohortsStore.project ? cohortsStore.project.title : 'PROJECT MISSING' + cohortsStore.project ? cohortsStore.project.title : 'PROJECT MISSING', ) const projectUuid = computed(() => - cohortsStore.project ? cohortsStore.project.sodar_uuid : 'no-uuid' + cohortsStore.project ? cohortsStore.project.sodar_uuid : 'no-uuid', ) /** Define emits. */ diff --git a/cohorts/vueapp/src/components/CohortListTable.vue b/cohorts/vueapp/src/components/CohortListTable.vue index f9d2fb595..1140cb0a4 100644 --- a/cohorts/vueapp/src/components/CohortListTable.vue +++ b/cohorts/vueapp/src/components/CohortListTable.vue @@ -29,8 +29,8 @@ watch( ], ( [_newPageNo, _newRowsPerPage, _newSortBy, _newSortType], - [_oldPageNo, _oldRowsPerPage, _oldSortBy, _oldSortType] - ) => cohortsStore.loadFromServer() + [_oldPageNo, _oldRowsPerPage, _oldSortBy, _oldSortType], + ) => cohortsStore.loadFromServer(), ) /** Debounced version for reloading the table from server */ @@ -43,7 +43,7 @@ const debouncedLoadFromServer = debounce(cohortsStore.loadFromServer, 1000, { /** Update display when search term changed. */ watch( () => cohortsStore.searchTerm, - (_newSearchTerm, _oldSearchTerm) => debouncedLoadFromServer() + (_newSearchTerm, _oldSearchTerm) => debouncedLoadFromServer(), ) const headers = [ @@ -123,7 +123,7 @@ const handleDeleteCohortClicked = async (cohortUuid) => { const getMemberCount = (cases) => { return cases.reduce( (accumulator, kase) => accumulator + kase.pedigree.length, - 0 + 0, ) } diff --git a/cohorts/vueapp/src/components/ModalCohortEditor.vue b/cohorts/vueapp/src/components/ModalCohortEditor.vue index 8390de34e..e2799b225 100644 --- a/cohorts/vueapp/src/components/ModalCohortEditor.vue +++ b/cohorts/vueapp/src/components/ModalCohortEditor.vue @@ -121,12 +121,12 @@ import { helpers } from '@vuelidate/validators' const selectAtLeastTwoCases = helpers.withMessage( 'Select at least two cases', - (value) => value.length > 1 + (value) => value.length > 1, ) const selectAtLeastOneCase = helpers.withMessage( 'Select at least one case', - (value) => value.length > 0 + (value) => value.length > 0, ) /** The state to use in vuelidate. */ @@ -193,11 +193,11 @@ const buildProjectCasesSelected = () => { indeterminate: computed(() => { const currentSelection = new Set(propsCopy.value.modelValue.cases) const allSet = project.case_set.every((kase) => - currentSelection.has(kase.sodar_uuid) + currentSelection.has(kase.sodar_uuid), ) if (allSet) return false const noneSet = project.case_set.every( - (kase) => !currentSelection.has(kase.sodar_uuid) + (kase) => !currentSelection.has(kase.sodar_uuid), ) return !noneSet }), @@ -205,7 +205,7 @@ const buildProjectCasesSelected = () => { get() { const currentSelection = new Set(propsCopy.value.modelValue.cases) return project.case_set.every((kase) => - currentSelection.has(kase.sodar_uuid) + currentSelection.has(kase.sodar_uuid), ) }, set(newValue) { @@ -374,12 +374,12 @@ defineExpose({ show, hide }) role="progressbar" :style="`width: ${computeProgressBar( getSelectedProjectCasesCount(project.case_set), - project.case_set.length + project.case_set.length, )}%`" :aria-valuenow=" computeProgressBar( getSelectedProjectCasesCount(project.case_set), - project.case_set.length + project.case_set.length, ) " aria-valuemin="0" diff --git a/cohorts/vueapp/src/main.js b/cohorts/vueapp/src/main.js index 3cc8295fb..b8a97c955 100644 --- a/cohorts/vueapp/src/main.js +++ b/cohorts/vueapp/src/main.js @@ -28,7 +28,7 @@ app.mount('#app') const rawAppContext = JSON.parse( document.getElementById('sodar-ss-app-context').getAttribute('app-context') || - '{}' + '{}', ) const cohortsStore = useCohortsStore() diff --git a/cohorts/vueapp/src/stores/cohorts.js b/cohorts/vueapp/src/stores/cohorts.js index e43d57bcc..74629d22c 100644 --- a/cohorts/vueapp/src/stores/cohorts.js +++ b/cohorts/vueapp/src/stores/cohorts.js @@ -105,7 +105,7 @@ export const useCohortsStore = defineStore('cohorts', () => { cohort = await cohortsApi.createCohort( csrfToken.value, project.value.sodar_uuid, - payload + payload, ) } finally { serverInteractions.value -= 1 @@ -122,7 +122,7 @@ export const useCohortsStore = defineStore('cohorts', () => { await cohortsApi.createCohortCase( csrfToken.value, project.value.sodar_uuid, - cohortCase + cohortCase, ) } finally { serverInteractions.value -= 1 @@ -142,7 +142,7 @@ export const useCohortsStore = defineStore('cohorts', () => { cohort = await cohortsApi.updateCohort( csrfToken.value, cohortUuid, - payload + payload, ) } finally { serverInteractions.value -= 1 @@ -151,7 +151,7 @@ export const useCohortsStore = defineStore('cohorts', () => { try { const cohortCases = await cohortsApi.listCohortCase( csrfToken.value, - cohortUuid + cohortUuid, ) for (const cohortCase of cohortCases) { currentCasesUuids[cohortCase.case] = cohortCase.sodar_uuid @@ -162,13 +162,13 @@ export const useCohortsStore = defineStore('cohorts', () => { if (cohort && currentCasesUuids) { for (const caseToRemove of difference( Object.keys(currentCasesUuids), - cases + cases, )) { serverInteractions.value += 1 try { await cohortsApi.destroyCohortCase( csrfToken.value, - currentCasesUuids[caseToRemove] + currentCasesUuids[caseToRemove], ) } finally { serverInteractions.value -= 1 @@ -176,7 +176,7 @@ export const useCohortsStore = defineStore('cohorts', () => { } for (const caseToAdd of difference( cases, - Object.keys(currentCasesUuids) + Object.keys(currentCasesUuids), )) { const cohortCase = { sodar_uuid: uuidv4(), @@ -188,7 +188,7 @@ export const useCohortsStore = defineStore('cohorts', () => { await cohortsApi.createCohortCase( csrfToken.value, project.value.sodar_uuid, - cohortCase + cohortCase, ) } finally { serverInteractions.value -= 1 @@ -221,7 +221,7 @@ export const useCohortsStore = defineStore('cohorts', () => { orderBy: tableServerOptions.value.sortBy, orderDir: tableServerOptions.value.sortType, queryString: searchTerm.value, - } + }, ) cohortCount.value = response.count tableRows.value = response.results diff --git a/svs/vueapp/src/api/svs.js b/svs/vueapp/src/api/svs.js index 3662ce56e..b6cfea9af 100644 --- a/svs/vueapp/src/api/svs.js +++ b/svs/vueapp/src/api/svs.js @@ -5,7 +5,7 @@ export default { const response = await apiFetch( csrfToken, '/svs/ajax/query-case/quick-presets/', - 'GET' + 'GET', ) return await response.json() }, @@ -13,7 +13,7 @@ export default { const response = await apiFetch( csrfToken, `/svs/ajax/query-case/inheritance-presets/${caseUuid}/`, - 'GET' + 'GET', ) return await response.json() }, @@ -21,7 +21,7 @@ export default { const response = await apiFetch( csrfToken, `/svs/ajax/query-case/category-presets/${category}/`, - 'GET' + 'GET', ) return await response.json() }, @@ -29,7 +29,7 @@ export default { const response = await apiFetch( csrfToken, `/svs/ajax/query-case/query-settings-shortcut/${caseUuid}/`, - 'GET' + 'GET', ) return await response.json() }, @@ -37,7 +37,7 @@ export default { const response = await apiFetch( csrfToken, `/svs/ajax/sv-query/list-create/${caseUuid}/`, - 'GET' + 'GET', ) return await response.json() }, @@ -46,7 +46,7 @@ export default { csrfToken, `/svs/ajax/sv-query/list-create/${caseUuid}/`, 'POST', - payload + payload, ) return await response.json() }, @@ -54,7 +54,7 @@ export default { const response = await apiFetch( csrfToken, `/svs/ajax/sv-query/retrieve-update-destroy/${svQueryUuid}/`, - 'GET' + 'GET', ) return await response.json() }, @@ -62,7 +62,7 @@ export default { const response = await apiFetch( csrfToken, `/svs/sv-query-result-set/list/${svQueryUuid}/`, - 'GET' + 'GET', ) return await response.json() }, @@ -70,7 +70,7 @@ export default { const response = await apiFetch( csrfToken, `/svs/sv-query-result-set/retrieve/${svQueryResultUuid}/`, - 'GET' + 'GET', ) return await response.json() }, @@ -87,7 +87,7 @@ export default { const response = await apiFetch( csrfToken, `/svs/sv-query-result-row/list/${svQueryResultSetUuid}/${urlQuery}`, - 'GET' + 'GET', ) return await response.json() }, @@ -95,7 +95,7 @@ export default { const response = await apiFetch( csrfToken, `/svs/sv-query-result-row/retrieve/${queryResultRowUuid}/`, - 'GET' + 'GET', ) return await response.json() }, @@ -112,7 +112,7 @@ export default { const response = await apiFetch( csrfToken, `/svs/ajax/structural-variant-comment/list-create/${caseUuid}/${query}`, - 'GET' + 'GET', ) return await response.json() }, @@ -120,7 +120,7 @@ export default { csrfToken, caseUuid, { release, chromosome, start, end, sv_type, sv_sub_type }, - payload + payload, ) { const query = `release=${release}&chromosome=${chromosome}&start=${start}` + @@ -129,7 +129,7 @@ export default { csrfToken, `/svs/ajax/structural-variant-comment/list-create/${caseUuid}/?${query}`, 'POST', - payload + payload, ) return await response.json() }, @@ -138,7 +138,7 @@ export default { csrfToken, `/svs/ajax/structural-variant-comment/retrieve-update-destroy/${commentUuid}/`, 'PATCH', - payload + payload, ) return await response.json() }, @@ -146,7 +146,7 @@ export default { const response = await apiFetch( csrfToken, `/svs/ajax/structural-variant-comment/retrieve-update-destroy/${commentUuid}/`, - 'DELETE' + 'DELETE', ) await response }, @@ -163,7 +163,7 @@ export default { const response = await apiFetch( csrfToken, `/svs/ajax/structural-variant-flags/list-create/${caseUuid}/${query}`, - 'GET' + 'GET', ) return await response.json() }, @@ -171,7 +171,7 @@ export default { csrfToken, caseUuid, { release, chromosome, start, end, sv_type, sv_sub_type }, - payload + payload, ) { const query = `release=${release}&chromosome=${chromosome}&start=${start}` + @@ -180,7 +180,7 @@ export default { csrfToken, `/svs/ajax/structural-variant-flags/list-create/${caseUuid}/?${query}`, 'POST', - payload + payload, ) return await response.json() }, @@ -189,7 +189,7 @@ export default { csrfToken, `/svs/ajax/structural-variant-flags/retrieve-update-destroy/${flagsUuid}/`, 'PATCH', - payload + payload, ) return await response.json() }, @@ -197,7 +197,7 @@ export default { const response = await apiFetch( csrfToken, `/svs/ajax/structural-variant-flags/retrieve-update-destroy/${flagsUuid}/`, - 'DELETE' + 'DELETE', ) await response }, diff --git a/svs/vueapp/src/components/GenomeBrowser.vue b/svs/vueapp/src/components/GenomeBrowser.vue index d90ea0c8d..9cae27935 100644 --- a/svs/vueapp/src/components/GenomeBrowser.vue +++ b/svs/vueapp/src/components/GenomeBrowser.vue @@ -61,7 +61,7 @@ watch( .then((browser) => { addTracks(browser) }) - } + }, ) // Watch changes to the case (requires track reload). @@ -72,7 +72,7 @@ watch( igvBrowser.value.removeTrackByName('Case SVs') addCaseTracks(igvBrowser.value) } - } + }, ) // Watch changes to the locus (jumping is enough). @@ -80,7 +80,7 @@ watch( () => props.locus, (_newValue, _oldValue) => { igvBrowser.value.search(props.locus) - } + }, ) // Construct igv.js browser when mounted. diff --git a/svs/vueapp/src/components/SvDetails.vue b/svs/vueapp/src/components/SvDetails.vue index f0826b838..e64fe12ff 100644 --- a/svs/vueapp/src/components/SvDetails.vue +++ b/svs/vueapp/src/components/SvDetails.vue @@ -36,12 +36,12 @@ const detailsStore = useSvDetailsStore() const flagsStore = useSvFlagsStore() flagsStore.initialize( { csrf_token: svFilterStore.csrfToken }, - svFilterStore.caseUuid + svFilterStore.caseUuid, ) const commentsStore = useSvCommentsStore() commentsStore.initialize( { csrf_token: svFilterStore.csrfToken }, - svFilterStore.caseUuid + svFilterStore.caseUuid, ) // Safely return case release. diff --git a/svs/vueapp/src/components/SvDetailsGenes.vue b/svs/vueapp/src/components/SvDetailsGenes.vue index 20855b22f..f9680df8a 100644 --- a/svs/vueapp/src/components/SvDetailsGenes.vue +++ b/svs/vueapp/src/components/SvDetailsGenes.vue @@ -28,7 +28,7 @@ const genesInfosByHgnc: ComputedRef> = computed( result.set(record.hgnc.hgnc_id, record) } return result - } + }, ) const headers: Header[] = [ diff --git a/svs/vueapp/src/components/SvDetailsGenotypeCall.vue b/svs/vueapp/src/components/SvDetailsGenotypeCall.vue index b3abc4cb5..ef1117538 100644 --- a/svs/vueapp/src/components/SvDetailsGenotypeCall.vue +++ b/svs/vueapp/src/components/SvDetailsGenotypeCall.vue @@ -33,12 +33,12 @@ const allKeys = computed(() => { let tmp = [] for (let call_info of Object.values( - props.currentSvRecord.payload.call_info + props.currentSvRecord.payload.call_info, )) { tmp = tmp.concat( Object.entries(call_info) .filter(([_, value]) => value !== null) - .map(([key, _]) => key) + .map(([key, _]) => key), ) } let result = Array.from(new Set(tmp)) diff --git a/svs/vueapp/src/components/SvDetailsModalWrapper.vue b/svs/vueapp/src/components/SvDetailsModalWrapper.vue index cf03f1dfd..2d215c4b3 100644 --- a/svs/vueapp/src/components/SvDetailsModalWrapper.vue +++ b/svs/vueapp/src/components/SvDetailsModalWrapper.vue @@ -50,7 +50,7 @@ const showModal = async () => { const resultRow = await svsApi.retrieveSvQueryResultRow( svFilterStore.csrfToken, - props.resultRowUuid + props.resultRowUuid, ) svRecord.value = resultRow await svDetailsStore.fetchSvDetails(resultRow) @@ -69,7 +69,7 @@ watch( } else { $(modalRef.value).modal('hide') } - } + }, ) /** Event handler called when the modal is hidden. diff --git a/svs/vueapp/src/components/SvFilterApp.vue b/svs/vueapp/src/components/SvFilterApp.vue index fd9b9c297..6f941ce4e 100644 --- a/svs/vueapp/src/components/SvFilterApp.vue +++ b/svs/vueapp/src/components/SvFilterApp.vue @@ -25,7 +25,7 @@ const props = defineProps({ const appContext = JSON.parse( document.getElementById('sodar-ss-app-context').getAttribute('app-context') || - '{}' + '{}', ) /** The currently used route. */ @@ -82,11 +82,11 @@ watch( updateUserSetting( svFilterStore.csrfToken, 'vueapp.filtration_inline_help', - newValue + newValue, ) } $('#vueapp-filtration-inline-help').prop('checked', newValue) - } + }, ) watch( () => svFilterStore.filtrationComplexityMode, @@ -95,11 +95,11 @@ watch( updateUserSetting( svFilterStore.csrfToken, 'vueapp.filtration_complexity_mode', - newValue + newValue, ) } $('#vueapp-filtration-complexity-mode').val(newValue).change() - } + }, ) // Vice versa. @@ -107,10 +107,10 @@ onMounted(() => { const handleUpdate = () => { const svFilterStore = useSvFilterStore() svFilterStore.showFiltrationInlineHelp = $( - '#vueapp-filtration-inline-help' + '#vueapp-filtration-inline-help', ).prop('checked') svFilterStore.filtrationComplexityMode = $( - '#vueapp-filtration-complexity-mode' + '#vueapp-filtration-complexity-mode', ).val() } nextTick(() => { diff --git a/svs/vueapp/src/components/SvFilterAppHeader.vue b/svs/vueapp/src/components/SvFilterAppHeader.vue index 5378a5109..75fadd483 100644 --- a/svs/vueapp/src/components/SvFilterAppHeader.vue +++ b/svs/vueapp/src/components/SvFilterAppHeader.vue @@ -36,7 +36,7 @@ watch( try { const presetSet = await queryPresetsApi.retrievePresetSet( csrfToken, - newValue + newValue, ) presetSetLabel.value = presetSet.label } catch (err) { @@ -44,7 +44,7 @@ watch( } finally { presetSetLoading.value = false } - } + }, ) diff --git a/svs/vueapp/src/components/SvFilterForm.vue b/svs/vueapp/src/components/SvFilterForm.vue index fdbaebe0b..832a65a16 100644 --- a/svs/vueapp/src/components/SvFilterForm.vue +++ b/svs/vueapp/src/components/SvFilterForm.vue @@ -59,7 +59,7 @@ const anyHasError = computed(() => { const v$ = useVuelidate() const showOverlay = computed(() => - ['initial', 'initializing'].includes(svFilterStore.storeState) + ['initial', 'initializing'].includes(svFilterStore.storeState), ) const onSubmitCancelButtonClicked = () => { diff --git a/svs/vueapp/src/components/SvFilterFormCriteriaDefinitionPane.vue b/svs/vueapp/src/components/SvFilterFormCriteriaDefinitionPane.vue index 85c283745..fb9e05bdc 100644 --- a/svs/vueapp/src/components/SvFilterFormCriteriaDefinitionPane.vue +++ b/svs/vueapp/src/components/SvFilterFormCriteriaDefinitionPane.vue @@ -67,7 +67,7 @@ const initSelectedCriteriaDef = () => { watch( () => props.querySettings.genotype_criteria, - (newValue, _oldValue) => initSelectedCriteriaDef() + (newValue, _oldValue) => initSelectedCriteriaDef(), ) onMounted(() => initSelectedCriteriaDef()) diff --git a/svs/vueapp/src/components/SvFilterFormDev.vue b/svs/vueapp/src/components/SvFilterFormDev.vue index fd49c9ac6..1421eccf1 100644 --- a/svs/vueapp/src/components/SvFilterFormDev.vue +++ b/svs/vueapp/src/components/SvFilterFormDev.vue @@ -12,13 +12,13 @@ const loadSettings = () => { rawFilterCriteriaRef.value.value = JSON.stringify( props.querySettings.genotype_criteria, null, - 2 + 2, ) } const applySettings = () => { props.querySettings.genotype_criteria = JSON.parse( - rawFilterCriteriaRef.value.value + rawFilterCriteriaRef.value.value, ) } diff --git a/svs/vueapp/src/components/SvFilterFormFrequencyPane.vue b/svs/vueapp/src/components/SvFilterFormFrequencyPane.vue index e1e24d7d2..0bc81de37 100644 --- a/svs/vueapp/src/components/SvFilterFormFrequencyPane.vue +++ b/svs/vueapp/src/components/SvFilterFormFrequencyPane.vue @@ -73,7 +73,7 @@ const _vuelidateWrappers = (keys) => } }, }), - ]) + ]), ) // Define the form state. diff --git a/svs/vueapp/src/components/SvFilterFormGenesRegionsPane.vue b/svs/vueapp/src/components/SvFilterFormGenesRegionsPane.vue index d3368fbff..63185b26d 100644 --- a/svs/vueapp/src/components/SvFilterFormGenesRegionsPane.vue +++ b/svs/vueapp/src/components/SvFilterFormGenesRegionsPane.vue @@ -59,7 +59,7 @@ const regexRegion = new RegExp( '(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|X|Y|M|MT)' + // chrom name ')' + // close chrom '(:(?(\\d+(,\\d+)*))-(?(\\d+(,\\d+)*)))?' + // optional range - '$' // end + '$', // end ) /** Load Genome England PanelApp presets. */ @@ -73,19 +73,19 @@ const loadPanelPage = async (page) => { label: `${panel.name} (v${panel.version})`, value: panel, } - }) + }), ) if (responseJson.next) { await loadPanelPage(page + 1) } - } + }, ) } /** Insert genomics england panel. */ const insertGenomicsEnglandPanel = async (panel) => { await fetch( - `/proxy/panelapp/v1/panels/${panel.id}/?version=${panel.version}` + `/proxy/panelapp/v1/panels/${panel.id}/?version=${panel.version}`, ).then(async (response) => { const responseJson = await response.json() let symbols = [] @@ -207,7 +207,7 @@ const loadGenePanelCategories = async () => { await fetch('/geneinfo/api/genepanel-category/list/').then( async (response) => { genePanelCategories.value = await response.json() - } + }, ) } diff --git a/svs/vueapp/src/components/SvFilterFormGenotypePane.vue b/svs/vueapp/src/components/SvFilterFormGenotypePane.vue index 3d81c70a1..15c4e348a 100644 --- a/svs/vueapp/src/components/SvFilterFormGenotypePane.vue +++ b/svs/vueapp/src/components/SvFilterFormGenotypePane.vue @@ -65,12 +65,12 @@ const getRole = (name) => { /** Precomputed mapping of father for each pedigree member. */ const memberToFather = Object.fromEntries( - props.caseObj.pedigree.map((member) => [member.name, member.father]) + props.caseObj.pedigree.map((member) => [member.name, member.father]), ) /** Precomputed mapping of mother for each pedigree member. */ const memberToMother = Object.fromEntries( - props.caseObj.pedigree.map((member) => [member.name, member.mother]) + props.caseObj.pedigree.map((member) => [member.name, member.mother]), ) /** Build a wrapper to go into `genotypeWrappers` below. */ @@ -96,7 +96,7 @@ const makeGenotypeWrapper = (name) => key !== memberToFather[name] && key !== memberToMother[name] && ['comphet-index', 'recessive-index', 'recessive-parent'].includes( - value + value, ) ) { props.querySettings[key] = 'any' @@ -140,8 +140,8 @@ const genotypeWrappers = reactive( props.caseObj.pedigree.map((member) => [ member.name, makeGenotypeWrapper(member.name), - ]) - ) + ]), + ), ) /** Initialize vuelidate. */ diff --git a/svs/vueapp/src/components/SvFilterFormImpactPane.vue b/svs/vueapp/src/components/SvFilterFormImpactPane.vue index 4083ef31f..5d6471fd3 100644 --- a/svs/vueapp/src/components/SvFilterFormImpactPane.vue +++ b/svs/vueapp/src/components/SvFilterFormImpactPane.vue @@ -66,7 +66,7 @@ const _vuelidateWrappers = (keys) => } }, }), - ]) + ]), ) // Helper function to build wrappers for array valued fields. @@ -107,7 +107,7 @@ const buildSvTypeGroupWrapper = (key) => { get() { const currentSvSubTypes = new Set(props.querySettings.sv_sub_types) const allSet = svTypeGroups[key].every((value) => - currentSvSubTypes.has(value) + currentSvSubTypes.has(value), ) return allSet }, @@ -171,7 +171,7 @@ const buildTxEffectsWrapper = (key) => { } } else { props.querySettings.tx_effects = props.querySettings.tx_effects.filter( - (val) => val !== key + (val) => val !== key, ) } }, diff --git a/svs/vueapp/src/components/SvFilterFormPatho.vue b/svs/vueapp/src/components/SvFilterFormPatho.vue index a0622967e..872680513 100644 --- a/svs/vueapp/src/components/SvFilterFormPatho.vue +++ b/svs/vueapp/src/components/SvFilterFormPatho.vue @@ -52,7 +52,7 @@ const _vuelidateWrappers = (keys) => } }, }), - ]) + ]), ) // Define the form state. diff --git a/svs/vueapp/src/components/SvFilterFormQuickPresets.vue b/svs/vueapp/src/components/SvFilterFormQuickPresets.vue index 20498ff85..41176805c 100644 --- a/svs/vueapp/src/components/SvFilterFormQuickPresets.vue +++ b/svs/vueapp/src/components/SvFilterFormQuickPresets.vue @@ -29,7 +29,7 @@ const refreshInheritanceRef = () => { return // not fully loaded yet } for (const [presetName, presetValues] of Object.entries( - props.categoryPresets.inheritance + props.categoryPresets.inheritance, )) { let isCompatible = true for (const member of Object.values(props.case.pedigree)) { @@ -48,7 +48,7 @@ const refreshInheritanceRef = () => { ) && !isEqual( props.querySettings.genotype[member.name], - presetValues.genotype[member.name] + presetValues.genotype[member.name], ) ) { isCompatible = false @@ -58,7 +58,7 @@ const refreshInheritanceRef = () => { if ( !isEqual( props.querySettings.recessive_index, - presetValues.recessive_index + presetValues.recessive_index, ) || !isEqual(props.querySettings.recessive_mode, presetValues.recessive_mode) ) { @@ -81,7 +81,7 @@ const inheritanceWrapper = computed({ set(newValue) { if (newValue !== 'custom') { props.querySettings.genotype = copy( - props.categoryPresets.inheritance[newValue].genotype + props.categoryPresets.inheritance[newValue].genotype, ) const recessiveIndex = props.categoryPresets.inheritance[newValue].recessive_index @@ -117,7 +117,7 @@ const _keysToStrip = [ /** Return copy of obj without keys. */ const _objectWithoutKeys = (obj, keys) => { return Object.fromEntries( - Object.entries(obj).filter(([key, _value]) => !keys.includes(key)) + Object.entries(obj).filter(([key, _value]) => !keys.includes(key)), ) } @@ -149,13 +149,13 @@ const refreshValueRefs = () => { continue // not fully loaded yet } for (const [presetName, presetValues] of Object.entries( - props.categoryPresets[category] + props.categoryPresets[category], )) { if (category === 'genotypeCriteria') { if (svFilterStore.querySettings !== null) { isCompatible = isEqual( svFilterStore.querySettings.genotype_criteria, - presetValues + presetValues, ) } } else { @@ -199,11 +199,11 @@ const makeWrapper = (name) => blockRefresh.value = true if (name === 'genotypeCriteria') { props.querySettings.genotype_criteria = copy( - props.categoryPresets.genotypeCriteria[newValue] + props.categoryPresets.genotypeCriteria[newValue], ) } else { for (const [key, value] of Object.entries( - props.categoryPresets[name][newValue] + props.categoryPresets[name][newValue], )) { if (!_keysToStrip.includes(key)) { props.querySettings[key] = value @@ -250,7 +250,7 @@ const refreshQuickPreset = () => { isEqual(regulatoryWrapper.value, theQuickPresets.regulatory) && isEqual( genotypeCriteriaWrapper.value, - theQuickPresets.genotype_criteria + theQuickPresets.genotype_criteria, ) && isEqual(tadWrapper.value, theQuickPresets.tad) && isEqual(knownPathoWrapper.value, theQuickPresets.known_patho) diff --git a/svs/vueapp/src/components/SvFilterFormRegulatoryPane.vue b/svs/vueapp/src/components/SvFilterFormRegulatoryPane.vue index b12c036a2..35381407c 100644 --- a/svs/vueapp/src/components/SvFilterFormRegulatoryPane.vue +++ b/svs/vueapp/src/components/SvFilterFormRegulatoryPane.vue @@ -45,7 +45,7 @@ const _vuelidateWrappers = (keys) => } }, }), - ]) + ]), ) // Define the form state. diff --git a/svs/vueapp/src/components/SvFilterFormTadsPane.vue b/svs/vueapp/src/components/SvFilterFormTadsPane.vue index f3fc8912b..b5755d4e1 100644 --- a/svs/vueapp/src/components/SvFilterFormTadsPane.vue +++ b/svs/vueapp/src/components/SvFilterFormTadsPane.vue @@ -42,7 +42,7 @@ const _vuelidateWrappers = (keys) => } }, }), - ]) + ]), ) // Define the form state. diff --git a/svs/vueapp/src/components/SvFilterResultsTable.vue b/svs/vueapp/src/components/SvFilterResultsTable.vue index e3ad17240..dd101beaf 100644 --- a/svs/vueapp/src/components/SvFilterResultsTable.vue +++ b/svs/vueapp/src/components/SvFilterResultsTable.vue @@ -136,7 +136,7 @@ const loadFromServer = async () => { return genes } else if (genes[0].gene) { return genes.toSorted( - sortBy('-gene.is_acmg', '-gene.is_disease_gene', 'gene.symbol') + sortBy('-gene.is_acmg', '-gene.is_disease_gene', 'gene.symbol'), ) } else { return genes.toSorted(sortBy('-is_acmg', '-is_disease_gene', 'symbol')) @@ -177,7 +177,7 @@ const loadFromServer = async () => { ? 'chromosome_no,start' : tableServerOptions.value.sortBy, orderDir: tableServerOptions.value.sortType, - } + }, ) tableRows.value = response.results.map((row) => transmogrify(row)) tableLoading.value = false @@ -188,7 +188,7 @@ const goToLocus = async ({ chromosome, start, end }) => { ? chromosome : `chr${chromosome}` await fetch( - `http://127.0.0.1:60151/goto?locus=${chrPrefixed}:${start}-${end}` + `http://127.0.0.1:60151/goto?locus=${chrPrefixed}:${start}-${end}`, ) } @@ -321,7 +321,7 @@ watch( (_newValue, _oldValue) => { loadFromServer() }, - { deep: true } + { deep: true }, ) @@ -503,7 +503,7 @@ watch(