示例#1
0
def runPy():
    import hexagram
    rootDir = '/Users/swat/hex-stats'
    inDir = 'pyIn/'
    class Options:
        def __init__(s):
            s.associations = True
            s.colormaps = inDir + 'colormaps.txt'
            s.directory = 'pyOutTest'
            s.drlpath = None
            s.html = 'test.dat'
            s.mi_binary_binning = True
            s.mi_window_size = 25
            s.mi_window_threshold = 30
            s.mutualinfo = True
            s.names = ['mRNA seq']
            s.query = None
            s.raw = None
            s.rawsim = None
            s.scores = [inDir + 'old_attributes.csv']
            s.similarity = [inDir + 'artificial_sparse.tab']
            s.singletons = False
            s.stats = True
            s.truncation_edges = 10
            s.type = None
            s.window_size = 20

        def printIt(s):
            print json.dumps(s, indent=4, sort_keys=True)

    options = Options();
    os.chdir(rootDir)
    hexagram.hexIt(options)
    os.chdir('tests/unittest')
示例#2
0
    def hexIt(s):
        global inDir, outDir

        class Options:
            global inDir, outDir

            def __init__(s):
                s.associations = True
                s.colormaps = inDir + 'colormaps.txt'
                s.directory = outDir
                s.drlpath = None
                s.html = 'test.dat'
                s.mi_window_size = 25
                s.mi_window_threshold = 4  # 30
                s.mutualinfo = True
                s.names = ['mRNA seq']
                s.query = None
                s.raw = None
                s.rawsim = None
                s.scores = [inDir + 'old_attributes.csv']
                s.similarity = [inDir + 'artificial_sparse.tab']
                s.singletons = False
                s.stats = True
                s.truncation_edges = 10
                s.type = None
                s.window_size = 25

            def printIt(s):
                print json.dumps(s, indent=4, sort_keys=True)

        os.chdir(serverDir)
        s.options = Options()
        shutil.rmtree(outDir)
        hexagram.hexIt(s.options)
    def hexIt(s):
        global inDir, outDir
        class Options:
            global inDir, outDir
            def __init__(s):
                s.associations = True
                s.colormaps = inDir + 'colormaps.txt'
                s.directory = outDir
                s.drlpath = None
                s.html = 'test.dat'
                s.mi_window_size = 25
                s.mi_window_threshold = 4 # 30
                s.mutualinfo = True
                s.names = ['mRNA seq']
                s.query = None
                s.raw = None
                s.rawsim = None
                s.scores = [inDir + 'old_attributes.csv']
                s.similarity = [inDir + 'artificial_sparse.tab']
                s.singletons = False
                s.stats = True
                s.truncation_edges = 10
                s.type = None
                s.window_size = 25
            def printIt(s):
                print json.dumps(s, indent=4, sort_keys=True)

        os.chdir(serverDir)
        s.options = Options();
        shutil.rmtree(outDir)
        hexagram.hexIt(s.options)
示例#4
0
文件: run.py 项目: lammig/hexagram
def runPy():
    rootDir = '/Users/swat/dev/hexagram/'
    serverDir = rootDir + 'server/'
    inDir = rootDir + 'tests/pyUnittest/pyIn/'
    outDir = rootDir + 'tests/pyUnittest/pyOutTest/'
    testDir = rootDir + 'tests/pyUnittest'
    print 'serverDir', serverDir
    sys.path.append(serverDir)
    import hexagram
    """
    python /data/medbook-galaxy-central/tools/hexagram/hexagram.py \
    "/data/signatures/TCGA/PANCAN/paper/sparse_matrices/spearman/mRNA_pancan12_self_SPEARMAN_top_50" \
    "/data/signatures/TCGA/PANCAN/paper/sparse_matrices/spearman/cn_pancan12_self_SPEARMAN_top_50.tab" \
    --names "mRNA Seq" \
    --names "SCNA" \
    --scores "/data/signatures/TCGA/PANCAN/paper/attributes/genomic_events,_breast_subtype_,_tissue_scores.tab" \
    --scores "/data/signatures/TCGA/PANCAN/paper/subtypes/OV-Subtypes.tab" \
    --colormaps "/data/signatures/TCGA/PANCAN/paper/subtypes/colormaps.tab" \
    --html "/data/database/files/014/dataset_14909.dat" \
    --directory "hex_temp" \
    --truncation_edges 10
    """
    class Options:
        def __init__(s):
            s.associations = True
            s.colormaps = inDir + 'colormaps.txt'
            s.directory = outDir
            s.drlpath = None
            s.html = 'test.dat'
            s.mi_window_size = 25
            s.mi_window_threshold = 4  # 30 default
            s.mutualinfo = True
            s.names = ['mRNA seq']
            s.query = None
            s.raw = None
            s.rawsim = None
            s.scores = [inDir + 'old_attributes.csv']
            s.similarity = [inDir + 'artificial_sparse.tab']
            s.singletons = False
            s.stats = True
            s.truncation_edges = 10
            s.type = None
            s.window_size = 20

        def printIt(s):
            print json.dumps(s, indent=4, sort_keys=True)

    options = Options()
    os.chdir(serverDir)
    hexagram.hexIt(options)
    os.chdir(rootDir + 'tests/pyUnittest')
示例#5
0
def runPy():
    rootDir = '/Users/swat/dev/hexagram/'
    serverDir = rootDir + 'server/'
    inDir = rootDir + 'tests/pyUnittest/pyIn/'
    outDir = rootDir + 'tests/pyUnittest/pyOutTest/'
    testDir = rootDir + 'tests/pyUnittest'
    print 'serverDir', serverDir
    sys.path.append(serverDir)
    import hexagram
    """
    python /data/medbook-galaxy-central/tools/hexagram/hexagram.py \
    "/data/signatures/TCGA/PANCAN/paper/sparse_matrices/spearman/mRNA_pancan12_self_SPEARMAN_top_50" \
    "/data/signatures/TCGA/PANCAN/paper/sparse_matrices/spearman/cn_pancan12_self_SPEARMAN_top_50.tab" \
    --names "mRNA Seq" \
    --names "SCNA" \
    --scores "/data/signatures/TCGA/PANCAN/paper/attributes/genomic_events,_breast_subtype_,_tissue_scores.tab" \
    --scores "/data/signatures/TCGA/PANCAN/paper/subtypes/OV-Subtypes.tab" \
    --colormaps "/data/signatures/TCGA/PANCAN/paper/subtypes/colormaps.tab" \
    --html "/data/database/files/014/dataset_14909.dat" \
    --directory "hex_temp" \
    --truncation_edges 10
    """
    class Options:
        def __init__(s):
            s.associations = True
            s.colormaps = inDir + 'colormaps.txt'
            s.directory = outDir
            s.drlpath = None
            s.html = 'test.dat'
            s.mi_window_size = 25
            s.mi_window_threshold = 4 # 30 default
            s.mutualinfo = True
            s.names = ['mRNA seq']
            s.query = None
            s.raw = None
            s.rawsim = None
            s.scores = [inDir + 'old_attributes.csv']
            s.similarity = [inDir + 'artificial_sparse.tab']
            s.singletons = False
            s.stats = True
            s.truncation_edges = 10
            s.type = None
            s.window_size = 20

        def printIt(s):
            print json.dumps(s, indent=4, sort_keys=True)

    options = Options();
    os.chdir(serverDir)
    hexagram.hexIt(options)
    os.chdir(rootDir + 'tests/pyUnittest')