From: Diane Trout Date: Wed, 7 Mar 2012 23:59:42 +0000 (-0800) Subject: Update archive script to try and deal with HiSeq multiplexed lanes. X-Git-Tag: v0.5.5~50 X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=ae30235e77586691617e7ad78c0593aeec05500f Update archive script to try and deal with HiSeq multiplexed lanes. --- diff --git a/scripts/htsw-update-archive b/scripts/htsw-update-archive index 0cf33f3..aeabc57 100755 --- a/scripts/htsw-update-archive +++ b/scripts/htsw-update-archive @@ -36,8 +36,12 @@ def build_flowcell_db(fcdb_filename, sequences, baseurl, apiid, apikey): # make library id db if flowcell_info is not None: - seq_library_id = flowcell_info['lane_set'][unicode(seq.lane)]['library_id'] - libdb.setdefault(seq_library_id, []).append(seq) + lane_collection = flowcell_info['lane_set'][unicode(seq.lane)] + if type(lane_collection) != type([]): + lane_collection = [lane_collection] + for sample in lane_collection: + seq_library_id = sample['library_id'] + libdb.setdefault(seq_library_id, []).append(seq) fcdb.sync() return fcdb, libdb