public NucleotideCompound getAmbiguity ( NucleotideCompound ... compounds ) { Set < NucleotideCompound > settedCompounds = new HashSet < NucleotideCompound > ( ) ; for ( NucleotideCompound compound : compounds ) { for ( NucleotideCompound subCompound : compound . getConstituents ( ) ) { settedCompounds . add ( getCompoundForString ( subCompound . getBase ( ) . toUpperCase ( ) ) ) ; } } for ( NucleotideCompound compound : getAllCompounds ( ) ) { if ( compound . getConstituents ( ) . equals ( settedCompounds ) ) { return compound ; } } return null ; }
Calculates the best symbol for a collection of compounds . For example if you gave this method a AC it will return a M which is the ambiguity symbol for these compounds .