Esempio n. 1
0
def main():
    args = docopt.docopt(__doc__)
    print(args)
    cluster.require_qsub()

    workspace = pipeline.workspace_from_dir(args['<workspace>'])
    # If not a fragment workspace, make a new one
    if not hasattr(workspace, 'fasta_path'):
        step = workspace.get_next_step()
        workspace = pipeline.ValidationWorkspace(workspace.root_dir, step)
    workspace.check_paths()
    workspace.make_dirs()
    workspace.clear_fragments()

    inputs = pick_inputs(workspace)
    if not inputs:
        print('All inputs already have fragments')
    # if not '--input_model' in args:
    # model = workspace.input_pdb_path
    # else:
    # model = args['--input_model']

    # Run the fragment generation script.

    generate_fragments = [
        'klab_generate_fragments',
        '--outdir',
        workspace.fragments_dir,
        '--memfree',
        args['--mem-free'],
    ] + inputs
    if not args['--ignore-loop-file']:
        generate_fragments += [
            '--loops_file',
            workspace.loops_path,
        ]

    if args['--dry-run']:
        print(' '.join(generate_fragments))
    else:
        subprocess.call(generate_fragments)
Esempio n. 2
0
def get_workspace(root_dir, step):
    return pipeline.ValidationWorkspace(root_dir, step)
Esempio n. 3
0
def get_workspace(root_dir, step):
    '''
    Provides information to the submission script about the workspace
    '''
    return pipeline.ValidationWorkspace(root_dir, step)