diff --git a/common/client-base/src/main/webapp/html/css/style.css b/common/client-base/src/main/webapp/html/css/style.css index d167e7737..a1682083d 100644 --- a/common/client-base/src/main/webapp/html/css/style.css +++ b/common/client-base/src/main/webapp/html/css/style.css @@ -684,6 +684,8 @@ a.contact-button :hover { /* Gene View: interactive evidence summary filter */ #evidenceSummary2 {cursor:pointer; padding-top:5px; padding-bottom:5px;} #loadingDiv_GeneView {float:right; color:darkOrange; font-size:15px; font-weight:bold; width:120px; height:25px; display:none;} +#revertGeneView.unhover { cursor:pointer; border: none; width:30px; height:30px; background:url("../image/reset_filter.png") no-repeat; } +#revertGeneView.hover { cursor:pointer; border: none; width:30px; height:30px; background:url("../image/reset_filter_hover.png") no-repeat; } /* Suggestor box */ /* #suggestor_search_area {} */ diff --git a/common/client-base/src/main/webapp/html/image/reset_filter.png b/common/client-base/src/main/webapp/html/image/reset_filter.png new file mode 100644 index 000000000..1ba2f234f Binary files /dev/null and b/common/client-base/src/main/webapp/html/image/reset_filter.png differ diff --git a/common/client-base/src/main/webapp/html/image/reset_filter_hover.png b/common/client-base/src/main/webapp/html/image/reset_filter_hover.png new file mode 100644 index 000000000..93c416279 Binary files /dev/null and b/common/client-base/src/main/webapp/html/image/reset_filter_hover.png differ diff --git a/common/client-base/src/main/webapp/html/javascript/utils.js b/common/client-base/src/main/webapp/html/javascript/utils.js index 1c3511984..4cf0869b7 100644 --- a/common/client-base/src/main/webapp/html/javascript/utils.js +++ b/common/client-base/src/main/webapp/html/javascript/utils.js @@ -817,7 +817,7 @@ function searchKeyword(){ activateButton('resultsTable'); createGenesTable(data.geneTable, keyword, candidateGenes); - createEvidenceTable(data.evidenceTable); + createEvidenceTable(data.evidenceTable, keyword); } }); } @@ -825,7 +825,7 @@ function searchKeyword(){ /* * Function - * Generates the new lightweight Network graph, using cytoscapeJS. + * Generates the network using KnetMaps * @author: Ajit Singh. */ function generateCyJSNetwork(url,requestParams){ @@ -938,7 +938,7 @@ var table = ""; table = table + '

Download as TAB delimited file
'; table = table + 'Select gene(s) and click "View Network" button to see the network.

'; table = table + '
'; - table = table + 'Max number of genes to show: '; + table = table + 'Max number of genes to show: '; table = table + ''; table = table + ''; @@ -955,7 +955,8 @@ var table = ""; // dynamic Evidence Summary to be displayed above Gene View table // table = table + interactive_summary_Legend; table = table + '
'+ interactive_summary_Legend + - ''+'
'; + ''+''; + table = table + '
'; table = table + ''; table = table + ''; @@ -970,11 +971,11 @@ var table = ""; table = table + ''; table = table + ''; } - //table = table + ''; - table = table + ''; + //table = table + ''; // hide TAXID (if single organism) + // table = table + ''; // hide score for now (18/07/18) // table = table + ''; // user yes/no; DISABLED (13/09/17) if(reference_genome == true){ //QTL - table = table + ''; + //table = table + ''; // hide QTL for now (18/07/18) } table = table + ''; table = table + ''; @@ -1134,7 +1135,7 @@ var table = ""; var select = ''; //table = table + gene + chr + start + end + score + withinQTL + usersList + evidence + select; - table = table + gene + geneName + taxid + chr + start + score + /*usersList +*/ withinQTL + evidence + select; + table = table + gene + geneName + taxid + chr + start + /*score + /*usersList +*/ /*withinQTL +*/ evidence + select; // hide score & QTL for now (18/07/18) table = table + ''; } table = table+''; @@ -1213,6 +1214,14 @@ var table = ""; // $("#loadingDiv_GeneView").css("display","none"); // clear }); + $("#revertGeneView").mouseenter(function(e) { + $("#revertGeneView").removeClass('unhover').addClass('hover'); + }); + + $("#revertGeneView").mouseout(function(e) { + $("#revertGeneView").removeClass('hover').addClass('unhover'); + }); + /* * if select all targets is checked find all targets and check them. */ @@ -1285,7 +1294,7 @@ function containsKey(keyToTest, array){ * Function * */ -function createEvidenceTable(text){ +function createEvidenceTable(text, keyword){ var table = ""; var summaryArr = new Array(); var summaryText = ''; @@ -1307,7 +1316,7 @@ function createEvidenceTable(text){ table = table + ''; table = table + ''; table = table + ''; - table = table + ''; + // table = table + ''; // hide QTL for now (18/07/18) table = table + ''; table = table + ''; table = table + ''; @@ -1332,10 +1341,28 @@ function createEvidenceTable(text){ } */ table = table + ''; table = table + ''; + //table = table + ''; - table = table + ''; - table = table + ''; // user genes - table = table + ''; + table = table + ''; // all genes + + // table = table + ''; // user genes + // For user genes, add option to visualize their Networks in KnetMaps via web services (api_url) + var userGenes= 0; + if(values[4].length > 0) { + userGenes= 1; // i.e., min. 1 user gene found + values[4]= values[4].trim(); + if(values[4].includes(",")) { // for multiple user genes + userGenes= values[4].split(",").length; // total user genes found + } + // launch evidence network using 'userGenes'. + table = table + ''; + } + else { + userGenes= 0; + table = table + ''; // zero user genes + } + + // table = table + ''; // hide QTL for now (18/07/18) table = table + ''; //Calculates the summary box if (containsKey(values[0],summaryArr)){ @@ -1377,25 +1404,56 @@ function createEvidenceTable(text){ evidencePath(values[6]); }); + /* + * click handler for generating the evidence path network for user genes (using user_genes and search keywords, passed to api_url + * @author: Ajit Singh (19/07/2018) + */ + $(".userGenes_evidenceNetwork").bind("click", {x: evidenceTable}, function(e) { + e.preventDefault(); + var evidenceNum = $(e.target).attr("id").replace("userGenes_evidenceNetwork_",""); + var values = e.data.x[evidenceNum].split("\t"); + + var evi_userGenes= values[4].trim(); // user gene(s) provided + // Add comma-separated user genes to a new (candidates) list + var ug_list= []; + if(evi_userGenes.includes(",")) { + var vals= evi_userGenes.split(","); + for(var i=0; i < vals.length; i++) { + ug_list.push(vals[i]); + } + } + else { + ug_list.push(evi_userGenes); + } + + var search_keywords= keyword.trim(); // user search keyword(s) used + // search_keywords= search_keywords.replace(/"/g, '\"').trim(); // replace all keyword double quotes with separator/quote + + // console.log("generate userGenes_evidenceNetwork: keywords: "+ search_keywords +", userGenes_list: "+ ug_list); + // Generate Network + generateCyJSNetwork(api_url+'/network', {keyword:search_keywords, list:ug_list}); + }); + $("#tablesorterEvidence").tablesorter({ - sortList: [[3,1]], //sort by score in decending order - textExtraction: function(node) { // Sort TYPE column - var attr = $(node).attr('type-sort-value'); - if (typeof attr !== 'undefined' && attr !== false) { - return attr; - } - return $(node).text(); - } - }); + sortList: [[3,1]], //sort by score in decending order + textExtraction: function(node) { // Sort TYPE column + var attr = $(node).attr('type-sort-value'); + if (typeof attr !== 'undefined' && attr !== false) { + return attr; + } + return $(node).text(); + } + }); + //Shows the evidence summary box for(key in summaryArr){ - var contype= key.trim(); - //if (key !== "Trait") { - summaryText = summaryText+'
'+summaryArr[key]+'
'; - /* } - else { // For Trait, display tooltip text as GWAS instead. - summaryText = summaryText+'
'+summaryArr[key]+'
'; - } */ + var contype= key.trim(); + // if (key !== "Trait") { + summaryText= summaryText+'
'+summaryArr[key]+'
'; + /* } + else { // For Trait, display tooltip text as GWAS instead. + summaryText= summaryText+'
'+summaryArr[key]+'
'; + }*/ } diff --git a/common/server-datasource-ondexlocal/pom.xml b/common/server-datasource-ondexlocal/pom.xml index 8b800ce08..e5c754796 100644 --- a/common/server-datasource-ondexlocal/pom.xml +++ b/common/server-datasource-ondexlocal/pom.xml @@ -55,6 +55,7 @@ net.sourceforge.ondex.modules cyjs_json + 2.1.1-SNAPSHOT diff --git a/common/server-datasource-ondexlocal/src/main/java/rres/knetminer/datasource/ondexlocal/OndexLocalDataSource.java b/common/server-datasource-ondexlocal/src/main/java/rres/knetminer/datasource/ondexlocal/OndexLocalDataSource.java index 76b38d886..b98d2a945 100644 --- a/common/server-datasource-ondexlocal/src/main/java/rres/knetminer/datasource/ondexlocal/OndexLocalDataSource.java +++ b/common/server-datasource-ondexlocal/src/main/java/rres/knetminer/datasource/ondexlocal/OndexLocalDataSource.java @@ -212,7 +212,7 @@ from user gene list (Set userGenes) */ // temporary... /* String genomaps_filename= Paths.get(this.getProperty("DataPath"), System.currentTimeMillis()+"_genomaps.xml").toString(); - this.ondexServiceProvider.writeGenomapsFile(genomaps_filename, xmlGViewer); + this.ondexServiceProvider.writeResultsFile(genomaps_filename, xmlGViewer); */ log.debug("1.) Genomaps annotation "); @@ -223,11 +223,19 @@ from user gene list (Set userGenes) */ // Gene table file String geneTable = this.ondexServiceProvider.writeGeneTable(genes, userGenes, request.getQtl(), request.getListMode()); + // temporary... + /* String gv_filename= Paths.get(this.getProperty("DataPath"), System.currentTimeMillis()+"_GeneTable.tab").toString(); + this.ondexServiceProvider.writeResultsFile(gv_filename, geneTable); */ + log.debug("2.) Gene table "); // Evidence table file String evidenceTable = this.ondexServiceProvider.writeEvidenceTable(qtlnetminerResults.getLuceneConcepts(), userGenes, request.getQtl()); + // temporary... + /* String ev_filename= Paths.get(this.getProperty("DataPath"), System.currentTimeMillis()+"_EvidenceTable.tab").toString(); + this.ondexServiceProvider.writeResultsFile(ev_filename, evidenceTable); */ + log.debug("3.) Evidence table "); // Document count (only related with genes) diff --git a/common/server-datasource-ondexlocal/src/main/java/rres/knetminer/datasource/ondexlocal/OndexServiceProvider.java b/common/server-datasource-ondexlocal/src/main/java/rres/knetminer/datasource/ondexlocal/OndexServiceProvider.java index b70dc0254..ea5b9b0bf 100644 --- a/common/server-datasource-ondexlocal/src/main/java/rres/knetminer/datasource/ondexlocal/OndexServiceProvider.java +++ b/common/server-datasource-ondexlocal/src/main/java/rres/knetminer/datasource/ondexlocal/OndexServiceProvider.java @@ -1840,7 +1840,7 @@ public String writeAnnotationXML(String api_url, ArrayList genes, } // temporary... - public void writeGenomapsFile(String filename, String sb_string) { + public void writeResultsFile(String filename, String sb_string) { try { BufferedWriter out = new BufferedWriter(new FileWriter(filename)); out.write(sb_string); @@ -2174,15 +2174,35 @@ public String writeEvidenceTable(HashMap luceneConcepts, Se Set listOfGenes = mapConcept2Genes.get(lc.getId()); Integer numberOfGenes = listOfGenes.size(); // Creates numberOfUserGenes and numberOfQTL - Integer numberOfUserGenes = 0; + //Integer numberOfUserGenes = 0; + String user_genes=""; Integer numberOfQTL = 0; for (int log : listOfGenes) { ONDEXConcept gene = graph.getConcept(log); if ((userGenes != null) && (gene != null) && (userGenes.contains(gene))) { - numberOfUserGenes++; - } + // numberOfUserGenes++; + // retain gene Accession/Name (18/07/18) + String geneAcc=""; + for(ConceptAccession acc : gene.getConceptAccessions()) { + String accValue= acc.getAccession(); + geneAcc = accValue; + if(acc.getElementOf().getId().equalsIgnoreCase("TAIR") && accValue.startsWith("AT") + && (accValue.indexOf(".") == -1)) { + geneAcc = accValue; + break; + } + else if(acc.getElementOf().getId().equalsIgnoreCase("PHYTOZOME")) { + geneAcc = accValue; + break; + } + } + // use shortest preferred concept name + /* String geneName = getShortestPreferedName(gene.getConceptNames()); + geneAcc= geneName; */ + user_genes= user_genes + geneAcc +","; + } if (mapGene2QTL.containsKey(log)) { numberOfQTL++; @@ -2307,8 +2327,13 @@ public String writeEvidenceTable(HashMap luceneConcepts, Se // } // } } + + // omit last comma from user_genes String + if(user_genes.contains(",")) { + user_genes= user_genes.substring(0, user_genes.length()-1); + } // writes the row - out.append(type + "\t" + name + "\t" + fmt.format(score) + "\t" + numberOfGenes + "\t" + numberOfUserGenes + out.append(type + "\t" + name + "\t" + fmt.format(score) + "\t" + numberOfGenes + "\t" + /*numberOfUserGenes*/ user_genes + "\t" + numberOfQTL + "\t" + ondexId + "\n"); } //log.info("Evidence table generated..."); diff --git a/wheat/client/src/main/webapp/html/release.html b/wheat/client/src/main/webapp/html/release.html index f13356e5d..ec1814d38 100644 --- a/wheat/client/src/main/webapp/html/release.html +++ b/wheat/client/src/main/webapp/html/release.html @@ -1,140 +1,152 @@ - - - - - - - - - - -Wheat Release Notes - - - - - - - - - - - - - - -
-

Release Notes

-

Wheat (Triticum aestivum) knowledge network is based on IWGSC RefSeq v1.0 genome annotation and contains:

- -
    -

    Datasets used for integration

    -
      -
    • Gene-Protein [Ensembl]
    • -
        -
      • RefSeq v1.0 High Confidence Genes
      • -
      • iwgsc_refseqv1.0_HighConf_2017Mar13.gff3
      • -
      • iwgsc_refseqv1.0_HighConf_PROTEIN_2017Mar13.fa
      • -
      • Concepts: 110,790 [Gene] | 137,052 [Protein]
      • -
      • Relations: 137,052 [encodes]
      • -
      -
    • Co-Expression [JIC]
    • -
        -
      • Data provided by Cristobal Uauy and Philippa Borrill from John Innes Centre
      • -
      • WGCNA global network using 850 RNA-seq samples from diverse tissues, developmental stages, stresses and varieties
      • -
      • Enriched GO and Plant Ontology terms for each Co-Expression Cluster
      • -
      • Concepts: 54,402 [Gene] | 38 [CoExpCluster] | 1 [CoExpStudy] | 43 [BioProc] | 270 [PlantOntologyTerm] -
      • Relations: 2,582 [enriched_for] | 54,440 [part_of] -
      -
    • Gene Regulation [JIC]
    • -
        -
      • Data provided by John Innes Centre
      • -
      • Top 1 million Genie3 transcription factor target predictions
      • -
      • 3,384 Transcription Factors
      • -
      • Concepts: 75,725 [Gene]
      • -
      • Relations: 1,000,000 [regulates]
      • -
      -
    • TILLING SNP-Effects [Rothamsted]
    • -
        -
      • Data provided by Robert King from Rothamsted Research
      • -
      • Filter SNP effects for stop_gained, stop_lost and start_lost
      • -
      • Filter for High Confidence Genes
      • -
      • Concepts: 52,601 [Gene] | 145,973 [SNP] | 29 [SNPEffect]
      • -
      • Relations: 145,973 [has_mutant] | 145,973 [leads_to] -
      -
    • Gene Homeologs [IWGSC]
    • -
        -
      • Concepts: 114,495 [Gene]
      • -
      • Relations: 114,862 [homeolog]
      • -
      -
    • Gene-TraitOntology [Text-Mining]
    • -
        -
      • Gene-TO sentence based co-occurrences in PubMed abstracts
      • -
      -
    • Publications [PubMed]
    • -
        -
      • PubMed articles containing wheat OR triticum aestivum
      • -
      • XML
      • -
      • 54,783 PubMed abstracts
      • -
      • Filter publications that are unconnected, i.e. not linked via citation or text-mining
      • -
      -
    • Ontologies
    • - -
    • Homology [Decypher, Ensembl]
    • -
        -
      • Wheat-Arabidopsis homologs from Ensembl
      • -
          -
        • Concepts: 79,314 [Protein]
        • -
        • Relations: 147,659 [orthologue]
        • -
        -
      • Sequence alignments to other Plants
      • -
          -
        • Wheat proteins aligned against plant proteins from UniProtKB-SP [Smith-Waterman] -
            -
          • Concepts: 65,370 [Protein]
          • -
          • Relations: 344,344 [h_s_S]
          • -
          -
        -
      -
    • References
    • -
        -
      • Arabidopsis (TAIR) see Release notes for Arabidopsis
      • -
      -
    - -
- - -
- - - - - - - + + + + + + + + + + +Wheat Release Notes + + + + + + + + + + + + + + +
+

Release Notes

+

Wheat (Triticum aestivum) knowledge network is based on IWGSC RefSeq v1.0 genome annotation and contains:

+ +
+

Old KnetMiner Wheat (using TGACv1.0 reference) archived and available: HERE.

+ +

KnetMiner version used: v2.0.

+
+ +
    +

    Datasets used for integration

    +
      +
    • Gene-Protein [Ensembl]
    • +
        +
      • RefSeq v1.0 High Confidence Genes
      • +
      • iwgsc_refseqv1.0_HighConf_2017Mar13.gff3
      • +
      • iwgsc_refseqv1.0_HighConf_PROTEIN_2017Mar13.fa
      • +
      • Concepts: 110,790 [Gene] | 137,052 [Protein]
      • +
      • Relations: 137,052 [encodes]
      • +
      +
    • Gene-SNP-Phenotype [T3]
    • +
        +
      • Wheat GWAS/QTL data for about 50 phenotypes
      • +
      • SNP markers were mapped to IWGSC RefSeq
      • +
      • Data was provided by Jean-Luc Janning and Clay Birkett and is available at Triticeae Toolbox
      • +
      +
    • Co-Expression [JIC]
    • +
        +
      • Data provided by Cristobal Uauy and Philippa Borrill from John Innes Centre
      • +
      • WGCNA global network using 850 RNA-seq samples from diverse tissues, developmental stages, stresses and varieties
      • +
      • Enriched GO and Plant Ontology terms for each Co-Expression Cluster
      • +
      • Concepts: 54,402 [Gene] | 38 [CoExpCluster] | 1 [CoExpStudy] | 43 [BioProc] | 270 [PlantOntologyTerm] +
      • Relations: 2,582 [enriched_for] | 54,440 [part_of] +
      +
    • Gene Regulation [JIC]
    • +
        +
      • Data provided by John Innes Centre
      • +
      • Top 1 million Genie3 transcription factor target predictions
      • +
      • 3,384 Transcription Factors
      • +
      • Concepts: 75,725 [Gene]
      • +
      • Relations: 1,000,000 [regulates]
      • +
      +
    • TILLING SNP-Effects [Rothamsted]
    • +
        +
      • Data provided by Robert King from Rothamsted Research
      • +
      • Filter SNP effects for stop_gained, stop_lost and start_lost
      • +
      • Filter for High Confidence Genes
      • +
      • Concepts: 52,601 [Gene] | 145,973 [SNP] | 29 [SNPEffect]
      • +
      • Relations: 145,973 [has_mutant] | 145,973 [leads_to] +
      +
    • Gene Homeologs [IWGSC]
    • +
        +
      • Concepts: 114,495 [Gene]
      • +
      • Relations: 114,862 [homeolog]
      • +
      +
    • Gene-TraitOntology [Text-Mining]
    • +
        +
      • Gene-TO sentence based co-occurrences in PubMed abstracts
      • +
      +
    • Publications [PubMed]
    • +
        +
      • PubMed articles containing wheat OR triticum aestivum
      • +
      • XML
      • +
      • 54,783 PubMed abstracts
      • +
      • Filter publications that are unconnected, i.e. not linked via citation or text-mining
      • +
      +
    • Ontologies
    • + +
    • Homology [Decypher, Ensembl]
    • +
        +
      • Wheat-Arabidopsis homologs from Ensembl
      • +
          +
        • Concepts: 79,314 [Protein]
        • +
        • Relations: 147,659 [orthologue]
        • +
        +
      • Sequence alignments to other Plants
      • +
          +
        • Wheat proteins aligned against plant proteins from UniProtKB-SP [Smith-Waterman] +
            +
          • Concepts: 65,370 [Protein]
          • +
          • Relations: 344,344 [h_s_S]
          • +
          +
        +
      +
    • References
    • +
        +
      • Arabidopsis (TAIR) see Release notes for Arabidopsis
      • +
      +
    + +
+ + +
+ + + + + + +
'+values[3]+''+values[4]+''+values[5]+''+values[6]+''+values[5]+''+values[6]+''+values[7]+''+values[8]+''+values[8]+''+values[9]+'Select
'+header[2]+''+header[3]+''+header[4]+''+header[5]+''+header[5]+'
'+evidenceValue+''+values[2]+''+values[3]+''+values[3]+''+values[4]+''+values[5]+''+values[3]+''+values[4]+''+userGenes+''+userGenes+''+values[5]+'