Commit f0b65429 authored by mirandaa's avatar mirandaa
Browse files

add remove lock from header option

parent 7f0e6f35
......@@ -41,7 +41,7 @@ def main(file):
scans = filterScanBy_filterline(scans)
scans = filterScanBy_samples(scans, step_size = 3)
'''
scans = removeLockFromHeader(scans)
#Note: mergePeaksOnFilterline_withRandom to generate testing data
filterLines = mergePeaksOnFilterline(scans)
if log.level == logging.DEBUG: filterlinePeaks_csv(filterLines, 'mergePeaksOnFilterline.csv')
......@@ -124,6 +124,16 @@ def ThermoRawfile2Scans(file_path):
return MSrawscans
def removeLockFromHeader(scans):
log.info('removeLockFromHeader')
newScans = []
for scan in scans:
scanList = list(scan)
header = scanList[1]
scanList[1] = header.replace('lock ','')
newScans.append(scanList)
return newScans
def ThermoRawfile2Scans_csv(scans, filename='ThermoRawfile2Scans.csv'):
with open(filename, "wb") as csv_file:
writer = csv.writer(csv_file, delimiter=',')
......
......@@ -149,6 +149,7 @@ class MyFrame(MyFrame2):
if self.m_checkBox5.GetValue(): scans = filterScanBy_retentionTime(scans, float(self.m_textCtrl2.GetValue()), float(self.m_textCtrl3.GetValue()) )
#NOTE use try catch notify to validate input
if self.m_checkBox6.GetValue(): scans = filterScanBy_filterline(scans, self.m_textCtrl4.GetValue(), self.m_radioBox1.GetSelection()==0)
if self.m_checkBox61.GetValue(): scans = removeLockFromHeader(scans)
''' filtering by scan
scans = filterScanBy_samples(scans, step_size = 3)
'''
......
This diff is collapsed.
......@@ -233,6 +233,24 @@ class MyFrame2 ( wx.Frame ):
bSizer19.Add( bSizer23, 0, wx.EXPAND, 5 )
self.m_staticline152 = wx.StaticLine( self.m_panel5, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
bSizer19.Add( self.m_staticline152, 0, wx.EXPAND |wx.ALL, 5 )
bSizer231 = wx.BoxSizer( wx.HORIZONTAL )
self.m_checkBox61 = wx.CheckBox( self.m_panel5, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_checkBox61.SetValue(True)
bSizer231.Add( self.m_checkBox61, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
self.m_staticText111 = wx.StaticText( self.m_panel5, wx.ID_ANY, u"Remove 'lock ' from header text", wx.DefaultPosition, wx.DefaultSize, 0 )
self.m_staticText111.Wrap( -1 )
self.m_staticText111.SetToolTipString( u"ms lock and ms non lock are considered the same" )
bSizer231.Add( self.m_staticText111, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
bSizer19.Add( bSizer231, 0, wx.EXPAND, 5 )
self.m_panel5.SetSizer( bSizer19 )
self.m_panel5.Layout()
......@@ -551,6 +569,7 @@ class MyFrame2 ( wx.Frame ):
self.m_checkBox10.Bind( wx.EVT_CHECKBOX, self.checkOutConf )
self.m_checkBox5.Bind( wx.EVT_CHECKBOX, self.checkScanRet )
self.m_checkBox6.Bind( wx.EVT_CHECKBOX, self.checkScanHead )
self.m_checkBox61.Bind( wx.EVT_CHECKBOX, self.checkScanHead )
self.m_radioBtn10.Bind( wx.EVT_RADIOBUTTON, self.radioPre )
self.m_radioBtn11.Bind( wx.EVT_RADIOBUTTON, self.radioPre )
self.m_radioBtn9.Bind( wx.EVT_RADIOBUTTON, self.radioBin )
......@@ -586,6 +605,7 @@ class MyFrame2 ( wx.Frame ):
def checkScanHead( self, event ):
event.Skip()
def radioPre( self, event ):
event.Skip()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment