Example #1
0
    def __init__(self):
        QtGui.QMainWindow.__init__(self)
        self.ui = Ui_SNPConvert()
        self.ui.setupUi(self)

        ###############################################
        ###### TAB1 - Illumina MATRIX Format ##########
        ###############################################
        #Setting log screen as readonly
        self.ui.Log_wdg_tab1.setReadOnly(True)
        #Setting action of buttons opening to Open file
        self.inputFinRepFile_tab1 = ''
        self.inputSnpMapFile_tab1 = ''
        self.ui.FinRep_tab1.clicked.connect(self.FinRep_open_tab1)
        self.ui.SnpMap_tab1.clicked.connect(self.SnpMap_open_tab1)
        #Setting linedit read (breed code)
        self.BrdCode_tab1 = 'UNKN_BRD'
        self.ui.BrdCode_tab1.setPlaceholderText(
            self.BrdCode_tab1)  #default (example) value
        self.ui.BrdCode_tab1.cursorPositionChanged.connect(
            self.BrdCodeChange_tab1)
        #Setting linedit read (output name)
        self.OutName_tab1 = 'Output_name'
        self.ui.OutName_tab1.setPlaceholderText(
            self.OutName_tab1)  #default (example) name
        self.ui.OutName_tab1.cursorPositionChanged.connect(
            self.OutNameChange_tab1)
        #Setting action of buttons RUN
        self.ui.ConvertFile_tab1.clicked.connect(self.ConvertFile_run_tab1)

        ###############################################
        ###### TAB2 - Illumina ROW Format ##########
        ###############################################
        #Setting log screen as readonly
        self.ui.Log_wdg_tab2.setReadOnly(True)
        #Setting action of buttons opening to Open file
        self.inputFinRepFile_tab2 = ''
        self.inputSnpMap_tab2 = ''
        self.ui.FinRep_tab2.clicked.connect(self.FinRep_open_tab2)
        self.ui.SnpMap_tab2.clicked.connect(self.SnpMap_open_tab2)
        #Setting the combo box
        self.Chosen_allele = 'Forward'
        self.items = ('Forward', 'Top', 'AB')
        self.ui.AlleleCod_box_tab2.addItems(self.items)
        self.ui.AlleleCod_box_tab2.currentIndexChanged.connect(
            self.OutAlleleCoding_tab2)
        #Setting linedit read (breed code)
        self.BrdCode_tab2 = 'UNKN_BRD'
        self.ui.BrdCode_tab2.setPlaceholderText(
            self.BrdCode_tab2)  #default (example) value
        self.ui.BrdCode_tab2.cursorPositionChanged.connect(
            self.BrdCodeChange_tab2)
        #Setting linedit read (output name)
        self.OutName_tab2 = 'Output_name'
        self.ui.OutName_tab2.setPlaceholderText(
            self.OutName_tab2)  #default (example) name
        self.ui.OutName_tab2.cursorPositionChanged.connect(
            self.OutNameChange_tab2)
        #Setting action of buttons RUN
        self.ui.ConvertFile_tab2.clicked.connect(self.ConvertFile_run_tab2)

        ################################
        ###### TAB3 - iConvert #########
        ################################
        #Setting log screen as readonly
        self.ui.Log_wdg_tab3.setReadOnly(True)
        #Setting action of buttons opening to Open file
        self.inputPedFile_tab3 = ''
        self.inputMapFile_tab3 = ''
        self.inputSnpChimpFile_tab3 = ''
        self.ui.PedFile_tab3.clicked.connect(self.PedFile_open_tab3)
        self.ui.MapFile_tab3.clicked.connect(self.MapFile_open_tab3)
        self.ui.SnpChimp_tab3.clicked.connect(self.SnpChimp_open_tab3)
        #Setting the combo box
        self.items1 = [
            'ILMN_Forward', 'ILMN_Top', 'ILMN_AB', 'AFFY_Forward', 'AFFY_AB',
            'NO_allele_conv'
        ]
        self.INChosen_allele = 'ILMN_Forward'
        self.ui.AlleleCodIn_box_tab3.addItems(self.items1)
        self.ui.AlleleCodIn_box_tab3.currentIndexChanged.connect(
            self.InAlleleCoding_tab3)

        self.items2 = [
            'ILMN_Top', 'ILMN_Forward', 'ILMN_AB', 'AFFY_Forward', 'AFFY_AB',
            'NO_allele_conv'
        ]
        self.OUTChosen_allele = 'ILMN_Top'
        self.ui.AlleleCodOut_box_tab3.addItems(self.items2)
        self.ui.AlleleCodOut_box_tab3.currentIndexChanged.connect(
            self.OutAlleleCoding_tab3)

        #Setting radio buttons
        self.UpdateMap = True
        self.ui.YesRadioButton_tab3.clicked.connect(self.YesRadio_clicked)
        self.ui.NoRadioButton_tab3.clicked.connect(self.NoRadio_clicked)

        #Setting linedit read (output name)
        self.OutName_tab3 = 'Output_name'
        self.ui.OutName_tab3.setPlaceholderText(
            self.OutName_tab3)  #default (example) name
        self.ui.OutName_tab3.cursorPositionChanged.connect(
            self.OutNameChange_tab3)
        #Setting action of buttons RUN
        self.ui.ConvertFile_tab3.clicked.connect(self.ConvertFile_run_tab3)