def RunPipeline(**kwargs):

            setGroup = set()
            """
            listSamples is ...
            190819_Nahye_12K_D4_D0_1-Cas9D7 Cas9D7  Ctrl 
            190819_Nahye_12K_D4_eCas9_Rep1-Cas9D7   Cas9D7  Exp ...
            """
            for strSample in listSamples:

                """
                tupSampleInfo is ... tuple instance
                (190819_Nahye_12K_D4_D0_1-Cas9D7, Cas9D7,  Ctrl)
                """
                tupSampleInfo = Helper.SplitSampleInfo(strSample)
                if not tupSampleInfo: continue

                """
                strSample = 190819_Nahye_12K_D4_D0_1-Cas9D7 ... sample name
                , strRef = Cas9D7 ... reference name
                , strExpCtrl = Ctrl/Exp/"" 
                """
                strSample, strRef, strExpCtrl = tupSampleInfo
                setGroup.add(strExpCtrl)

                """
                options ... has PAM type: Cas9 Cpf1, PAM position: Forward Reverse ...
                """
                InstRunner = clsIndelSearcherRunner(strSample, strRef, options, InstInitFolder)
                #"""
                logging.info('SplitFile')
                InstRunner.SplitFile()
                logging.info('MakeReference')
                InstRunner.MakeReference()

                """
                Indel_searcher_crispresso_hash.py
                """
                logging.info('MakeIndelSearcherCmd')
                listCmd = InstRunner.MakeIndelSearcherCmd()
                logging.info('RunMulticore')
                RunMulticore(listCmd, options.multicore)  ## from CoreSystem.py
                logging.info('MakeOutput')
                InstRunner.MakeOutput()
                logging.info('RunIndelFreqCalculator')
                InstRunner.RunIndelFreqCalculator()
                #"""

            if setGroup == {'EXP', 'CTRL'}:
                InstRunner.IndelNormalization()
            elif setGroup in [set(), set([]), set(['']), set([' '])]:
                pass
            else:
                logging.error('The group category is not appropriate. : %s' % setGroup)
                logging.error('Please make sure your project file is correct.')
                logging.error('The group category must be Exp or Ctrl')
                raise Exception
        def RunPipeline(**kwargs):

            for strSample in listSamples:
                if strSample[0] == '#': continue

                tupSampleInfo = Helper.SplitSampleInfo(strSample)
                if not tupSampleInfo: continue
                strSample, strRef, strExpCtrl = tupSampleInfo

                InstBaseEdit = clsBaseEditRunner(strSample, strRef, options,
                                                 InstInitFolder)
                InstBaseEdit.MakeReference()

                listCmd = InstBaseEdit.MakeIndelSearcherCmd()
                ###print(lCmd[:5])
                RunMulticore(listCmd, options.multicore)  ## from CoreSystem.py

                InstBaseEdit.MakeMergeTarget()

            InstBaseEdit.CopyToAllResultFolder()
def Main():

    logging.info('Program Start')

    logging.info('Make commands for a multiple processing')
    lPara = []
    with open('./User/{user}/{project}.txt'.format(
            user=strUser, project=strProject)) as Project_list:

        for strSample in Project_list:
            if strSample[0] == '#': continue

            tupSampleInfo = Helper.SplitSampleInfo(strSample)
            if not tupSampleInfo: continue
            strSample, strRef, strExpCtrl = tupSampleInfo

            strSample = strSample.replace('\n', '').replace('\r', '')
            sFile_path = './Output/{user}/{project}/{sample}/Tmp/Alignment'.format(
                user=strUser, project=strProject, sample=strSample)
            sTotal_readcnt_path = './Output/{user}/{project}/{sample}/Tmp/All'.format(
                user=strUser, project=strProject, sample=strSample)
            dInput_fa = Make_ref_dict(strRef)

            lPara.append(
                [strSample, sFile_path, sTotal_readcnt_path, dInput_fa])

    logging.info('Multiple processing Start')
    p = mp.Pool(iCore)
    p.map_async(Count_seq_freq, lPara).get()
    logging.info('Multiple processing End')

    #logging.info('Count group Start')
    #Count_group()
    #logging.info('Count group End')

    #logging.info('Trim data Start')
    #Trim_data()
    #logging.info('Trim data End')

    logging.info('Program End')
        def RunPipeline(**kwargs):

            setGroup = set()
            for strSample in listSamples:

                tupSampleInfo = Helper.SplitSampleInfo(strSample)
                if not tupSampleInfo: continue
                strSample, strRef, strExpCtrl = tupSampleInfo
                setGroup.add(strExpCtrl)

                InstRunner = clsIndelSearcherRunner(strSample, strRef, options,
                                                    InstInitFolder)
                #"""
                logging.info('SplitFile')
                InstRunner.SplitFile()
                logging.info('MakeReference')
                InstRunner.MakeReference()
                logging.info('MakeIndelSearcherCmd')
                listCmd = InstRunner.MakeIndelSearcherCmd()
                logging.info('RunMulticore')
                RunMulticore(listCmd, options.multicore)  ## from CoreSystem.py
                logging.info('MakeOutput')
                InstRunner.MakeOutput()
                logging.info('RunIndelFreqCalculator')
                InstRunner.RunIndelFreqCalculator()
                #"""

            if setGroup == {'EXP', 'CTRL'}:
                InstRunner.IndelNormalization()
            elif setGroup in [set(), set([]), set(['']), set([' '])]:
                pass
            else:
                logging.error('The group category is not appropriate. : %s' %
                              setGroup)
                logging.error('Please make sure your project file is correct.')
                logging.error('The group category must be Exp or Ctrl')
                raise Exception