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.4-py3-none-any.whl
.
File metadata
- Download URL: adiscstudies-0.10.4-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 | 7116ba97e3a43ffcc49fed03626ffe6fc07a1cbad681b1dfa9537c9a7bbf68f7 |
|
MD5 | 6cb659e8953188ba66c8858a116435ce |
|
BLAKE2b-256 | 54d76a0227f22a9c74938226340d62bbaa1dccf9d25f5440b4acfbb7f2555584 |