diff --git a/gotrack/pom.xml b/gotrack/pom.xml index 6e03716..638e176 100644 --- a/gotrack/pom.xml +++ b/gotrack/pom.xml @@ -4,7 +4,7 @@ ubc.pavlab gotrack war - 1.4 + 1.5 gotrack http://maven.apache.org diff --git a/gotrack/src/main/java/ubc/pavlab/gotrack/beans/EnrichmentView.java b/gotrack/src/main/java/ubc/pavlab/gotrack/beans/EnrichmentView.java index 0d1bacd..b743000 100644 --- a/gotrack/src/main/java/ubc/pavlab/gotrack/beans/EnrichmentView.java +++ b/gotrack/src/main/java/ubc/pavlab/gotrack/beans/EnrichmentView.java @@ -896,6 +896,8 @@ public void removeAllGenes() { if ( selectGenes != null ) { selectGenes.clear(); } + bulkQuery = ""; + queryGene = null; } /** diff --git a/gotrack/src/main/java/ubc/pavlab/gotrack/beans/GeneView.java b/gotrack/src/main/java/ubc/pavlab/gotrack/beans/GeneView.java index a081d2d..04859df 100644 --- a/gotrack/src/main/java/ubc/pavlab/gotrack/beans/GeneView.java +++ b/gotrack/src/main/java/ubc/pavlab/gotrack/beans/GeneView.java @@ -19,7 +19,10 @@ package ubc.pavlab.gotrack.beans; -import com.google.common.collect.*; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; +import com.google.common.collect.Sets; import com.google.gson.Gson; import lombok.Getter; import lombok.Setter; @@ -277,6 +280,20 @@ public void fetchData() { // retrieve data annotationData = fetchAnnotationData(); + // Prune inferred root terms + Set rootGOTerms = Sets.newHashSet( "GO:0003674", "GO:0008150", "GO:0005575" ).stream() + .map( s -> cache.getCurrentTerm( s ) ) + .collect( Collectors.toSet() ); + + annotationData.values().forEach( editionData -> { + for ( GeneOntologyTerm term : rootGOTerms ) { + Set annotations = editionData.get( term ); + if ( annotations != null && annotations.stream().noneMatch( FullAnnotation::isDirect ) ) { + editionData.remove( term ); + } + } + } ); + // A map that will be needed in the front end for drilling down Map dateToEdition = new HashMap<>(); @@ -542,17 +559,23 @@ public void fetchTimeline() { for ( Edition ed : allEditions ) { + Map categoryCounts = Maps.newHashMap(); + Map> editionData = annotationData.get( ed ); - Stream>> dataStream = editionData.entrySet().stream(); + if (editionData != null) { + Stream>> dataStream = editionData.entrySet().stream(); + + if ( !filterTerms.isEmpty() ) { + dataStream = dataStream.filter( e -> filterTerms.contains( e.getKey() ) ); + } + + // Group by annotation.evidence.category + categoryCounts = dataStream.flatMap( e -> e.getValue().stream() ) + .collect( Collectors.groupingBy( o -> o.getAnnotation().getEvidence().getCategory(), Collectors.counting() ) ); - if ( !filterTerms.isEmpty() ) { - dataStream = dataStream.filter( e -> filterTerms.contains( e.getKey() ) ); } - // Group by annotation.evidence.category - Map categoryCounts = dataStream.flatMap( e -> e.getValue().stream() ) - .collect( Collectors.groupingBy( o -> o.getAnnotation().getEvidence().getCategory(), Collectors.counting() ) ); for (String category : cache.getEvidenceCategories().keySet() ) { seriesMap.computeIfAbsent( category, Series::new ).addDataPoint( ed.getDate(), categoryCounts.getOrDefault( category, 0L ) ); } diff --git a/gotrack/src/main/webapp/about.xhtml b/gotrack/src/main/webapp/about.xhtml index 3994c9f..015c7ae 100644 --- a/gotrack/src/main/webapp/about.xhtml +++ b/gotrack/src/main/webapp/about.xhtml @@ -40,8 +40,13 @@ .section { margin-bottom: 40px; - width: 80%; - max-width: 1000px; + /*width: 80%;*/ + /*max-width: 1000px;*/ + } + + .section-separator { + height: 1px; + max-width: 150px; } @@ -76,21 +81,21 @@ -
+
- +

About GOTrack

- + -
+

Citing

- +
@@ -102,9 +107,9 @@

-
+

Contact

- +
@@ -114,9 +119,9 @@

-
+

License

- +
@@ -131,16 +136,16 @@

Fork it on Github

-
+

Disclaimer

- +

Use at your own risk. GOTrack is provided "AS-IS" without any warranty, expressed or implied.

-
+

Credits and acknowledgments

- +

@@ -157,9 +162,9 @@

-
+

Financial support

- +
diff --git a/gotrack/src/main/webapp/enrichment.xhtml b/gotrack/src/main/webapp/enrichment.xhtml index a40b5d1..534dc9b 100644 --- a/gotrack/src/main/webapp/enrichment.xhtml +++ b/gotrack/src/main/webapp/enrichment.xhtml @@ -109,7 +109,7 @@ oncomplete="PF('addMultipleGenesDlg').show()"/> + update=":formSelect:geneList :formSelect:runEnrichmentBtn :formAddGenes"/> diff --git a/gotrack/src/main/webapp/resources/composites/enrichmentResultsTable.xhtml b/gotrack/src/main/webapp/resources/composites/enrichmentResultsTable.xhtml index e29349d..eb9c40d 100644 --- a/gotrack/src/main/webapp/resources/composites/enrichmentResultsTable.xhtml +++ b/gotrack/src/main/webapp/resources/composites/enrichmentResultsTable.xhtml @@ -22,7 +22,7 @@ diff --git a/gotrack/src/main/webapp/resources/composites/geneTable.xhtml b/gotrack/src/main/webapp/resources/composites/geneTable.xhtml index ae7c48a..8d9d6b5 100644 --- a/gotrack/src/main/webapp/resources/composites/geneTable.xhtml +++ b/gotrack/src/main/webapp/resources/composites/geneTable.xhtml @@ -17,7 +17,13 @@ - +