Skip to content

Commit

Permalink
Fix search links for WGCNA network nodes (#1079)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmfalke committed May 8, 2024
1 parent 886aab8 commit 28e7124
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,18 @@ export const plugin: ComputationPlugin = {
const variable = variables.find((v) => v.id === variableId);
if (variable == null) return [];

// E.g., "qa."
const urlPrefix = window.location.host.replace(
/(plasmodb|hostdb)\.org/,
''
);

const href = parasiteCollection?.memberVariableIds.includes(
variable.id
)
? `https://qa.plasmodb.org/plasmo/app/search/transcript/GenesByRNASeqpfal3D7_Lee_Gambian_ebi_rnaSeq_RSRCWGCNAModules?param.wgcnaParam=${variable.displayName.toLowerCase()}&autoRun=1`
? `//${urlPrefix}plasmodb.org/plasmo/app/search/transcript/GenesByRNASeqpfal3D7_Lee_Gambian_ebi_rnaSeq_RSRCWGCNAModules?param.wgcnaParam=${variable.displayName.toLowerCase()}&autoRun=1`
: hostCollection?.memberVariableIds.includes(variable.id)
? `https://qa.hostdb.org/hostdb/app/search/transcript/GenesByRNASeqhsapREF_Lee_Gambian_ebi_rnaSeq_RSRCWGCNAModules?param.wgcnaParam=${variable.displayName.toLowerCase()}&autoRun=1`
? `//${urlPrefix}hostdb.org/hostdb/app/search/transcript/GenesByRNASeqhsapREF_Lee_Gambian_ebi_rnaSeq_RSRCWGCNAModules?param.wgcnaParam=${variable.displayName.toLowerCase()}&autoRun=1`
: undefined;
if (href == null) return [];
return [
Expand Down

0 comments on commit 28e7124

Please sign in to comment.