View Javadoc

1   /*
2    *                Doelan development code
3    *
4    * This code may be freely distributed and modified under the
5    * terms of the GNU General Public Licence.  This should
6    * be distributed with the code. If you do not have a copy,
7    * see:
8    *
9    *      http://www.gnu.org/copyleft/gpl.txt
10   *
11   * Copyright (c) 2004-2005 ENS Microarray Platform
12   * Copyright for this code is held jointly by the individual
13   * authors.  These should be listed in @author doc comments.
14   *
15   * For more information on the Doelan project and its aims,
16   * or to join the Doelan mailing list, visit the home page
17   * at:
18   *
19   *      http://www.transcriptome.ens.fr/doelan
20   */
21  
22  package fr.ens.transcriptome.doelan.tests;
23  
24  import fr.ens.transcriptome.doelan.Defaults;
25  import fr.ens.transcriptome.doelan.DoelanRegistery;
26  import fr.ens.transcriptome.nividic.om.BioAssay;
27  import fr.ens.transcriptome.nividic.platform.PlatformException;
28  import fr.ens.transcriptome.nividic.platform.module.AboutModule;
29  import fr.ens.transcriptome.nividic.platform.module.Module;
30  import fr.ens.transcriptome.nividic.platform.module.ModuleDescription;
31  import fr.ens.transcriptome.nividic.util.SystemUtils;
32  
33  /***
34   * This class define a test based on not found spot flags.
35   * @author Laurent Jourdren
36   */
37  public class NotFoundFeatureTest extends FeatureFlagTest implements Module {
38  
39    private static final double DEFAULT_THRESHOLD = 7.0;
40    private static AboutModule aboutModule;
41  
42    /***
43     * Get the description of the module.
44     * @return The description of the module
45     */
46    public AboutModule aboutModule() {
47  
48      if (aboutModule == null) {
49  
50        ModuleDescription md = null;
51        try {
52          md = new ModuleDescription("NotFoundTestFeatureTest",
53              "Test for not found feature flag (Flag=-50)");
54          md.setWebsite(DoelanRegistery.getAppURL());
55          md.setHTMLDocumentation(SystemUtils.readTextRessource("/files/test-"
56              + SystemUtils.getClassShortName(this.getClass()) + ".html"));
57          md.setStability(AboutModule.STATE_STABLE);
58          md.setVersion(Defaults.DEFAULT_TEST_VERSION);
59        } catch (PlatformException e) {
60          getLogger().error("Unable to create the module description");
61        }
62        aboutModule = md;
63      }
64  
65      return aboutModule;
66    }
67  
68    protected int getFlagFilterValue() {
69      return BioAssay.FLAG_NOT_FOUND;
70    }
71  
72    protected String getFlagFilerType() {
73      return "Not found";
74    }
75  
76    protected double getDefaultThreshold() {
77      return DEFAULT_THRESHOLD;
78    }
79  
80    //
81    // Constructor
82    //
83  
84    /***
85     * Public constructor.
86     * @throws PlatformException If the name or the version of the element is
87     *                 <b>null </b>.
88     */
89    public NotFoundFeatureTest() throws PlatformException {
90      // MUST BE EMPTY
91    }
92  }