PRIDE-Toolsuite / pride-converter-2

Automatically exported from code.google.com/p/pride-converter-2
0 stars 6 forks source link

SlimModification bug #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
 The following methods from the SlimModification class are wrong, since they will return at the first iteration:

    public boolean isSpecificity(Specificity.AminoAcid specificity) {
        for (int i = 0; i < specificityCollection.size(); i++) {
            return (this.specificityCollection.get(i).getName() == specificity) ? true : false;
        }
        return false;
    }

    public boolean isSpecificity(Specificity.AminoAcid specificity, double mass, double difference) {
        if (Math.abs(this.deltaMass - mass) < difference) {
            for (int i = 0; i < specificityCollection.size(); i++) {
                return (this.specificityCollection.get(i).getName() == specificity) ? true : false;
            }
        }
        return false;
    }

What version of the product are you using? On what operating system?

I'm using the version from maven:
       <dependency>
           <groupId>uk.ac.ebi.pride-mod</groupId>
           <artifactId>pride-mod</artifactId>
           <version>1.0.1-SNAPSHOT</version>
       </dependency>

Original issue reported on code.google.com by smartinez@proteored.org on 2 Jul 2013 at 7:33

GoogleCodeExporter commented 9 years ago
Issue verified. Fixed in r436. Maven SNAPSHOT updated.

Original comment by florian....@gmail.com on 2 Jul 2013 at 9:24