Ejemplo n.º 1
0
def make_wgs2ctg(outdir, c):
    com = c['community']
    tbl = os.path.basename(c['comm_table'])

    # TODO find a better way to obtain the path to WGS reads
    query = appconfig.get_wgs_reads(
        os.path.join(os.path.abspath(config['wgs_folder']), com, tbl,
                     str(c['wgs_xfold'])), config)

    # TODO likewise
    subject = os.path.join(os.path.abspath(config['wgs_folder']), com, tbl,
                           str(c['wgs_xfold']), config['wgs_asmdir'],
                           '{0[wgs_base]}.contigs.fasta'.format(config))

    target = os.path.join(outdir, config['wgs2ctg'])
    source = [subject] + query

    action = exec_env.resolve_action({
        'pbs':
        'bin/pbsrun_MAP.sh $SOURCES.abspath $TARGET.abspath',
        'sge':
        'bin/sgerun_MAP.sh $SOURCES.abspath $TARGET.abspath'
    })

    return 'output', env.Command(target, source, action)
Ejemplo n.º 2
0
def generate_wgs(outdir, c):

    src_dir = os.path.join(config['wgs_folder'], '/'.join(outdir.split('/')[1:]))
    sources = ['{1}/{2}/{0[wgs_base]}.contigs.fasta'.format(c, src_dir, config['wgs_asmdir'])] + \
              appconfig.get_wgs_reads(src_dir, config)

    target = os.path.join(outdir, 'lap_ctg.prob')

    action = exec_env.resolve_action({
        'pbs': 'bin/pbsrun_LAP.sh $SOURCES.abspath $TARGET.abspath'.format(c, od=outdir),
        'sge': 'bin/sgerun_LAP.sh $SOURCES.abspath $TARGET.abspath'.format(c, od=outdir)
    })

    return 'lap_ctg', env.Command(target, sources, action)
Ejemplo n.º 3
0
def generate_wgs(outdir, c):

    src_dir = os.path.join(config['wgs_folder'], '/'.join(outdir.split('/')[1:]))
    sources = ['{1[community][folder]}/{0[community]}/{0[refseq]}'.format(c, config)] + \
              appconfig.get_wgs_reads(src_dir, config)

    target = os.path.join(outdir, 'lap_ref.prob')

    action = exec_env.resolve_action({
        'pbs': 'bin/pbsrun_LAP.sh $SOURCES.abspath $TARGET.abspath'.format(c, od=outdir),
        'sge': 'bin/sgerun_LAP.sh $SOURCES.abspath $TARGET.abspath'.format(c, od=outdir)
    })

    return 'lap_ref', env.Command(target, sources, action)
Ejemplo n.º 4
0
def generate_wgs(outdir, c):

    src_dir = os.path.join(config['wgs_folder'],
                           '/'.join(outdir.split('/')[1:]))
    sources = ['{1}/{2}/{0[wgs_base]}.contigs.fasta'.format(c, src_dir, config['wgs_asmdir'])] + \
              appconfig.get_wgs_reads(src_dir, config)

    target = os.path.join(outdir, 'lap_ctg.prob')

    action = exec_env.resolve_action({
        'pbs':
        'bin/pbsrun_LAP.sh $SOURCES.abspath $TARGET.abspath'.format(c,
                                                                    od=outdir),
        'sge':
        'bin/sgerun_LAP.sh $SOURCES.abspath $TARGET.abspath'.format(c,
                                                                    od=outdir)
    })

    return 'lap_ctg', env.Command(target, sources, action)
Ejemplo n.º 5
0
def generate_wgs(outdir, c):

    src_dir = os.path.join(config['wgs_folder'],
                           '/'.join(outdir.split('/')[1:]))
    sources = ['{1[community][folder]}/{0[community]}/{0[refseq]}'.format(c, config)] + \
              appconfig.get_wgs_reads(src_dir, config)

    target = os.path.join(outdir, 'lap_ref.prob')

    action = exec_env.resolve_action({
        'pbs':
        'bin/pbsrun_LAP.sh $SOURCES.abspath $TARGET.abspath'.format(c,
                                                                    od=outdir),
        'sge':
        'bin/sgerun_LAP.sh $SOURCES.abspath $TARGET.abspath'.format(c,
                                                                    od=outdir)
    })

    return 'lap_ref', env.Command(target, sources, action)
Ejemplo n.º 6
0
def generate_wgs(outdir, c):
    target = appconfig.get_wgs_reads(outdir, config)
    source = '{1[community][folder]}/{0[community]}/{0[refseq]}'.format(c, config)
    action = 'bin/sgerun_METAART.sh {0[seed]} {0[wgs_insert_length]} {0[wgs_insert_sd]} ' \
             '{0[wgs_read_length]} {0[wgs_xfold]} {0[comm_table]} $SOURCE.abspath {0[wgs_base]} {od}'.format(c, od=outdir)
    return 'r1', 'r2', env.Command(target, source, action)