def test_xy(s): outDir = outDirBase + '_xy/' opts = Namespace( layoutInputFile= [coordDataFile], names= ["layout"], metric= 'spearman', scores= [attsCodedFile], colormaps= colorDataFile, directory= outDir, singletons=True, clumpinessStats=False, mutualinfo=False, associations=False ) util.removeOldOutFiles(outDir) layout.makeMapUIfiles(opts) #check that it is mostly the same as the other files util.compareActualVsExpectedDir(s,expDir, outDir, excludeFiles = ['log', 'mapMeta.json', 'neighbors_0.tab', 'assignments0.tab', 'hexNames.tab', 'xyPreSquiggle_0.tab'] ) util.compareActualVsExpectedFile(s,'assignments0.tab',expXyDir,outDir) util.compareActualVsExpectedFile(s,'xyPreSquiggle_0.tab',expXyDir,outDir)
def test_xy(s): outDir = outDirBase + '_xy/' opts = [ "--coordinates", coordDataFile, "--names", "layout", "--metric", 'spearman', "--scores", attsCodedFile, "--colormaps", colorDataFile, "--directory", outDir, "--include-singletons", "--no_layout_independent_stats", "--no_layout_aware_stats" ] util.removeOldOutFiles(outDir) layout.main(opts) #check that it is mostly the same as the other files util.compareActualVsExpectedDir(s, expDir, outDir, excludeFiles=[ 'log', 'mapMeta.json', 'assignments0.tab', 'neighbors_0.tab', 'hexNames.tab', 'xyPreSquiggle_0.tab' ]) util.compareActualVsExpectedFile(s, 'assignments0.tab', expXyDir, outDir) util.compareActualVsExpectedFile(s, 'xyPreSquiggle_0.tab', expXyDir, outDir)
def test_xy_no_color(s): outDir = outDirBase + '_xy_no_color/' opts = [ "--coordinates", coordDataFile, "--scores", attsStringsFile, "--names", "layout", "--directory", outDir, "--include-singletons", "--no_layout_independent_stats", "--no_layout_aware_stats" ] util.removeOldOutFiles(outDir) layout.main(opts) #check that it is mostly the same as the other files util.compareActualVsExpectedDir(s, expNoColorDir, outDir, excludeFiles=[ 'log', 'assignments0.tab', 'neighbors_0.tab', 'hexNames.tab', 'xyPreSquiggle_0.tab' ]) #theese files are not expected to be the same as other runs, # but to make sure they are correct we have but previous runs in a different # expected directory. util.compareActualVsExpectedFile(s, 'assignments0.tab', expXyDir, outDir) util.compareActualVsExpectedFile(s, 'xyPreSquiggle_0.tab', expXyDir, outDir)
def test_coordinates_layout_parms_renamed(s): outDir = outDirBase + '_coordinates_layout_parms_renamed/' opts = [ "--coordinates", coordDataFile, "--layoutName", "layout", "--distanceMetric", 'spearman', "--outputDirectory", outDir, "--noLayoutIndependentStats", "--noLayoutAwareStats" ] util.removeOldOutFiles(outDir) layout.main(opts) #check that it is mostly the same as the other files util.compareActualVsExpectedDir(s, expNoAttsDir, outDir, excludeFiles=[ 'log', 'neighbors_0.tab', 'assignments0.tab', 'hexNames.tab', 'xyPreSquiggle_0.tab' ]) #theese files are not expected to be the same as other runs, # but to make sure they are correct we have but previous runs in a different # expected directory. util.compareActualVsExpectedFile(s, 'assignments0.tab', expXyDir, outDir) util.compareActualVsExpectedFile(s, 'xyPreSquiggle_0.tab', expXyDir, outDir)
def test_xy_no_colorMakeMapUIfiles(s): outDir = outDirBase + '_xy_no_color/' opts = Namespace(coordinates=[coordDataFile], scores=[attsStringsFile], names=["layout"], directory=outDir, singletons=True, clumpinessStats=False, mutualinfo=False, associations=False) util.removeOldOutFiles(outDir) layout.makeMapUIfiles(opts) #check that it is mostly the same as the other files util.compareActualVsExpectedDir(s, expNoColorDir, outDir, excludeFiles=[ 'log', 'assignments0.tab', 'neighbors_0.tab', 'hexNames.tab', 'xyPreSquiggle_0.tab' ]) #theese files are not expected to be the same as other runs, # but to make sure they are correct we have but previous runs in a different # expected directory. util.compareActualVsExpectedFile(s, 'assignments0.tab', expXyDir, outDir) util.compareActualVsExpectedFile(s, 'xyPreSquiggle_0.tab', expXyDir, outDir)
def test_xy_no_attsfromMakeUI(s): outDir = outDirBase + '_xy_no_atts/' opts = Namespace(coordinates=[coordDataFile], names=["layout"], directory=outDir, singletons=True, clumpinessStats=True, mutualinfo=True, associations=True) util.removeOldOutFiles(outDir) layout.makeMapUIfiles(opts) util.compareActualVsExpectedDir(s, expNoAttsDir, outDir, excludeFiles=[ 'log', 'mapMeta.json', 'neighbors_0.tab', 'assignments0.tab', 'hexNames.tab', 'xyPreSquiggle_0.tab' ]) util.compareActualVsExpectedFile(s, 'assignments0.tab', expXyDir, outDir) util.compareActualVsExpectedFile(s, 'xyPreSquiggle_0.tab', expXyDir, outDir)
def test_group_meta_json_view_no_group_dir(s): outDir = os.path.join(outDirBase, 'groupMetaCalcNoGroup/view/baseMap') opts = [ "--layoutInputFile", os.path.join(inDir, 'similarity.tab'), "--layoutInputFormat", 'sparseSimilarity', "--layoutName", "layout", "--role", "myRole", "--outputDirectory", outDir, "--noLayoutIndependentStats", "--noLayoutAwareStats" ] util.removeOldOutFiles(outDir) layout.main(opts) util.compareActualVsExpectedFile(s, 'meta.json', expMetaDir, outDir)
def test_xy_no_atts(s): outDir = outDirBase + '_xy_no_atts/' opts = [ "--coordinates", coordDataFile, "--names", "layout", "--directory", outDir, "--include-singletons", "--no_layout_independent_stats", "--no_layout_aware_stats" ] util.removeOldOutFiles(outDir) layout.main(opts) util.compareActualVsExpectedDir(s, expNoAttsDir, outDir, excludeFiles=[ 'log', 'mapMeta.json', 'neighbors_0.tab', 'assignments0.tab', 'hexNames.tab', 'xyPreSquiggle_0.tab' ]) util.compareActualVsExpectedFile(s, 'assignments0.tab', expXyDir, outDir) util.compareActualVsExpectedFile(s, 'xyPreSquiggle_0.tab', expXyDir, outDir)
def test_xy_no_atts(s): outDir = outDirBase + 'xy_no_atts' expDir = testDir + 'exp/layoutBasicNoAtts/' #check that it is mostly the same as the other files util.compareActualVsExpectedDir(s, expDir, outDir, excludeFiles=[ 'log', 'neighbors_0.tab', 'assignments0.tab', 'hexNames.tab', 'xyPreSquiggle_0.tab' ]) # These files for xy coords are not expected to be the same as other # runs, but to make sure they are correct we have but previous runs in a # different expected directory. util.compareActualVsExpectedFile(s, '/neighbors_0.tab', expXyDir, outDir) util.compareActualVsExpectedFile(s, '/assignments0.tab', expXyDir, outDir) util.compareActualVsExpectedFile(s, '/xyPreSquiggle_0.tab', expXyDir, outDir)