monarch-initiative / HpoCaseAnnotator

Next-generation Biocuration App for annotating cases and PhenoPackets
https://hpocaseannotator.readthedocs.io/en/latest/index.html
BSD 3-Clause "New" or "Revised" License
8 stars 0 forks source link

DIsease database #13

Closed pnrobinson closed 5 years ago

pnrobinson commented 5 years ago

The disease/disease name field is inactivated. Do we need to download stuff to fill these fields? There is nothing in the Settings field for the disease data.

ielis commented 5 years ago

There was some bug in OMIM tsv parsing and I do not understand why it was not working. I did a workaround and pushed to master. Could you please try to run the app again?

pnrobinson commented 5 years ago

There was an issue that the header line was wrong in a release. The line that starts with DatabaseId should NOT start with "#". Maybe that was the issue. In the latest phenol and the latest download things should be consistent!

#tracker: https://github.com/obophenotype/human-phenotype-ontology
#HPO-version: http://purl.obolibrary.org/obo/hp/releases/2018-12-21/hp.owl
DatabaseID      DiseaseName     Qualifier       HPO_ID  Reference       Evidence        Onset   Frequency       Sex     Modifier        Aspect  Biocuration
OMIM:210100     BETA-AMINOISOBUTYRIC ACID, URINARY EXCRETION OF         HP:0000007      OMIM:210100     IEA     
pnrobinson commented 5 years ago

Hmm, I just rebuilt the app from the latest master and get the same issue. Where is the disease name data coming from again?

ielis commented 5 years ago

The disease name data comes from a file omim.tsv that is located at hpo-case-annotator-gui/src/main/resources/dat/omim.tsv in the project. After packaging, the file is bundled in the JAR file.

During app's startup the file is parsed in org.monarchinitiative.hpo_case_annotator.gui.util.StartupTask class.

I found what the issue was. I made a change to this line recently. It looks like that when you are reading a file that is bundled in JAR, it is not possible to open reader/input stream using Files.* factory method, such as

try (BufferedReader reader = Files.newBufferedReader(Paths.get(getClass().getResource(OMIM_FILE_RESOURCE).toURI())))

The code above would result in an Exception and in result the Disease-related controls would be disabled.

I reworked the OMIMParser to accept an InputStream and now the code is working (the last commit on master).

pnrobinson commented 5 years ago

Thanks, all is working now!