Search in sources :

Example 1 with MalformedLoincCodeException

use of org.monarchinitiative.loinc2hpo.exception.MalformedLoincCodeException in project loinc2hpo by monarch-initiative.

the class AnnotateTabController method initialize.

@FXML
private void initialize() {
    if (model != null) {
        // weird line. model is set by main controller; this line never runs
        setModel(model);
    // currentAnnotationController.setModel(model); //let current annotation stage have access to model
    }
    // currentAnnotationController.setModel(model); //let current annotation stage have access to model
    suggestHPOButton.setTooltip(new Tooltip("Suggest new HPO terms"));
    filterButton.setTooltip(new Tooltip("Filter Loinc by providing a Loinc list in txt file"));
    addCodedAnnotationButton.setTooltip(new Tooltip("Add current annotation"));
    flagForAnnotation.setTooltip(new Tooltip("Check if you are not confident"));
    clearButton.setTooltip(new Tooltip("Clear all textfields"));
    allAnnotationsButton.setTooltip(new Tooltip("Display annotations for currently selected Loinc code"));
    initLOINCtableButton.setTooltip(new Tooltip("Initialize Loinc Core Table. Download it first."));
    IntializeHPOmodelbutton.setTooltip(new Tooltip("Load hp.owl as a RDF model for query"));
    searchForLOINCIdButton.setTooltip(new Tooltip("Search Loinc with a Loinc code or name"));
    modeButton.setTooltip(new Tooltip("Switch between basic and advanced annotation mode"));
    autoQueryButton.setTooltip(new Tooltip("Find candidate HPO terms with automatically generated keys"));
    manualQueryButton.setTooltip(new Tooltip("Find candidate HPO terms with manually typed keys"));
    hpoListView.setCellFactory(new Callback<ListView<HPO_Class_Found>, ListCell<HPO_Class_Found>>() {

        @Override
        public ListCell<HPO_Class_Found> call(ListView<HPO_Class_Found> param) {
            return new ListCell<HPO_Class_Found>() {

                @Override
                public void updateItem(HPO_Class_Found hpo, boolean empty) {
                    super.updateItem(hpo, empty);
                    if (hpo != null) {
                        setText(hpo.toString());
                        Tooltip tooltip = new Tooltip(hpo.getDefinition());
                        tooltip.setPrefWidth(300);
                        tooltip.setWrapText(true);
                        setTooltip(tooltip);
                    } else {
                        setText(null);
                    }
                }
            };
        }
    });
    treeView.setCellFactory(new Callback<TreeView<HPO_TreeView>, TreeCell<HPO_TreeView>>() {

        @Override
        public TreeCell<HPO_TreeView> call(TreeView<HPO_TreeView> param) {
            return new TreeCell<HPO_TreeView>() {

                @Override
                public void updateItem(HPO_TreeView hpo, boolean empty) {
                    super.updateItem(hpo, empty);
                    if (empty) {
                        setText(null);
                        setGraphic(null);
                    } else {
                        if (hpo != null && hpo.hpo_class_found == null) {
                            setText("root");
                        }
                        if (hpo != null && hpo.hpo_class_found != null) {
                            setText(hpo.toString());
                            if (hpo.hpo_class_found.getDefinition() != null) {
                                Tooltip tooltip = new Tooltip(hpo.hpo_class_found.getDefinition());
                                tooltip.setPrefWidth(300);
                                tooltip.setWrapText(true);
                                setTooltip(tooltip);
                            }
                        }
                    }
                }
            };
        }
    });
    // if user creates a new Loinc group, add two menuitems for it, and specify the actions when those menuitems are
    // clicked
    userCreatedLoincLists.addListener(new ListChangeListener<String>() {

        @Override
        public void onChanged(Change<? extends String> c) {
            while (c.next()) {
                if (c.wasAdded()) {
                    logger.trace(c + " was added");
                    c.getAddedSubList().stream().filter(p -> !model.getUserCreatedLoincLists().containsKey(p)).forEach(p -> {
                        model.addUserCreatedLoincList(p, new LinkedHashSet<>());
                        MenuItem newListMenuItem = new MenuItem(p);
                        userCreatedLoincListsButton.getItems().add(newListMenuItem);
                        newListMenuItem.setOnAction((event -> {
                            logger.trace("action detected");
                            if (loincTableView.getSelectionModel().getSelectedItem() != null) {
                                LoincId loincId = loincTableView.getSelectionModel().getSelectedItem().getLOINC_Number();
                                if (model.getUserCreatedLoincLists().get(p).contains(loincId)) {
                                    model.getUserCreatedLoincLists().get(p).remove(loincId);
                                    logger.trace(String.format("LOINC: %s removed from %s", loincId, p));
                                } else {
                                    model.getUserCreatedLoincLists().get(p).add(loincId);
                                    logger.trace(String.format("LOINC: %s added to %s", loincId, p));
                                }
                                changeColorLoincTableView();
                                model.setSessionChanged(true);
                            }
                        }));
                        MenuItem newExportMenuItem = new MenuItem(p);
                        exportLoincListButton.getItems().add(newExportMenuItem);
                        newExportMenuItem.setOnAction((event -> {
                            logger.trace("action detected");
                            if (loincTableView.getSelectionModel().getSelectedItem() != null) {
                                Set<LoincId> loincIds = model.getUserCreatedLoincLists().get(p);
                                if (loincIds.isEmpty()) {
                                    return;
                                }
                                FileChooser chooser = new FileChooser();
                                chooser.setTitle("Save Loinc List: ");
                                chooser.getExtensionFilters().add(new FileChooser.ExtensionFilter("TSV files (*.txt)", "*.txt"));
                                chooser.setInitialFileName(p);
                                File f = chooser.showSaveDialog(null);
                                String filepath;
                                if (f == null) {
                                    return;
                                } else {
                                    filepath = f.getAbsolutePath();
                                }
                                StringBuilder builder = new StringBuilder();
                                loincIds.forEach(l -> {
                                    builder.append(l);
                                    builder.append("\n");
                                });
                                WriteToFile.writeToFile(builder.toString().trim(), filepath);
                            }
                        }));
                        MenuItem newImportMenuItem = new MenuItem(p);
                        importLoincGroupButton.getItems().add(newImportMenuItem);
                        newImportMenuItem.setOnAction((event) -> {
                            logger.trace("user wants to import " + p);
                            FileChooser chooser = new FileChooser();
                            chooser.setTitle("Select file to import from");
                            File f = chooser.showOpenDialog(null);
                            if (f == null) {
                                return;
                            }
                            List<String> malformed = new ArrayList<>();
                            List<String> notFound = new ArrayList<>();
                            try {
                                LoincOfInterest loincSet = new LoincOfInterest(f.getAbsolutePath());
                                Set<String> loincIds = loincSet.getLoincOfInterest();
                                loincIds.forEach(l -> {
                                    LoincId loincId = null;
                                    try {
                                        loincId = new LoincId(l);
                                    } catch (MalformedLoincCodeException e) {
                                        malformed.add(l);
                                    }
                                    if (model.getLoincEntryMap().containsKey(loincId)) {
                                        model.getUserCreatedLoincLists().get(p).add(loincId);
                                    } else {
                                        notFound.add(l);
                                    }
                                    changeColorLoincTableView();
                                });
                            } catch (FileNotFoundException e) {
                                logger.error("File not found. Should never happen");
                            }
                            if (!malformed.isEmpty() || !notFound.isEmpty()) {
                                String malformedString = String.join("\n", malformed);
                                String notFoundString = String.join("\n", notFound);
                                PopUps.showInfoMessage(String.format("Malformed Loinc: %d\n%s\nNot Found: %d\n%s", malformed.size(), malformedString, notFound.size(), notFoundString), "Error during importing");
                            }
                        });
                    });
                } else {
                    logger.error("This should never happen");
                }
            }
        }
    });
    initadvancedAnnotationTable();
}
Also used : PopUps(org.monarchinitiative.loinc2hpo.gui.PopUps) WriteToFile(org.monarchinitiative.loinc2hpo.io.WriteToFile) javafx.scene.control(javafx.scene.control) Inject(com.google.inject.Inject) Parent(javafx.scene.Parent) Task(javafx.concurrent.Task) ListChangeListener(javafx.collections.ListChangeListener) MalformedLoincCodeException(org.monarchinitiative.loinc2hpo.exception.MalformedLoincCodeException) HpoTerm(com.github.phenomics.ontolib.formats.hpo.HpoTerm) GitHubPopup(org.monarchinitiative.loinc2hpo.gui.GitHubPopup) Circle(javafx.scene.shape.Circle) ImmutableMap(com.google.common.collect.ImmutableMap) LoincLongNameParser(org.monarchinitiative.loinc2hpo.util.LoincLongNameParser) Event(javafx.event.Event) javafx.stage(javafx.stage) Platform(javafx.application.Platform) FXML(javafx.fxml.FXML) Logger(org.apache.logging.log4j.Logger) Code(org.monarchinitiative.loinc2hpo.codesystems.Code) HPO_Class_Found(org.monarchinitiative.loinc2hpo.util.HPO_Class_Found) ObservableList(javafx.collections.ObservableList) org.monarchinitiative.loinc2hpo.loinc(org.monarchinitiative.loinc2hpo.loinc) LoincCodeNotFoundException(org.monarchinitiative.loinc2hpo.exception.LoincCodeNotFoundException) NetPostException(org.monarchinitiative.loinc2hpo.exception.NetPostException) Singleton(com.google.inject.Singleton) Scene(javafx.scene.Scene) Main(org.monarchinitiative.loinc2hpo.gui.Main) java.util(java.util) Loinc2HPOCodedValue(org.monarchinitiative.loinc2hpo.codesystems.Loinc2HPOCodedValue) LocalDateTime(java.time.LocalDateTime) FXCollections(javafx.collections.FXCollections) GitHubLabelRetriever(org.monarchinitiative.loinc2hpo.github.GitHubLabelRetriever) GitHubPoster(org.monarchinitiative.loinc2hpo.github.GitHubPoster) CodeSystemConvertor(org.monarchinitiative.loinc2hpo.codesystems.CodeSystemConvertor) FXMLLoader(javafx.fxml.FXMLLoader) Annotation(org.monarchinitiative.loinc2hpo.model.Annotation) SparqlQuery(org.monarchinitiative.loinc2hpo.util.SparqlQuery) Callback(javafx.util.Callback) Color(javafx.scene.paint.Color) OntologyModelBuilderForJena(org.monarchinitiative.loinc2hpo.io.OntologyModelBuilderForJena) javafx.scene.input(javafx.scene.input) Model(org.monarchinitiative.loinc2hpo.model.Model) ReadOnlyStringWrapper(javafx.beans.property.ReadOnlyStringWrapper) LoincOfInterest(org.monarchinitiative.loinc2hpo.io.LoincOfInterest) Injector(com.google.inject.Injector) ActionEvent(javafx.event.ActionEvent) java.io(java.io) LoincCodeClass(org.monarchinitiative.loinc2hpo.util.LoincCodeClass) LogManager(org.apache.logging.log4j.LogManager) LoincOfInterest(org.monarchinitiative.loinc2hpo.io.LoincOfInterest) ObservableList(javafx.collections.ObservableList) HPO_Class_Found(org.monarchinitiative.loinc2hpo.util.HPO_Class_Found) MalformedLoincCodeException(org.monarchinitiative.loinc2hpo.exception.MalformedLoincCodeException) WriteToFile(org.monarchinitiative.loinc2hpo.io.WriteToFile) FXML(javafx.fxml.FXML)

Example 2 with MalformedLoincCodeException

use of org.monarchinitiative.loinc2hpo.exception.MalformedLoincCodeException in project loinc2hpo by monarch-initiative.

the class WriteToFile method fromTSV.

/**
 * A method to deserialize annotation map from a TSV file.
 * @param path filepath to the TSV
 * @param hpoTermMap a HPO map from TermId to HpoTerm. Note: the key is TermId, instead of TermName
 * @return an annotation map
 * @throws FileNotFoundException
 */
public static Map<LoincId, UniversalLoinc2HPOAnnotation> fromTSV(String path, Map<TermId, HpoTerm> hpoTermMap) throws FileNotFoundException {
    Map<LoincId, UniversalLoinc2HPOAnnotation> deserializedMap = new LinkedHashMap<>();
    Map<LoincId, UniversalLoinc2HPOAnnotation.Builder> builderMap = new HashMap<>();
    Map<String, Code> internalCode = CodeSystemConvertor.getCodeContainer().getCodeSystemMap().get(Loinc2HPOCodedValue.CODESYSTEM);
    BufferedReader reader = new BufferedReader(new FileReader(path));
    reader.lines().forEach(serialized -> {
        String[] elements = serialized.split("\\t");
        if (elements.length == 13 && !serialized.startsWith("loincId")) {
            try {
                LoincId loincId = new LoincId(elements[0]);
                LoincScale loincScale = LoincScale.string2enum(elements[1]);
                String codeSystem = elements[2];
                String codeId = elements[3];
                TermPrefix prefix = new ImmutableTermPrefix(elements[4].substring(0, 2));
                String id = elements[4].substring(3);
                HpoTerm hpoTerm = hpoTermMap.get(new ImmutableTermId(prefix, id));
                boolean inverse = Boolean.parseBoolean(elements[5]);
                String note = elements[6].equals(MISSINGVALUE) ? null : elements[6];
                boolean flag = Boolean.parseBoolean(elements[7]);
                double version = Double.parseDouble(elements[8]);
                LocalDateTime createdOn = elements[9].equals(MISSINGVALUE) ? null : LocalDateTime.parse(elements[9]);
                String createdBy = elements[10].equals(MISSINGVALUE) ? null : elements[10];
                LocalDateTime lastEditedOn = elements[11].equals(MISSINGVALUE) ? null : LocalDateTime.parse(elements[11]);
                String lastEditedBy = elements[12].equals(MISSINGVALUE) ? null : elements[12];
                if (!builderMap.containsKey(loincId)) {
                    UniversalLoinc2HPOAnnotation.Builder builder = new UniversalLoinc2HPOAnnotation.Builder().setLoincId(loincId).setLoincScale(loincScale).setNote(note).setFlag(flag).setVersion(version).setCreatedOn(createdOn).setCreatedBy(createdBy).setLastEditedOn(lastEditedOn).setLastEditedBy(lastEditedBy);
                    builderMap.put(loincId, builder);
                }
                Code code = Code.getNewCode().setSystem(codeSystem).setCode(codeId);
                HpoTermId4LoincTest hpoTermId4LoincTest = new HpoTermId4LoincTest(hpoTerm, inverse);
                if (code.equals(internalCode.get("L"))) {
                    builderMap.get(loincId).setLowValueHpoTerm(hpoTermId4LoincTest.getHpoTerm());
                }
                if (code.equals(internalCode.get("N"))) {
                    builderMap.get(loincId).setIntermediateValueHpoTerm(hpoTermId4LoincTest.getHpoTerm());
                    builderMap.get(loincId).setIntermediateNegated(hpoTermId4LoincTest.isNegated());
                }
                if (code.equals(internalCode.get("H"))) {
                    builderMap.get(loincId).setHighValueHpoTerm(hpoTermId4LoincTest.getHpoTerm());
                }
                if (code.equals(internalCode.get("A")) || code.equals(internalCode.get("P")) || code.equals(internalCode.get("NP"))) {
                    // currently, we neglect those codes
                    // it will be wrong to do so if the user has manually changed what map to them
                    logger.info("!!!!!!!!!!!annotation neglected. MAY BE WRONG!!!!!!!!!!!!!!!");
                } else {
                    builderMap.get(loincId).addAdvancedAnnotation(code, hpoTermId4LoincTest);
                }
            } catch (MalformedLoincCodeException e) {
                logger.error("Malformed loinc code line: " + serialized);
            }
        } else {
            if (elements.length != 13) {
                logger.error(String.format("line does not have 13 elements, but has %d elements. Line: %s", elements.length, serialized));
            } else {
                logger.info("line is header: " + serialized);
            }
        }
    });
    try {
        reader.close();
    } catch (IOException e) {
        e.printStackTrace();
    }
    builderMap.entrySet().forEach(b -> deserializedMap.put(b.getKey(), b.getValue().build()));
    return deserializedMap;
}
Also used : LocalDateTime(java.time.LocalDateTime) HashMap(java.util.HashMap) LinkedHashMap(java.util.LinkedHashMap) LinkedHashMap(java.util.LinkedHashMap) HpoTermId4LoincTest(org.monarchinitiative.loinc2hpo.loinc.HpoTermId4LoincTest) LoincScale(org.monarchinitiative.loinc2hpo.loinc.LoincScale) TermPrefix(com.github.phenomics.ontolib.ontology.data.TermPrefix) ImmutableTermPrefix(com.github.phenomics.ontolib.ontology.data.ImmutableTermPrefix) UniversalLoinc2HPOAnnotation(org.monarchinitiative.loinc2hpo.loinc.UniversalLoinc2HPOAnnotation) LoincId(org.monarchinitiative.loinc2hpo.loinc.LoincId) MalformedLoincCodeException(org.monarchinitiative.loinc2hpo.exception.MalformedLoincCodeException) Code(org.monarchinitiative.loinc2hpo.codesystems.Code) HpoTerm(com.github.phenomics.ontolib.formats.hpo.HpoTerm) ImmutableTermId(com.github.phenomics.ontolib.ontology.data.ImmutableTermId) ImmutableTermPrefix(com.github.phenomics.ontolib.ontology.data.ImmutableTermPrefix)

Example 3 with MalformedLoincCodeException

use of org.monarchinitiative.loinc2hpo.exception.MalformedLoincCodeException in project loinc2hpo by monarch-initiative.

the class LoincEntry method getLoincEntryList.

public static ImmutableMap<LoincId, LoincEntry> getLoincEntryList(String pathToLoincCoreTable) {
    ImmutableMap.Builder<LoincId, LoincEntry> builder = new ImmutableMap.Builder();
    int count_malformed = 0;
    int count_correct = 0;
    try {
        BufferedReader br = new BufferedReader(new FileReader(pathToLoincCoreTable));
        String line = null;
        String header = br.readLine();
        if (!header.contains("\"LOINC_NUM\"")) {
            logger.error(String.format("Malformed header line (%s) in Loinc File %s", header, pathToLoincCoreTable));
            // empty list
            return builder.build();
        }
        while ((line = br.readLine()) != null) {
            try {
                LoincEntry entry = new LoincEntry(line);
                builder.put(entry.getLOINC_Number(), entry);
                count_correct++;
            } catch (MalformedLoincCodeException e) {
                logger.error("Malformed loinc code in the line:\n " + line);
                count_malformed++;
            }
        }
        br.close();
    } catch (IOException e) {
        e.printStackTrace();
    }
    logger.info(count_correct + " loinc entries are created");
    logger.warn(count_malformed + " loinc numbers are malformed");
    return builder.build();
}
Also used : BufferedReader(java.io.BufferedReader) MalformedLoincCodeException(org.monarchinitiative.loinc2hpo.exception.MalformedLoincCodeException) FileReader(java.io.FileReader) IOException(java.io.IOException) ImmutableMap(com.google.common.collect.ImmutableMap)

Example 4 with MalformedLoincCodeException

use of org.monarchinitiative.loinc2hpo.exception.MalformedLoincCodeException in project loinc2hpo by monarch-initiative.

the class AnnotateTabController method handleLoincFiltering.

@FXML
private void handleLoincFiltering(ActionEvent e) {
    List<LoincEntry> entrylist = new ArrayList<>();
    String enlistName = null;
    FileChooser chooser = new FileChooser();
    chooser.setTitle("Choose File containing a list of interested Loinc " + "codes");
    File f = chooser.showOpenDialog(null);
    List<String> notFoundList = new ArrayList<>();
    List<String> malformedList = new ArrayList<>();
    int malformedLoincCount = 0;
    if (f != null) {
        String path = f.getAbsolutePath();
        enlistName = f.getName();
        try {
            Set<String> loincOfInterest = new LoincOfInterest(path).getLoincOfInterest();
            // loincOfInterest.stream().forEach(System.out::print);
            for (String loincString : loincOfInterest) {
                LoincId loincId = null;
                LoincEntry loincEntry = null;
                try {
                    loincId = new LoincId(loincString);
                    loincEntry = model.getLoincEntryMap().get(loincId);
                } catch (MalformedLoincCodeException e2) {
                    // try to see whether user provided Loinc long common name
                    if (model.getLoincEntryMapWithName().get(loincString) != null) {
                        loincEntry = model.getLoincEntryMapWithName().get(loincString);
                    } else {
                        logger.error("Malformed loinc");
                        malformedList.add(loincString);
                        continue;
                    }
                }
                if (loincEntry != null) {
                    entrylist.add(loincEntry);
                } else {
                    notFoundList.add(loincString);
                }
            }
        } catch (FileNotFoundException e1) {
            e1.printStackTrace();
        }
        if (!malformedList.isEmpty() || !notFoundList.isEmpty()) {
            String malformed = String.join(",\n", malformedList);
            String notfound = String.join(",\n", notFoundList);
            String popupMessage = String.format("# malformed Loinc codes: %d\n %s\n\n# Loinc codes not found: %d\n%s", malformedList.size(), malformed, notFoundList.size(), notfound);
            PopUps.showInfoMessage(popupMessage, "Incomplete import of Loinc codes");
        }
        if (entrylist.isEmpty()) {
            logger.error(String.format("Found 0 Loinc codes"));
            PopUps.showWarningDialog("LOINC filtering", "No hits found", "Could not find any loinc codes");
            return;
        } else {
            logger.trace("Loinc filtering result: ");
            logger.trace("# of loinc entries found: " + entrylist.size());
        }
        // set up the Hpo autocomplete if possible
        if (termmap == null)
            initialize();
        loincTableView.getItems().clear();
        loincTableView.getItems().addAll(entrylist);
        // keep a record in model
        model.addFilteredList(enlistName, new ArrayList<>(entrylist));
        entrylist.forEach(p -> logger.trace(p.getLOINC_Number()));
        accordion.setExpandedPane(loincTableTitledpane);
    } else {
        logger.error("Unable to obtain path to LOINC of interest file");
        return;
    }
}
Also used : LoincOfInterest(org.monarchinitiative.loinc2hpo.io.LoincOfInterest) MalformedLoincCodeException(org.monarchinitiative.loinc2hpo.exception.MalformedLoincCodeException) WriteToFile(org.monarchinitiative.loinc2hpo.io.WriteToFile) FXML(javafx.fxml.FXML)

Example 5 with MalformedLoincCodeException

use of org.monarchinitiative.loinc2hpo.exception.MalformedLoincCodeException in project loinc2hpo by monarch-initiative.

the class MainController method openSession.

protected void openSession(String pathToOpen) {
    // This is deprecated. keep this only temperoly
    // there should be one default file, "annotations.tsv",
    // one default folder "LOINC category", which should have two files "require_new_HPO_terms.txt", "unable_to_annotate.txt" by default (and possibility others)
    /**
     *        String annotationsFilePath = pathToOpen + File.separator + "annotations.tsv";
     *        if (new File(annotationsFilePath).exists()) {
     *            loinc2HpoAnnotationsTabController.tempimportLoincAnnotation(annotationsFilePath);
     *        }
     */
    loinc2HpoAnnotationsTabController.importLoincAnnotation(pathToOpen);
    File loinc_category_folder = new File(pathToOpen + File.separator + LOINC_CATEGORY_folder);
    if (!loinc_category_folder.exists() || !loinc_category_folder.isDirectory()) {
        return;
    }
    File[] files = loinc_category_folder.listFiles();
    if (files == null) {
        return;
    } else {
        for (File file : files) {
            try {
                LoincOfInterest loincCategory = new LoincOfInterest(file.getAbsolutePath());
                Set<String> loincIdStrings = loincCategory.getLoincOfInterest();
                String categoryName = file.getName();
                if (categoryName.endsWith(".txt")) {
                    categoryName = categoryName.substring(0, file.getName().length() - 4);
                }
                Set<LoincId> loincIds = loincIdStrings.stream().map(p -> {
                    try {
                        return new LoincId(p);
                    } catch (MalformedLoincCodeException e1) {
                        logger.error("This should never happen since the loincids are automatically saved");
                    }
                    return null;
                }).collect(Collectors.toSet());
                if (!annotateTabController.userCreatedLoincLists.contains(categoryName)) {
                    annotateTabController.userCreatedLoincLists.add(categoryName);
                }
                model.addUserCreatedLoincList(categoryName, loincIds);
            } catch (FileNotFoundException e1) {
                logger.error("This should never happen since the folder is autogenerated.");
            }
        }
        annotateTabController.changeColorLoincTableView();
    }
}
Also used : PopUps(org.monarchinitiative.loinc2hpo.gui.PopUps) WriteToFile(org.monarchinitiative.loinc2hpo.io.WriteToFile) POP(com.sun.org.apache.bcel.internal.generic.POP) javafx.scene.control(javafx.scene.control) Inject(com.google.inject.Inject) Task(javafx.concurrent.Task) PopUps.getStringFromUser(org.monarchinitiative.loinc2hpo.gui.PopUps.getStringFromUser) MalformedLoincCodeException(org.monarchinitiative.loinc2hpo.exception.MalformedLoincCodeException) Path(java.nio.file.Path) Loinc2HpoPlatform(org.monarchinitiative.loinc2hpo.io.Loinc2HpoPlatform) MapChangeListener(javafx.collections.MapChangeListener) Border(javafx.scene.layout.Border) Event(javafx.event.Event) Sys(org.apache.jena.dboe.sys.Sys) ObservableMapValue(javafx.beans.value.ObservableMapValue) Collectors(java.util.stream.Collectors) WindowEvent(java.awt.event.WindowEvent) Platform(javafx.application.Platform) FXML(javafx.fxml.FXML) BooleanProperty(javafx.beans.property.BooleanProperty) Logger(org.apache.logging.log4j.Logger) LoincId(org.monarchinitiative.loinc2hpo.loinc.LoincId) FlowPane(javafx.scene.layout.FlowPane) BorderPane(javafx.scene.layout.BorderPane) Singleton(com.google.inject.Singleton) Scene(javafx.scene.Scene) Main(org.monarchinitiative.loinc2hpo.gui.Main) java.util(java.util) SimpleDateFormat(java.text.SimpleDateFormat) SystemProperties(com.sun.javafx.runtime.SystemProperties) Insets(javafx.geometry.Insets) Downloader(org.monarchinitiative.loinc2hpo.io.Downloader) DirectoryChooser(javafx.stage.DirectoryChooser) Files(java.nio.file.Files) Model(org.monarchinitiative.loinc2hpo.model.Model) WindowCloseRequestHandler(com.sun.javafx.stage.WindowCloseRequestHandler) MouseEvent(java.awt.event.MouseEvent) LoincOfInterest(org.monarchinitiative.loinc2hpo.io.LoincOfInterest) FileChooser(javafx.stage.FileChooser) ActionEvent(javafx.event.ActionEvent) SimpleBooleanProperty(javafx.beans.property.SimpleBooleanProperty) UniversalLoinc2HPOAnnotation(org.monarchinitiative.loinc2hpo.loinc.UniversalLoinc2HPOAnnotation) Stage(javafx.stage.Stage) java.io(java.io) Paths(java.nio.file.Paths) HelpViewFactory(org.monarchinitiative.loinc2hpo.gui.HelpViewFactory) SettingsViewFactory(org.monarchinitiative.loinc2hpo.gui.SettingsViewFactory) ObservableValue(javafx.beans.value.ObservableValue) ChangeListener(javafx.beans.value.ChangeListener) LogManager(org.apache.logging.log4j.LogManager) LoincOfInterest(org.monarchinitiative.loinc2hpo.io.LoincOfInterest) LoincId(org.monarchinitiative.loinc2hpo.loinc.LoincId) MalformedLoincCodeException(org.monarchinitiative.loinc2hpo.exception.MalformedLoincCodeException) WriteToFile(org.monarchinitiative.loinc2hpo.io.WriteToFile)

Aggregations

MalformedLoincCodeException (org.monarchinitiative.loinc2hpo.exception.MalformedLoincCodeException)7 ImmutableTermId (com.github.phenomics.ontolib.ontology.data.ImmutableTermId)3 LocalDateTime (java.time.LocalDateTime)3 FXML (javafx.fxml.FXML)3 LoincId (org.monarchinitiative.loinc2hpo.loinc.LoincId)3 UniversalLoinc2HPOAnnotation (org.monarchinitiative.loinc2hpo.loinc.UniversalLoinc2HPOAnnotation)3 HpoTerm (com.github.phenomics.ontolib.formats.hpo.HpoTerm)2 TermId (com.github.phenomics.ontolib.ontology.data.TermId)2 ImmutableMap (com.google.common.collect.ImmutableMap)2 Inject (com.google.inject.Inject)2 Singleton (com.google.inject.Singleton)2 java.io (java.io)2 java.util (java.util)2 LinkedHashMap (java.util.LinkedHashMap)2 Platform (javafx.application.Platform)2 Task (javafx.concurrent.Task)2 ActionEvent (javafx.event.ActionEvent)2 Event (javafx.event.Event)2 Scene (javafx.scene.Scene)2 javafx.scene.control (javafx.scene.control)2