-
Notifications
You must be signed in to change notification settings - Fork 0
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
Search basic #15
base: paralell_normalization
Are you sure you want to change the base?
Search basic #15
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be in the expression router instead, with no /query
prefix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be in the expressions router, since it is has the /expressions
path.
sample_id: str = Field(..., min_length=1, max_length=255, description="Sample ID") | ||
experiment_result_id: str = Field(..., min_length=1, max_length=255, description="Experiment result ID") | ||
count: float = Field(..., description="Expression count") | ||
method: str = Field(..., description="Method used to calculate the expression count") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
method: MethodEnum = Field(MethodEnum, ...)
getmm_count: Optional[float] = None | ||
|
||
|
||
class GeneExpressionData(BaseModel): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was there a specific reason to only include one count?
getmm = "getmm" | ||
|
||
|
||
class QueryParameters(BaseModel): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename to ExpressionQueryBody
.
The term "query parameters" refers to query params that are included in the URL, these are in a POST's body so we should avoid confusion.
page: int = Field( | ||
1, | ||
ge=1, | ||
description="Page number for pagination (must be greater than or equal to 1)", | ||
) | ||
page_size: int = Field( | ||
100, | ||
ge=1, | ||
le=1000, | ||
description="Number of records per page (between 1 and 1000)", | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to have this bundled in a model. Something like this:
class PaginatedRequest(BaseModel):
page: int = Field(..., ge=1, description="Current page number")
page_size: int = Field(..., ge=1, le=1000, description="Number of records per page")
# extends PaginatedRequest
class PaginatedRespone(PaginatedRequest):
total_records: int = Field(..., ge=0, description="Total number of records")
total_pages: int = Field(..., ge=1, description="Total number of pages")
class SomePaginatedQuery(PaginatedRequest):
...
class SomePaginatedResponse(PaginatedRespone):
...
This way we reuse the same model for requests or responses, and we have less code duplication!
Add endpoints to retrieve paginated expression data raw and normalized via GET. Retrieve normalized and raw expression information via POST, by experiment, gene_id and sample_id