Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.

Commit be2fc4a

Browse files
tanyasgTanya Grancharova
andauthored
Data/filtered plots (#159)
* add 0 structure scores to bonus * update merging manual scores * add fish manual zero structure score csvs * collating for revised plots * quilt revised plot dataset * update public quilt for revised manuscript * dont need test rename Co-authored-by: Tanya Grancharova <[email protected]>
1 parent e957c31 commit be2fc4a

File tree

4 files changed

+539
-7
lines changed

4 files changed

+539
-7
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import subprocess
2+
3+
import fire
4+
import quilt3
5+
6+
from fish_morphology_code.analysis.collate_revised_plot_dataset import collate_revised
7+
8+
9+
def manuscript_plots_dataset(
10+
test=False,
11+
col_name_map={},
12+
dataset_name="revised_manuscript_plots",
13+
package_owner="tanyasg",
14+
readme_path="README.md",
15+
s3_bucket="s3://allencell-internal-quilt",
16+
):
17+
18+
df = collate_revised()
19+
20+
# subsample df for a test dataset
21+
if test:
22+
df = df.sample(2, random_state=0)
23+
dataset_name = f"{dataset_name}_test"
24+
25+
# create the dataset
26+
p = quilt3.Package()
27+
p = p.set("README.md", readme_path)
28+
p = p.set("data.csv", df)
29+
30+
# tag with commit hash
31+
label = (
32+
subprocess.check_output(["git", "rev-parse", "HEAD"]).strip().decode("utf-8")
33+
)
34+
35+
# upload to quilt
36+
p.push(
37+
f"{package_owner}/{dataset_name}",
38+
s3_bucket,
39+
message=f"git commit hash of fish_morphology_code = {label}",
40+
)
41+
42+
43+
if __name__ == "__main__":
44+
fire.Fire(manuscript_plots_dataset)

0 commit comments

Comments
 (0)