Browse Source

umap center radius!!!! FML

main
Michael Pilosov, PhD 9 months ago
parent
commit
cff4b6a4d2
  1. 2
      makefile
  2. 4
      scripts/sortcolor.py
  3. 2
      scripts/vips_composite.py

2
makefile

@ -59,7 +59,7 @@ sort_umap:
python scripts/sortcolor.py -s umap --dpi 300 --seed 21 python scripts/sortcolor.py -s umap --dpi 300 --seed 21
parallel_umap: parallel_umap:
parallel -j 12 python scripts/sortcolor.py -s umap --dpi 300 --seed ::: $$(seq 1 100) parallel -j 4 python scripts/sortcolor.py -s umap --dpi 300 --seed ::: $$(seq 1 100)
parallel_check: parallel_check:
parallel -j 4 python check.py -v ::: $$(seq 0 99) parallel -j 4 python check.py -v ::: $$(seq 0 99)

4
scripts/sortcolor.py

@ -15,7 +15,7 @@ rgb_values = [mcolors.to_rgb(mcolors.XKCD_COLORS[color]) for color in colors]
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument("-s", "--sort-by", type=str, default="hsv", help="kind of sorting") parser.add_argument("-s", "--sort-by", type=str, default="hsv", help="kind of sorting")
parser.add_argument("--seed", type=int, default=21, help="seed for UMAP") parser.add_argument("--seed", type=int, default=21, help="seed for UMAP")
parser.add_argument("--dpi", type=int, default=100, help="dpi for saving") parser.add_argument("--dpi", type=int, default=300, help="dpi for saving")
parser.add_argument("--size", type=float, default=6.0, help="size of figure") parser.add_argument("--size", type=float, default=6.0, help="size of figure")
parser.add_argument( parser.add_argument(
"--fontsize", "--fontsize",
@ -24,7 +24,7 @@ parser.add_argument(
help="fontsize of annotation (default: 0 = None)", help="fontsize of annotation (default: 0 = None)",
) )
parser.add_argument( parser.add_argument(
"--radius", type=float, default=1 / 3, help="inner radius of circle" "--radius", type=float, default=1 / 2, help="inner radius of circle"
) )
args = parser.parse_args() args = parser.parse_args()
KIND = args.sort_by KIND = args.sort_by

2
scripts/vips_composite.py

@ -62,7 +62,7 @@ def create_grid_composite(
if __name__ == "__main__": if __name__ == "__main__":
# Example usage # Example usage
# experiment = "umap" # experiment = "umap"
experiment = "supervised" experiment = "unsupervised-anchors"
# directory = "/teamspace/studios/this_studio/out_sortcolors/{experiment}/" # Change to your directory path # directory = "/teamspace/studios/this_studio/out_sortcolors/{experiment}/" # Change to your directory path
directory = f"/teamspace/studios/this_studio/colors/colors-refactor-{experiment}/" # Change to your directory path directory = f"/teamspace/studios/this_studio/colors/colors-refactor-{experiment}/" # Change to your directory path
k = 10 k = 10

Loading…
Cancel
Save