NcbiGeneHistoryParser extends BasicLineMapParser<String, NcbiGeneHistory> { public String discontinuedIdForSymbol( String geneSymbol, Integer taxonId ) { if ( !discontinuedGenes.containsKey( taxonId ) ) return null; return discontinuedGenes.get( taxonId ).get( geneSymbol ); }  @Override boolean containsKey( String key ); @Override NcbiGeneHistory get( String key ); @Override Collection<String> getKeySet(); @Override Collection<NcbiGeneHistory> getResults(); @Override NcbiGeneHistory parseOneLine( String line ); String discontinuedIdForSymbol( String geneSymbol, Integer taxonId );  }
@Test public void testParseA() throws Exception { NcbiGeneHistoryParser parser = new NcbiGeneHistoryParser(); parser.parse( NCBIGeneHistoryParserTest.class.getResourceAsStream( "/data/loader/genome/gene/gene_history.human.sample" ) ); String r = parser.discontinuedIdForSymbol( "ACTBP12", 9606 ); assertEquals( "77", r ); }
@Test public void testParseB() throws Exception { NcbiGeneHistoryParser parser = new NcbiGeneHistoryParser(); parser.parse( NCBIGeneHistoryParserTest.class.getResourceAsStream( "/data/loader/genome/gene/gene_history.rat.sample" ) ); String r = parser.discontinuedIdForSymbol( "Olr617-ps", 10116 ); assertEquals( "405484", r ); }