-
Notifications
You must be signed in to change notification settings - Fork 33
cleaning up biosample and participant #312
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
Changes from all commits
f6978f7
fa92dde
6115f7e
71e21a0
9befe54
46e03ba
2d0837f
5e15370
ec9414f
eb5a7cd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -226,17 +226,17 @@ class ContactPoint(DandiBaseModel): | |
|
|
||
|
|
||
| class Contributor(DandiBaseModel): | ||
| identifier: Identifier = Field( | ||
| identifier: Optional[Identifier] = Field( | ||
| None, | ||
| title="A Common Identifier", | ||
| description="Use a common identifier such as ORCID for people or ROR for institutions", | ||
| nskey="schema", | ||
| ) | ||
| name: str = Field(None, nskey="schema") | ||
| email: EmailStr = Field(None, nskey="schema") | ||
| url: AnyUrl = Field(None, nskey="schema") | ||
| roleName: List[RoleType] = Field( | ||
| title="Role", description="Role of the contributor", nskey="schema" | ||
| name: Optional[str] = Field(None, nskey="schema") | ||
| email: Optional[EmailStr] = Field(None, nskey="schema") | ||
| url: Optional[AnyUrl] = Field(None, nskey="schema") | ||
| roleName: Optional[List[RoleType]] = Field( | ||
| None, title="Role", description="Role of the contributor", nskey="schema" | ||
| ) | ||
| includeInCitation: bool = Field( | ||
| True, | ||
|
|
@@ -245,7 +245,7 @@ class Contributor(DandiBaseModel): | |
| "when generating a citation for the item", | ||
| nskey="dandi", | ||
| ) | ||
| awardNumber: Identifier = Field( | ||
| awardNumber: Optional[Identifier] = Field( | ||
| None, | ||
| title="Identifier for an award", | ||
| description="Identifier associated with a sponsored or gidt award", | ||
|
|
@@ -254,8 +254,15 @@ class Contributor(DandiBaseModel): | |
|
|
||
|
|
||
| class Organization(Contributor): | ||
| contactPoint: List[ContactPoint] = Field( | ||
| description="Contact for the organization", nskey="schema" | ||
| includeInCitation: bool = Field( | ||
| False, | ||
| title="Include Contributor in Citation", | ||
| description="A flag to indicate whether a contributor should be included " | ||
| "when generating a citation for the item", | ||
| nskey="dandi", | ||
| ) | ||
| contactPoint: Optional[List[ContactPoint]] = Field( | ||
| None, description="Contact for the organization", nskey="schema" | ||
| ) | ||
| _ldmeta = { | ||
| "rdfs:subClassOf": ["schema:Organization", "prov:Organization"], | ||
|
|
@@ -396,9 +403,29 @@ class BioSample(DandiBaseModel): | |
| ) | ||
| anatomy: Optional[List[Anatomy]] = Field( | ||
| None, | ||
| description="UBERON based identifier for the location of the sample", | ||
| description="UBERON based identifier for what organ the sample belongs " | ||
| "to. Use the most specific descriptor.", | ||
| nskey="dandi", | ||
| ) | ||
|
|
||
| wasDerivedFrom: Optional[List["BioSample"]] = Field(None, nskey="prov") | ||
|
|
||
| _ldmeta = { | ||
| "rdfs:subClassOf": ["schema:Thing", "prov:Entity"], | ||
| "rdfs:label": "Information about the biosample.", | ||
| "nskey": "dandi", | ||
| } | ||
|
|
||
|
|
||
| BioSample.update_forward_refs() | ||
|
|
||
|
|
||
| class Participant(DandiBaseModel): | ||
| """Description about the sample that was studied""" | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. separating out participant details |
||
|
|
||
| identifier: Identifier = Field(nskey="schema") | ||
| source_id: Optional[Identifier] = Field(None, nskey="dandi") | ||
|
|
||
| strain: Optional[StrainType] = Field( | ||
| None, description="Identifier for the strain of the sample", nskey="dandi" | ||
| ) | ||
|
|
@@ -435,7 +462,7 @@ class BioSample(DandiBaseModel): | |
|
|
||
| _ldmeta = { | ||
| "rdfs:subClassOf": ["schema:Thing", "prov:Entity"], | ||
| "rdfs:label": "Information about the biosample.", | ||
| "rdfs:label": "Information about the participant.", | ||
| "nskey": "dandi", | ||
| } | ||
|
|
||
|
|
@@ -632,6 +659,9 @@ class AssetMeta(CommonModel): | |
| ) | ||
|
|
||
| wasDerivedFrom: Optional[List[BioSample]] = Field(None, nskey="prov") | ||
| wasAttributedTo: List[Participant] = Field( | ||
| None, description="Participant(s) to which this file belongs to", nskey="prov" | ||
| ) | ||
|
Comment on lines
+662
to
+664
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. a given asset may have multiple participants potentially. how we deal with this in the name is something we will have to figure out. |
||
|
|
||
| # on publish or set by server | ||
| contentUrl: Optional[List[AnyUrl]] = Field(None, readOnly=True, nskey="schema") | ||
|
|
||
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 recursive formulation should allow us to have cell ids, slice ids, and tissue ids.