index = -1 for row in csv_reader: index += 1 if index == 0: metids = row[1:] else: sampleid = row[0] metvals = row[1:] minlen = min(len(metids), len(metvals)) write_meta_values(h5, h5writepath, str(sampleid), metids[0:minlen], metvals[0:minlen], parameters['overwrite'] == 'yes') if __name__ == "__main__": tic() settings = OptionsHolder(__doc__, ImportMetaSet_options) settings.description = 'Metadata import' settings.do = 'yes' printlog(settings.program_description) #Parse command line parameters try: settings.parse_command_line_args() except Exception as inst: printlog('!!! Error in command line parameters: !!!') printlog(inst) printlog('\nRun python ' + sys.argv[0] + ' --help for command line options information!') sys.exit(-1) parameters = settings.parameters
idx = np.argmin(test*ref) divpoint = mididx[idx]+1 return divpoint def export(self): """ Prepares peak alignment parameter set for export """ self.minsegwidth = self.minsegwidth * self.rtrange[1] self.maxpeakshift = self.maxpeakshift * self.rtrange[1] if __name__ == "__main__": tic(); settings=OptionsHolder(__doc__, InternalAlign_options); settings.description='Profile Alignment'; settings.do='yes'; printlog(settings.program_description); try: settings.parse_command_line_args() except Exception as inst: printlog('!!! Error in command line parameters: !!!'); printlog(inst); printlog('\nRun python ' + sys.argv[0] + ' --help for command line options information!'); sys.exit(-1) parameters = settings.parameters; if parameters['logfile'] != '': start_log(parameters['logfile'], overwrite_existing = (parameters['overwrite_logfile'] == 'yes'), verbosity_level = parameters['verbose']);