Single cell studies data model
Project description
This package contains the source files and built models for an "ADI" (Application Data Interface) schema describing single cell data collection and analysis studies.
Examples
pip install adiscstudies
Tables and fields
import importlib.resources
import pandas as pd
with importlib.resources.path('adiscstudies', 'tables.tsv') as path:
tables = pd.read_csv(path, sep='\t')
print(tables)
Name ... Entity
subject ... Study subject
diagnosis ... Diagnosis event
diagnostic_selection_criterion ... Diagnostic selection criterion
specimen_collection_study ... Biospecimen collection study
specimen_collection_process ... Biospecimen collection process
histology_assessment_process ... Histology assessment process
...
import importlib.resources
with importlib.resources.path('adiscstudies', 'fields.tsv') as path:
fields = pd.read_csv(path, sep='\t')
print(fields[fields['Table'] == 'Histological structure identification'][[
'Label', 'Table', 'Foreign table', 'Foreign key', 'Ordinality',
]])
Label Table Foreign table Foreign key Ordinality
Histological structure Histological structure identification Histological structure Identifier 1
Data source Histological structure identification Data file SHA256 hash 2
Shape file Histological structure identification Shape file Identifier 3
Plane coordinates reference Histological structure identification Plane coordinates reference system Name 4
Identification method Histological structure identification NaN NaN 5
Identification date Histological structure identification NaN NaN 6
Annotator Histological structure identification NaN NaN 7
SQL
import importlib.resources
with importlib.resources.path('adiscstudies', 'schema.sql') as path:
sql_create = open(path, 'rt').read()
print(sql_create)
CREATE TABLE IF NOT EXISTS subject (
identifier VARCHAR(512) PRIMARY KEY,
species VARCHAR(512),
sex VARCHAR(512),
birth_date VARCHAR,
death_date VARCHAR,
cause_of_death VARCHAR
);
CREATE TABLE IF NOT EXISTS diagnosis (
subject VARCHAR(512) REFERENCES subject(identifier),
condition VARCHAR,
result VARCHAR(512),
assessor VARCHAR(512),
date VARCHAR
);
...
OWL
import importlib.resources
with importlib.resources.path('adiscstudies', 'schema.owl') as path:
schema = open(path, 'rt').read()
with open('schema.owl', 'wt') as file:
file.write(schema)
Then open schema.owl
e.g. with Protege.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file adiscstudies-0.10.5-py3-none-any.whl
.
File metadata
- Download URL: adiscstudies-0.10.5-py3-none-any.whl
- Upload date:
- Size: 30.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fac3649e368bc02275eb4615dbb9f1b0c48a857abb55eb41c8ab5228a0604c04 |
|
MD5 | f0d80226f5ab5d39f4244d1d1e22a24c |
|
BLAKE2b-256 | 135e72dfb376f2e892fafc2358e4d5366e65f201aacf27c4b0c418bd14754a3c |