@Test void testGetCorrectMarker() { Map<TermId, MpSimpleModel> modelmap = MpAnnotationParser.loadIndividualModels(genePhenoPath); TermId kitlGenotype = TermId.of("MGI:5306347"); MpSimpleModel model = modelmap.get(kitlGenotype); assertNotNull(model); TermId Kitl = TermId.of("MGI:96974"); assertEquals(Kitl,model.getMarkerId()); }
public static Map<TermId, MpSimpleModel> loadIndividualModels(String genePhenoPath) { ImmutableMap.Builder<TermId, MpGeneModel> builder = new ImmutableMap.Builder<>(); MpAnnotationParser annotParser = new MpAnnotationParser(genePhenoPath); if (annotParser.genotypeAccessionToMpSimpleModelMap.isEmpty()) { for (String e : annotParser.parseErrors) { System.err.println(e); } throw new PhenolRuntimeException("Could not parse " + genePhenoPath); } return annotParser.genotypeAccessionToMpSimpleModelMap; }
MpAnnotationParser { public static Map<TermId, MpSimpleModel> loadIndividualModels(String genePhenoPath) { ImmutableMap.Builder<TermId, MpGeneModel> builder = new ImmutableMap.Builder<>(); MpAnnotationParser annotParser = new MpAnnotationParser(genePhenoPath); if (annotParser.genotypeAccessionToMpSimpleModelMap.isEmpty()) { for (String e : annotParser.parseErrors) { System.err.println(e); } throw new PhenolRuntimeException("Could not parse " + genePhenoPath); } return annotParser.genotypeAccessionToMpSimpleModelMap; } }
MpAnnotationParser { public static Map<TermId, MpSimpleModel> loadIndividualModels(String genePhenoPath) { ImmutableMap.Builder<TermId, MpGeneModel> builder = new ImmutableMap.Builder<>(); MpAnnotationParser annotParser = new MpAnnotationParser(genePhenoPath); if (annotParser.genotypeAccessionToMpSimpleModelMap.isEmpty()) { for (String e : annotParser.parseErrors) { System.err.println(e); } throw new PhenolRuntimeException("Could not parse " + genePhenoPath); } return annotParser.genotypeAccessionToMpSimpleModelMap; } private  MpAnnotationParser(String path); private  MpAnnotationParser(String genePhenoPath, String phenoSexPath); }
MpAnnotationParser { public static Map<TermId, MpSimpleModel> loadIndividualModels(String genePhenoPath) { ImmutableMap.Builder<TermId, MpGeneModel> builder = new ImmutableMap.Builder<>(); MpAnnotationParser annotParser = new MpAnnotationParser(genePhenoPath); if (annotParser.genotypeAccessionToMpSimpleModelMap.isEmpty()) { for (String e : annotParser.parseErrors) { System.err.println(e); } throw new PhenolRuntimeException("Could not parse " + genePhenoPath); } return annotParser.genotypeAccessionToMpSimpleModelMap; } private  MpAnnotationParser(String path); private  MpAnnotationParser(String genePhenoPath, String phenoSexPath); static Map<TermId, MpSimpleModel> loadIndividualModels(String genePhenoPath); static Map<TermId, MpSimpleModel> loadIndividualModelsWithSexSpecificPhenotypes(String genePhenoPath, String phenoSexPath); static Map<TermId, MpGeneModel> loadMpGeneModels(String genePhenoPath); static Map<TermId, MpGeneModel> loadMpGeneModelsWithSexSpecificPhenotypes(String genePhenoPath, String phenoSexPath); }
MpAnnotationParser { public static Map<TermId, MpSimpleModel> loadIndividualModels(String genePhenoPath) { ImmutableMap.Builder<TermId, MpGeneModel> builder = new ImmutableMap.Builder<>(); MpAnnotationParser annotParser = new MpAnnotationParser(genePhenoPath); if (annotParser.genotypeAccessionToMpSimpleModelMap.isEmpty()) { for (String e : annotParser.parseErrors) { System.err.println(e); } throw new PhenolRuntimeException("Could not parse " + genePhenoPath); } return annotParser.genotypeAccessionToMpSimpleModelMap; } private  MpAnnotationParser(String path); private  MpAnnotationParser(String genePhenoPath, String phenoSexPath); static Map<TermId, MpSimpleModel> loadIndividualModels(String genePhenoPath); static Map<TermId, MpSimpleModel> loadIndividualModelsWithSexSpecificPhenotypes(String genePhenoPath, String phenoSexPath); static Map<TermId, MpGeneModel> loadMpGeneModels(String genePhenoPath); static Map<TermId, MpGeneModel> loadMpGeneModelsWithSexSpecificPhenotypes(String genePhenoPath, String phenoSexPath);  }