|
@@ 382-393 (lines=12) @@
|
| 379 |
|
self.warn('Unexpected header format', numline=self._numline) |
| 380 |
|
|
| 381 |
|
return 0 |
| 382 |
|
if line.startswith('Results database:'): |
| 383 |
|
if len(self._header) == 0: |
| 384 |
|
self.err("No header found", numline=self._numline) |
| 385 |
|
return -1 |
| 386 |
|
|
| 387 |
|
splitted = self.splitLine(line) |
| 388 |
|
if len(splitted) > 1: |
| 389 |
|
self._header['Result database'] = splitted[1].replace('"', '').strip() |
| 390 |
|
else: |
| 391 |
|
self.warn('Unexpected header format', numline=self._numline) |
| 392 |
|
|
| 393 |
|
return 0 |
| 394 |
|
|
| 395 |
|
|
| 396 |
|
if self.columns_name: |
|
@@ 370-381 (lines=12) @@
|
| 367 |
|
|
| 368 |
|
return 0 |
| 369 |
|
|
| 370 |
|
if line.startswith('Used Compound list'): |
| 371 |
|
if len(self._header) == 0: |
| 372 |
|
self.err("No header found", numline=self._numline) |
| 373 |
|
return -1 |
| 374 |
|
|
| 375 |
|
splitted = self.splitLine(line) |
| 376 |
|
if len(splitted) > 1: |
| 377 |
|
self._header['Used compound'] = splitted[1].replace('"', '').strip() |
| 378 |
|
else: |
| 379 |
|
self.warn('Unexpected header format', numline=self._numline) |
| 380 |
|
|
| 381 |
|
return 0 |
| 382 |
|
if line.startswith('Results database:'): |
| 383 |
|
if len(self._header) == 0: |
| 384 |
|
self.err("No header found", numline=self._numline) |
|
@@ 357-368 (lines=12) @@
|
| 354 |
|
|
| 355 |
|
return 0 |
| 356 |
|
|
| 357 |
|
if line.startswith('Correction applied for film'): |
| 358 |
|
if len(self._header) == 0: |
| 359 |
|
self.err("No header found", numline=self._numline) |
| 360 |
|
return -1 |
| 361 |
|
|
| 362 |
|
splitted = self.splitLine(line) |
| 363 |
|
if len(splitted) > 1: |
| 364 |
|
self._header['Correction film'] = splitted[1].replace('"', '').strip() |
| 365 |
|
else: |
| 366 |
|
self.warn('Unexpected header format', numline=self._numline) |
| 367 |
|
|
| 368 |
|
return 0 |
| 369 |
|
|
| 370 |
|
if line.startswith('Used Compound list'): |
| 371 |
|
if len(self._header) == 0: |
|
@@ 344-355 (lines=12) @@
|
| 341 |
|
|
| 342 |
|
return 0 |
| 343 |
|
|
| 344 |
|
if line.startswith('Correction applied for medium'): |
| 345 |
|
if len(self._header) == 0: |
| 346 |
|
self.warn('Unexpected header format', numline=self._numline) |
| 347 |
|
return -1 |
| 348 |
|
|
| 349 |
|
splitted = self.splitLine(line) |
| 350 |
|
if len(splitted) > 1: |
| 351 |
|
self._header['Correction medium'] = splitted[1].replace('"', '').strip() |
| 352 |
|
else: |
| 353 |
|
self.warn('Unexpected header format', numline=self._numline) |
| 354 |
|
|
| 355 |
|
return 0 |
| 356 |
|
|
| 357 |
|
if line.startswith('Correction applied for film'): |
| 358 |
|
if len(self._header) == 0: |
|
@@ 331-342 (lines=12) @@
|
| 328 |
|
|
| 329 |
|
return 0 |
| 330 |
|
|
| 331 |
|
if line.startswith('Weight after pressing (g)'): |
| 332 |
|
if len(self._header) == 0: |
| 333 |
|
self.err("No header found", numline=self._numline) |
| 334 |
|
return -1 |
| 335 |
|
|
| 336 |
|
splitted = self.splitLine(line) |
| 337 |
|
if len(splitted) > 1: |
| 338 |
|
self._header['Weight after pressing'] = splitted[1].replace('"', '').strip() |
| 339 |
|
else: |
| 340 |
|
self.warn('Unexpected header format', numline=self._numline) |
| 341 |
|
|
| 342 |
|
return 0 |
| 343 |
|
|
| 344 |
|
if line.startswith('Correction applied for medium'): |
| 345 |
|
if len(self._header) == 0: |
|
@@ 318-329 (lines=12) @@
|
| 315 |
|
|
| 316 |
|
return 0 |
| 317 |
|
|
| 318 |
|
if line.startswith('Initial sample weight (g)'): |
| 319 |
|
if len(self._header) == 0: |
| 320 |
|
self.err("No header found", numline=self._numline) |
| 321 |
|
return -1 |
| 322 |
|
|
| 323 |
|
splitted = self.splitLine(line) |
| 324 |
|
if len(splitted) > 1: |
| 325 |
|
self._header['Initial sample weight'] = splitted[1].replace('"', '').strip() |
| 326 |
|
else: |
| 327 |
|
self.warn('Unexpected header format', numline=self._numline) |
| 328 |
|
|
| 329 |
|
return 0 |
| 330 |
|
|
| 331 |
|
if line.startswith('Weight after pressing (g)'): |
| 332 |
|
if len(self._header) == 0: |
|
@@ 305-316 (lines=12) @@
|
| 302 |
|
|
| 303 |
|
return 0 |
| 304 |
|
|
| 305 |
|
if line.startswith('Sample type'): |
| 306 |
|
if len(self._header) == 0: |
| 307 |
|
self.err("No header found", numline=self._numline) |
| 308 |
|
return -1 |
| 309 |
|
|
| 310 |
|
splitted = self.splitLine(line) |
| 311 |
|
if len(splitted) > 1: |
| 312 |
|
self._header['Sample type'] = splitted[1].strip() |
| 313 |
|
else: |
| 314 |
|
self.warn('Unexpected header format', numline=self._numline) |
| 315 |
|
|
| 316 |
|
return 0 |
| 317 |
|
|
| 318 |
|
if line.startswith('Initial sample weight (g)'): |
| 319 |
|
if len(self._header) == 0: |
|
@@ 292-303 (lines=12) @@
|
| 289 |
|
|
| 290 |
|
return 0 |
| 291 |
|
|
| 292 |
|
if line.startswith('Normalised to'): |
| 293 |
|
if len(self._header) == 0: |
| 294 |
|
self.err("No header found", numline=self._numline) |
| 295 |
|
return -1 |
| 296 |
|
|
| 297 |
|
splitted = self.splitLine(line) |
| 298 |
|
if len(splitted) > 1: |
| 299 |
|
self._header['Normalized'] = splitted[1].replace('"', '').strip() |
| 300 |
|
else: |
| 301 |
|
self.warn('Unexpected header format', numline=self._numline) |
| 302 |
|
|
| 303 |
|
return 0 |
| 304 |
|
|
| 305 |
|
if line.startswith('Sample type'): |
| 306 |
|
if len(self._header) == 0: |
|
@@ 279-290 (lines=12) @@
|
| 276 |
|
|
| 277 |
|
return 0 |
| 278 |
|
|
| 279 |
|
if line.startswith('Sum before normalization'): |
| 280 |
|
if len(self._header) == 0: |
| 281 |
|
self.err("No header found", numline=self._numline) |
| 282 |
|
return -1 |
| 283 |
|
|
| 284 |
|
splitted = self.splitLine(line) |
| 285 |
|
if len(splitted) > 1: |
| 286 |
|
self._header['Sum'] = splitted[1].replace('"', '').strip() |
| 287 |
|
else: |
| 288 |
|
self.warn('Unexpected header format', numline=self._numline) |
| 289 |
|
|
| 290 |
|
return 0 |
| 291 |
|
|
| 292 |
|
if line.startswith('Normalised to'): |
| 293 |
|
if len(self._header) == 0: |
|
@@ 254-265 (lines=12) @@
|
| 251 |
|
self.warn('Unexpected header format', numline=self._numline) |
| 252 |
|
return 1 |
| 253 |
|
# Save each header field (that we know) and its own value in the dict |
| 254 |
|
if line.startswith('R.M.S.'): |
| 255 |
|
|
| 256 |
|
if len(self._header) == 0: |
| 257 |
|
self.err("No header found", numline=self._numline) |
| 258 |
|
return -1 |
| 259 |
|
|
| 260 |
|
splitted = self.splitLine(line) |
| 261 |
|
if len(splitted) > 1: |
| 262 |
|
self._header['R.M.S.'] = splitted[1].replace('"', '').strip() |
| 263 |
|
else: |
| 264 |
|
self.warn('Unexpected header format', numline=self._numline) |
| 265 |
|
return 0 |
| 266 |
|
|
| 267 |
|
if line.startswith('Result status'): |
| 268 |
|
if len(self._header) == 0: |
|
@@ 267-277 (lines=11) @@
|
| 264 |
|
self.warn('Unexpected header format', numline=self._numline) |
| 265 |
|
return 0 |
| 266 |
|
|
| 267 |
|
if line.startswith('Result status'): |
| 268 |
|
if len(self._header) == 0: |
| 269 |
|
self.err("No header found", numline=self._numline) |
| 270 |
|
|
| 271 |
|
splitted = self.splitLine(line) |
| 272 |
|
if len(splitted) > 1: |
| 273 |
|
self._header['Result status'] = splitted[1].replace('"', '').strip() |
| 274 |
|
else: |
| 275 |
|
self.warn('Unexpected header format', numline=self._numline) |
| 276 |
|
|
| 277 |
|
return 0 |
| 278 |
|
|
| 279 |
|
if line.startswith('Sum before normalization'): |
| 280 |
|
if len(self._header) == 0: |
|
@@ 95-105 (lines=11) @@
|
| 92 |
|
self.warn('Unexpected header format', numline=self._numline) |
| 93 |
|
return 0 |
| 94 |
|
|
| 95 |
|
if line.startswith('Number of'): |
| 96 |
|
if len(self._header) == 0: |
| 97 |
|
self.err("No header found", numline=self._numline) |
| 98 |
|
return -1 |
| 99 |
|
|
| 100 |
|
splitted = self.splitLine(line) |
| 101 |
|
if len(splitted) > 1: |
| 102 |
|
self._header['NumResults'] = splitted[1].replace('"', '').strip() |
| 103 |
|
else: |
| 104 |
|
self.warn('Unexpected header format', numline=self._numline) |
| 105 |
|
return 0 |
| 106 |
|
|
| 107 |
|
if line.startswith('Seq.'): |
| 108 |
|
if len(self._header) == 0: |
|
@@ 83-93 (lines=11) @@
|
| 80 |
|
self._header['Quantitative'] = splitted[1] |
| 81 |
|
return 1 |
| 82 |
|
|
| 83 |
|
if line.startswith('Selected archive'): |
| 84 |
|
if len(self._header) == 0: |
| 85 |
|
self.err("No header found", numline=self._numline) |
| 86 |
|
return -1 |
| 87 |
|
|
| 88 |
|
splitted = self.splitLine(line) |
| 89 |
|
if len(splitted) > 1: |
| 90 |
|
self._header['Archive'] = splitted[1].replace('"', '').strip() |
| 91 |
|
else: |
| 92 |
|
self.warn('Unexpected header format', numline=self._numline) |
| 93 |
|
return 0 |
| 94 |
|
|
| 95 |
|
if line.startswith('Number of'): |
| 96 |
|
if len(self._header) == 0: |