PageSourceSearch

https://monarchinitiative.org/assets/SectionAssociations-Dj0Cc6Uj.js

js monarchinitiative.org collected 2026-09-24 17:38:10 UTC 10,229 bytes, 1 lines download raw bytes

1import{A as te,S as ie}from"./SectionCasePhenotypeGrid-Coy6Ji6r.js";import{u as P,G as oe,d as ne,a as O,B as ae,o as h,i as F,F as N,j as le,e as C,b as B,g as L,t as re,x as D,a6 as ce,l as A,c as w,h as I,n as de,A as ue,m as pe,D as he,r as f,_ as be}from"./index-C1QTFfJN.js";import{T as fe}from"./associations-BpIiEl0T.js";import{l as S,i as $e,A as me}from"./AssociationsTable-ANMjibN2.js";import Te from"./SectionPathograph-DkmC0bj4.js";import"./index-sJ5DBUcv.js";import"./EntityGridModal-BmubpRhA.js";import"./model-EtLkNkXt.js";import"./AppPercentage-CT4ppVkG.js";import"./AppPredicateBadge-9KVp_Frz.js";import"./AppTable-C9MSqtVo.js";import"./TheTableContols-GilcMbd_.js";import"./AppSelectSingle-Canqs8TM.js";import"./resourceNames-Cna40RmZ.js";import"./AssociationsSummary.vue_vue_type_style_index_0_scoped_439d468d_lang-CuuTqdNc.js";import"./SectionAssociationDetails-6vO_orqB.js";import"./AppDetail-CuUTdsyh.js";import"./AppDetails-C1vDx9X6.js";import"./use-source-versions-9GYEyR4D.js";import"./agentType-CLlR6sp8.js";const De=new Set(["biolink:ChemicalOrDrugOrTreatmentToDiseaseOrPhenotypicFeatureAssociation"]);function Ae(e){return{options:P(()=>{var m;const n=(((m=e.association_counts)==null?void 0:m.map(r=>({id:r.category||"",label:oe.startCase(r.label),count:fe.has(r.category||"")?r.count_with_orthologs??r.count:r.count??0})))??[]).filter(r=>!De.has(r.id)&&(r.count??0)>0),a=n.findIndex(r=>
1r.id==="biolink:CausalGeneToDiseaseAssociation"),u=n.findIndex(r=>r.id==="biolink:GeneToPhenotypicFeatureAssociation");if(a>-1&&u>-1&&a>u){const[r]=n.splice(a,1);n.splice(u,0,r)}return n})}}const ve={"biolink:DiseaseToPhenotypicFeatureAssociation":"Disease Phenotypes","biolink:CausalGeneToDiseaseAssociation":"Causal Genes","biolink:GeneToPhenotypicFeatureAssociation":"Causal Gene Phenotypes","biolink:CorrelatedGeneToDiseaseAssociation":"Correlated Genes","biolink:GenotypeToDiseaseAssociation":"Disease Models","biolink:VariantToDiseaseAssociation":"Disease Variants"};function ke(e,s){return ve[e]??s??e}const Ce={"biolink:DiseaseToPhenotypicFeatureAssociation":{direct:()=>"Directly associated phenotypes",inferred:()=>"Inferred associated phenotypes"},"biolink:GeneToPhenotypicFeatureAssociation":{direct:()=>"Directly associated causal gene phenotypes",inferred:()=>"Inferred associated causal gene phenotypes"},"biolink:CausalGeneToDiseaseAssociation":{direct:()=>"Directly associated causal genes",inferred:()=>"Inferred associated causal genes"},"biolink:CorrelatedGeneToDiseaseAssociation":{direct:()=>"Directly associated correlated genes",inferred:()=>"Inferred associated correlated genes"},"biolink:GenotypeToDiseaseAssociation":{direct:()=>"Directly associated disease models",inferred:()=>"Inferred associated disease models"},"biolink:VariantToDiseaseAssociation":{direct:()=>"Directly Associated Disease Variants",inferred:()=>"Inferred Associated Disease Variants"}},we={direct:({label:e})=>`Directly associated ${e}`,inferred:({label:e})=>`Inferred associated ${e}`};function R(e,s){const o=S(e);return(Ce[e]??we)[s]({label:o}).trim()}const c=(e,s="subclass",o="subclasses",n="en")=>{const a=typeof e=="number"&&Number.isFinite(e)?e:0;if(a===0)return"";const u=new Intl.PluralRules(n).select(Math.abs(a))==="one";return`${a.toLocaleString(n)} ${u?s:o}`},b=e=>e?`“${e.replace(/\s+/g," ").trim()}”`:"",v=(e,s,o)=>String(c(e??0,s,o)).replace(/^\s*[+-]?\d{1,3}(?:,\d{3})*(?:\.\d+)?\s*/,""),$=e=>(e??0).toLocaleString(),Se={"biolink:DiseaseToPhenotypicFeatureAssociation":({n:e,node:s})=>`${$(e)} ${v(e,"phenotype","phenotypes")} directly associated with ${s}`,"biolink:GeneToPhenotypicFeatureAssociation":({n:e,node:s})=>`${$(e)} ${v(e,"gene with phenotypes","genes with phenotypes")} that are directly associated with ${s}`,"biolink:CausalGeneToDiseaseAssociation":({n:e,node:s})=>`${$(e)} ${v(e,"causal gene","causal genes")} that causes ${s}`,"biolink:CorrelatedGeneToDiseaseAssociation":({n:e,node:s})=>`${$(e)} ${v(e,"correlated gene","correlated genes")} for ${s}`,"biolink:GenotypeToDiseaseAssociation":({n:e,node:s})=>`${$(e)} ${v(e,"genotype","genotypes")} that model ${s}`,"biolink:VariantToDiseaseAssociation":({n:e,node:s})=>`${$(e)} ${v(e,"variant","variants")} directly associated with ${s}`},Ge=({n:e,node:s,label:o})=>`${(e??0).toLocaleString()} ${o} directly associated with ${s}`,Fe={"biolink:DiseaseToPhenotypicFeatureAssociation":({all:e,n:s,diff:o,node:n,example:a})=>(s??0)>0?`${c(s,"phenotype","phenotypes")} directly associated with ${n} as well as ${c(o,"subclass","subclasses")} ${a?` such as ${b(a)}`:""}`:`${$(e)} phenotypes associated with ${n}`,"biolink:GeneToPhenotypicFeatureAssociation":({all:e,n:s,node:o,example:n})=>(s??0)>0?`Phenotypes of the ${c(s,"gene","genes")} that cause subclasses of ${o} such as ${b(n)}`:` ${c(e,"gene","genes")} with phenotypes associated with ${o}`,"biolink:CausalGeneToDiseaseAssociation":({all:e,n:s,diff:o,node:n,example:a})=>(s??0)>0?` ${c(s,"gene","genes")} that causes ${n} as well as ${c(o,"subclass","subclasses")} such as  ${a?` (e.g., ${b(a)})`:""}`:`${c(e,"gene","genes")} that cause subtypes of ${n} such as ${b(a)}`,"biolink:CorrelatedGeneToDiseaseAssociation":({all:e,n:s,diff:o,node:n,example:a})=>(s??0)>0?`  ${c(s,"correlated gene","correlated genes")} for ${n} as wells as  ${c(o,"subclass","subclasses")} such as ${a?`${b(a)}`:""}`:` ${c(e,"correlated gene","correlated genes")} associated with ${n}`,"biolink:GenotypeToDiseaseAssociation":({all:e,n:s,diff:o,node:n,example:a})=>(s??0)>0?`${c(s,"disease model","disease models")} that are assciated with ${n} as well as ${c(o,"subclass","subclasses")} such as ${a?` ${b(a)}`:""}`:` ${c(e,"disease model","disease models")} that are assciated with ${n}`,"biolink:VariantToDiseaseAssociation":({all:e,n:s,diff:o,node:n,example:a})=>(s??0)>0?` ${c(s,"variant","variants")} that are assciated with ${n} as well as ${c(o,"subclass","subclasses")} such as ${a?` ${b(a)}`:""}`:` ${c(e,"variant","variants")} that are assciated with ${n}`},ye=({all:e,n:s,diff:o,node:n,label:a,example:u})=>(s??0)>
10?`${(s??0).toLocaleString()} ${a} directly associated with ${n} as well as ${c(o,"subclass","subclasses")} such as ${u?` such as ${b(u)}`:""}`:`${(e??0).toLocaleString()} ${a} associated with ${n}`;function xe(e,s){const o=s.n??0;return!Number.isFinite(o)||o<=0?void 0:(Se[e]??Ge)({...s,label:s.label||S(e)})}function Pe(e,s){const o=s.all??0;return!Number.isFinite(o)||o<=0?void 0:(Fe[e]??ye)({...s,label:s.label||S(e)})}const ge={key:0},Ve={class:"actions-row"},Ee={class:"search-wrapper"},_e=ne({__name:"SectionAssociations",props:{node:{}},setup(e){const s=e,o=f({}),{category:n}=s.node,a=f({}),u=f({}),m=f({}),r=f({}),k=f({}),y=f({}),H=(t,l)=>{k.value[t]=l},M=(t,l)=>{y.value[t]=l},U=t=>{const l=y.value[t],p=k.value[t];return!l||!p||l.length===0?[]:l.length===p.length?[]:l.map(x=>x.id)},{options:g}=Ae(s.node),W=({categoryId:t,direct:l,all:p})=>{o.value[t]={direct:l,all:p}},V=P(()=>n==="biolink:Disease"),T=t=>{var l;return((l=o.value[t])==null?void 0:l.direct)??0},E=t=>{var l;return((l=o.value[t])==null?void 0:l.all)??0},j=t=>{const l=E(t)-T(t);return Number.isFinite(l)?Math.max(0,l):0},q=t=>o.value[t]!==void 0,z=t=>(a.value[t]??G(t))==="direct",Y=({categoryId:t,label:l})=>{r.value[t]=l},J=(t,l)=>{a.value[t]=l==="true"?"direct":"all"},K=t=>xe(t,{node:s.node.name,label:S(t),n:T(t)}),Q=t=>Pe(t,{node:s.node.name,label:S(t),all:E(t),n:T(t),diff:j(t),example:r.value[t]}),X=t=>T(t)>0,Z=P(()=>(t,l)=>t>T(l));function G(t){const l=T(t);return V.value&&l>0?"direct":"all"}const ee=t=>{const p=(a.value[t]??G(t))==="direct";return{id:p?"true":"false",label:p?"directly":"including sub-classes"}};return(t,l)=>{const p=O("AppHeading"),x=O("AppSection"),se=ae("tooltip");return h(),F(N,null,[(h(!0),F(N,null,le(D(g),i=>(h(),F("div",{key:i.id},[C(x,{alignment:"left",width:"full",class:"inset"},{default:B(()=>{var _;return[C(p,{id:i.label,level:3},{default:B(()=>[L(re(D(ke)(i.id,i.label)),1)]),_:2},1032,["id"]),D(g).length?A("",!0):(h(),F("span",ge,[l[0]||(l[0]=L("No associations with  ",-1)),C(ce,{node:e.node},null,8,["node"])])),V.value?(h(),w(te,{key:1,"has-direct-associations":X(i.id),"show-all-tab":Z.value(i.count??0,i.id),"direct-active":(a.value[i.id]??G(i.id))==="direct","all-active":(a.value[i.id]??G(i.id))==="all","direct-label":D(R)(i.id,"direct"),"inferred-label":D(R)(i.id,"inferred"),"direct-tooltip":K(i.id),"inferred-tooltip":Q(i.id),onSelect:d=>J(i.id,d==="direct"?"true":"false")},null,8,["has-direct-associations","show-all-tab","direct-active","all-active","direct-label","inferred-label","direct-tooltip","inferred-tooltip","onSelect"])):A("",!0),I("div",Ve,[q(i.id)&&z(i.id)&&e.node.category==="biolink:Disease"&&(i!=null&&i.id.startsWith("biolink:DiseaseToPheno"))&&(e.node.has_phenotype_count??0)>0||e.node.category==="biolink:Gene"&&(i!=null&&i.id.startsWith("biolink:GeneToPheno"))&&(e.node.has_phenotype_count??0)>0?de((h(),w(ue,{key:0,to:"/search-phenotypes",state:{search:e.node.id},text:"Phenotype Explorer",icon:"search"},null,8,["state"])),[[se,"Send these phenotypes to Phenotype Explorer for comparison"]]):A("",!0),D($e)(String(i.id))&&(((_=k.value[i.id])==null?void 0:_.length)??0)>1?(h(),w(pe,{key:1,name:"Filter by Taxon",options:k.value[i.id]??[],"model-value":y.value[i.id]??k.value[i.id]??[],design:"normal",onChange:d=>M(String(i.id),d)},null,8,["options","model-value","onChange"])):A("",!0),I("div",Ee,[C(he,{modelValue:u.value[i.id],"onUpdate:modelValue":d=>u.value[i.id]=d,placeholder:"Search table data...",class:"search-box",onDebounce:d=>m.value[i.id]=d,onChange:d=>m.value[i.id]=d},null,8,["modelValue","onUpdate:modelValue","onDebounce","onChange"])])]),i?(h(),w(me,{key:2,node:e.node,category:i,direct:ee(i.id),search:m.value[i.id],"taxon-filters":U(String(i.id)),onTotals:d=>W({categoryId:String(i.id),...d}),onInferredLabel:Y,onTaxonOptions:d=>H(String(i.id),d)},null,8,["node","category","direct","search","taxon-filters","onTotals","onTaxonOptions"])):A("",!0)]}),_:2},1024),i.id==="biolink:CaseToDiseaseAssociation"?(h(),w(ie,{key:0,node:e.node},null,8,["node"])):A("",!0)]))),128)),C(Te,{node:e.node},null,8,["node"])],64)}}}),ss=be(_e,[["__scopeId","data-v-b1d03bab"]]);export{ss as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.