示例#1
0
    def __init__(self, dProject,parent=None):
        QtGui.QWidget.__init__(self, parent)
        
        self.labelTitle = QtGui.QLabel(self.tr("<center><b>SMOOTHING</b></center>"))
        self.name="Smooth"
        self.toolID=2

        
        self.dProject=dProject 
        self.dProjOut=deepcopy(dProject)  
        self.isToolApplied=False   
#Saturation Correction: Analysis of saturated data points by creating a synthetic peak based upon the peak shape before and after saturation.
        self.checkBoxSatd=QtGui.QCheckBox('Saturation Correction')  
        self.checkBoxSatd.setChecked(True)
####  Group  Box Radio
        self.radioButton0 = QtGui.QRadioButton(self.tr("Triangular Moving Aver."))
        self.radioButton1 = QtGui.QRadioButton(self.tr("Rectangular Moving Aver."))
        self.radioButton2 = QtGui.QRadioButton(self.tr("Gaussian"))
        self.radioButton0.setChecked(True)
        
 #### Window Size
        windowSizeLabel = QtGui.QLabel("Window Size:")
        self.spinBox1 = QtGui.QSpinBox()
        self.spinBox1.setRange(1, 10)
        self.spinBox1.setValue(1)
        self.spinBox1.setSingleStep(1)
        
        layout1 = myGridLayout()
        layout1.addWidget(self.radioButton0,0,0,1,2)
        layout1.addWidget(self.radioButton1,1,0,1,2)
        layout1.addWidget(self.radioButton2,2,0,1,2)
        layout1.addWidget(windowSizeLabel,3,0)
        layout1.addWidget(self.spinBox1,3,1)
        
        self.groupBox0 = QtGui.QGroupBox(self.tr("Smoothing"))
        self.groupBox0.setCheckable(True)
        self.groupBox0.setLayout(layout1)
 
### Button Box
 
        self.buttonBox =ToolButton()
        
        self.groupBoxROI=GroupBoxROI(self.dProject)
        self.applyChannel=ApplyChannel(self.dProject)
        
        mainLayout=QtGui.QVBoxLayout()
        mainLayout.addWidget(self.labelTitle)
        mainLayout.addWidget(self.checkBoxSatd)
        mainLayout.addWidget(self.groupBox0)       
        mainLayout.addWidget(self.groupBoxROI.groupBox)
        mainLayout.addWidget(self.applyChannel.groupBox)
        mainLayout.addStretch()
        mainLayout.addWidget(self.buttonBox)
      
        self.setLayout(mainLayout)
示例#2
0
 def __init__(self, dProject,parent=None):
     QtGui.QDialog.__init__(self, parent)
     
     self.dProject=dProject
     self.isApplied=False
     self.title = QtGui.QLabel(self.tr("<center><b>CREATE NEW PROJECT - STEP 1 OF 3</b></center>"))
     self.name='New Project'
 
     label0=QtGui.QLabel('Project Name')
     self.lineEdit0=QtGui.QLineEdit()
     self.lineEdit0.setText(self.dProject['name'])
     
     self.selectDir0=DlgSelectDir('Directory')
     self.selectDir0.lineEdit0.setText(self.dProject['dir'])
     
     self.radioButton0=QtGui.QRadioButton('One Sequencing Channel')
     self.radioButton1=QtGui.QRadioButton('Two Sequencing Channels ')
     
     if self.dProject['isSeq2']:
         self.radioButton1.setChecked(True)
     else:
         self.radioButton0.setChecked(True)    
     
     self.groupBox = QtGui.QGroupBox(self.tr("Choose the Project Type"))
     layout0=QtGui.QVBoxLayout()
     layout0.addWidget(self.radioButton0)
     layout0.addWidget(self.radioButton1)
     self.groupBox.setLayout(layout0)
 
     layout0=QtGui.QGridLayout() 
     layout0.addWidget(label0,1,0)
     layout0.addWidget(self.lineEdit0,1,1)
     layout0.addWidget(self.selectDir0,2,0,1,2)
     layout0.addWidget(self.groupBox,3,0,1,2)
     
     self.buttonBox=ButtonWizard() 
     self.buttonBox.backButton.setEnabled(False)
     self.buttonBox.doneButton.setEnabled(False)
     self.buttonBox.nextButton.setDefault(True)
    
     self.connect(self.buttonBox.nextButton,QtCore.SIGNAL("clicked()"),self.clickNext0)
    
     mainLayout=QtGui.QVBoxLayout()
     mainLayout.addWidget(self.title)
     mainLayout.addLayout(layout0)
     mainLayout.addStretch()
     mainLayout.addWidget(self.buttonBox)
     self.setLayout(mainLayout)
示例#3
0
    def __init__(self, dProject,parent=None):
        QtGui.QWidget.__init__(self, parent)
        
        self.labelTitle = QtGui.QLabel(self.tr("<center><b>SIGNAL DECAY CORRECTION</b></center>"))
        self.name="Signal Decay Correction"
        self.toolID=4
        
        self.dProject=dProject
        self.dOutput=dProject['dData'].copy()
        self.dProjOut=deepcopy(dProject)
        self.isToolApplied=False
        
        
        self.spinBox0=QtGui.QDoubleSpinBox()    
        self.spinBox0.setRange(0,2.0)
        self.spinBox0.setValue(0.2)
        self.spinBox0.setSingleStep(0.1)
          
        ####  Group  Box Radio
        self.radioButton0 = QtGui.QRadioButton(self.tr(" Automatic Summation "))
        self.radioButton1 = QtGui.QRadioButton(self.tr("Exponential"))
        self.radioButton2 = QtGui.QRadioButton(self.tr("Summation       - Factor"))
        
        self.radioButton0.setChecked(True)

        layout0 = myGridLayout()
        layout0.addWidget(self.radioButton0,0,0)
        layout0.addWidget(self.radioButton1,1,0)
        layout0.addWidget(self.radioButton2,2,0)
        layout0.addWidget(self.spinBox0,2,1)
        groupBox0 = QtGui.QGroupBox(self.tr("Select a method"))
        groupBox0.setLayout(layout0)    
        
 ### Button Box
        self.buttonBox = ToolButton()
        self.groupBoxROI=GroupBoxROI(self.dProject)
        self.applyChannel=ApplyChannel(self.dProject)
### Main Layout
        mainLayout=QtGui.QVBoxLayout()
        mainLayout.addWidget(self.labelTitle)
        mainLayout.addWidget(groupBox0) 
        mainLayout.addWidget(self.groupBoxROI.groupBox)
        mainLayout.addWidget(self.applyChannel.groupBox)
        
        mainLayout.addStretch()
        mainLayout.addWidget(self.buttonBox)
        self.setLayout(mainLayout)
示例#4
0
    def __init__(self, dProject, parent=None):
        QtGui.QWidget.__init__(self, parent)

        self.labelTitle = QtGui.QLabel(
            self.tr("<center><b>SOME FUNCTIONS</b></center>"))
        self.name = "Various Tools"
        self.toolID = 1

        self.dProject = dProject
        self.isToolApplied = False
        ####  Group  Box Radio
        groupBoxRadio = QtGui.QGroupBox(self.tr("Select a Tool"))
        self.radioButton0 = QtGui.QRadioButton(
            self.tr("Resolution Enhancement"))
        self.radioButton1 = QtGui.QRadioButton(self.tr("First Derivative"))
        self.radioButton2 = QtGui.QRadioButton(self.tr("Stat Normalization"))
        self.radioButton3 = QtGui.QRadioButton(self.tr("Fourier Transform"))

        self.radioButton0.setChecked(True)

        vbox = myVBoxLayout()
        vbox.addWidget(self.radioButton0)
        vbox.addWidget(self.radioButton1)
        vbox.addWidget(self.radioButton2)
        vbox.addWidget(self.radioButton3)
        groupBoxRadio.setLayout(vbox)

        ### Button Box
        self.buttonBox = ToolButton()

        self.groupBoxROI = GroupBoxROI(self.dProject)
        self.applyChannel = ApplyChannel(self.dProject)

        mainLayout = QtGui.QVBoxLayout()
        mainLayout.addWidget(self.labelTitle)
        mainLayout.addWidget(groupBoxRadio)
        mainLayout.addWidget(self.groupBoxROI.groupBox)
        mainLayout.addWidget(self.applyChannel.groupBox)
        mainLayout.addStretch()
        mainLayout.addWidget(self.buttonBox)
        self.setLayout(mainLayout)
示例#5
0
    def __init__(self,dProject,parent=None):
        QtGui.QWidget.__init__(self, parent)
        
        self.labelTitle = QtGui.QLabel(self.tr("<center><b>MOBILITY SHIFT</b></center>"))
        self.name="Mobility Shift"
        self.toolID=4
        
        self.dProject=dProject
        self.dProjOut=deepcopy(dProject)    
        self.dProject=dProject.copy()
        self.isToolApplied=False
        
        self.radioButton0=QtGui.QRadioButton('Position Similarity')
        self.radioButton1=QtGui.QRadioButton('Dynamic Programming')
        self.radioButton0.setChecked(True)
        
        layoutMethod=myVBoxLayout()
        layoutMethod.addWidget((self.radioButton0))
        layoutMethod.addWidget(self.radioButton1)
        self.groupBoxMethod=QtGui.QGroupBox('Select a method')
        self.groupBoxMethod.setLayout(layoutMethod)
        
        self.comboBox0={}
        self.label0={}
        for key in dProject['chKeyRS']:
            self.label0[key] = QtGui.QLabel(key)
            self.comboBox0[key]=QtGui.QComboBox()
            self.comboBox0[key].addItems(dyesName)
            try:
                self.comboBox0[key].setCurrentIndex(dyesName.index(dProject['dyeN'][key]))
            except:
                pass
            if len(self.dProject['dData'][key])==0:
                self.comboBox0[key].setEnabled(False)
        
        self.groupBoxRX=QtGui.QGroupBox(self.tr('(+) Reagent'))
        self.groupBoxRX.setCheckable(True)
        self.groupBoxRX.setChecked(True)
        layoutRX = myGridLayout()
        layoutRX.addWidget(self.label0['RX'], 0, 0)
        layoutRX.addWidget(self.comboBox0['RX'], 0, 1)
        layoutRX.addWidget(self.label0['RXS1'], 1, 0)
        layoutRX.addWidget(self.comboBox0['RXS1'], 1, 1)
        if self.dProject['isSeq2']:
            layoutRX.addWidget(self.label0['RXS2'], 2, 0)
            layoutRX.addWidget(self.comboBox0['RXS2'], 2, 1)
        
        self.groupBoxRX.setLayout(layoutRX)
         
        self.groupBoxBG=QtGui.QGroupBox(self.tr('(-) Reagent)'))
        self.groupBoxBG.setCheckable(True)
        self.groupBoxBG.setChecked(True)
        
        layoutBG = myGridLayout()
        layoutBG.addWidget(self.label0['BG'], 0, 0)
        layoutBG.addWidget(self.comboBox0['BG'], 0, 1)
        layoutBG.addWidget(self.label0['BGS1'], 1, 0)
        layoutBG.addWidget(self.comboBox0['BGS1'], 1, 1)
        if self.dProject['isSeq2']:
            layoutBG.addWidget(self.label0['BGS2'], 2, 0)
            layoutBG.addWidget(self.comboBox0['BGS2'], 2, 1)
        
        self.groupBoxBG.setLayout(layoutBG)
 ### Button Box
        self.buttonBox = ToolButton()
        
        mainLayout=QtGui.QVBoxLayout()
        mainLayout.addWidget(self.labelTitle)
        mainLayout.addWidget(self.groupBoxMethod)
        mainLayout.addWidget(self.groupBoxRX)
        mainLayout.addWidget(self.groupBoxBG)
        mainLayout.addStretch()     
        mainLayout.addWidget(self.buttonBox)
        self.setLayout(mainLayout)
示例#6
0
    def __init__(self, dProject, parent=None):
        QtGui.QWidget.__init__(self, parent)

        self.title = QtGui.QLabel(
            self.tr("<center><b>SEQUENCE ALIGNMENT</b></center>"))
        self.name = "Sequence Alignment"
        self.toolID = 1

        self.dProject = dProject
        self.dProjOut = deepcopy(dProject)

        self.fileReadSeq = DlgSelectFile(
            'Seq. File', "Base Files (*.txt *.fasta *.gbk *.seq )",
            self.dProject['dir'])
        self.fileReadSeq.lineEdit0.setText(self.dProject['fNameSeq'])
        self.seqRNA3to5 = self.dProjOut['RNA'][::-1]
        self.seqRNA3to5N = changeNucToN(self.seqRNA3to5, self.dProjOut)
        self.NSeqRNA = len(self.dProjOut['RNA'])

        ###  SEQUENCE FIND
        label0 = QtGui.QLabel("Channel")
        label1 = QtGui.QLabel("ddNTP")
        label2 = QtGui.QLabel('Thres')

        self.comboBox0 = QtGui.QComboBox()
        self.comboBox1 = QtGui.QComboBox()
        self.comboBox2 = QtGui.QComboBox()
        self.comboBox3 = QtGui.QComboBox()

        self.spinBox0 = QtGui.QDoubleSpinBox()
        self.spinBox0.setRange(-3, 3)
        self.spinBox0.setValue(0.5)
        self.spinBox0.setSingleStep(0.1)

        choices0 = ['BGS1', 'RXS1']
        self.choicesNuc = ['ddC', 'ddG', 'ddA', 'ddT']
        self.nucNames = ['G', 'C', 'U', 'A']

        self.comboBox0.addItems(choices0)
        self.comboBox1.addItems(self.choicesNuc)
        self.comboBox1.setCurrentIndex(
            self.nucNames.index(self.dProject['nuc1']))

        self.radioSeqFind0 = QtGui.QRadioButton('Histogram')
        self.radioSeqFind1 = QtGui.QRadioButton('Background')

        layoutMethod = myHBoxLayout()
        layoutMethod.addWidget(self.radioSeqFind0)
        layoutMethod.addWidget(self.radioSeqFind1)

        gridLayout = myGridLayout()

        gridLayout.addWidget(label0, 0, 0)
        gridLayout.addWidget(label1, 0, 1)
        #      gridLayout.addWidget(label2, 0, 2)
        gridLayout.addWidget(self.comboBox0, 1, 0)
        gridLayout.addWidget(self.comboBox1, 1, 1)
        #     gridLayout.addWidget(self.spinBox0, 1, 2)

        if self.dProject[
                'isSeq2']:  #('RXS2' in self.dInput.keys()) and ('BGS2' in self.dInput.keys()):
            choices2 = ['BGS2', 'RXS2']
            self.comboBox2.addItems(choices2)
            self.comboBox3.addItems(self.choicesNuc)
            self.comboBox3.setCurrentIndex(
                self.nucNames.index(self.dProject['nuc2']))
            self.spinBox1 = QtGui.QDoubleSpinBox()
            self.spinBox1.setRange(-3, 3)
            self.spinBox1.setValue(0.5)
            self.spinBox1.setSingleStep(0.1)
            gridLayout.addWidget(self.comboBox2, 2, 0)
            gridLayout.addWidget(self.comboBox3, 2, 1)

    #    gridLayout.addWidget(self.spinBox1, 2, 2)

        self.checkBox0 = QtGui.QCheckBox('Check for high BG peaks')

        self.groupBoxBaseCall = QtGui.QGroupBox('Base Calling')
        self.groupBoxBaseCall.setLayout(gridLayout)
        self.groupBoxBaseCall.setCheckable(True)

        ##  LAYOUTS
        labelSetting2 = QtGui.QLabel("Seq Range: From")
        labelSetting3 = QtGui.QLabel("To:")
        labelSetting4 = QtGui.QLabel("Seq Start: ")

        self.spinBoxSeqRangeFrom = QtGui.QSpinBox()
        self.spinBoxSeqRangeTo = QtGui.QSpinBox()
        try:
            self.setSpinBoxSeq()
        except:
            pass
        self.spinBoxSeqOffset = QtGui.QSpinBox()
        self.spinBoxSeqOffset.setRange(0, len(self.dProject['RNA']))

        self.checkBoxLineDraw = QtGui.QCheckBox('Draw peak match lines')
        self.checkBoxLineDraw.setChecked(True)
        layoutSetting = myGridLayout()
        layoutSetting.addWidget(labelSetting2, 0, 0)
        layoutSetting.addWidget(self.spinBoxSeqRangeFrom, 0, 1)
        layoutSetting.addWidget(labelSetting3, 0, 2)
        layoutSetting.addWidget(self.spinBoxSeqRangeTo, 0, 3)
        #       layoutSetting.addWidget(self.checkBoxLineDraw,1,0,1,2)

        self.groupBoxSettings = QtGui.QGroupBox('Settings')
        self.groupBoxSettings.setLayout(layoutSetting)

        text = "HINT: Click a Nuc to change the type. \
                Press Key 'A' button and click to add a Nuc.\
                Press Key 'D' button and click to delete a Nuc. \
                Press Key 'Shift' button and select a peak to change position. "

        self.hint = hintLabel(text)

        self.connect(self.fileReadSeq.pushButton0, QtCore.SIGNAL("clicked()"),
                     self.changeSeqFile)

        self.buttonBox = ToolButton()

        mainLayout = QtGui.QVBoxLayout()
        mainLayout.addWidget(self.title)
        mainLayout.addWidget(self.fileReadSeq)
        mainLayout.addWidget(self.groupBoxBaseCall)
        mainLayout.addWidget(self.groupBoxSettings)
        mainLayout.addWidget(self.hint)
        mainLayout.addStretch()
        mainLayout.addWidget(self.buttonBox)
        self.setLayout(mainLayout)
        self.isToolApplied = False
示例#7
0
    def __init__(self, dProject, dProjRef, parent=None):
        QtGui.QWidget.__init__(self, parent)

        self.labelTitle = QtGui.QLabel(
            self.tr("<center><b>REACTIVITY</b></center>"))
        self.name = "Reactivity"
        self.toolID = 1

        self.dProject = dProject
        self.dProjRef = dProjRef
        self.dProjOut = deepcopy(self.dProject)

        self.scaleFactor = 1

        self.checkBox0 = QtGui.QCheckBox('Scale and Normalize with Reference')

        ## SCALE
        self.groupBox1 = scaleGroupBox("Scale BG")

        ## NORMALIZATION
        label0 = QtGui.QLabel('Outlier')
        label1 = QtGui.QLabel('Average')
        self.spinBox0 = QtGui.QDoubleSpinBox()
        self.spinBox1 = QtGui.QDoubleSpinBox()
        self.spinBox0.setRange(0, 9)
        self.spinBox1.setRange(0, 15)
        self.spinBox0.setSuffix("%")
        self.spinBox1.setSuffix("%")
        self.spinBox0.setSingleStep(0.25)
        self.spinBox1.setSingleStep(0.25)
        self.spinBox0.setValue(2.0)
        self.spinBox1.setValue(10.0)

        self.checkBox1 = QtGui.QCheckBox("Set Negative Value to Zero")

        layout2 = myHBoxLayout()
        layout2.addWidget(label0)
        layout2.addWidget(self.spinBox0)
        #  layout2.addWidget(label1)
        #  layout2.addWidget(self.spinBox1)

        layout21 = myVBoxLayout()
        #   layout21.addWidget(self.radioNormCluster)
        layout21.addLayout(layout2)
        layout21.addWidget(self.checkBox1)

        self.groupBox2 = QtGui.QGroupBox(self.tr('Normalization'))
        self.groupBox2.setLayout(layout21)
        #   self.groupBox2.setEnabled(False)

        self.radio3to5 = QtGui.QRadioButton("3' to 5'")
        self.radio5to3 = QtGui.QRadioButton("5' to 3'")
        self.radio3to5.setChecked(True)

        self.pushButton0 = QtGui.QPushButton('Reactivity')
        self.pushButton1 = QtGui.QPushButton('Peak Area')
        self.pushButton2 = QtGui.QPushButton('Data')

        layout3 = myGridLayout()
        layout3.addWidget(self.radio3to5, 0, 0)
        layout3.addWidget(self.radio5to3, 0, 1)
        layout3.addWidget(self.pushButton0, 1, 0)
        layout3.addWidget(self.pushButton1, 1, 1)
        layout3.addWidget(self.pushButton2, 1, 3)

        self.groupBox3 = QtGui.QGroupBox(self.tr('Select Plot Type'))
        self.groupBox3.setLayout(layout3)
        #    self.groupBox3.setEnabled(False)

        self.buttonBox = ToolButton()

        mainLayout = QtGui.QVBoxLayout()
        mainLayout.addWidget(self.labelTitle)
        mainLayout.addWidget(self.groupBox1)
        mainLayout.addWidget(self.groupBox2)
        mainLayout.addWidget(self.groupBox3)

        mainLayout.addStretch()
        mainLayout.addWidget(self.buttonBox)

        self.setLayout(mainLayout)
        self.isToolApplied = False