示例#1
0
def cleanOptions(options):
    options['dialogs'] = 'dialogs' in options
    cwd = options.get('p', None)

    if options['dialogs']:

        if not 'i' in options:
            options['i'] = D.askForFile(defaultextension='*.xls',
                                        filetypes=(('Excel classic', '*.xls'),
                                                   ('Excel', '*.xlsx'),
                                                   ('All files', '*.*')),
                                        initialdir=cwd,
                                        multiple=False,
                                        title="Cherrypicking Table")

        if not 'src' in options:
            options['src'] = D.askForFile(
                defaultextension='*.xls',
                filetypes=(('Excel classic', '*.xls'), ('Excel', '*.xlsx'),
                           ('All files', '*.*')),
                initialdir=cwd,
                multiple=True,
                title="Source samples and their locations")

        if not 'o' in options:
            options['o'] = D.askForFile(defaultextension='*.gwl',
                                        filetypes=(('Evo Worklist', '*.gwl'),
                                                   ('Text file', '*.txt'),
                                                   ('All files', '*.*')),
                                        initialdir=cwd,
                                        multiple=False,
                                        newfile=True,
                                        title="Save Worklist output file as")

    options['i'] = F.existingFile(
        options['i'],
        cwd=cwd,
        errmsg='Cannot find cherrypicking input (-i) file.')

    options['src'] = U.tolist(options['src'])
    msg = 'Cannot find source (-src) file '
    options['src'] = [
        F.existingFile(f, cwd=cwd, errmsg=msg) for f in options['src']
    ]

    options['o'] = F.absfile(options['o'], cwd=cwd)

    options['columns'] = U.tolist(options.get('columns', []))

    options['useLabel'] = 'barcode' not in options
    return options
示例#2
0
def cleanOptions(options):
    options['dialogs'] = 'dialogs' in options
    options['p'] = F.absfile(options.get('p', ''))

    if options['dialogs']:

        if not 'i' in options:
            options['i'] = D.askForFile(defaultextension='*.xls',
                                        filetypes=(('Excel classic', '*.xls'),
                                                   ('Excel', '*.xlsx'),
                                                   ('All files', '*.*')),
                                        initialdir=options['p'],
                                        multiple=False,
                                        title="Definition of Target Reactions")

        if not 'src' in options:
            options['src'] = D.askForFile(
                defaultextension='*.xls',
                filetypes=(('Excel classic', '*.xls'), ('Excel', '*.xlsx'),
                           ('All files', '*.*')),
                initialdir=options['p'],
                multiple=True,
                title="Source fragments and their locations")

        if not 'o' in options:
            options['o'] = D.askForFile(defaultextension='*.gwl',
                                        filetypes=(('Evo Worklist', '*.gwl'),
                                                   ('Text file', '*.txt'),
                                                   ('All files', '*.*')),
                                        initialdir=options['p'],
                                        multiple=False,
                                        newfile=True,
                                        title="Save Worklist output file as")

    options['i'] = F.absfile(options['i'])
    options['src'] = [F.absfile(f) for f in U.tolist(options['src'])]
    options['o'] = F.absfile(options['o'])

    options['useLabel'] = 'useLabel' in options
    ##    options['srcplate'] = [s.strip() for s in U.tolist(options.get('srcplate',[]))]
    return options
示例#3
0
def cleanOptions( options ):
    options['dialogs'] = 'dialogs' in options
    options['p'] = F.absfile( options.get('p', ''))
    
    if options['dialogs']:
        
        if not 'i' in options:
            options['i'] = D.askForFile(defaultextension='*.xls', 
                            filetypes=(('Excel classic','*.xls'),('Excel','*.xlsx'),('All files','*.*')), 
                            initialdir=options['p'], 
                            multiple=False, 
                            title="Definition of Target Reactions")
        
        if not 'src' in options:
            options['src'] = D.askForFile(defaultextension='*.xls', 
                            filetypes=(('Excel classic','*.xls'),('Excel','*.xlsx'),('All files','*.*')), 
                            initialdir=options['p'], 
                            multiple=True, 
                            title="Source templates and primers and their locations")
        
        if not 'o' in options:
            options['o'] = D.askForFile(defaultextension='*.gwl', 
                            filetypes=(('Evo Worklist','*.gwl'),('Text file','*.txt'),('All files','*.*')), 
                            initialdir=options['p'], 
                            multiple=False,
                            newfile=True,
                            title="Save Worklist output file as")
    
    
    options['i'] = F.absfile(options['i'])
    options['src'] = [ F.absfile(f) for f in U.tolist(options['src']) ]
    options['o'] = F.absfile(options['o'])
    
    options['useLabel'] = 'useLabel' in options
##    options['srcplate'] = [s.strip() for s in U.tolist(options.get('srcplate',[]))]
    return options