def set_header(self,**kws): """ Set items in the [Header] section Supply keyword=value pairs to set the values for items in the sample sheet header For example: >>> s.set_header(Date="08/19/2016",Assay="Nextera XT") """ new_header = OrderedDictionary() items = ('IEMFileVersion', 'Date', 'Workflow', 'Application', 'Assay', 'Description', 'Chemistry') for item in items: if item in kws: new_header[item] = kws[item] elif item in self._header: new_header[item] = self._header[item] for item in kws: if item not in items: new_header[item] = kws[item] self._header = new_header
def set_settings(self, **kws): """ Set items in the [Settings] section Supply keyword=value pairs to set the values for items in the sample sheet header For example: >>> s.set_settings(Adapter="AGATCGG",AdapterRead2="") """ new_settings = OrderedDictionary() items = ('ReverseComplement', 'Adapter', 'AdapterRead2') for item in items: if item in kws: new_settings[item] = kws[item] elif item in self._settings: new_settings[item] = self._settings[item] self._settings = new_settings