Add remaining results batch 0
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
Files changed (50)
- .gitattributes+91
- results/calib_heldout.jsonAdded+632
- results/calib_heldout/README.mdAdded+55
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/cryoDRGN_figures.ipynbAdded+519
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/cryoDRGN_filtering.ipynbAdded+1113
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/cryoDRGN_viz.ipynbAdded+522
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/centers.txtAdded+20
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/centers_ind.txtAdded+20
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/labels.pklAdded+3
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/umap.pngAdded
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/umap_hex.pngAdded
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_001.mrcAdded+3
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_002.mrcAdded+3
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_003.mrcAdded+3
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_004.mrcAdded+3
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_005.mrcAdded+3
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_006.mrcAdded+3
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_007.mrcAdded+3
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_008.mrcAdded+3
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_009.mrcAdded+3
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_010.mrcAdded+3
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_011.mrcAdded+3
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_012.mrcAdded+3
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_013.mrcAdded+3
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_014.mrcAdded+3
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_015.mrcAdded+3
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_016.mrcAdded+3
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_017.mrcAdded+3
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_018.mrcAdded+3
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_019.mrcAdded+3
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_020.mrcAdded+3
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/z_pca.pngAdded
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/z_pca_hex.pngAdded
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/z_values.txtAdded+20
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/learning_curve_epoch20.pngAdded
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/pca_traversal.pngAdded
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/pca_traversal_hex.pngAdded
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/umap.pngAdded
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/umap_traversal.pngAdded
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/umap_traversal_connected.pngAdded
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/vol_001.mrcAdded+3
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/vol_002.mrcAdded+3
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/vol_003.mrcAdded+3
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/vol_004.mrcAdded+3
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/vol_005.mrcAdded+3
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/vol_006.mrcAdded+3
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/vol_007.mrcAdded+3
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/vol_008.mrcAdded+3
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/vol_009.mrcAdded+3
- results/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/vol_010.mrcAdded+3
31597 unmodified lines3159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131597 unmodified linesresults/calib_s0.05_n100k_v0/level1r_class02.mrc filter=lfs diff=lfs merge=lfs -textresults/calib_s0.05_n100k_v0/level1r_class03.mrc filter=lfs diff=lfs merge=lfs -textlogs/hf_upload_pose_full.log filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_001.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_002.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_003.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_004.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_005.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_006.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_007.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_008.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_009.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_010.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_011.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_012.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_013.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_014.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_015.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_016.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_017.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_018.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_019.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_020.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/vol_001.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/vol_002.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/vol_003.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/vol_004.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/vol_005.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/vol_006.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/vol_007.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/vol_008.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/vol_009.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/vol_010.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/pc2/vol_001.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/pc2/vol_002.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/pc2/vol_003.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/pc2/vol_004.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/pc2/vol_005.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/pc2/vol_006.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/pc2/vol_007.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/pc2/vol_008.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/pc2/vol_009.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t1/analyze.20/pc2/vol_010.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/kmeans20/vol_001.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/kmeans20/vol_002.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/kmeans20/vol_003.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/kmeans20/vol_004.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/kmeans20/vol_005.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/kmeans20/vol_006.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/kmeans20/vol_007.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/kmeans20/vol_008.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/kmeans20/vol_009.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/kmeans20/vol_010.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/kmeans20/vol_011.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/kmeans20/vol_012.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/kmeans20/vol_013.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/kmeans20/vol_014.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/kmeans20/vol_015.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/kmeans20/vol_016.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/kmeans20/vol_017.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/kmeans20/vol_018.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/kmeans20/vol_019.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/kmeans20/vol_020.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/pc1/vol_001.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/pc1/vol_002.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/pc1/vol_003.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/pc1/vol_004.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/pc1/vol_005.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/pc1/vol_006.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/pc1/vol_007.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/pc1/vol_008.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/pc1/vol_009.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/pc1/vol_010.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/pc2/vol_001.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/pc2/vol_002.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/pc2/vol_003.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/pc2/vol_004.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/pc2/vol_005.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/pc2/vol_006.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/pc2/vol_007.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/pc2/vol_008.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/pc2/vol_009.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r0t2/analyze.20/pc2/vol_010.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r10t0/analyze.20/kmeans20/vol_001.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r10t0/analyze.20/kmeans20/vol_002.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r10t0/analyze.20/kmeans20/vol_003.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r10t0/analyze.20/kmeans20/vol_004.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r10t0/analyze.20/kmeans20/vol_005.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r10t0/analyze.20/kmeans20/vol_006.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r10t0/analyze.20/kmeans20/vol_007.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r10t0/analyze.20/kmeans20/vol_008.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r10t0/analyze.20/kmeans20/vol_009.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r10t0/analyze.20/kmeans20/vol_010.mrc filter=lfs diff=lfs merge=lfs -textresults/cryodrgn_pn_igg1d_r10t0/analyze.20/kmeans20/vol_011.mrc filter=lfs diff=lfs merge=lfs -text123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632{ "calibration": { "calib_s0.005_n100k": { "n_species": 2, "fp_real": { "0.1": 0.13213750000000002, "0.05": 0.06570000000000001, "0.02": 0.024599999999999997, "0.01": 0.012212500000000001, "0.005": 0.00605, "0.001": 0.0011375 }, "fp_null": { "0.1": 0.19332499999999997, "0.05": 0.1034, "0.02": 0.04455, "0.01": 0.0234, "0.005": 0.0122375, "0.001": 0.0024999999999999996 }, "n_static_domains": 4, "detect_at_0.01": { "arm": 0.21281372784860877, "block2": 0.12495300162927685, "block3": 0.1837485370339408 } }, "calib_s0.005_n20k": { "n_species": 2, "fp_real": { "0.1": 0.09855122258489378, "0.05": 0.043119738876481704, "0.02": 0.01534673309282483, "0.01": 0.007444310828609059, "0.005": 0.0038939472026570457, "0.001": 0.0012025425184676172 }, "fp_null": { "0.1": 0.19234953902536792, "0.05": 0.1028460172937067, "0.02": 0.043234266735383386, "0.01": 0.023535475004294797, "0.005": 0.012769856267537079, "0.001": 0.0029777243314436236 }, "n_static_domains": 3, "detect_at_0.01": { "arm": 0.21505009107468123, "block2": 0.09124407790840498, "block3": 0.1618374558303887 } }, "calib_s0.005_n50k": { "n_species": 2, "fp_real": { "0.1": 0.12371308588458413, "0.05": 0.06024790029802221, "0.02": 0.022571796261175833, "0.01": 0.010532376049850987, "0.005": 0.005181522622595503, "0.001": 0.001083717149823896 }, "fp_null": { "0.1": 0.19452722839338932, "0.05": 0.10493429964779193, "0.02": 0.04466946626930371, "0.01": 0.023503115686805746, "0.005": 0.012378081820644812, "0.001": 0.002624627472229748 }, "n_static_domains": 4, "detect_at_0.01": { "arm": 0.21857268440821545, "block2": 0.09112559538731511, "block3": 0.10992493744787322 } }, "calib_s0.01_n100k": { "n_species": 2, "fp_real": { "0.1": 0.13286666666666666, "0.05": 0.06596666666666667, "0.02": 0.02573333333333333, "0.01": 0.011916666666666666, "0.005": 0.005533333333333334, "0.001": 0.0012166666666666665 }, "fp_null": { "0.1": 0.20466666666666666, "0.05": 0.10971666666666667, "0.02": 0.0472, "0.01": 0.024566666666666667, "0.005": 0.012633333333333335, "0.001": 0.00265 }, "n_static_domains": 3, "detect_at_0.01": { "arm": 0.47183098591549294, "block2": 0.24220321931589536, "block3": 0.33883622098725075 } }, "calib_s0.01_n20k": { "n_species": 2, "fp_real": { "0.1": 0.10412036245512053, "0.05": 0.04992306377158489, "0.02": 0.017609847837237135, "0.01": 0.008847666267738075, "0.005": 0.004530689006667806, "0.001": 0.0004701658403145837 }, "fp_null": { "0.1": 0.20512053342451703, "0.05": 0.11074542656864421, "0.02": 0.04684561463498034, "0.01": 0.024534108394597368, "0.005": 0.01303641648144982, "0.001": 0.002735510343648487 }, "n_static_domains": 4, "detect_at_0.01": { "arm": 0.4422333409142597, "block2": 0.22707192083406963, "block3": 0.36486807701449964 } }, "calib_s0.01_n50k": { "n_species": 2, "fp_real": { "0.1": 0.11124598197226156, "0.05": 0.05116101332973678, "0.02": 0.01867961426933711, "0.01": 0.008339514914469395, "0.005": 0.003978690403938229, "0.001": 0.0006518758288938342 }, "fp_null": { "0.1": 0.20419448378177896, "0.05": 0.11007710117562435, "0.02": 0.04747454312495786, "0.01": 0.024816238451682515, "0.005": 0.01294760267044305, "0.001": 0.0028098096073010093 }, "n_static_domains": 3, "detect_at_0.01": { "arm": 0.4415097350781998, "block2": 0.2867212083071114, "block3": 0.36199095022624433 } }, "calib_s0.02_n100k": { "n_species": 2, "fp_real": { "0.1": 0.13598749999999998, "0.05": 0.0666875, "0.02": 0.0249125, "0.01": 0.012125, "0.005": 0.0064375000000000005, "0.001": 0.0013 }, "fp_null": { "0.1": 0.2129875, "0.05": 0.11485, "0.02": 0.0499, "0.01": 0.026049999999999997, "0.005": 0.013525, "0.001": 0.0028125 }, "n_static_domains": 4, "detect_at_0.01": { "arm": 0.6217501585288523, "block2": 0.3517044040806171, "block3": 0.42405277401894453 } }, "calib_s0.02_n20k": { "n_species": 2, "fp_real": { "0.1": 0.0861244019138756, "0.05": 0.03691045796308954, "0.02": 0.013157894736842105, "0.01": 0.005126452494873548, "0.005": 0.0017088174982911825, "0.001": 0.0005126452494873548 }, "fp_null": { "0.1": 0.19412166780587833, "0.05": 0.10133287764866712, "0.02": 0.043574846206425155, "0.01": 0.02238550922761449, "0.005": 0.01281613123718387, "0.001": 0.002563226247436774 }, "n_static_domains": 1, "detect_at_0.01": { "arm": 0.6155070486584812, "block2": 0.41839080459770117, "block3": 0.496550083273852 } }, "calib_s0.02_n50k": { "n_species": 2, "fp_real": { "0.1": 0.12411840064729285, "0.05": 0.058040590654709734, "0.02": 0.021117928662935742, "0.01": 0.010046524172341717, "0.005": 0.004814240442316769, "0.001": 0.0009035129121434832 }, "fp_null": { "0.1": 0.21356617894949767, "0.05": 0.11488099251567663, "0.02": 0.048938035196547776, "0.01": 0.025837772233834537, "0.005": 0.013606634751533949, "0.001": 0.002939788281302677 }, "n_static_domains": 5, "detect_at_0.01": { "arm": 0.6046213093709885, "block2": 0.36896248902270734, "block3": 0.4725477067291597 } }, "calib_s0.05_n100k": { "n_species": 2, "fp_real": { "0.1": 0.137, "0.05": 0.0641, "0.02": 0.023775, "0.01": 0.011162499999999999, "0.005": 0.005125, "0.001": 0.0009125000000000001 }, "fp_null": { "0.1": 0.2190875, "0.05": 0.11776249999999999, "0.02": 0.049824999999999994, "0.01": 0.026250000000000002, "0.005": 0.0137625, "0.001": 0.0029375 }, "n_static_domains": 4, "detect_at_0.01": { "arm": 0.6672479391249208, "block2": 0.39026226628184213, "block3": 0.47996702390766693 } }, "calib_s0.05_n20k": { "n_species": 2, "fp_real": { "0.1": 0.09671907040328093, "0.05": 0.04329004329004329, "0.02": 0.014866712235133287, "0.01": 0.0066643882433356115, "0.005": 0.002961950330371383, "0.001": 0.0007974481658692185 }, "fp_null": { "0.1": 0.21679197994987467, "0.05": 0.11574390521758943, "0.02": 0.050694919115971744, "0.01": 0.02608794714057872, "0.005": 0.013955342902711323, "0.001": 0.0031897926634768745 }, "n_static_domains": 3, "detect_at_0.01": { "arm": 0.6808776716689404, "block2": 0.3853227232537577, "block3": 0.5284320723292886 } }, "calib_s0.05_n50k": { "n_species": 2, "fp_real": { "0.1": 0.14139302811678242, "0.05": 0.06547097296203898, "0.02": 0.021104443395590318, "0.01": 0.010046524172341717, "0.005": 0.004719843570898793, "0.001": 0.0007416897039983817 }, "fp_null": { "0.1": 0.193243881059942, "0.05": 0.1013417841008698, "0.02": 0.04193918144427213, "0.01": 0.021913559436315826, "0.005": 0.010653361202885847, "0.001": 0.0024947744589036477 }, "n_static_domains": 1, "detect_at_0.01": { "arm": 0.6986521181001284, "block2": 0.34462426295320536, "block3": 0.493806494810847 } } }, "heldout": { "heldout_g1": { "n_species": 1, "true_species": 2, "ari": null, "species": [ { "run": "heldout_g1", "species": "mixed", "domains": [], "note": "no moving domain found -> static", "all_correct": false, "missed_blocks": [ "arm (hinge)", "block 2", "block 3" ] } ] }, "heldout_g2": { "n_species": 2, "true_species": 2, "ari": null, "species": [ { "run": "heldout_g2_class0", "species": "A", "domains": [ { "domain": 1, "truth": "core (63%)", "expected": "static", "decision": [ "disorder" ], "correct": false, "frac_non_rest": 0.1408, "null_fp": 0.025900000000000034 }, { "domain": 2, "truth": "block 2 (81%)", "expected": "compositional", "decision": [ "compositional" ], "correct": true, "frac_non_rest": 0.14295, "null_fp": 0.020449999999999968 }, { "domain": 3, "truth": "arm (hinge) (94%)", "expected": "conformational", "decision": [ "conformational" ], "correct": true, "frac_non_rest": 0.1714, "null_fp": 0.021399999999999975 } ], "missed_blocks": [ "block 3" ], "bead_gt_median_dist_A": 2.9076875524711436, "all_correct": false }, { "run": "heldout_g2_class1", "species": "B", "domains": [ { "domain": 1, "truth": "rigid body", "expected": "static", "decision": [ "static" ], "correct": true, "frac_non_rest": 0.009169981794889084, "null_fp": 0.025015170925763552 } ], "missed_blocks": [], "bead_gt_median_dist_A": null, "all_correct": true } ] }, "heldout_g3": { "n_species": 2, "true_species": 2, "ari": null, "species": [ { "run": "heldout_g3_class0", "species": "A", "domains": [ { "domain": 1, "truth": "block 2 (68%)", "expected": "compositional", "decision": [ "compositional" ], "correct": true, "frac_non_rest": 0.26595, "null_fp": 0.023599999999999954 }, { "domain": 2, "truth": "block 3 (80%)", "expected": "compositional", "decision": [ "compositional", "conformational" ], "correct": true, "frac_non_rest": 0.1994, "null_fp": 0.01805000000000001 }, { "domain": 3, "truth": "arm (hinge) (80%)", "expected": "conformational", "decision": [ "conformational" ], "correct": true, "frac_non_rest": 0.10845, "null_fp": 0.018549999999999955 } ], "missed_blocks": [], "bead_gt_median_dist_A": 2.8803216920668224, "all_correct": true }, { "run": "heldout_g3_class1", "species": "B", "domains": [ { "domain": 1, "truth": "rigid body", "expected": "static", "decision": [ "static" ], "correct": true, "frac_non_rest": 0.00876542377452633, "null_fp": 0.02467803924212797 }, { "domain": 2, "truth": "rigid body", "expected": "static", "decision": [ "static" ], "correct": true, "frac_non_rest": 0.005596385948351426, "null_fp": 0.024610612905400897 } ], "missed_blocks": [], "bead_gt_median_dist_A": null, "all_correct": true } ] }, "heldout_g4": { "n_species": 2, "true_species": 2, "ari": null, "species": [ { "run": "heldout_g4_class0", "species": "B", "domains": [ { "domain": 1, "truth": "rigid body", "expected": "static", "decision": [ "static" ], "correct": true, "frac_non_rest": 0.01429438338615063, "null_fp": 0.02717281370103164 }, { "domain": 2, "truth": "rigid body", "expected": "static", "decision": [ "static" ], "correct": true, "frac_non_rest": 0.012339019621063988, "null_fp": 0.024880318252309297 }, { "domain": 3, "truth": "rigid body", "expected": "static", "decision": [ "static" ], "correct": true, "frac_non_rest": 0.01213674061088261, "null_fp": 0.023801496864675364 } ], "missed_blocks": [], "bead_gt_median_dist_A": null, "all_correct": true }, { "run": "heldout_g4_class1", "species": "A", "domains": [], "note": "no moving domain found -> static", "all_correct": false, "missed_blocks": [ "arm (hinge)", "block 2", "block 3" ] } ] }, "heldout_g5": { "n_species": 2, "true_species": 2, "ari": null, "species": [ { "run": "heldout_g5_class0", "species": "B", "domains": [ { "domain": 1, "truth": "rigid body", "expected": "static", "decision": [ "static" ], "correct": true, "frac_non_rest": 0.009035129121434832, "null_fp": 0.02521744993594499 }, { "domain": 2, "truth": "rigid body", "expected": "static", "decision": [ "static" ], "correct": true, "frac_non_rest": 0.006405501989076933, "null_fp": 0.025622007956307757 }, { "domain": 3, "truth": "rigid body", "expected": "static", "decision": [ "static" ], "correct": true, "frac_non_rest": 0.014024678039242127, "null_fp": 0.026498550333760362 } ], "missed_blocks": [], "bead_gt_median_dist_A": null, "all_correct": true }, { "run": "heldout_g5_class1", "species": "A", "domains": [ { "domain": 1, "truth": "core (97%)", "expected": "static", "decision": [ "static" ], "correct": true, "frac_non_rest": 0.0199, "null_fp": 0.026100000000000012 }, { "domain": 2, "truth": "block 2 (77%)", "expected": "compositional", "decision": [ "compositional", "conformational" ], "correct": true, "frac_non_rest": 0.3217, "null_fp": 0.023249999999999993 }, { "domain": 3, "truth": "arm (hinge) (99%)", "expected": "conformational", "decision": [ "conformational" ], "correct": true, "frac_non_rest": 0.2758, "null_fp": 0.01715 } ], "missed_blocks": [ "block 3" ], "bead_gt_median_dist_A": 2.9518731554525393, "all_correct": false } ] } }}12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455# 校准网格与冻结阈值测试(2026-11-08)
作业:`scripts/run_calib_heldout.sh`(阵列 58771512,17 个任务,每个 1 张 H100)。评分:`scripts/calib_heldout_eval.py` → `results/calib_heldout.json`。所有阈值与论文完全相同,没有任何调整。合成数据由 `scripts/make_synth_hier.py` 生成:- 物种 A:核心 + 铰链臂 + 两个占位块;- 物种 B:没有任何内部变化的刚体,占 30%。
## 1. 校准曲线(12 个数据集:4 档 SNR × 3 档颗粒数,默认几何)
- **怎么算**:在每个名义水平 α 下,用零假设图像上每种解释得分的 1−α 分位数作阈值,和论文中 α=0.01 的做法相同。- **真值静止的部分**:物种 B 的所有结构域,以及物种 A 的核心。- **"实际"**:真实图像上被标为非静止的比例,也就是实际假阳性率。- **"零假设"**:零假设图像上被标为非静止的比例,是方法用来对照的参考值。它高于 α,是因为每个颗粒要在 4 种解释里取最大值。- **检出率**:铰链臂取 |角度| > 15° 的颗粒,看有多少被标为转动;块 2 和块 3 取缺失该块的颗粒,看有多少被标为占位变化。
| SNR | 颗粒数 | 静止结构域数 | α=0.05 实际 / 零假设 | α=0.01 实际 / 零假设 | α=0.001 实际 / 零假设 | 检出率 铰链 / 块2 / 块3(α=0.01) ||---|---|---|---|---|---|---|| 0.005 | 20k | 3 | 4.3% / 10.3% | 0.7% / 2.4% | 0.1% / 0.3% | 21.5% / 9.1% / 16.2% || 0.005 | 50k | 4 | 6.0% / 10.5% | 1.1% / 2.4% | 0.1% / 0.3% | 21.9% / 9.1% / 11.0% || 0.005 | 100k | 4 | 6.6% / 10.3% | 1.2% / 2.3% | 0.1% / 0.2% | 21.3% / 12.5% / 18.4% || 0.01 | 20k | 4 | 5.0% / 11.1% | 0.9% / 2.5% | 0.0% / 0.3% | 44.2% / 22.7% / 36.5% || 0.01 | 50k | 3 | 5.1% / 11.0% | 0.8% / 2.5% | 0.1% / 0.3% | 44.2% / 28.7% / 36.2% || 0.01 | 100k | 3 | 6.6% / 11.0% | 1.2% / 2.5% | 0.1% / 0.3% | 47.2% / 24.2% / 33.9% || 0.02 | 20k | 1 | 3.7% / 10.1% | 0.5% / 2.2% | 0.1% / 0.3% | 61.6% / 41.8% / 49.7% || 0.02 | 50k | 5 | 5.8% / 11.5% | 1.0% / 2.6% | 0.1% / 0.3% | 60.5% / 36.9% / 47.3% || 0.02 | 100k | 4 | 6.7% / 11.5% | 1.2% / 2.6% | 0.1% / 0.3% | 62.2% / 35.2% / 42.4% || 0.05 | 20k | 3 | 4.3% / 11.6% | 0.7% / 2.6% | 0.1% / 0.3% | 68.1% / 38.5% / 52.8% || 0.05 | 50k | 1 | 6.5% / 10.1% | 1.0% / 2.2% | 0.1% / 0.2% | 69.9% / 34.5% / 49.4% || 0.05 | 100k | 4 | 6.4% / 11.8% | 1.1% / 2.6% | 0.1% / 0.3% | 66.7% / 39.0% / 48.0% |
**结论**- **假阳性率没有超标**:在所有 SNR 和颗粒数下,真实静止颗粒的假阳性率都不高于零假设参考值,而且在 α=0.01 时为 0.5–1.2%,不超过名义水平。也就是说,校准是保守的。- **低 SNR 下判为静止,不代表真的没动**:检出率随 SNR 明显上升,铰链从 21%(SNR 0.005)升到 44%、61%、68%;颗粒数对检出率几乎没有影响。
## 2. 冻结阈值测试(5 个没见过的几何构型,SNR 0.02,5 万颗粒)
| 构型 | 第 1 层物种数(真值 2) | 物种 B(真值:静止) | 物种 A:核心(真值:静止) | 物种 A:铰链臂(真值:构象) | 物种 A:块 2(真值:组成) | 物种 A:块 3(真值:组成) ||---|---|---|---|---|---|---|| g1 | 1 | ✗ 与 A 合并 | – | ✗ 未发现 | ✗ 未发现 | ✗ 未发现 || g2 | 2 | ✓ 静止 | ✗ 无序(63% 珠子) | ✓ 构象(94% 珠子) | ✓ 组成(81% 珠子) | ✗ 未发现 || g3 | 2 | ✓ 静止 | 参照体(静止) | ✓ 构象(80% 珠子) | ✓ 组成(68% 珠子) | ✓ 组成+构象(80% 珠子) || g4 | 2 | ✓ 静止 | – | ✗ 未发现 | ✗ 未发现 | ✗ 未发现 || g5 | 2 | ✓ 静止 | ✓ 静止(97% 珠子) | ✓ 构象(99% 珠子) | ✓ 组成+构象(77% 珠子) | ✗ 未发现 |
- **第 1 层**:5 个里 4 个正确。g1 的两个物种在随机几何下太像(类间密度相关 0.79,超过冻结阈值 0.70),被合并成一个物种。- **物种 B(刚体)**:判对的 4 个构型里,全部判为静止,没有一个假阳性。- **物种 A**: - g3 完全正确。 - g2 和 g5 的铰链和块 2 判对了,但块 3 没被找到;g2 还有一个以核心为主(63% 珠子)的结构域被判为"无序"。 - g4 一个可动结构域都没找到。- **所有被找到的结构域**:18 个里 17 个判定正确:B 的 9 个全对,A 的 9 个对了 8 个,唯一判错的是 g2 的那个核心结构域。- **错误类型**:主要是漏检(结构域没被发现),而不是误判。
## 附:修复以前第 2 层找不到可动结构域时,刚体步骤会直接报错退出。现在改为把这个物种记为"静止",见 `scripts/run_hier.sh`。这只是让结论能被记录下来,不改变任何判定。g1 和 g4 已按新逻辑补完。123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519{ "cells": [ { "cell_type": "markdown", "id": "12d6bdad", "metadata": {}, "source": [ "# CryoDRGN visualization and figures\n", "\n", "This jupyter notebook provides a template for regenerating and customizing cryoDRGN visualizations and figures" ] }, { "cell_type": "code", "execution_count": null, "id": "b98dcf23", "metadata": {}, "outputs": [], "source": [ "from cryodrgn import analysis\n", "from cryodrgn import utils\n", "\n", "import numpy as np\n", "import matplotlib.pyplot as plt\n", "import seaborn as sns" ] }, { "cell_type": "markdown", "id": "47ec8987", "metadata": {}, "source": [ "### Load results" ] }, { "cell_type": "code", "execution_count": null, "id": "829f0e1d", "metadata": {}, "outputs": [], "source": [ "# Specify the workdir and the epoch number (1-based index) to analyze\n", "WORKDIR = '..' \n", "EPOCH = 20 # change me if necessary!" ] }, { "cell_type": "code", "execution_count": null, "id": "551cc751", "metadata": {}, "outputs": [], "source": [ "# Load z\n", "z = utils.load_pkl(f'{WORKDIR}/z.{EPOCH}.pkl')\n", "umap = utils.load_pkl(f'{WORKDIR}/analyze.{EPOCH}/umap.pkl')" ] }, { "cell_type": "markdown", "id": "83324d44-767e-47e2-a3c7-cab9b430fab5", "metadata": {}, "source": [ "# Plot learning curve" ] }, { "cell_type": "code", "execution_count": null, "id": "b6ba1e22-696c-4c46-a2de-48c386ef8526", "metadata": {}, "outputs": [], "source": [ "loss = analysis.parse_loss(f'{WORKDIR}/run.log')\n", "plt.figure(figsize=(4, 4))\n", "plt.plot(loss)\n", "plt.xlabel(\"Epoch\")\n", "plt.ylabel(\"Loss\")\n", "plt.axvline(x=EPOCH, linestyle=\"--\", color=\"black\", label=f\"Epoch {EPOCH}\")\n", "plt.legend()\n", "plt.tight_layout()\n", "#plt.savefig(f\"{WORKDIR}/analyze.{EPOCH}/learning_curve_epoch{EPOCH}.png\")" ] }, { "cell_type": "markdown", "id": "9cce7848", "metadata": {}, "source": [ "# Plot PCA\n", "\n", "Visualize the latent space by principal component analysis (PCA)." ] }, { "cell_type": "code", "execution_count": null, "id": "81518fa1", "metadata": {}, "outputs": [], "source": [ "pc, pca = analysis.run_pca(z)" ] }, { "cell_type": "code", "execution_count": null, "id": "a441bce1", "metadata": {}, "outputs": [], "source": [ "# Style 1 -- Scatter\n", "\n", "plt.figure(figsize=(4,4))\n", "plt.scatter(pc[:,0], pc[:,1], alpha=.1, s=1,rasterized=True)\n", "plt.xlabel('PC1 ({:.2f})'.format(pca.explained_variance_ratio_[0]))\n", "plt.ylabel('PC2 ({:.2f})'.format(pca.explained_variance_ratio_[1]))\n", "#plt.savefig('pca_style1.pdf')" ] }, { "cell_type": "code", "execution_count": null, "id": "7fe803e6", "metadata": {}, "outputs": [], "source": [ "# Style 2 -- Scatter with marginals\n", "\n", "g = sns.jointplot(x=pc[:,0], y=pc[:,1], alpha=.1, s=1,rasterized=True, height=4)\n", "g.ax_joint.set_xlabel('PC1 ({:.2f})'.format(pca.explained_variance_ratio_[0]))\n", "g.ax_joint.set_ylabel('PC2 ({:.2f})'.format(pca.explained_variance_ratio_[1]))\n", "#plt.savefig('pca_style2.pdf')" ] }, { "cell_type": "code", "execution_count": null, "id": "d27280eb", "metadata": {}, "outputs": [], "source": [ "# Style 3 -- Hexbin/heatmap\n", "\n", "try:\n", " g = sns.jointplot(x=pc[:,0], y=pc[:,1], height=4, kind='hex')\n", "except ZeroDivisionError:\n", " print(\"Data too small to produce hexbins!\")\n", "plt.xlabel('PC1 ({:.2f})'.format(pca.explained_variance_ratio_[0]))\n", "plt.ylabel('PC2 ({:.2f})'.format(pca.explained_variance_ratio_[1]))\n", "#plt.savefig('pca_style3.pdf')" ] }, { "cell_type": "markdown", "id": "cea11ef1", "metadata": {}, "source": [ "# Plot UMAP\n", "\n", "Visualize the latent space by Uniform Manifold Approximation and Projection (UMAP). " ] }, { "cell_type": "code", "execution_count": null, "id": "feb9a1d1", "metadata": {}, "outputs": [], "source": [ "# Style 1 -- Scatter\n", "\n", "plt.figure(figsize=(4,4))\n", "plt.scatter(umap[:,0], umap[:,1], alpha=.1, s=1,rasterized=True)\n", "plt.xticks([])\n", "plt.yticks([])\n", "plt.xlabel('UMAP1')\n", "plt.ylabel('UMAP2')\n", "#plt.savefig('umap_style1.pdf')" ] }, { "cell_type": "code", "execution_count": null, "id": "8e5dd8a8", "metadata": {}, "outputs": [], "source": [ "# Style 2 -- Scatter with marginal distributions\n", "\n", "g = sns.jointplot(x=umap[:,0], y=umap[:,1], alpha=.1, s=1,rasterized=True, height=4)\n", "g.ax_joint.set_xlabel('UMAP1')\n", "g.ax_joint.set_ylabel('UMAP2')\n", "#plt.savefig('umap_style2.pdf')" ] }, { "cell_type": "code", "execution_count": null, "id": "dc4def2a", "metadata": {}, "outputs": [], "source": [ "# Style 3 -- Hexbin / heatmap\n", "\n", "try:\n", " g = sns.jointplot(x=umap[:,0], y=umap[:,1], kind='hex',height=4)\n", "except ZeroDivisionError:\n", " print(\"Data too small to produce hexbins!\")\n", "g.ax_joint.set_xlabel('UMAP1')\n", "g.ax_joint.set_ylabel('UMAP2')\n", "#plt.savefig('umap_style3.pdf')" ] }, { "cell_type": "markdown", "id": "7cd98f8e", "metadata": {}, "source": [ "# Plot kmeans samples" ] }, { "cell_type": "code", "execution_count": null, "id": "e992fca8", "metadata": {}, "outputs": [], "source": [ "# Load points\n", "KMEANS = 20\n", "kmeans_ind = np.loadtxt(\n", " f'{WORKDIR}/analyze.{EPOCH}/kmeans{KMEANS}/centers_ind.txt', dtype=int\n", ")\n" ] }, { "cell_type": "code", "execution_count": null, "id": "4f176e1f", "metadata": {}, "outputs": [], "source": [ "# Default chimerax color map\n", "colors = analysis._get_chimerax_colors(KMEANS)" ] }, { "cell_type": "code", "execution_count": null, "id": "7f171d81", "metadata": {}, "outputs": [], "source": [ "# Plot kmeans on PCA\n", "\n", "f, ax = plt.subplots(figsize=(4,4))\n", "plt.scatter(pc[:,0], pc[:,1], alpha=.05, s=1,rasterized=True)\n", "plt.scatter(pc[kmeans_ind,0], pc[kmeans_ind,1], c=colors,edgecolor='black')\n", "labels = np.arange(len(kmeans_ind))\n", "centers = pc[kmeans_ind]\n", "for i in labels:\n", " ax.annotate(str(i + 1), centers[i, 0:2] + np.array([0.1, 0.1]))\n", "plt.xlabel('PC1 ({:.2f})'.format(pca.explained_variance_ratio_[0]))\n", "plt.ylabel('PC2 ({:.2f})'.format(pca.explained_variance_ratio_[1]))\n", "#plt.savefig('pca_w_kmeans.pdf')" ] }, { "cell_type": "code", "execution_count": null, "id": "d4071fd5", "metadata": {}, "outputs": [], "source": [ "# Plot kmeans on UMAP\n", "\n", "f, ax = plt.subplots(figsize=(4,4))\n", "plt.scatter(umap[:,0], umap[:,1], alpha=.05, s=1,rasterized=True)\n", "plt.scatter(umap[kmeans_ind,0], umap[kmeans_ind,1], c=colors,edgecolor='black')\n", "labels = np.arange(len(kmeans_ind))\n", "centers = umap[kmeans_ind]\n", "for i in labels:\n", " ax.annotate(str(i + 1), centers[i, 0:2] + np.array([0.1, 0.1]))\n", "plt.xticks([])\n", "plt.yticks([])\n", "plt.xlabel('UMAP1')\n", "plt.ylabel('UMAP2')\n", "#plt.savefig('umap_w_kmeans.pdf')" ] }, { "cell_type": "markdown", "id": "5a3d7052", "metadata": {}, "source": [ "### Plot PC traversals\n", "\n", "Visualize the PC axes traversals. By default, plot the first two PCs." ] }, { "cell_type": "code", "execution_count": null, "id": "c0576ccf", "metadata": {}, "outputs": [], "source": [ "plt.figure(figsize=(4,4))\n", "plt.scatter(pc[:,0], pc[:,1], alpha=.1, s=1,rasterized=True)\n", "\n", "# 10 points, from 5th to 95th percentile of PC1 values\n", "t = np.linspace(np.percentile(pc[:,0],5),np.percentile(pc[:,0],95), 10, endpoint=True)\n", "plt.scatter(t,np.zeros(10),c='cornflowerblue',edgecolor='white')\n", "\n", "plt.xlabel('PC1 ({:.2f})'.format(pca.explained_variance_ratio_[0]))\n", "plt.ylabel('PC2 ({:.2f})'.format(pca.explained_variance_ratio_[1]))" ] }, { "cell_type": "code", "execution_count": null, "id": "de260d19", "metadata": {}, "outputs": [], "source": [ "plt.figure(figsize=(4,4))\n", "plt.scatter(pc[:,0], pc[:,1], alpha=.1, s=1,rasterized=True)\n", "\n", "# 10 points, from 5th to 95th percentile of PC2 values\n", "t = np.linspace(np.percentile(pc[:,1],5),np.percentile(pc[:,1],95),10,endpoint=True)\n", "plt.scatter(np.zeros(10),t,c='cornflowerblue',edgecolor='white')\n", "\n", "plt.xlabel('PC1 ({:.2f})'.format(pca.explained_variance_ratio_[0]))\n", "plt.ylabel('PC2 ({:.2f})'.format(pca.explained_variance_ratio_[1]))" ] }, { "cell_type": "code", "execution_count": null, "id": "aefaacef", "metadata": {}, "outputs": [], "source": [ "g = sns.jointplot(x=pc[:,0], y=pc[:,1], alpha=.1, s=1,rasterized=True, height=4)\n", "\n", "t = np.linspace(np.percentile(pc[:,0],5),np.percentile(pc[:,0],95),10,endpoint=True)\n", "g.ax_joint.scatter(x=t,y=np.zeros(10),c='cornflowerblue',edgecolor='white')\n", "\n", "g.ax_joint.set_xlabel('PC1 ({:.2f})'.format(pca.explained_variance_ratio_[0]))\n", "g.ax_joint.set_ylabel('PC2 ({:.2f})'.format(pca.explained_variance_ratio_[1]))\n", "#plt.savefig('pca_pc1_traversal.pdf')" ] }, { "cell_type": "code", "execution_count": null, "id": "3785ef98", "metadata": {}, "outputs": [], "source": [ "g = sns.jointplot(x=pc[:,0], y=pc[:,1], alpha=.1, s=1,rasterized=True, height=4)\n", "t = np.linspace(np.percentile(pc[:,1],5),np.percentile(pc[:,1],95),10,endpoint=True)\n", "g.ax_joint.scatter(x=np.zeros(10),y=t,c='cornflowerblue',edgecolor='white')\n", "g.ax_joint.set_xlabel('PC1 ({:.2f})'.format(pca.explained_variance_ratio_[0]))\n", "g.ax_joint.set_ylabel('PC2 ({:.2f})'.format(pca.explained_variance_ratio_[1]))\n", "#plt.savefig('pca_pc2_traversal.pdf')" ] }, { "cell_type": "markdown", "id": "2e40a6ef", "metadata": {}, "source": [ "### Plot UMAP \n", "\n", "Plot the PC axes traversal paths in the UMAP visualization of the latent space." ] }, { "cell_type": "code", "execution_count": null, "id": "2a62cc0e", "metadata": {}, "outputs": [], "source": [ "z_pc1 = np.loadtxt('pc1/z_values.txt')" ] }, { "cell_type": "code", "execution_count": null, "id": "5298124f", "metadata": {}, "outputs": [], "source": [ "z_pc1_on_data, pc1_ind = analysis.get_nearest_point(z, z_pc1)\n", "((z_pc1_on_data - z_pc1)**2).sum(axis=1)**.5" ] }, { "cell_type": "code", "execution_count": null, "id": "1ae119ad", "metadata": {}, "outputs": [], "source": [ "plt.figure(figsize=(4,4))\n", "plt.scatter(umap[:,0], umap[:,1], alpha=.05, s=1,rasterized=True)\n", "plt.scatter(umap[pc1_ind,0], umap[pc1_ind,1], c='cornflowerblue',edgecolor='black')\n", "\n", "plt.xticks([])\n", "plt.yticks([])\n", "plt.xlabel('UMAP1')\n", "plt.ylabel('UMAP2')\n", "#plt.savefig('umap_pc1_traversal.pdf')" ] }, { "cell_type": "code", "execution_count": null, "id": "08d1a2a3", "metadata": {}, "outputs": [], "source": [ "plt.figure(figsize=(4,4))\n", "plt.scatter(umap[:,0], umap[:,1], alpha=.05, s=1,rasterized=True)\n", "plt.plot(umap[pc1_ind,0], umap[pc1_ind,1], '--',c='k')\n", "plt.scatter(umap[pc1_ind,0], umap[pc1_ind,1], c='cornflowerblue',edgecolor='black')\n", "\n", "plt.xticks([])\n", "plt.yticks([])\n", "plt.xlabel('UMAP1')\n", "plt.ylabel('UMAP2')\n", "#plt.savefig('umap_pc1_traversal_v2.pdf')" ] }, { "cell_type": "code", "execution_count": null, "id": "d0571e10", "metadata": {}, "outputs": [], "source": [ "z_pc2 = np.loadtxt('pc2/z_values.txt')" ] }, { "cell_type": "code", "execution_count": null, "id": "0eb0c9a0", "metadata": {}, "outputs": [], "source": [ "z_pc2_on_data, pc2_ind = analysis.get_nearest_point(z, z_pc2)\n", "((z_pc2_on_data - z_pc2)**2).sum(axis=1)**.5" ] }, { "cell_type": "code", "execution_count": null, "id": "b355769f", "metadata": {}, "outputs": [], "source": [ "plt.figure(figsize=(4,4))\n", "plt.scatter(umap[:,0], umap[:,1], alpha=.05, s=1,rasterized=True)\n", "plt.scatter(umap[pc2_ind,0], umap[pc2_ind,1], c='cornflowerblue',edgecolor='black')\n", "\n", "plt.xticks([])\n", "plt.yticks([])\n", "plt.xlabel('UMAP1')\n", "plt.ylabel('UMAP2')\n", "#plt.savefig('umap_pc2_traversal.pdf')" ] }, { "cell_type": "code", "execution_count": null, "id": "32a455e8", "metadata": {}, "outputs": [], "source": [ "plt.figure(figsize=(4,4))\n", "plt.scatter(umap[:,0], umap[:,1], alpha=.05, s=1,rasterized=True)\n", "plt.plot(umap[pc2_ind,0], umap[pc2_ind,1], '--',c='k')\n", "plt.scatter(umap[pc2_ind,0], umap[pc2_ind,1], c='cornflowerblue',edgecolor='black')\n", "\n", "plt.xticks([])\n", "plt.yticks([])\n", "plt.xlabel('UMAP1')\n", "plt.ylabel('UMAP2')\n", "#plt.savefig('umap_pc2_traversal_v2.pdf')" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.6" } }, "nbformat": 4, "nbformat_minor": 5}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113{ "cells": [ { "cell_type": "markdown", "metadata": { "scrolled": false }, "source": [ "# CryoDRGN interactive filtering\n", "\n", "This jupyter notebook provides multiple methods for filtering particles based on the latent space, including:\n", "* clustering of the latent space (k-means or Gaussian mixture model)\n", "* outlier detection (Z-score)\n", "* interactive selection with a lasso tool\n", "* selection by UMAP or PC values\n", "\n", "For each method, the selected particles are tracked in the variable, `ind_selected`.\n", "\n", "Once the selection has been finalized, the selected particles are saved as a `index.pkl` file at the end of this notebook. The selected indices can be provided to cryoDRGN with the `--ind` argument to train a new model on a subset of the images or converted to `.star` file format.\n", "\n", "For more information, see the tutorial on [Notion page]." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import numpy as np\n", "import pickle\n", "import subprocess\n", "import os, sys\n", "\n", "from cryodrgn import analysis\n", "from cryodrgn import utils\n", "from cryodrgn import dataset\n", "from cryodrgn import ctf\n", "import cryodrgn.config\n", " \n", "import matplotlib.pyplot as plt\n", "import seaborn as sns\n", "import plotly.graph_objs as go\n", "import plotly.offline as py\n", "from ipywidgets import interact, interactive, HBox, VBox\n", "from scipy.spatial.transform import Rotation as RR\n", "py.init_notebook_mode()\n", "from IPython.display import FileLink, FileLinks" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Enable interactive widgets\n", "!jupyter nbextension enable --py widgetsnbextension" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Load results" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "scrolled": false }, "outputs": [], "source": [ "# Specify the workdir and the epoch number (1-based index) to analyze\n", "WORKDIR = '..' \n", "EPOCH = 20 # change me if necessary!" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "print(os.path.abspath(WORKDIR))" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "scrolled": false }, "outputs": [], "source": [ "# Load z\n", "with open(f'{WORKDIR}/z.{EPOCH}.pkl','rb') as f:\n", " z = pickle.load(f)\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Load UMAP\n", "umap = utils.load_pkl(f'{WORKDIR}/analyze.{EPOCH}/umap.pkl')\n", "# or run UMAP\n", "# umap = analysis.run_umap(z)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Load kmeans\n", "KMEANS = 20\n", "kmeans_labels = utils.load_pkl(f'{WORKDIR}/analyze.{EPOCH}/kmeans{KMEANS}/labels.pkl')\n", "kmeans_centers = np.loadtxt(f'{WORKDIR}/analyze.{EPOCH}/kmeans{KMEANS}/centers.txt')\n", "# Or re-run kmeans with the desired number of classes\n", "#kmeans_labels, kmeans_centers = analysis.cluster_kmeans(z, 20)\n", "\n", "# Get index for on-data cluster center\n", "kmeans_centers, centers_ind = analysis.get_nearest_point(z, kmeans_centers)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Define helper functions" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "def invert_selection(ind_selected):\n", " return np.array(sorted(set(np.arange(len(z))) - set(ind_selected)))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "def combine_selection(ind_sel1, ind_sel2, kind='union'):\n", " assert kind in ('union','intersection')\n", " return analysis.combine_ind(len(z), ind_sel1, ind_sel2, kind)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "def select_clusters(labels, cluster_ids):\n", " return analysis.get_ind_for_cluster(labels, cluster_ids)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "def save_selection(path, index):\n", " if ind_orig is not None:\n", " print('Converting to original .mrcs indices')\n", " print(f\"{index} -- {N_orig} -- {ind_orig}\")\n", " index = analysis.convert_original_indices(index, N_orig, ind_orig)\n", " utils.save_pkl(index, path)\n", " print(f'Wrote {os.path.abspath(path)}')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Load dataset" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Load configuration file\n", "config = cryodrgn.config.load(f'{WORKDIR}/config.yaml')\n", "print(config)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Load poses\n", "if \"poses\" not in config['dataset_args'] or config['dataset_args']['do_pose_sgd']:\n", " pose_pkl = f'{WORKDIR}/pose.{EPOCH}.pkl'\n", " with open(pose_pkl,'rb') as f:\n", " rot, trans = pickle.load(f)\n", "else:\n", " pose_pkl = config['dataset_args']['poses']\n", " rot, trans = utils.load_pkl(pose_pkl)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Convert rotation matrices to euler angles\n", "euler = RR.from_matrix(rot).as_euler('zyz', degrees=True)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Load index filter\n", "ind_orig = config['dataset_args']['ind']\n", "if ind_orig is not None:\n", " ind_orig = utils.load_pkl(ind_orig)\n", " if len(rot) > len(ind_orig):\n", " print(f'Filtering poses from {len(rot)} to {len(ind_orig)}')\n", " rot = rot[ind_orig]\n", " trans = trans[ind_orig]\n", " euler = euler[ind_orig]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# load input particles; we can look at the \n", "particles = dataset.ImageDataset(\n", " config['dataset_args']['particles'], lazy=True, ind=ind_orig,\n", " datadir=config['dataset_args']['datadir']\n", ")\n", "N_orig = particles.src.orig_n\n", "\n", "# particles object can be filtered manually as well\n", "# (e.g. to retrieve individual particles)\n", "\n", "# if ind_orig is not None:\n", "# print(f'Filtering particles from {len(particles)} to {len(ind_orig)}')\n", "# particles = [particles[int(i)][0, ...] for i in ind_orig]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Load CTF\n", "if \"ctf\" in config['dataset_args'] and config['dataset_args']['ctf'] is not None:\n", " ctf_params = utils.load_pkl(config['dataset_args']['ctf'])\n", " if ind_orig is not None:\n", " print(f'Filtering ctf parameters from {len(ctf_params)} to {len(ind_orig)}')\n", " ctf_params = ctf_params[ind_orig]\n", " ctf.print_ctf_params(ctf_params[0])\n", "else:\n", " ctf_params = None\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### View pose distribution" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# rotations\n", "analysis.plot_euler(euler[:,0],euler[:,1], euler[:,2])" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# translations\n", "sns.jointplot(x=trans[:,0],\n", " y=trans[:,1],\n", " kind='hex').set_axis_labels('tx (fraction)','ty (fraction)')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Learning curve" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "loss = analysis.parse_loss(f'{WORKDIR}/run.log')\n", "plt.plot(loss)\n", "plt.xlabel(\"Epoch\")\n", "plt.ylabel(\"Loss\")\n", "plt.axvline(x=EPOCH, linestyle=\"--\", color=\"black\", label=f\"Epoch {EPOCH}\")\n", "plt.legend()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### PCA" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "pc, pca = analysis.run_pca(z)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "g = sns.jointplot(x=pc[:,0], y=pc[:,1], alpha=.1, s=1)\n", "g.set_axis_labels('PC1', 'PC2')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "g = sns.jointplot(x=pc[:,0], y=pc[:,1], kind='hex')\n", "g.set_axis_labels('PC1', 'PC2')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "plt.bar(np.arange(z.shape[1])+1,pca.explained_variance_ratio_)\n", "plt.xticks(np.arange(z.shape[1])+1)\n", "plt.xlabel('PC')\n", "plt.ylabel('explained variance')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### UMAP" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "g = sns.jointplot(x=umap[:,0], y=umap[:,1], alpha=.1, s=1)\n", "g.set_axis_labels('UMAP1', 'UMAP2')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "g = sns.jointplot(x=umap[:,0], y=umap[:,1], kind='hex')\n", "g.set_axis_labels('UMAP1', 'UMAP2')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Filter by clustering\n", "\n", "Select particles based on k-means cluster labels or GMM cluster labels" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### View K-means clusters" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Optionally, re-run kmeans with the desired number of classes\n", "#K = 20\n", "#kmeans_labels, kmeans_centers = analysis.cluster_kmeans(z, K)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "K = len(set(kmeans_labels))\n", "c = pca.transform(kmeans_centers) # transform to view with PCs\n", "analysis.plot_by_cluster(pc[:,0], pc[:,1], K, \n", " kmeans_labels, \n", " centers=c,\n", " annotate=True)\n", "plt.xlabel('PC1')\n", "plt.ylabel('PC2')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "fig, ax = analysis.plot_by_cluster_subplot(pc[:,0], pc[:,1], K, \n", " kmeans_labels)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "analysis.plot_by_cluster(umap[:,0], umap[:,1], K, \n", " kmeans_labels, \n", " centers_ind=centers_ind,\n", " annotate=True)\n", "plt.xlabel('UMAP1')\n", "plt.ylabel('UMAP2')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "fig, ax = analysis.plot_by_cluster_subplot(umap[:,0], umap[:,1], K, \n", " kmeans_labels)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Select particles based on k-means clustering**" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "cluster_ids = [1,3] # set clusters to select, 1 and 3 in this example\n", "ind_selected = select_clusters(kmeans_labels, cluster_ids)\n", "ind_selected_not = invert_selection(ind_selected)\n", "print('Selected indices:')\n", "print(ind_selected)\n", "print('Number of selected points:')\n", "print(len(ind_selected))\n", "print('Number of unselected points:')\n", "print(len(ind_selected_not))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# View PCA\n", "plt.scatter(pc[:,0], pc[:,1], alpha=.1, s=1)\n", "plt.scatter(pc[ind_selected,0], pc[ind_selected,1], alpha=.1, s=1)\n", "plt.xlabel('PC1 ({:.2f})'.format(pca.explained_variance_ratio_[0]))\n", "plt.ylabel('PC2 ({:.2f})'.format(pca.explained_variance_ratio_[1]))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# View umap\n", "plt.scatter(umap[:,0], umap[:,1], alpha=.1, s=1)\n", "plt.scatter(umap[ind_selected,0], umap[ind_selected,1], alpha=.1, s=1)\n", "plt.xlabel('UMAP1')\n", "plt.ylabel('UMAP2')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### GMM-clustering" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "G = 3 # or change to desired cluster number\n", "random_state = np.random.randint(100000) # sample random integer\n", "print(f'Random state: {random_state}')\n", "gmm_labels, gmm_centers = analysis.cluster_gmm(z, G, random_state=random_state)\n", "gmm_centers, gmm_centers_ind = analysis.get_nearest_point(z, gmm_centers)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "analysis.plot_by_cluster(pc[:,0], pc[:,1], G, \n", " gmm_labels, \n", " centers_ind=gmm_centers_ind,\n", " annotate=True)\n", "plt.xlabel('PC1')\n", "plt.ylabel('PC2')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "fig, ax = analysis.plot_by_cluster_subplot(pc[:,0], pc[:,1], G, gmm_labels)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "analysis.plot_by_cluster(umap[:,0], umap[:,1], G, \n", " gmm_labels, \n", " centers_ind=gmm_centers_ind,\n", " annotate=True)\n", "plt.xlabel('UMAP1')\n", "plt.ylabel('UMAP2')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "fig, ax = analysis.plot_by_cluster_subplot(umap[:,0], umap[:,1], G, gmm_labels)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Select particles based on GMM-means clustering**" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "cluster_ids = [0,2] # set clusters to select, 0 and 2 in this example\n", "ind_selected = select_clusters(gmm_labels, cluster_ids)\n", "ind_selected_not = invert_selection(ind_selected)\n", "print('Selected indices:')\n", "print(ind_selected)\n", "print('Number of selected points:')\n", "print(len(ind_selected))\n", "print('Number of unselected points:')\n", "print(len(ind_selected_not))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# View PCA\n", "plt.scatter(pc[:,0], pc[:,1], alpha=.1, s=1)\n", "plt.scatter(pc[ind_selected,0], pc[ind_selected,1], alpha=.1, s=1)\n", "plt.xlabel('PC1 ({:.2f})'.format(pca.explained_variance_ratio_[0]))\n", "plt.ylabel('PC2 ({:.2f})'.format(pca.explained_variance_ratio_[1]))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# View umap\n", "plt.scatter(umap[:,0], umap[:,1], alpha=.1, s=1)\n", "plt.scatter(umap[ind_selected,0], umap[ind_selected,1], alpha=.1, s=1)\n", "plt.xlabel('UMAP1')\n", "plt.ylabel('UMAP2')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Filter outlier particles" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Compute magnitude of latent encodings\n", "znorm = np.sum(z**2,axis=1)**.5" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Distribution of ||z||\n", "sns.distplot(znorm, kde=False)\n", "plt.xlabel('||z||')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# By default, identify particles with ||z|| 2 std deviations above mean\n", "zscore = 2\n", "thresh = znorm.mean()+zscore*znorm.std()\n", "print(f'Mean: {znorm.mean()}, Std: {znorm.std()}, Selected threshold: {thresh}')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "ind_outliers = np.where(znorm >= thresh)[0]\n", "ind_outliers_not = invert_selection(ind_outliers)\n", "\n", "print('Selected indices:')\n", "print(ind_outliers)\n", "print('Number of selected points:')\n", "print(len(ind_outliers))\n", "print('Number of unselected points:')\n", "print(len(ind_outliers_not))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "g = sns.distplot(znorm, kde=False)\n", "plt.axvline(x=thresh)\n", "plt.xlabel('||z||')\n", "plt.title('Magnitude of particle latent encodings')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# View PCA\n", "plt.scatter(pc[:,0], pc[:,1], alpha=.1, s=1)\n", "plt.scatter(pc[ind_outliers,0], pc[ind_outliers,1], alpha=.1, s=1)\n", "plt.xlabel('PC1 ({:.2f})'.format(pca.explained_variance_ratio_[0]))\n", "plt.ylabel('PC2 ({:.2f})'.format(pca.explained_variance_ratio_[1]))\n", "plt.title(f'Particles with ||z|| > {thresh}')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# View UMAP\n", "plt.scatter(umap[:,0], umap[:,1], alpha=.1, s=1)\n", "plt.scatter(umap[ind_outliers,0], umap[ind_outliers,1], alpha=.1, s=1)\n", "plt.xlabel('UMAP1')\n", "plt.ylabel('UMAP2')\n", "plt.title(f'Particles with ||z|| > {thresh}')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Assign variables for viz/saving cells at the end of the notebook\n", "ind_selected = ind_outliers\n", "ind_selected_not = ind_outliers_not" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Interactive visualization\n", "\n", "Interactive visualization of the latent encodings for the trained model. Each point represents a particle image of the dataset. The hover text includes the index of the image in the particle stack. " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Load data into a pandas dataframe\n", "df = analysis.load_dataframe(z=z, \n", " pc=pc, \n", " euler=euler, \n", " trans=trans, \n", " labels=kmeans_labels, \n", " umap=umap,\n", " df1=ctf_params[:,2] if ctf_params is not None else None,\n", " df2=ctf_params[:,3] if ctf_params is not None else None,\n", " dfang=ctf_params[:,4] if ctf_params is not None else None,\n", " phase=ctf_params[:,8] if ctf_params is not None else None,\n", " znorm=znorm)\n", "df.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Interactive selection\n", "\n", "The next two cells contain helper code to select particles using an interactive lasso tool. \n", "\n", "1. In the first cell, select points with the lasso tool. The table widget is dynamically updated with the most recent selection's indices. \n", "2. Then once you've finalized your selection, **run the next cell** to save the particle indices for downstream analysis/viz.\n", "\n", "(Double click to clear selection)\n", "\n", "You can also use our interactive command line tool `cryodrgn filter $WORKDIR` for selecting particles." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "widget, fig, ind_table = analysis.ipy_plot_interactive(df)\n", "VBox((widget,fig,ind_table))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "ind_selected = ind_table.data[0].cells.values[0] # save table values\n", "ind_selected = np.array(ind_selected)\n", "ind_selected_not = invert_selection(ind_selected)\n", "\n", "print('Selected indices:')\n", "print(ind_selected)\n", "print('Number of selected points:')\n", "print(len(ind_selected))\n", "print('Number of unselected points:')\n", "print(len(ind_selected_not))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# View PCA\n", "plt.scatter(pc[:,0], pc[:,1], alpha=.1, s=1)\n", "plt.scatter(pc[ind_selected,0], pc[ind_selected,1], alpha=.1, s=1)\n", "plt.xlabel('PC1 ({:.2f})'.format(pca.explained_variance_ratio_[0]))\n", "plt.ylabel('PC2 ({:.2f})'.format(pca.explained_variance_ratio_[1]))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# View umap\n", "plt.scatter(umap[:,0], umap[:,1], alpha=.1, s=1)\n", "plt.scatter(umap[ind_selected,0], umap[ind_selected,1], alpha=.1, s=1)\n", "plt.xlabel('UMAP1')\n", "plt.ylabel('UMAP2')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# UMAP/PC selection" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Load data into a pandas dataframe\n", "df = analysis.load_dataframe(z=z, \n", " pc=pc, \n", " euler=euler, \n", " trans=trans, \n", " labels=kmeans_labels, \n", " umap=umap,\n", " df1=ctf_params[:,2] if ctf_params is not None else None,\n", " df2=ctf_params[:,3] if ctf_params is not None else None,\n", " dfang=ctf_params[:,4] if ctf_params is not None else None,\n", " phase=ctf_params[:,8] if ctf_params is not None else None)\n", "df.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Selection by UMAP/PC values\n", "\n", "In the next cell, you can select different indexes using UMAP or PC values. Change the values in the selection, and add more selections if necessary. The default is UMAP1 and UMAP2, you can change that by changing the 'UMAP1' by your desired field (e.g. PC1).\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# 1 selection\n", "ind_selected1 = df.index[(df['UMAP1'] >= -5) & (df['UMAP1'] <= 5) & (df['UMAP2'] >= -5) & (df['UMAP2'] <= 5)]\n", "ind_selected1 = np.array(ind_selected1)\n", "ind_selected = ind_selected1\n", "# 2 selections\n", "#ind_selected2 = df.index[(df['UMAP1'] >= -5) & (df['UMAP1'] <= 5) & (df['UMAP2'] >= -5) & (df['UMAP2'] <= 5)]\n", "#ind_selected2 = np.array(ind_selected2)\n", "#ind_selected = np.append(ind_selected1, ind_selected2)\n", "#ind_selected = np.unique(ind_selected)\n", "# 3 selections\n", "#ind_selected3 = df.index[(df['UMAP1'] >= -5) & (df['UMAP1'] <= 5) & (df['UMAP2'] >= -5) & (df['UMAP2'] <= 5)]\n", "#ind_selected3 = np.array(ind_selected3)\n", "#ind_selected = np.append(ind_selected, ind_selected3)\n", "#ind_selected = np.unique(ind_selected)\n", "\n", "ind_selected_not = invert_selection(ind_selected)\n", "\n", "print('Selected indices:')\n", "print(ind_selected)\n", "print('Number of selected points:')\n", "print(len(ind_selected))\n", "print('Number of unselected points:')\n", "print(len(ind_selected_not))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# View PCA\n", "plt.scatter(pc[:,0], pc[:,1], alpha=.1, s=1)\n", "plt.scatter(pc[ind_selected,0], pc[ind_selected,1], alpha=.1, s=1)\n", "plt.xlabel('PC1 ({:.2f})'.format(pca.explained_variance_ratio_[0]))\n", "plt.ylabel('PC2 ({:.2f})'.format(pca.explained_variance_ratio_[1]))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# View umap\n", "plt.scatter(umap[:,0], umap[:,1], alpha=.1, s=1)\n", "plt.scatter(umap[ind_selected,0], umap[ind_selected,1], alpha=.1, s=1)\n", "plt.xlabel('UMAP1')\n", "plt.ylabel('UMAP2')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# View particles\n", "\n", "View images from selected particles" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# or set to custom selection\n", "particle_ind = list(ind_selected) or np.random.choice(range(len(particles)),\n", " 9, replace=False)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Choose 9 particles to view at random\n", "if len(particle_ind) > 9:\n", " ind_subset9 = np.random.choice(particle_ind, 9, replace=False)\n", "else: \n", " ind_subset9 = particle_ind\n", "\n", "print(ind_subset9)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "p = [particles[int(ii)][\"y\"][0, ...] for ii in ind_subset9]\n", "_ = analysis.plot_projections(p, ind_subset9)\n", "\n", "plt.figure()\n", "plt.scatter(umap[:,0], umap[:,1], alpha=.1, s=1)\n", "plt.scatter(umap[ind_subset9,0], umap[ind_subset9,1], color='k')\n", "plt.xlabel('UMAP1')\n", "plt.ylabel('UMAP2')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Save selection\n", "\n", "Save the particle indices for the selected (`ind_selected`) and unselected particles (`ind_selected_not`) as a .pkl file for downstream processing in cryoDRGN or with other tools.\n", "\n", "Rename the paths as desired. Note that the indices will be automatically converted if the current cryoDRGN training run has already been filtered (`ind_orig` loaded in an earlier cell)." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Set selection as either the kept or bad particles (for file naming purposes)\n", "ind_keep = ind_selected # or ind_selected_not\n", "ind_bad = ind_selected_not # or ind_selected" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# View PCA\n", "plt.scatter(pc[:,0], pc[:,1], alpha=.1, s=1)\n", "plt.scatter(pc[ind_keep,0], pc[ind_keep,1], alpha=.1, s=1)\n", "plt.xlabel('PC1 ({:.2f})'.format(pca.explained_variance_ratio_[0]))\n", "plt.ylabel('PC2 ({:.2f})'.format(pca.explained_variance_ratio_[1]))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# View UMAP\n", "plt.scatter(umap[:,0], umap[:,1], alpha=.1, s=1)\n", "plt.scatter(umap[ind_keep,0], umap[ind_keep,1], alpha=.1, s=1)\n", "plt.xlabel('UMAP1')\n", "plt.ylabel('UMAP2')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "print('Kept particle indices:')\n", "print(ind_keep)\n", "print('Number of kept particles:')\n", "print(len(ind_keep))\n", "print('Number of bad particles:')\n", "print(len(ind_bad))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "if len(ind_keep):\n", " # Path to save index .pkl for selected particles\n", " SAVE_PATH = f'{WORKDIR}/ind_keep.{len(ind_keep)}_particles.pkl'\n", " save_selection(SAVE_PATH, ind_keep)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "if len(ind_bad):\n", " # Path to save index .pkl for non-selected particles\n", " SAVE_PATH = f'{WORKDIR}/ind_bad.{len(ind_bad)}_particles.pkl'\n", " save_selection(SAVE_PATH, ind_bad)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.13" } }, "nbformat": 4, "nbformat_minor": 2}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522{ "cells": [ { "cell_type": "markdown", "metadata": { "scrolled": false }, "source": [ "# CryoDRGN visualization and analysis\n", "\n", "This jupyter notebook provides a template for analyzing cryoDRGN results, including:\n", "* latent space visualization with PCA/UMAP\n", "* clustering\n", "* interactive visualization of the latent space, imaging, and pose parameters\n", "* interactive selection of particle images from the latent space\n", "* interactive generation of volumes from the latent space\n", "\n", "Note that this is a simple template for data analysis, and not a polished UI. Experience with Python/Pandas is recommended.\n", "\n", "This notebook assumes that the latent variable dimension is > 1 (e.g. multidimensional plotting)." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "import pickle\n", "import os\n", "\n", "from cryodrgn import analysis\n", "from cryodrgn import utils\n", "from cryodrgn import dataset\n", "from cryodrgn import ctf\n", "from cryodrgn import config\n", " \n", "import matplotlib.pyplot as plt\n", "import plotly.offline as py\n", "from ipywidgets import VBox\n", "from scipy.spatial.transform import Rotation as RR\n", "py.init_notebook_mode()\n", "from IPython.display import FileLinks" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Enable interactive widgets\n", "!jupyter nbextension enable --py widgetsnbextension" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Load results" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "scrolled": false }, "outputs": [], "source": [ "# Specify the workdir and the epoch number (1-based index) to analyze\n", "WORKDIR = '..' \n", "EPOCH = 20 # change me if necessary!\n", "print(os.path.abspath(WORKDIR))" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "scrolled": false }, "outputs": [], "source": [ "# Load UMAP\n", "umap = utils.load_pkl(f'{WORKDIR}/analyze.{EPOCH}/umap.pkl')\n", "# or run UMAP\n", "# umap = analysis.run_umap(z)\n", "\n", "# Load z\n", "with open(f'{WORKDIR}/z.{EPOCH}.pkl','rb') as f:\n", " z = pickle.load(f)\n", "\n", "# Load kmeans\n", "KMEANS = 20\n", "kmeans_labels = utils.load_pkl(f'{WORKDIR}/analyze.{EPOCH}/kmeans{KMEANS}/labels.pkl')\n", "kmeans_centers = np.loadtxt(f'{WORKDIR}/analyze.{EPOCH}/kmeans{KMEANS}/centers.txt')\n", "# Or re-run kmeans with the desired number of classes\n", "#kmeans_labels, kmeans_centers = analysis.cluster_kmeans(z, 20)\n", "\n", "# Get index for on-data cluster center\n", "kmeans_centers, centers_ind = analysis.get_nearest_point(z, kmeans_centers)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Load dataset" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Load configuration file\n", "config = config.load(f'{WORKDIR}/config.yaml')\n", "print(config)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Load poses\n", "if \"poses\" not in config[\"dataset_args\"] or config['dataset_args']['do_pose_sgd']:\n", " pose_pkl = f'{WORKDIR}/pose.{EPOCH}.pkl'\n", " with open(pose_pkl,'rb') as f:\n", " rot, trans = pickle.load(f)\n", "else:\n", " pose_pkl = config['dataset_args']['poses']\n", " rot, trans = utils.load_pkl(pose_pkl)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Convert rotation matrices to euler angles\n", "euler = RR.from_matrix(rot).as_euler('zyz', degrees=True)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Load index filter\n", "ind_orig = config['dataset_args']['ind']\n", "if ind_orig is not None:\n", " ind_orig = utils.load_pkl(ind_orig)\n", " if len(rot) > len(ind_orig):\n", " print(f'Filtering poses from {len(rot)} to {len(ind_orig)}')\n", " rot = rot[ind_orig]\n", " trans = trans[ind_orig]\n", " euler = euler[ind_orig]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# load input particles, first time just to get total number of particles\n", "particles = dataset.ImageDataset(\n", " config['dataset_args']['particles'], lazy=True, ind=ind_orig,\n", " datadir=config['dataset_args']['datadir']\n", ")\n", "N_orig = particles.src.orig_n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Load CTF\n", "if \"ctf\" in config['dataset_args'] and config['dataset_args']['ctf'] is not None:\n", " ctf_params = utils.load_pkl(config['dataset_args']['ctf'])\n", " if ind_orig is not None:\n", " print(f'Filtering ctf parameters from {len(ctf_params)} to {len(ind_orig)}')\n", " ctf_params = ctf_params[ind_orig]\n", " ctf.print_ctf_params(ctf_params[0])\n", "else:\n", " ctf_params = None\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### PCA" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "pc, pca = analysis.run_pca(z)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Interactive visualization\n", "\n", "Interactive visualization of the latent encodings for the trained model. Each point represents a particle image of the dataset. The hover text includes the index of the image in the particle stack. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Load into pandas dataframe" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Load data into a pandas dataframe\n", "df = analysis.load_dataframe(z=z, \n", " pc=pc, \n", " euler=euler, \n", " trans=trans, \n", " labels=kmeans_labels, \n", " umap=umap,\n", " df1=ctf_params[:,2] if ctf_params is not None else None,\n", " df2=ctf_params[:,3] if ctf_params is not None else None,\n", " dfang=ctf_params[:,4] if ctf_params is not None else None,\n", " phase=ctf_params[:,8] if ctf_params is not None else None)\n", "df.head()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Annotated points correspond to kmeans cluster centers\n", "widget, fig = analysis.ipy_plot_interactive_annotate(df,centers_ind)\n", "VBox((widget,fig))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Interactive selection\n", "\n", "The next two cells contain helper code to select particles using an interactive lasso tool. \n", "\n", "1. In the first cell, select points with the lasso tool. The table widget is dynamically updated with the most recent selection's indices. \n", "2. Then once you've finalized your selection, use the next cell to save the particle indices for downstream analysis/viz.\n", "\n", "(Double click to clear selection)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "widget, fig, ind_table = analysis.ipy_plot_interactive(df)\n", "VBox((widget,fig,ind_table))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "ind_selected = ind_table.data[0].cells.values[0] # save table values\n", "ind_selected = np.array(ind_selected)\n", "ind_selected_not = np.array(sorted(set(np.arange(len(df))) - set(ind_selected)))\n", "\n", "print('Selected indices:')\n", "print(ind_selected)\n", "print('Number of selected points:')\n", "print(len(ind_selected))\n", "print('Number of unselected points:')\n", "print(len(ind_selected_not))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Visualize selected subset" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# View PCA\n", "plt.scatter(pc[:,0], pc[:,1], alpha=.1, s=1)\n", "plt.scatter(pc[ind_selected,0], pc[ind_selected,1], alpha=.1, s=1)\n", "plt.xlabel('PC1 ({:.2f})'.format(pca.explained_variance_ratio_[0]))\n", "plt.ylabel('PC2 ({:.2f})'.format(pca.explained_variance_ratio_[1]))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# View umap\n", "plt.scatter(umap[:,0], umap[:,1], alpha=.1, s=1)\n", "plt.scatter(umap[ind_selected,0], umap[ind_selected,1], alpha=.1, s=1)\n", "plt.xlabel('UMAP1')\n", "plt.ylabel('UMAP2')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Subset of dataframe\n", "df_sub = df.loc[ind_selected]\n", "df_sub_not = df.loc[ind_selected_not]" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "scrolled": true }, "outputs": [], "source": [ "# View pose distribution\n", "analysis.plot_euler(df_sub.theta, df_sub.phi, df_sub.psi)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "widget, fig, ind_table = analysis.ipy_plot_interactive(df_sub)\n", "VBox((widget,fig,ind_table))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# View particles\n", "\n", "View images at selected points in latent space" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# or set to custom selection\n", "particle_ind = list(ind_selected) or np.random.choice(range(len(particles)),\n", " 9, replace=False)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# choose 9 particles to view at random\n", "if len(particle_ind) > 9:\n", " ind_subset9 = np.random.choice(particle_ind, 9, replace=False)\n", "else: \n", " ind_subset9 = particle_ind\n", "print(ind_subset9)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "p = [particles[int(ii)][\"y\"][0, ...] for ii in ind_subset9]\n", "analysis.plot_projections(p, ind_subset9)\n", "widget, fig = analysis.ipy_plot_interactive_annotate(df, ind_subset9, opacity=.1)\n", "VBox((widget,fig))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Generate volumes\n", "\n", "Generate volumes at selected points in latent space" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "vol_ind = [] # ADD INDICES HERE\n", "print(vol_ind)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "widget, fig = analysis.ipy_plot_interactive_annotate(df, vol_ind, opacity=.1)\n", "VBox((widget,fig))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "def get_outdir():\n", " '''Helper function to get a clean directory to save volumes'''\n", " for i in range(100000):\n", " outdir = f'reconstruct_{i:06d}'\n", " if os.path.exists(outdir): continue\n", " else: break\n", " return outdir\n", "\n", "def generate_volumes(zvalues, outdir, **kwargs):\n", " '''Helper function to call cryodrgn eval_vol and generate new volumes'''\n", " if not os.path.exists(outdir):\n", " os.mkdir(outdir)\n", " np.savetxt(f'{outdir}/zfile.txt', zvalues)\n", " analysis.gen_volumes(f'{WORKDIR}/weights.{EPOCH}.pkl',\n", " f'{WORKDIR}/config.yaml',\n", " f'{outdir}/zfile.txt',\n", " f'{outdir}', **kwargs)\n", " return FileLinks(f'{outdir}/')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Get a unique output directory, or define your own\n", "outdir = get_outdir()\n", "print(os.path.abspath(outdir))" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "# Modify any defaults for volume generation -- see `cryodrgn eval_vol -h` for details \n", "Apix = 1 # Set to volume pixel size\n", "flip = False # Hand flip?\n", "invert = False # Invert contrast?\n", "downsample = None # Set to smaller box size if desired\n", "cuda = None # specify cuda device\n", "\n", "generate_volumes(z[vol_ind], outdir, Apix=Apix, flip=flip,\n", " downsample=downsample, invert=invert)\n" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.12" } }, "nbformat": 4, "nbformat_minor": 2}12345678910111213141516171819206.835848093032836914e-01 2.179422378540039062e+00 -3.525929212570190430e+00 -1.218404054641723633e+00 4.831327497959136963e-01 1.813371330499649048e-01 2.772295236587524414e+00 1.040952324867248535e+00-1.760769188404083252e-01 2.814074754714965820e+00 7.411355525255203247e-02 -8.671783804893493652e-01 -1.798674464225769043e-01 -6.255091726779937744e-02 4.069147586822509766e+00 -1.812707662582397461e+00-1.356920599937438965e+00 2.949568033218383789e+00 -1.859995961189270020e+00 1.891642332077026367e+00 -1.878888964653015137e+00 1.079878568649291992e+00 2.287286996841430664e+00 -5.703133344650268555e-01-2.009793996810913086e+00 1.174134016036987305e+00 2.364059686660766602e+00 -1.910169959068298340e+00 7.221967577934265137e-01 3.164270877838134766e+00 -1.170394301414489746e+00 -1.757082939147949219e+00-8.068684935569763184e-01 1.651506900787353516e+00 -1.172073483467102051e+00 -2.822029590606689453e+00 9.409107267856597900e-02 2.675395488739013672e+00 1.404643058776855469e+00 -8.442430496215820312e-011.237633466720581055e+00 -1.017653703689575195e+00 -8.128866553306579590e-01 -3.013601779937744141e+00 -8.807971477508544922e-01 1.883165091276168823e-01 -2.215296588838100433e-02 -8.639321327209472656e-01-1.251133903861045837e-02 7.661210894584655762e-01 1.796332716941833496e+00 -2.550866842269897461e+00 1.378983378410339355e+00 6.208741292357444763e-02 6.066734194755554199e-01 -3.174285590648651123e-018.488629460334777832e-01 -1.601947247982025146e-01 1.952728748321533203e+00 -2.755828619003295898e+00 -1.165881156921386719e+00 1.865972757339477539e+00 5.743027329444885254e-01 2.286089658737182617e-01-4.083835184574127197e-01 -3.353943824768066406e+00 -3.963485360145568848e-02 2.153118371963500977e+00 -9.473074674606323242e-01 7.527433633804321289e-01 -2.579175472259521484e+00 5.929354429244995117e-01-6.822063326835632324e-01 -2.621149539947509766e+00 2.056961774826049805e+00 3.609060287475585938e+00 6.626586616039276123e-02 -2.431867361068725586e+00 -1.635051727294921875e+00 1.672087758779525757e-01-1.016174554824829102e+00 -3.052383422851562500e+00 -2.384071648120880127e-01 1.678136944770812988e+00 2.058335781097412109e+00 -2.137378454208374023e+00 -2.006351709365844727e+00 1.334273219108581543e+00-1.497520446777343750e+00 -2.519778490066528320e+00 3.583385944366455078e+00 1.034069418907165527e+00 2.224770784378051758e+00 3.016604781150817871e-01 -8.423897027969360352e-01 -1.139730453491210938e+005.337375402450561523e-01 -2.500683069229125977e+00 1.177856802940368652e+00 -1.049243330955505371e+00 2.280330419540405273e+00 9.173786640167236328e-01 -1.032157182693481445e+00 1.240090966224670410e+007.409160137176513672e-01 -2.258792400360107422e+00 3.225911855697631836e+00 -7.920572906732559204e-02 -9.656757116317749023e-01 2.170354574918746948e-01 -6.946514844894409180e-01 1.506377160549163818e-013.426017761230468750e+00 -1.445207834243774414e+00 -2.489997863769531250e+00 1.571940779685974121e+00 -1.244463443756103516e+00 -6.649996042251586914e-01 -4.652214944362640381e-01 -2.568740606307983398e+001.335421204566955566e+00 1.782202422618865967e-01 -9.585482478141784668e-01 1.915595054626464844e+00 1.248875409364700317e-01 -4.002143383026123047e+00 -9.850311279296875000e-01 1.299164414405822754e+002.516414225101470947e-01 1.545400619506835938e+00 -1.852028131484985352e+00 9.236941933631896973e-01 1.107130885124206543e+00 -1.480130434036254883e+00 1.138681769371032715e+00 2.162334203720092773e+005.206010341644287109e-01 1.122733116149902344e+00 -2.344425678253173828e+00 1.196462631225585938e+00 -1.462021917104721069e-01 -1.032861828804016113e+00 -2.370456933975219727e+00 1.993837118148803711e+001.338700652122497559e+00 5.247898101806640625e-01 -7.529105544090270996e-01 1.234003424644470215e+00 -2.377283811569213867e+00 -2.179430574178695679e-01 3.780965805053710938e-01 1.382157921791076660e+00-6.775683164596557617e-01 1.573278903961181641e+00 -6.464111059904098511e-02 2.593132019042968750e+00 -2.467461109161376953e+00 -1.562120079994201660e+00 -1.854355812072753906e+00 -5.874530673027038574e-0112345678910111213141516171819204217149200400146641754742656966871967998100159023248888178469883585269911843433832230032950121434123version https://git-lfs.github.com/spec/v1oid sha256:8984e8abb17d8a6c775a493663d9fe29017827061e1dcab9e94fb17b34ea768fsize 800163123version https://git-lfs.github.com/spec/v1oid sha256:919351830792bb77726a4fe53d51d7d2c3cd2398a4e2962e362b3ddbfabac4f4size 8389632123version https://git-lfs.github.com/spec/v1oid sha256:2315d8de571bcc572db26ca761072f2515daa0b920429355ec8e6b5fb4f478b1size 8389632123version https://git-lfs.github.com/spec/v1oid sha256:30ec6c0c044a5bb89dc69da2d992989648ae4f80a1f0aa55666ebf9d8ad5f4e6size 8389632123version https://git-lfs.github.com/spec/v1oid sha256:1b12b31b80f89b3bb971074da79131d12623beec3b60e99ec624b11cd8216e9fsize 8389632123version https://git-lfs.github.com/spec/v1oid sha256:03852bc55b49c0d0bed068ac473e0ccecc20f300573223a374272059b7a9c0f6size 8389632123version https://git-lfs.github.com/spec/v1oid sha256:51885b8093dc1f1adfed6c619c3d4e63bb491de90db21ebde645ef8bcab8bc1bsize 8389632123version https://git-lfs.github.com/spec/v1oid sha256:8528640a738ef6ac1a3e8301e6a66943cfc095e6d84d811aa9c6185528853191size 8389632123version https://git-lfs.github.com/spec/v1oid sha256:d6874d0d08a93dc62ff3d83a7aef1f5a26e17e7933bdbf328c6ac906a4dbd678size 8389632123version https://git-lfs.github.com/spec/v1oid sha256:d1ebb255f6f61100148e25367af834159f08aed4758047debe18fd1347a440aesize 8389632123version https://git-lfs.github.com/spec/v1oid sha256:3283786807001ba3e743e7ac649debcd843ee7a5c0ac4dbb017c5e549dc75727size 8389632123version https://git-lfs.github.com/spec/v1oid sha256:ba347e05830c8e07497d454593b4871436b294d343496df12a9d61ae05a4a7e4size 8389632123version https://git-lfs.github.com/spec/v1oid sha256:41cc0f744c7d300656f2e613b8d2f93d25cb74c72921ad88313bfda5d8db0a1esize 8389632123version https://git-lfs.github.com/spec/v1oid sha256:1b472ccc7cd3707993b798f9b6b298a00653bdd120b3c4616011ebdfaef5bcfcsize 8389632123version https://git-lfs.github.com/spec/v1oid sha256:7de37f7b1ef71b890ea93a89e70418986ed040ccbbcc68ca6cbffad76a5a26e2size 8389632123version https://git-lfs.github.com/spec/v1oid sha256:6d969c103e9a950cff65bdab7a4d52410638e4499f260691cc6fcdd83d9a2b07size 8389632123version https://git-lfs.github.com/spec/v1oid sha256:4d6f1c5a066330549dd09b969dadfabd4ec78f0ceddf3cddae6e884f86328dc9size 8389632123version https://git-lfs.github.com/spec/v1oid sha256:f977ef178a956ddab2756ed37943c76b030299eb77f86f1de984586c04b0771dsize 8389632123version https://git-lfs.github.com/spec/v1oid sha256:c47f20f38592d4bfbbf0a654cd2d09b32342286ad93f7f6c38b0026fbab11d3esize 8389632123version https://git-lfs.github.com/spec/v1oid sha256:808b271d6aece386d1342ba218eda653f1bb75e161cbbd074f25fbaf7639a3fdsize 8389632123version https://git-lfs.github.com/spec/v1oid sha256:983dd7dcfcb895bc04ebd2b3e2a32dc886a7af815de427c5fedb30a35ea0630asize 838963212345678910111213141516171819206.835848093032836914e-01 2.179422378540039062e+00 -3.525929212570190430e+00 -1.218404054641723633e+00 4.831327497959136963e-01 1.813371330499649048e-01 2.772295236587524414e+00 1.040952324867248535e+00-1.760769188404083252e-01 2.814074754714965820e+00 7.411355525255203247e-02 -8.671783804893493652e-01 -1.798674464225769043e-01 -6.255091726779937744e-02 4.069147586822509766e+00 -1.812707662582397461e+00-1.356920599937438965e+00 2.949568033218383789e+00 -1.859995961189270020e+00 1.891642332077026367e+00 -1.878888964653015137e+00 1.079878568649291992e+00 2.287286996841430664e+00 -5.703133344650268555e-01-2.009793996810913086e+00 1.174134016036987305e+00 2.364059686660766602e+00 -1.910169959068298340e+00 7.221967577934265137e-01 3.164270877838134766e+00 -1.170394301414489746e+00 -1.757082939147949219e+00-8.068684935569763184e-01 1.651506900787353516e+00 -1.172073483467102051e+00 -2.822029590606689453e+00 9.409107267856597900e-02 2.675395488739013672e+00 1.404643058776855469e+00 -8.442430496215820312e-011.237633466720581055e+00 -1.017653703689575195e+00 -8.128866553306579590e-01 -3.013601779937744141e+00 -8.807971477508544922e-01 1.883165091276168823e-01 -2.215296588838100433e-02 -8.639321327209472656e-01-1.251133903861045837e-02 7.661210894584655762e-01 1.796332716941833496e+00 -2.550866842269897461e+00 1.378983378410339355e+00 6.208741292357444763e-02 6.066734194755554199e-01 -3.174285590648651123e-018.488629460334777832e-01 -1.601947247982025146e-01 1.952728748321533203e+00 -2.755828619003295898e+00 -1.165881156921386719e+00 1.865972757339477539e+00 5.743027329444885254e-01 2.286089658737182617e-01-4.083835184574127197e-01 -3.353943824768066406e+00 -3.963485360145568848e-02 2.153118371963500977e+00 -9.473074674606323242e-01 7.527433633804321289e-01 -2.579175472259521484e+00 5.929354429244995117e-01-6.822063326835632324e-01 -2.621149539947509766e+00 2.056961774826049805e+00 3.609060287475585938e+00 6.626586616039276123e-02 -2.431867361068725586e+00 -1.635051727294921875e+00 1.672087758779525757e-01-1.016174554824829102e+00 -3.052383422851562500e+00 -2.384071648120880127e-01 1.678136944770812988e+00 2.058335781097412109e+00 -2.137378454208374023e+00 -2.006351709365844727e+00 1.334273219108581543e+00-1.497520446777343750e+00 -2.519778490066528320e+00 3.583385944366455078e+00 1.034069418907165527e+00 2.224770784378051758e+00 3.016604781150817871e-01 -8.423897027969360352e-01 -1.139730453491210938e+005.337375402450561523e-01 -2.500683069229125977e+00 1.177856802940368652e+00 -1.049243330955505371e+00 2.280330419540405273e+00 9.173786640167236328e-01 -1.032157182693481445e+00 1.240090966224670410e+007.409160137176513672e-01 -2.258792400360107422e+00 3.225911855697631836e+00 -7.920572906732559204e-02 -9.656757116317749023e-01 2.170354574918746948e-01 -6.946514844894409180e-01 1.506377160549163818e-013.426017761230468750e+00 -1.445207834243774414e+00 -2.489997863769531250e+00 1.571940779685974121e+00 -1.244463443756103516e+00 -6.649996042251586914e-01 -4.652214944362640381e-01 -2.568740606307983398e+001.335421204566955566e+00 1.782202422618865967e-01 -9.585482478141784668e-01 1.915595054626464844e+00 1.248875409364700317e-01 -4.002143383026123047e+00 -9.850311279296875000e-01 1.299164414405822754e+002.516414225101470947e-01 1.545400619506835938e+00 -1.852028131484985352e+00 9.236941933631896973e-01 1.107130885124206543e+00 -1.480130434036254883e+00 1.138681769371032715e+00 2.162334203720092773e+005.206010341644287109e-01 1.122733116149902344e+00 -2.344425678253173828e+00 1.196462631225585938e+00 -1.462021917104721069e-01 -1.032861828804016113e+00 -2.370456933975219727e+00 1.993837118148803711e+001.338700652122497559e+00 5.247898101806640625e-01 -7.529105544090270996e-01 1.234003424644470215e+00 -2.377283811569213867e+00 -2.179430574178695679e-01 3.780965805053710938e-01 1.382157921791076660e+00-6.775683164596557617e-01 1.573278903961181641e+00 -6.464111059904098511e-02 2.593132019042968750e+00 -2.467461109161376953e+00 -1.562120079994201660e+00 -1.854355812072753906e+00 -5.874530673027038574e-01123version https://git-lfs.github.com/spec/v1oid sha256:e59c07d891f59c0d3ac3eb00262dab54cdbe9386f6e973fb1283980c51e5056dsize 8389632123version https://git-lfs.github.com/spec/v1oid sha256:a22cde9c881d88d0a64e31e99d57fb64781038b283b8bb20418bb160c17dab48size 8389632123version https://git-lfs.github.com/spec/v1oid sha256:b4bffce6c796760a642c856659d1e360658931d5b9b1c694b89fde2f73a6cf39size 8389632123version https://git-lfs.github.com/spec/v1oid sha256:2720694561c753c2aeba6de570c416577a85fb3392a997bf7e7870ff5042fe15size 8389632123version https://git-lfs.github.com/spec/v1oid sha256:94b5baa62bf5de4acc19a9d3b63795a7f3395793e761e2ca1a0d3fcbc7594fd2size 8389632123version https://git-lfs.github.com/spec/v1oid sha256:c422eb8edc78a26eac788c1dcc7cb2f724a3fef3a646bab4b97898e50bc2afe2size 8389632123version https://git-lfs.github.com/spec/v1oid sha256:1e74fbfebe417c26809682cce1aaaec2740179c1ef2ec53d8d45988e63a5e719size 8389632123version https://git-lfs.github.com/spec/v1oid sha256:692bf0001824bf54ac862e71bbad9311e2a00c30cf20560ec0dca435c3fc25afsize 8389632123version https://git-lfs.github.com/spec/v1oid sha256:ca99af416ee510c1adcfa940c26ac432e783c99ffdde843b6370782838d14c42size 8389632123version https://git-lfs.github.com/spec/v1oid sha256:63dbe81b3d3868f401deafa1442a9c33677ba08cc17b3e3dd9559288c0d02e4bsize 8389632.gitattributes+91
results/calib_heldout.jsonAdded+632
results/calib_heldout/README.mdAdded+55
results/cryodrgn_pn_igg1d_r0t1/analyze.20/cryoDRGN_figures.ipynbAdded+519
results/cryodrgn_pn_igg1d_r0t1/analyze.20/cryoDRGN_filtering.ipynbAdded+1113
results/cryodrgn_pn_igg1d_r0t1/analyze.20/cryoDRGN_viz.ipynbAdded+522
results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/centers.txtAdded+20
results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/centers_ind.txtAdded+20
results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/labels.pklAdded+3
results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/umap.pngAdded

Large File Pointer Details
- SHA256: 96eb6bd830c5376e862a2b74c2678dc3761fb251ad6449e61cccfc0ed8bb732f
- Pointer size: 131 Bytes
- Size of remote file: 188 kB
results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/umap_hex.pngAdded

Large File Pointer Details
- SHA256: 488f8bf3dd6b0813a578cec3ded42df82a537e5ac00610b1be2bf6e95adaebb3
- Pointer size: 130 Bytes
- Size of remote file: 84.1 kB
results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_001.mrcAdded+3
results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_002.mrcAdded+3
results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_003.mrcAdded+3
results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_004.mrcAdded+3
results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_005.mrcAdded+3
results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_006.mrcAdded+3
results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_007.mrcAdded+3
results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_008.mrcAdded+3
results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_009.mrcAdded+3
results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_010.mrcAdded+3
results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_011.mrcAdded+3
results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_012.mrcAdded+3
results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_013.mrcAdded+3
results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_014.mrcAdded+3
results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_015.mrcAdded+3
results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_016.mrcAdded+3
results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_017.mrcAdded+3
results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_018.mrcAdded+3
results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_019.mrcAdded+3
results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/vol_020.mrcAdded+3
results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/z_pca.pngAdded

Large File Pointer Details
- SHA256: 5e7655732398ce281c7d50761f15f03b77a259bfc62824c69ba808e4c971491d
- Pointer size: 130 Bytes
- Size of remote file: 95.6 kB
results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/z_pca_hex.pngAdded

Large File Pointer Details
- SHA256: e78415411a9fd77eb017bf91cb334936bf66d1773b8637010c0a41f3a70294ce
- Pointer size: 130 Bytes
- Size of remote file: 57 kB
results/cryodrgn_pn_igg1d_r0t1/analyze.20/kmeans20/z_values.txtAdded+20
results/cryodrgn_pn_igg1d_r0t1/analyze.20/learning_curve_epoch20.pngAdded

Large File Pointer Details
- SHA256: 0415d573a85dcfdfb41cff90007e7134c05508e381ed8f8c72c435e1915bdb5c
- Pointer size: 130 Bytes
- Size of remote file: 23.1 kB
results/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/pca_traversal.pngAdded

Large File Pointer Details
- SHA256: 79fd83708965322f5f624a3fcd92daa61e82537e3e225b433a364efde9271b08
- Pointer size: 130 Bytes
- Size of remote file: 87.7 kB
results/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/pca_traversal_hex.pngAdded

Large File Pointer Details
- SHA256: c71bc68718eda1b3f69b26cef63c48ef539db5f411b996b38bc1364515a76438
- Pointer size: 130 Bytes
- Size of remote file: 84.9 kB
results/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/umap.pngAdded

Large File Pointer Details
- SHA256: 9c5aca9e907211cf3fbe66dc20b2e393f9319fbf3d361daa1dc91eb9382ba69d
- Pointer size: 131 Bytes
- Size of remote file: 324 kB
results/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/umap_traversal.pngAdded

Large File Pointer Details
- SHA256: c894575e4f1276a661e88a5e15240b0285ebcdae04da55d74a362bbcb73e8d80
- Pointer size: 131 Bytes
- Size of remote file: 182 kB
results/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/umap_traversal_connected.pngAdded

Large File Pointer Details
- SHA256: 709936895b1784563e952ff82163fc4a800c721f939404fc75adbc690d2ed3f3
- Pointer size: 131 Bytes
- Size of remote file: 184 kB
results/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/vol_001.mrcAdded+3
results/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/vol_002.mrcAdded+3
results/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/vol_003.mrcAdded+3
results/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/vol_004.mrcAdded+3
results/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/vol_005.mrcAdded+3
results/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/vol_006.mrcAdded+3
results/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/vol_007.mrcAdded+3
results/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/vol_008.mrcAdded+3
results/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/vol_009.mrcAdded+3
results/cryodrgn_pn_igg1d_r0t1/analyze.20/pc1/vol_010.mrcAdded+3