Mercurial > repos > pieterlukasse > prims_metabolomics2
diff GCMS/combine_output.py @ 16:fe4682eb938c
small improvement
author | pieter.lukasse@wur.nl |
---|---|
date | Mon, 23 Mar 2015 08:40:42 +0100 |
parents | 346ff9ad8c7a |
children |
line wrap: on
line diff
--- a/GCMS/combine_output.py Fri Mar 20 17:11:04 2015 +0100 +++ b/GCMS/combine_output.py Mon Mar 23 08:40:42 2015 +0100 @@ -5,7 +5,6 @@ ''' import csv -import re import sys import math import pprint @@ -81,13 +80,15 @@ # The ID in the RankFilter output contains the following 5 fields: rf_id = rankfilter['ID'].split('-') try: + if 'Formula' not in rankfilter: + raise Exception("Error: old Rankfilter format detected (the selected Rankfilter data does not contain the column 'Formula'). Solution: rerun Rankfilter again.") hit = [rf_id[0], # Centrotype rf_id[1], # cent.Factor rf_id[2], # scan nr rf_id[3], # R.T. (umin) rf_id[4], # nr. Peaks + rankfilter['R.T.'], # Appending other fields - rankfilter['R.T.'], rankfilter['Name'], rankfilter['Formula'], rankfilter['Library'].strip(),