Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add findings to study-summary endpoint #349

Merged
merged 5 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/apiserver/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN python -m pip install scikit-learn==1.5.0
RUN python -m pip install Pillow==9.5.0
RUN python -m pip install pydantic==2.7.2
RUN python -m pip install secure==0.3.0
RUN python -m pip install matplotlib==3.9.0
RUN python -m pip install matplotlib==3.9.2
RUN python -m pip install squidpy==1.5.0
ARG version
ARG service_name
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml.unversioned
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ repository = "https://github.com/nadeemlab/SPT"

[project.optional-dependencies]
apiserver = [
"matplotlib==3.9.0",
"matplotlib==3.9.2",
"fastapi==0.111.0",
"uvicorn==0.30.0",
"pandas==2.2.2",
Expand Down Expand Up @@ -66,7 +66,7 @@ ondemand = [
"squidpy==1.5.0",
]
workflow = [
"matplotlib==3.9.0",
"matplotlib==3.9.2",
"umap-learn==0.5.6",
"numpy==1.26.4",
"scipy==1.13.1",
Expand All @@ -82,7 +82,7 @@ workflow = [
all = [
"bokeh==3.4.1",
"h5py==3.10.0",
"matplotlib==3.9.0",
"matplotlib==3.9.2",
"umap-learn==0.5.6",
"uvicorn==0.30.0",
"Jinja2==3.1.4",
Expand Down
2 changes: 2 additions & 0 deletions spatialprofilingtoolbox/db/accessors/study.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,13 @@ def get_study_summary(self, study: str) -> StudySummary:
publication = self._get_publication(study)
assay = self._get_assay(components.measurement)
sample_cohorts = get_sample_cohorts(self.cursor, study)
findings = self.get_study_findings()
return StudySummary(
context=Context(institution=institution, assay=assay, contact=contact),
products=Products(data_release=data_release, publication=publication),
counts=counts_summary,
cohorts=sample_cohorts,
findings=findings,
)

def get_study_components(self, study: str) -> StudyComponents:
Expand Down
1 change: 1 addition & 0 deletions spatialprofilingtoolbox/db/exchange_data_formats/study.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,4 @@ class StudySummary(BaseModel):
products: Products
counts: CountsSummary
cohorts: SampleCohorts
findings: list[str]
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,10 @@
"result": "Extreme responder"
}
]
}
},
"findings": [
"Finding 1.",
"Finding 2.",
"Finding 3."
]
}
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.28.0
0.29.0
Loading