affyfusion-109/src/affymetrix/gcos/chp/GenotypeProbeSetResults.java

Code
Comments
Other
Rev Date Author Line
11 13 Sep 07 nicklas 1 //////////////////////////////////////////////////////////////////
11 13 Sep 07 nicklas 2 //
11 13 Sep 07 nicklas 3 // Copyright (C) 2005 Affymetrix, Inc.
11 13 Sep 07 nicklas 4 //
11 13 Sep 07 nicklas 5 // This library is free software; you can redistribute it and/or modify
11 13 Sep 07 nicklas 6 // it under the terms of the GNU Lesser General Public License as published
11 13 Sep 07 nicklas 7 // by the Free Software Foundation; either version 2.1 of the License,
11 13 Sep 07 nicklas 8 // or (at your option) any later version.
11 13 Sep 07 nicklas 9 //
11 13 Sep 07 nicklas 10 // This library is distributed in the hope that it will be useful, but
11 13 Sep 07 nicklas 11 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 13 Sep 07 nicklas 12 // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
11 13 Sep 07 nicklas 13 // for more details.
11 13 Sep 07 nicklas 14 //
11 13 Sep 07 nicklas 15 // You should have received a copy of the GNU Lesser General Public License
11 13 Sep 07 nicklas 16 // along with this library; if not, write to the Free Software Foundation, Inc.,
11 13 Sep 07 nicklas 17 // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
11 13 Sep 07 nicklas 18 //
11 13 Sep 07 nicklas 19 /////////////////////////////////////////////////////////////////
11 13 Sep 07 nicklas 20
11 13 Sep 07 nicklas 21
11 13 Sep 07 nicklas 22 package affymetrix.gcos.chp;
11 13 Sep 07 nicklas 23
11 13 Sep 07 nicklas 24 /** Stores results for a genotyping probe set. */
11 13 Sep 07 nicklas 25 public class GenotypeProbeSetResults {
11 13 Sep 07 nicklas 26     
11 13 Sep 07 nicklas 27     /** The AA allele call */
11 13 Sep 07 nicklas 28     public static final byte ALLELE_A_CALL = 6;
11 13 Sep 07 nicklas 29
11 13 Sep 07 nicklas 30     /** The BB allele call */
11 13 Sep 07 nicklas 31     public static final byte ALLELE_B_CALL = 7;
11 13 Sep 07 nicklas 32
11 13 Sep 07 nicklas 33     /** The AB allele call */
11 13 Sep 07 nicklas 34     public static final byte ALLELE_AB_CALL = 8;
11 13 Sep 07 nicklas 35
11 13 Sep 07 nicklas 36     /** The no call allele call */
11 13 Sep 07 nicklas 37     public static final byte ALLELE_NO_CALL = 11;
11 13 Sep 07 nicklas 38
11 13 Sep 07 nicklas 39     /** The allele call */
11 13 Sep 07 nicklas 40     private byte alleleCall;
11 13 Sep 07 nicklas 41
11 13 Sep 07 nicklas 42     /** Gets the allele call
11 13 Sep 07 nicklas 43      * @return The allele call.
11 13 Sep 07 nicklas 44      */
11 13 Sep 07 nicklas 45     public byte getAlleleCall() { return alleleCall; }
11 13 Sep 07 nicklas 46
11 13 Sep 07 nicklas 47     /** Sets the allele call
11 13 Sep 07 nicklas 48      * @param val The allele call.
11 13 Sep 07 nicklas 49      */
11 13 Sep 07 nicklas 50     public void setAlleleCall(byte val) { alleleCall = val; }
11 13 Sep 07 nicklas 51
11 13 Sep 07 nicklas 52     /** The confidence associated with the allele call */
11 13 Sep 07 nicklas 53     private float confidence;
11 13 Sep 07 nicklas 54
11 13 Sep 07 nicklas 55     /** Gets the confidence
11 13 Sep 07 nicklas 56      * @return The confidence.
11 13 Sep 07 nicklas 57      */
11 13 Sep 07 nicklas 58     public float getConfidence() { return confidence; }
11 13 Sep 07 nicklas 59
11 13 Sep 07 nicklas 60     /** Sets the confidence
11 13 Sep 07 nicklas 61      * @param val The confidence.
11 13 Sep 07 nicklas 62      */
11 13 Sep 07 nicklas 63     public void setConfidence(float val) { confidence = val; }
11 13 Sep 07 nicklas 64
11 13 Sep 07 nicklas 65     /** The relative allele strength for the first block */
11 13 Sep 07 nicklas 66     private float ras1;
11 13 Sep 07 nicklas 67
11 13 Sep 07 nicklas 68     /** Gets the RAS1 value
11 13 Sep 07 nicklas 69      * @return The RAS1 value.
11 13 Sep 07 nicklas 70      */
11 13 Sep 07 nicklas 71     public float getRAS1() { return ras1; }
11 13 Sep 07 nicklas 72
11 13 Sep 07 nicklas 73     /** Sets the RAS1 value
11 13 Sep 07 nicklas 74      * @param val The RAS1 value.
11 13 Sep 07 nicklas 75      */
11 13 Sep 07 nicklas 76     public void setRAS1(float val) { ras1 = val; }
11 13 Sep 07 nicklas 77
11 13 Sep 07 nicklas 78     /** The relative allele strength for the second block */
11 13 Sep 07 nicklas 79     private float ras2;
11 13 Sep 07 nicklas 80
11 13 Sep 07 nicklas 81     /** Gets the RAS2 value
11 13 Sep 07 nicklas 82      * @return The RAS2 value.
11 13 Sep 07 nicklas 83      */
11 13 Sep 07 nicklas 84     public float getRAS2() { return ras2; }
11 13 Sep 07 nicklas 85
11 13 Sep 07 nicklas 86     /** Sets the RAS2 value
11 13 Sep 07 nicklas 87      * @param val The RAS2 value.
11 13 Sep 07 nicklas 88      */
11 13 Sep 07 nicklas 89     public void setRAS2(float val) { ras2 = val; }
11 13 Sep 07 nicklas 90
11 13 Sep 07 nicklas 91     /** The p-value associated with an AA call */
11 13 Sep 07 nicklas 92     private float pvalue_AA;
11 13 Sep 07 nicklas 93
11 13 Sep 07 nicklas 94     /** Gets the AA p-value
11 13 Sep 07 nicklas 95      * @return The AA p-value.
11 13 Sep 07 nicklas 96      */
11 13 Sep 07 nicklas 97     public float getPValue_AA() { return pvalue_AA; }
11 13 Sep 07 nicklas 98
11 13 Sep 07 nicklas 99     /** Sets the AA p-value
11 13 Sep 07 nicklas 100      * @param val The AA p-value.
11 13 Sep 07 nicklas 101      */
11 13 Sep 07 nicklas 102     public void setPValue_AA(float val) { pvalue_AA = val; }
11 13 Sep 07 nicklas 103
11 13 Sep 07 nicklas 104     /** The p-value associated with an AB call */
11 13 Sep 07 nicklas 105     private float pvalue_AB;
11 13 Sep 07 nicklas 106
11 13 Sep 07 nicklas 107     /** Gets the AB p-value
11 13 Sep 07 nicklas 108      * @return The AB p-value.
11 13 Sep 07 nicklas 109      */
11 13 Sep 07 nicklas 110     public float getPValue_AB() { return pvalue_AB; }
11 13 Sep 07 nicklas 111
11 13 Sep 07 nicklas 112     /** Sets the AB p-value
11 13 Sep 07 nicklas 113      * @param val The AB p-value.
11 13 Sep 07 nicklas 114      */
11 13 Sep 07 nicklas 115     public void setPValue_AB(float val) { pvalue_AB = val; }
11 13 Sep 07 nicklas 116
11 13 Sep 07 nicklas 117     /** The p-value associated with an BB call */
11 13 Sep 07 nicklas 118     private float pvalue_BB;
11 13 Sep 07 nicklas 119
11 13 Sep 07 nicklas 120     /** Gets the BB p-value
11 13 Sep 07 nicklas 121      * @return The BB p-value.
11 13 Sep 07 nicklas 122      */
11 13 Sep 07 nicklas 123     public float getPValue_BB() { return pvalue_BB; }
11 13 Sep 07 nicklas 124
11 13 Sep 07 nicklas 125     /** Sets the BB p-value
11 13 Sep 07 nicklas 126      * @param val The BB p-value.
11 13 Sep 07 nicklas 127      */
11 13 Sep 07 nicklas 128     public void setPValue_BB(float val) { pvalue_BB = val; }
11 13 Sep 07 nicklas 129
11 13 Sep 07 nicklas 130     /** The p-value associated with an no call call */
11 13 Sep 07 nicklas 131     private float pvalue_NoCall;
11 13 Sep 07 nicklas 132
11 13 Sep 07 nicklas 133     /** Gets the NoCall p-value
11 13 Sep 07 nicklas 134      * @return The NoCall p-value.
11 13 Sep 07 nicklas 135      */
11 13 Sep 07 nicklas 136     public float getPValue_NoCall() { return pvalue_NoCall; }
11 13 Sep 07 nicklas 137
11 13 Sep 07 nicklas 138     /** Sets the NoCall p-value
11 13 Sep 07 nicklas 139      * @param val The NoCall p-value.
11 13 Sep 07 nicklas 140      */
11 13 Sep 07 nicklas 141     public void setPValue_NoCall(float val) { pvalue_NoCall = val; }
11 13 Sep 07 nicklas 142
11 13 Sep 07 nicklas 143     /** Returns a string representation of the allele call.
11 13 Sep 07 nicklas 144      * @return The allele call as a string.
11 13 Sep 07 nicklas 145      */
11 13 Sep 07 nicklas 146     public String getAlleleCallString()
11 13 Sep 07 nicklas 147     {
11 13 Sep 07 nicklas 148         switch (alleleCall)
11 13 Sep 07 nicklas 149         {
11 13 Sep 07 nicklas 150             case ALLELE_A_CALL:
11 13 Sep 07 nicklas 151                 return "A";
11 13 Sep 07 nicklas 152                 
11 13 Sep 07 nicklas 153             case ALLELE_B_CALL:
11 13 Sep 07 nicklas 154                 return "B";
11 13 Sep 07 nicklas 155                         
11 13 Sep 07 nicklas 156             case ALLELE_AB_CALL:
11 13 Sep 07 nicklas 157                 return "AB";
11 13 Sep 07 nicklas 158                 
11 13 Sep 07 nicklas 159             default:
11 13 Sep 07 nicklas 160                 return "No Call";
11 13 Sep 07 nicklas 161         }
11 13 Sep 07 nicklas 162     }
11 13 Sep 07 nicklas 163     
11 13 Sep 07 nicklas 164     /** Creates a new instance of GenotypeProbeSetResults */
11 13 Sep 07 nicklas 165     public GenotypeProbeSetResults() {
11 13 Sep 07 nicklas 166         alleleCall = ALLELE_NO_CALL;
11 13 Sep 07 nicklas 167         confidence = 0.0f;
11 13 Sep 07 nicklas 168         ras1 = 0.0f;
11 13 Sep 07 nicklas 169         ras2 = 0.0f;
11 13 Sep 07 nicklas 170         pvalue_AA = 0.0f;
11 13 Sep 07 nicklas 171         pvalue_AB = 0.0f;
11 13 Sep 07 nicklas 172         pvalue_BB = 0.0f;
11 13 Sep 07 nicklas 173         pvalue_NoCall = 0.0f;
11 13 Sep 07 nicklas 174         
11 13 Sep 07 nicklas 175     }
11 13 Sep 07 nicklas 176     
11 13 Sep 07 nicklas 177 }