@Test void getMultiplePmid() { Map<TermId, MpSimpleModel> modelmap = MpAnnotationParser.loadIndividualModels(genePhenoPath); TermId kit = TermId.of("MGI:5433360"); MpSimpleModel model = modelmap.get(kit); assertNotNull(model); List<MpAnnotation> annots = model.getPhenotypicAbnormalities(); int expected_number_of_MP_terms=2; assertEquals(expected_number_of_MP_terms,annots.size()); assertFalse(model.hasSexSpecificAnnotation()); MpAnnotation annot = annots.get(0); Set<String> pmids = annot.getPmidSet(); assertEquals(2,pmids.size()); }
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);  }