annotate commons/core/parsing/VarscanHitForGnpSNP.py @ 31:0ab839023fe4

Uploaded
author m-zytnicki
date Tue, 30 Apr 2013 14:33:21 -0400
parents 769e306b7933
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
1 # Copyright INRA (Institut National de la Recherche Agronomique)
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
2 # http://www.inra.fr
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
3 # http://urgi.versailles.inra.fr
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
4 #
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
5 # This software is governed by the CeCILL license under French law and
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
6 # abiding by the rules of distribution of free software. You can use,
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
7 # modify and/ or redistribute the software under the terms of the CeCILL
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
8 # license as circulated by CEA, CNRS and INRIA at the following URL
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
9 # "http://www.cecill.info".
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
10 #
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
11 # As a counterpart to the access to the source code and rights to copy,
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
12 # modify and redistribute granted by the license, users are provided only
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
13 # with a limited warranty and the software's author, the holder of the
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
14 # economic rights, and the successive licensors have only limited
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
15 # liability.
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
16 #
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
17 # In this respect, the user's attention is drawn to the risks associated
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
18 # with loading, using, modifying and/or developing or reproducing the
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
19 # software by the user in light of its specific status of free software,
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
20 # that may mean that it is complicated to manipulate, and that also
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
21 # therefore means that it is reserved for developers and experienced
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
22 # professionals having in-depth computer knowledge. Users are therefore
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
23 # encouraged to load and test the software's suitability as regards their
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
24 # requirements in conditions enabling the security of their systems and/or
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
25 # data to be ensured and, more generally, to use and operate it in the
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
26 # same conditions as regards security.
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
27 #
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
28 # The fact that you are presently reading this means that you have had
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
29 # knowledge of the CeCILL license and that you accept its terms.
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
30
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
31
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
32 from commons.core.checker.CheckerException import CheckerException
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
33 from commons.core.parsing.VarscanHit import VarscanHit
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
34 import re
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
35
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
36 class VarscanHitForGnpSNP(VarscanHit):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
37
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
38 def __init__(self):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
39 VarscanHit.__init__(self)
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
40 self._reads1 = ''
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
41 self._reads2 = ''
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
42 self._varFreq = ''
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
43 self._strands1 = ''
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
44 self._strands2 = ''
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
45 self._qual1 = ''
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
46 self._qual2 = ''
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
47 self._pvalue = ''
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
48 self._5flank = ''
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
49 self._3flank = ''
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
50 self._gnpSnp_ref = ''
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
51 self._gnpSnp_var = ''
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
52 self._gnpSnp_position = 0
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
53 self._polymType = ''
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
54 self._polymLength = 0
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
55 self._occurrence = 1
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
56
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
57 ## Equal operator
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
58 #
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
59 # @param o a VarscanFileAnalysis instance
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
60 #
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
61 def __eq__(self, o):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
62 return VarscanHit.__eq__(self, o) \
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
63 and self._reads1 == o._reads1 and self._reads2 == o._reads2 \
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
64 and self._varFreq == o._varFreq and self._strands1 == o._strands1 \
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
65 and self._strands2 == o._strands2 and self._qual1 == o._qual1 \
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
66 and self._qual2 == o._qual2 and self._pvalue == o._pvalue \
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
67 and self._3flank == o._3flank and self._5flank == o._5flank \
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
68 and self._gnpSnp_position == o._gnpSnp_position and self._gnpSnp_ref == o._gnpSnp_ref \
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
69 and self._gnpSnp_var == o._gnpSnp_var and self._polymLength == o._polymLength \
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
70 and self._polymType == o._polymType and self._occurrence == o._occurrence
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
71
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
72 def isPolymTypeAlreadyFoundAtThisChromAndThisPosition(self, iVarscanHitForGnpSNP):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
73 return self._chrom == iVarscanHitForGnpSNP.getChrom() \
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
74 and self._position == iVarscanHitForGnpSNP.getPosition() \
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
75 and self._polymType == iVarscanHitForGnpSNP.getPolymType()
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
76
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
77 def manageOccurrence(self, iVarscanHitForGnpSNP=None):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
78 if iVarscanHitForGnpSNP != None and self.isPolymTypeAlreadyFoundAtThisChromAndThisPosition(iVarscanHitForGnpSNP):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
79 self._occurrence = iVarscanHitForGnpSNP.getOccurrence() + 1
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
80
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
81 def formatAlleles2GnpSnp(self):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
82 if self.getVar().find("-") != -1:
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
83 self._polymType = "DELETION"
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
84 self._gnpSnp_position = int(self._position) + 1
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
85 self._gnpSnp_ref = self._var[1:]
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
86 self._gnpSnp_var = "-" * len(self._gnpSnp_ref)
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
87 self._polymLength = len(self._gnpSnp_ref)
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
88 elif self.getVar().find("+") != -1:
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
89 self._polymType = "INSERTION"
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
90 self._gnpSnp_position = int(self._position)
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
91 self._gnpSnp_var = self._var[1:]
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
92 self._gnpSnp_ref = "-" * len(self._gnpSnp_var)
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
93 self._polymLength = 1
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
94 else:
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
95 self._polymType = "SNP"
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
96 self._gnpSnp_position = int(self._position)
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
97 self._gnpSnp_var = self._var
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
98 self._gnpSnp_ref = self._ref
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
99 self._polymLength = 1
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
100
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
101 def setReads1(self, nbReadsLikeRef):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
102 self._reads1 = nbReadsLikeRef
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
103
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
104 def setReads2(self, nbReadsLikeVar):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
105 self._reads2 = nbReadsLikeVar
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
106
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
107 def setVarFreq(self, frequencyOfVariantAllele):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
108 frequencyOfVariantAllele = frequencyOfVariantAllele.replace("%","")
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
109 frequencyOfVariantAllele = frequencyOfVariantAllele.replace(",",".")
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
110 self._varFreq = float(frequencyOfVariantAllele)
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
111
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
112 def setStrands1(self, strandsOfReferenceAllele):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
113 self._strands1 = strandsOfReferenceAllele
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
114
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
115 def setStrands2(self, strandsOfVariantAllele):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
116 self._strands2 = strandsOfVariantAllele
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
117
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
118 def setQual1(self, averageQualityOfRef):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
119 self._qual1 = averageQualityOfRef
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
120
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
121 def setQual2(self, averageQualityOfVar):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
122 self._qual2 = averageQualityOfVar
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
123
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
124 def setPvalue(self, pvalue):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
125 self._pvalue = pvalue
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
126
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
127 def set5flank(self, s5flank):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
128 self._5flank = s5flank
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
129
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
130 def set3flank(self, s3flank):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
131 self._3flank = s3flank
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
132
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
133 def setGnpSNPRef(self, ref):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
134 self._gnpSnp_ref = ref
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
135
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
136 def setGnpSNPVar(self, var):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
137 self._gnpSnp_var = var
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
138
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
139 def setGnpSNPPosition(self, position):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
140 self._gnpSnp_position = position
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
141
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
142 def setOccurrence(self, occurrence):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
143 self._occurrence = occurrence
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
144
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
145 def setPolymType(self, polymType):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
146 self._polymType = polymType
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
147
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
148 def setPolymLength(self, polymLength):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
149 self._polymLength = polymLength
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
150
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
151 def getReads1(self):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
152 return self._reads1
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
153
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
154 def getReads2(self):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
155 return self._reads2
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
156
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
157 def getVarFreq(self):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
158 return self._varFreq
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
159
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
160 def getStrands1(self):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
161 return self._strands1
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
162
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
163 def getStrands2(self):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
164 return self._strands2
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
165
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
166 def getQual1(self):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
167 return self._qual1
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
168
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
169 def getQual2(self):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
170 return self._qual2
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
171
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
172 def getPvalue(self):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
173 return self._pvalue
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
174
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
175 def get5flank(self):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
176 return self._5flank
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
177
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
178 def get3flank(self):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
179 return self._3flank
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
180
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
181 def getPolymType(self):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
182 return self._polymType
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
183
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
184 def getGnpSnpVar(self):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
185 return self._gnpSnp_var
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
186
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
187 def getGnpSnpRef(self):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
188 return self._gnpSnp_ref
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
189
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
190 def getGnpSnpPosition(self):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
191 return self._gnpSnp_position
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
192
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
193 def getPolymLength(self):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
194 return self._polymLength
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
195
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
196 def getOccurrence(self):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
197 return self._occurrence
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
198
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
199 def setAttributes(self, lResults, iCurrentLineNumber):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
200 VarscanHit.setAttributes(self, lResults, iCurrentLineNumber)
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
201 if lResults[4] != '':
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
202 self.setReads1(lResults[4])
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
203 else:
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
204 raise CheckerException ("The field Reads1 is empty in varscan file in line %s" % (iCurrentLineNumber))
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
205 if lResults[5] != '':
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
206 self.setReads2(lResults[5])
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
207 else:
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
208 raise CheckerException ("The field Reads2 is empty in varscan file in line %s" % (iCurrentLineNumber))
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
209 if lResults[6] != '' and re.match("[0-9\,\%]+", lResults[6]):
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
210 self.setVarFreq(lResults[6])
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
211 else:
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
212 raise CheckerException ("The field VarFreq is empty or in bad format in varscan file in line %s" % (iCurrentLineNumber))
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
213 if lResults[7] != '':
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
214 self.setStrands1(lResults[7])
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
215 else:
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
216 raise CheckerException ("The field Strands1 is empty in varscan file in line %s" % (iCurrentLineNumber))
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
217 if lResults[8] != '':
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
218 self.setStrands2(lResults[8])
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
219 else:
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
220 raise CheckerException ("The field Strands2 is empty in varscan file in line %s" % (iCurrentLineNumber))
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
221 if lResults[9] != '':
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
222 self.setQual1(lResults[9])
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
223 else:
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
224 raise CheckerException ("The field Qual1 is empty in varscan file in line %s" % (iCurrentLineNumber))
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
225 if lResults[10] != '':
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
226 self.setQual2(lResults[10])
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
227 else:
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
228 raise CheckerException ("The field Qual2 is empty in varscan file in line %s" % (iCurrentLineNumber))
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
229 if lResults[11] != '':
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
230 self.setPvalue(lResults[11])
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
231 else:
769e306b7933 Change the repository level.
yufei-luo
parents:
diff changeset
232 raise CheckerException ("The field Pvalue is empty in varscan file in line %s" % (iCurrentLineNumber))