Skip to content

Commit

Permalink
Merge pull request #172 from TheJacksonLaboratory/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
pnrobinson authored Jan 21, 2024
2 parents c9619ec + ab2c2ca commit bc1b3a8
Show file tree
Hide file tree
Showing 18 changed files with 262 additions and 43 deletions.
1 change: 0 additions & 1 deletion .github/workflows/documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,5 @@ jobs:
- run: pip install mkdocs-material
- run: pip install mkdocs-material[imaging]
- run: pip install pillow cairosvg
- run: pip install mkdocs-material-extensions
- run: pip install mkdocstrings[python]
- run: mkdocs gh-deploy --force
5 changes: 2 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ made by the [isopret expectation maximization algorithm](https://pubmed.ncbi.nlm
to perform gene-level and isoform-level GO overrepresentation analysis.

## Background: Gene Ontology
[Gene Ontology](http://geneontology.org/) traditionally has provided
[Gene Ontology](http://geneontology.org/){:target="\_blank"}. traditionally has provided
annotations for genes rather than for specific isoforms. However, in
some cases, the functions of the individual isoforms of a gene are
differ with respect to one or more of the gene's function. In this project,
Expand All @@ -18,13 +18,12 @@ expressed genes or the differentially spliced isoforms.
## Background: HBA-DEALS
Isopret requires as input a file that has the fold changes and p-values
for genes and isoforms in a case-control cohort that has been studied
by RNA-seq. We have previously published [HBA-DEALS](https://genomebiology.biomedcentral.com/articles/10.1186/s13059-020-02072-6),
by RNA-seq. We have previously published [HBA-DEALS](https://genomebiology.biomedcentral.com/articles/10.1186/s13059-020-02072-6){:target="\_blank"}.,
a hierarchical Bayesian algorithm that performs such an analysis, and this
is the recommended input file.
Isopret uses the analysis (output) file of
[HBA-DEALS](https://pubmed.ncbi.nlm.nih.gov/32660516/){:target="_blank"}.

TODO -- point to tutorial amd also mention EDGER

HBA-DEALS analyzes RNA-Seq data to determine differentially expression and differential splicing simultaneous. Isopret then performs Gene Ontology analysis using an updated implementation of code from the [Ontologizer](https://pubmed.ncbi.nlm.nih.gov/18511468/){:target="_blank"}.

Expand Down
16 changes: 11 additions & 5 deletions docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


isopret-gui is a desktop Java application. You can download precompiled executable
JAR files from the [Releases page](https://github.com/TheJacksonLaboratory/isopret/releases).
JAR files from the [Releases page](https://github.com/TheJacksonLaboratory/isopret/releases){:target="\_blank"}..
of the GitHub site. Later, we will generate stand-alone Windows and Mac native apps.
This is currently the recommended way of using isopret-gui.

Expand All @@ -15,13 +15,13 @@ Additionally, the following text describes how to build isopret-gui from source.

isopret-gui was written with Java version 17. If you want to
build isopret-gui from source, then the build process described below requires
[Git](https://git-scm.com/book/en/v2) and [maven](https://maven.apache.org/install.html). (version 3.5.3 or higher).
[Git](https://git-scm.com/book/en/v2){:target="\_blank"}. and [maven](https://maven.apache.org/install.html){:target="\_blank"}.. (version 3.5.3 or higher).


### Installation


Go the GitHub page of [isopretGO](https://github.com/TheJacksonLaboratory/isopretGO), and clone the project.
Go the GitHub page of [isopretGO](https://github.com/TheJacksonLaboratory/isopretGO){:target="\_blank"}., and clone the project.
Build the executable from source with maven, and then test the build.

```bash
Expand All @@ -46,9 +46,9 @@ java -jar target/isopret.jar

## Set up documentation

This step is not needed to run the application, but rather describes the code we use to
This step is not needed to run the application, but rather describes the code we use to
generate the isopretGO documentation.
Enter the following code to install mkdocs and run a server with the documentation locally.
Enter the following code to install mkdocs and run a server with the documentation locally.
The GitHub action will create a comparable site online.

```
Expand All @@ -63,7 +63,13 @@ pip install mkdocstrings[python]
mkdocs serve
```

Note that on an M! Mac we have encountered a difficulty with mkdocs not finding the cairo library. This can be solved
by running

```
export DYLD_FALLBACK_LIBRARY_PATH=/opt/homebrew/lib
```
before running mkdocs serve.



Expand Down
2 changes: 1 addition & 1 deletion isopret-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.jax.isopret</groupId>
<artifactId>isopret</artifactId>
<version>1.2.0</version>
<version>1.2.1</version>
</parent>

<artifactId>isopret-cli</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion isopret-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.jax.isopret</groupId>
<artifactId>isopret</artifactId>
<version>1.2.0</version>
<version>1.2.1</version>
</parent>

<artifactId>isopret-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ public Map<String,String> getAllEntries() {
return all;
}

public void addInfo(String inputFile, String basename) {
this.info.put(inputFile, basename);
}

/**
* Convenient way of collecting data about the current run.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public Map<TermId, List<TermId>> getOntologyTermToDomainItemsMap() {
// in interface AssociationContainer<T> after PR merged to only use Interface in client code
public Set<TermId> getDomainItemsAnnotatedByGoTerm(TermId goTermId) {
Set<TermId> domainItemSet = new HashSet<>();
//ontology.graph().getDescendants(goTermId, )
Set<TermId> descendentSet = OntologyAlgorithm.getDescendents(this.ontology, goTermId);
for (Map.Entry<TermId, IsopretAnnotations> entry : associationMap.entrySet()) {
TermId gene = entry.getKey();
Expand Down
9 changes: 2 additions & 7 deletions isopret-data/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.jax.isopret</groupId>
<artifactId>isopret</artifactId>
<version>1.2.0</version>
<version>1.2.1</version>
</parent>

<artifactId>isopret-data</artifactId>
Expand Down Expand Up @@ -35,12 +35,7 @@
<artifactId>svart</artifactId>
<version>${svart.version}</version>
</dependency>
<dependency>
<groupId>org.jax.isopret</groupId>
<artifactId>isopret-exception</artifactId>
<version>1.2.0</version>
<scope>compile</scope>
</dependency>

</dependencies>

</project>
2 changes: 1 addition & 1 deletion isopret-exception/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.jax.isopret</groupId>
<artifactId>isopret</artifactId>
<version>1.2.0</version>
<version>1.2.1</version>
</parent>

<artifactId>isopret-exception</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion isopret-gui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>org.jax.isopret</groupId>
<artifactId>isopret</artifactId>
<version>1.2.0</version>
<version>1.2.1</version>
</parent>

<artifactId>isopret-gui</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import javafx.stage.FileChooser;
import javafx.stage.Stage;
import org.apache.commons.io.IOUtils;
import org.jax.isopret.gui.widgets.GoTableGeneratorPopup;
import org.jax.isopret.visualization.*;
import org.jax.isopret.gui.service.HostServicesWrapper;
import org.jax.isopret.gui.service.IsopretService;
Expand Down Expand Up @@ -365,5 +366,22 @@ private void saveToPdf(String contents, File pdfFile) {
PopupFactory.showInfoMessage( "Successfully created " + pdfFile.getAbsolutePath(), "Info");
}

/**
* Export a TSV file with isopret annotations for this gene
*/
@FXML
public void goAnnotExport(ActionEvent e) {
e.consume();
Optional<String> opt = service.getGoReportDefaultFilename();
String baseName;
if (opt.isPresent()) {
baseName = opt.get().replace(".tsv", "");
baseName = String.format("%s-%s", baseName, visualizable.getGeneSymbol());
} else {
baseName = visualizable.getGeneSymbol();
}
GoAnnotationMatrix goMatrix = visualizable.getGoAnnotationMatrix();
GoTableGeneratorPopup popup = new GoTableGeneratorPopup(goMatrix, baseName);

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ private void isopretAnalysis(ActionEvent actionEvent) {
interproTab = new Tab("Interpro");
interproTab.setClosable(false);
} catch (IOException e) {
e.printStackTrace();
LOGGER.error(e.getMessage());
}
// Now the same for DAS
try {
Expand All @@ -283,7 +283,7 @@ private void isopretAnalysis(ActionEvent actionEvent) {
GeneOntologyController gc2 = loader.getController();
gc2.refreshGeneOntologyTable();
} catch (IOException e) {
e.printStackTrace();
LOGGER.error(e.getMessage());
}

// now for interpro
Expand Down Expand Up @@ -311,13 +311,12 @@ private void isopretAnalysis(ActionEvent actionEvent) {
interproController.refreshTable();

}catch (IOException e) {
e.printStackTrace();
LOGGER.error(e.getMessage());
}
});
task.setOnFailed(eh -> {
Exception exc = (Exception)eh.getSource().getException();
eh.getSource().getException().printStackTrace();
//eh.getSource().getException().toString()
LOGGER.error(eh.getSource().getException().getMessage());
PopupFactory.displayException("Error",
"Exception encountered while attempting to perform isopret analysis",
exc);
Expand Down
Loading

0 comments on commit bc1b3a8

Please sign in to comment.