[Biojava-l] equality of proteins based on their aminoacid sequence signature

Andreas Prlic andreas at sdsc.edu
Thu Mar 10 01:04:55 UTC 2011


Hi François,

you could try to compare the string representation of the sequences...

Andreas

2011/3/9 Andy Yates <ayates at ebi.ac.uk>:
> Hi Francois,
>
> Neither Compounds nor Sequences have an over-ridden equals() & hashcode() method which is why you're seeing the current behaviour.
>
> Andy
>
> On 9 Mar 2011, at 20:12, François Le Fevre wrote:
>
>> Dear all,
>>
>> I would like to know if 2 proteins that have the same sequence of aminoacid should be equals?
>> I was wandering that 2 Sequence<AminoAcidCompound> that have exactly the same string signature should be the same.
>> But it seems to be not the case.
>> Is it normal?
>>
>> Thank for your help.
>>
>>
>> Sequence<AminoAcidCompound> protein1 = MKRISTTITTTITITTGNGAG    hash=801818331
>> Sequence<AminoAcidCompound> protein2 = MKRISTTITTTITITTGNGAG    hash=700804192
>>
>> protein1.equals(protein2) return false.
>>
>> Francois
>>
>> --
>> ----------------------
>> Francois LE FEVRE
>>
>> _______________________________________________
>> Biojava-l mailing list  -  Biojava-l at lists.open-bio.org
>> http://lists.open-bio.org/mailman/listinfo/biojava-l
>
> --
> Andrew Yates                   Ensembl Genomes Engineer
> EMBL-EBI                       Tel: +44-(0)1223-492538
> Wellcome Trust Genome Campus   Fax: +44-(0)1223-494468
> Cambridge CB10 1SD, UK         http://www.ensemblgenomes.org/
>
>
>
>
>
> _______________________________________________
> Biojava-l mailing list  -  Biojava-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biojava-l
>




More information about the Biojava-l mailing list