}
private final static List<UniProtTaxonomy> getTaxonomiesFromTaxonomyCode( final String query ) throws IOException {
- if ( ( query.indexOf( "XX" ) == 3 ) && TaxonomyUtil.isHasTaxIdFromFakeTaxCode( query ) ) {
+ //FIXME fix "SPHAR" issue
+ if ( ( ( query.indexOf( "XX" ) == 3 ) && TaxonomyUtil.isHasTaxIdFromFakeTaxCode( query ) )
+ || query.equals( "SPHAR" ) /* TODO remove me, is same as Sphingomonas aromaticivorans */
+ ) {
final int id = TaxonomyUtil.getTaxIdFromFakeTaxCode( query );
return SequenceDbWsTools.getTaxonomiesFromId( String.valueOf( id ), MAX_TAXONOMIES_TO_RETURN );
}
if ( ( ( tax != null ) && ( isHasAppropriateId( tax )
|| !ForesterUtil.isEmpty( tax.getScientificName() )
|| !ForesterUtil.isEmpty( tax.getTaxonomyCode() ) || !ForesterUtil
- .isEmpty( tax.getCommonName() ) ) ) ) {
+ .isEmpty( tax.getCommonName() ) ) ) ) {
uniprot_tax = obtainUniProtTaxonomy( tax, null, qt );
}
else {
}
if ( ut == null ) {
String sn = "";
- final Matcher m = ParserUtils.TAXOMONY_SN_PATTERN_I.matcher( simple_name );
+ final Matcher m = ParserUtils.TAXOMONY_SN_PATTERN_GENUS.matcher( simple_name );
if ( m.matches() ) {
sn = m.group( 1 );
}