示例#1
0
from nestly.scons import SConsWrap, name_targets
import os
import os.path
import appconfig

config = appconfig.read('config.yaml')

nest = Nest()
wrap = SConsWrap(nest, config['quast_folder'])
env = Environment(ENV=os.environ)

# Used for resolving what type of execution environment will be used.
exec_env = appconfig.ExecutionEnvironment(ARGUMENTS, supported_env=['pbs', 'sge'])

# Constants
wrap.add('seed', [config['seed']], create_dir=False)
wrap.add('refseq', [config['community']['seq']], create_dir=False)
wrap.add('wgs_read_length', [config['wgs_read_length']], create_dir=False)
wrap.add('wgs_insert_length', [config['wgs_insert_length']], create_dir=False)
wrap.add('wgs_insert_sd', [config['wgs_insert_sd']], create_dir=False)
wrap.add('wgs_base', [config['wgs_base']],  create_dir=False)

# Variation
genomes = appconfig.find_files(config['community']['folder'], config['community']['seq'])
commPaths = [os.path.dirname(pn) for pn in genomes]
wrap.add('community', commPaths)

tableFolder = os.path.join(config['reference']['folder'], config['reference']['table_folder'])
tablePaths = appconfig.get_files(tableFolder, 'table')
wrap.add('comm_table', tablePaths, label_func=os.path.basename)
    os.path.join(config['cluster']['folder'],
                 config['cluster']['algorithms']['srmcl']['folder']))
env = Environment(ENV=os.environ)

# Used for resolving what type of execution environment will be used.
exec_env = appconfig.ExecutionEnvironment(
    ARGUMENTS, supported_env=['pbs', 'sge', 'local'])

# Variation

# don't include root as we don't want it embedded in this nest hierarchy
hic_paths = appconfig.get_precedents(config['map_folder'],
                                     config['hic2ctg'],
                                     prepend_root=False,
                                     tips_only=True)
wrap.add('hic_path', hic_paths)


#
# TODO, this needs to be placed in mapping
#
@wrap.add_target('make_graph')
@name_targets
def make_graph(outdir, c):
    # add the root back in because we need to refer to the file
    ref_path = os.path.join(config['map_folder'], c['hic_path'])
    hic_bam = str(os.path.join(ref_path, config['hic2ctg']))

    source = hic_bam
    targets = appconfig.prepend_paths(outdir, ['edges.csv', 'nodes.csv'])
    action = exec_env.resolve_action({
示例#3
0
from nestly import Nest, stripext
from nestly.scons import SConsWrap, name_targets
import os
import os.path
import appconfig

config = appconfig.read("config.yaml")

nest = Nest()
wrap = SConsWrap(nest, config["hic_folder"])
env = Environment(ENV=os.environ)

# Constants
wrap.add("seed", [config["seed"]], create_dir=False)
wrap.add("refseq", [config["community"]["seq"]], create_dir=False)
wrap.add("hic_base", [config["hic_base"]], create_dir=False)
wrap.add("hic_inter_prob", [config["hic_inter_prob"]], create_dir=False)
wrap.add("hic_read_length", [config["hic_read_length"]], create_dir=False)

# Variation
genomes = appconfig.find_files(config["community"]["folder"], config["community"]["seq"])
commPaths = [os.path.dirname(pn) for pn in genomes]
wrap.add("community", commPaths)

tableFolder = os.path.join(config["reference"]["folder"], config["reference"]["table_folder"])
tablePaths = appconfig.get_files(tableFolder, "table")
wrap.add("comm_table", tablePaths, label_func=os.path.basename)

wrap.add("hic_n_frag", config["hic_n_frag"])

config = appconfig.read('config.yaml')

# Base folder
nest = Nest()
wrap = SConsWrap(nest, os.path.join(config['cluster']['folder'],
                                    config['cluster']['algorithms']['mcl']['folder']))
env = Environment(ENV=os.environ)

# Used for resolving what type of execution environment will be used.
exec_env = appconfig.ExecutionEnvironment(ARGUMENTS, supported_env=['pbs', 'sge', 'local'])

# Variation

# don't include root as we don't want it embedded in this nest hierarchy
hic_paths = appconfig.get_precedents(config['map_folder'], config['hic2ctg'], prepend_root=False, tips_only=True)
wrap.add('hic_path', hic_paths)


#
# TODO, this needs to be placed in mapping
#
@wrap.add_target('make_graph')
@name_targets
def make_graph(outdir, c):
    # add the root back in because we need to refer to the file
    ref_path = os.path.join(config['map_folder'], c['hic_path'])
    hic_bam = str(os.path.join(ref_path, config['hic2ctg']))

    source = hic_bam
    targets = appconfig.prepend_paths(outdir, ['edges.csv', 'nodes.csv'])
    action = exec_env.resolve_action({
from nestly import Nest
from nestly.scons import SConsWrap
import os
import os.path
import appconfig
import numpy as np
import math

config = appconfig.read('config.yaml')

nest = Nest()
wrap = SConsWrap(nest, config['community']['folder'])
env = Environment(ENV=os.environ)

# Constants
wrap.add('seed', [config['seed']], create_dir=False)
wrap.add('genomes', [config['community']['seq']], create_dir=False)
wrap.add('basis_seq', [config['reference']['raw_seq']], create_dir=False)
wrap.add('seq_len', [config['reference']['seq_len']], create_dir=False)
wrap.add('sg_scale', [config['reference']['sg_scale']], create_dir=False)

# Variation

# trees are sourced from folder
seqFolder = os.path.join(config['reference']['folder'])
treeFolder = os.path.join(config['reference']['folder'],
                          config['reference']['tree_folder'])
treePaths = appconfig.get_files(treeFolder, config['reference']['tree_suffix'])
wrap.add('tree', treePaths, label_func=os.path.basename)

# scale divergence of tree evenly across log space
示例#6
0
import os
import os.path
import appconfig

config = appconfig.read('config.yaml')

nest = Nest()
wrap = SConsWrap(nest, config['map_folder'])
env = Environment(ENV=os.environ)

# Used for resolving what type of execution environment will be used.
exec_env = appconfig.ExecutionEnvironment(ARGUMENTS,
                                          supported_env=['pbs', 'sge'])

# Constant
wrap.add('refseq', [config['community']['seq']], create_dir=False)

# Variation
genomes = appconfig.find_files(config['community']['folder'],
                               config['community']['seq'])
# For testing - restrict to only star topology
#commPaths = [os.path.dirname(pn) for pn in genomes if 'ladder' not in pn]
commPaths = [os.path.dirname(pn) for pn in genomes]
wrap.add('community', commPaths)

tableFolder = os.path.join(config['reference']['folder'],
                           config['reference']['table_folder'])
tablePaths = appconfig.get_files(tableFolder, 'table')
wrap.add('comm_table', tablePaths, label_func=os.path.basename)

wrap.add('wgs_xfold', config['wgs_xfold'])
import os
import os.path
import appconfig

config = appconfig.read('config.yaml')

nest = Nest()
wrap = SConsWrap(nest, config['quast_folder'])
env = Environment(ENV=os.environ)

# Used for resolving what type of execution environment will be used.
exec_env = appconfig.ExecutionEnvironment(ARGUMENTS,
                                          supported_env=['pbs', 'sge'])

# Constants
wrap.add('seed', [config['seed']], create_dir=False)
wrap.add('refseq', [config['community']['seq']], create_dir=False)
wrap.add('wgs_read_length', [config['wgs_read_length']], create_dir=False)
wrap.add('wgs_insert_length', [config['wgs_insert_length']], create_dir=False)
wrap.add('wgs_insert_sd', [config['wgs_insert_sd']], create_dir=False)
wrap.add('wgs_base', [config['wgs_base']], create_dir=False)

# Variation
genomes = appconfig.find_files(config['community']['folder'],
                               config['community']['seq'])
commPaths = [os.path.dirname(pn) for pn in genomes]
wrap.add('community', commPaths)

tableFolder = os.path.join(config['reference']['folder'],
                           config['reference']['table_folder'])
tablePaths = appconfig.get_files(tableFolder, 'table')
示例#8
0
from nestly import Nest
from nestly.scons import SConsWrap
import os
import os.path
import appconfig
import numpy as np
import math

config = appconfig.read("config.yaml")

nest = Nest()
wrap = SConsWrap(nest, config["community"]["folder"])
env = Environment(ENV=os.environ)

# Constants
wrap.add("seed", [config["seed"]], create_dir=False)
wrap.add("genomes", [config["community"]["seq"]], create_dir=False)
wrap.add("basis_seq", [config["reference"]["raw_seq"]], create_dir=False)
wrap.add("seq_len", [config["reference"]["seq_len"]], create_dir=False)
wrap.add("sg_scale", [config["reference"]["sg_scale"]], create_dir=False)

# Variation

# trees are sourced from folder
seqFolder = os.path.join(config["reference"]["folder"])
treeFolder = os.path.join(config["reference"]["folder"], config["reference"]["tree_folder"])
treePaths = appconfig.get_files(treeFolder, config["reference"]["tree_suffix"])
wrap.add("tree", treePaths, label_func=os.path.basename)

# scale divergence of tree evenly across log space
wrap.add(
示例#9
0
config = appconfig.read('config.yaml')

# Base folder
nest = Nest()
wrap = SConsWrap(nest, os.path.join(config['cluster']['folder'],
                                    config['cluster']['algorithms']['srmcl']['folder']))
env = Environment(ENV=os.environ)

# Used for resolving what type of execution environment will be used.
exec_env = appconfig.ExecutionEnvironment(ARGUMENTS, supported_env=['pbs', 'sge', 'local'])

# Variation

# don't include root as we don't want it embedded in this nest hierarchy
hic_paths = appconfig.get_precedents(config['map_folder'], config['hic2ctg'], prepend_root=False, tips_only=True)
wrap.add('hic_path', hic_paths)

#
# TODO, this needs to be placed in mapping
#
@wrap.add_target('make_graph')
@name_targets
def make_graph(outdir, c):
    # add the root back in because we need to refer to the file
    ref_path = os.path.join(config['map_folder'], c['hic_path'])
    hic_bam = str(os.path.join(ref_path, config['hic2ctg']))

    source = hic_bam
    targets = appconfig.prepend_paths(outdir, ['edges.csv', 'nodes.csv'])
    action = exec_env.resolve_action({
        'pbs': 'bin/pbsrun_GRAPH.sh -s $SOURCE.abspath $TARGETS.abspath',
示例#10
0
from nestly import Nest, stripext
from nestly.scons import SConsWrap, name_targets
import os
import os.path
import appconfig

config = appconfig.read('config.yaml')

nest = Nest()
wrap = SConsWrap(nest, config['hic_folder'])
env = Environment(ENV=os.environ)

# Constants
wrap.add('seed', [config['seed']], create_dir=False)
wrap.add('refseq', [config['community']['seq']], create_dir=False)
wrap.add('hic_base', [config['hic_base']], create_dir=False)
wrap.add('hic_inter_prob', [config['hic_inter_prob']], create_dir=False)
wrap.add('hic_read_length', [config['hic_read_length']], create_dir=False)

# Variation
genomes = appconfig.find_files(config['community']['folder'],
                               config['community']['seq'])
commPaths = [os.path.dirname(pn) for pn in genomes]
wrap.add('community', commPaths)

tableFolder = os.path.join(config['reference']['folder'],
                           config['reference']['table_folder'])
tablePaths = appconfig.get_files(tableFolder, 'table')
wrap.add('comm_table', tablePaths, label_func=os.path.basename)

wrap.add('hic_n_frag', config['hic_n_frag'])
示例#11
0
wrap = SConsWrap(
    nest,
    os.path.join(config['cluster']['folder'],
                 config['cluster']['algorithms']['louvain']['folder']))
env = Environment(ENV=os.environ)

# Used for resolving what type of execution environment will be used.
exec_env = appconfig.ExecutionEnvironment(
    ARGUMENTS, supported_env=['pbs', 'sge', 'local'])

# don't include root as we don't want it embedded in this nest hierarchy
hic_paths = appconfig.get_precedents(config['map_folder'],
                                     config['hic2ctg'],
                                     prepend_root=False,
                                     tips_only=True)
wrap.add('hic_path', hic_paths)


@wrap.add_target('make_graph')
@name_targets
def make_graph(outdir, c):
    # add the root back in because we need to refer to the file
    ref_path = os.path.join(config['map_folder'], c['hic_path'])
    hic_bam = str(os.path.join(ref_path, config['hic2ctg']))

    source = hic_bam
    targets = appconfig.prepend_paths(outdir, ['edges.csv', 'nodes.csv'])

    action = exec_env.resolve_action({
        'pbs':
        'bin/pbsrun_GRAPH.sh $SOURCE.abspath $TARGETS.abspath',
示例#12
0

config = appconfig.read('config.yaml')

# Base folder
nest = Nest()
wrap = SConsWrap(nest, os.path.join(config['cluster']['folder'],
                                    config['cluster']['algorithms']['oclustr']['folder']))
env = Environment(ENV=os.environ)

# Used for resolving what type of execution environment will be used.
exec_env = appconfig.ExecutionEnvironment(ARGUMENTS, supported_env=['pbs', 'sge', 'local'])

# don't include root as we don't want it embedded in this nest hierarchy
hic_paths = appconfig.get_precedents(config['map_folder'], config['hic2ctg'], prepend_root=False, tips_only=True)
wrap.add('hic_path', hic_paths)

@wrap.add_target('make_graph')
@name_targets
def make_graph(outdir, c):
    # add the root back in because we need to refer to the file
    ref_path = os.path.join(config['map_folder'], c['hic_path'])
    hic_bam = str(os.path.join(ref_path, config['hic2ctg']))

    source = hic_bam
    targets = appconfig.prepend_paths(outdir, ['edges.csv', 'nodes.csv'])

    action = exec_env.resolve_action({
        'pbs': 'bin/pbsrun_GRAPH.sh $SOURCE.abspath $TARGETS.abspath',
        'sge': 'bin/sgerun_GRAPH.sh $SOURCE.abspath $TARGETS.abspath',
        'local': 'bin/bamToEdges.py $SOURCE.abspath $TARGETS.abspath'