# cidc-schemas
| Branch | Status | Maintainability | Test Coverage | Code Style |
| ---------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- |
| [master](https://cimac-cidc.github.io/cidc-schemas/) | ![Continuous Integration](https://github.com/CIMAC-CIDC/cidc-schemas/workflows/Continuous%20Integration/badge.svg?branch=master) | [![Maintainability](https://api.codeclimate.com/v1/badges/3f989b974663df81ef45/maintainability)](https://codeclimate.com/github/CIMAC-CIDC/cidc-schemas/maintainability) | [![Test Coverage](https://api.codeclimate.com/v1/badges/3f989b974663df81ef45/test_coverage)](https://codeclimate.com/github/CIMAC-CIDC/cidc-schemas/test_coverage) | <a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a> |
This repository contains formal definitions of the CIDC metadata model using [json-schema](https://json-schema.org/) syntax and vocabulary.
### View documentation at https://cimac-cidc.github.io/cidc-schemas/
## Installation
To install the latest released version, run:
```bash
pip install cidc-schemas
```
## Development
### Project Structure
- **`cidc_schemas/`** - a python module for generating, validating, and reading manifest and assay templates.
- **`schemas/`** - json specifications defining the CIDC metadata model.
- `templates/` - schemas for generating and validating manifest and assay templates.
- `assays/` - schemas for defining assay data models.
- `artifacts/` - schemas for defining artifacts.
- **`docs/`** - the most recent build of the data model documentation, along with templates and scripts for re-generating the documentation.
- **`template_examples/`** - example populated Excel files for template specifications in `schemas/templates`, and `.csv`s auto-generated from those `.xlsx`s that allow to transparently keep track of changes in them.
- **`tests/`** - tests for the `cidc_schemas` module.
- **`.githooks/`** - git hooks, e.g. for auto-generate `.csv`s in `template_examples/`.
### Developer Setup
Install necessary dependencies.
```bash
pip install -r requirements.dev.txt
```
Install and configure pre-commit hooks.
```bash
pre-commit install
```
### Running tests
This repository has unit tests in the _tests_ folder. After installing dependencies
the tests can be run via the command
```bash
pytest tests
```
### Building documentation
To build the documentation, run the following commands:
```bash
python setup.py install # install helpers from the cidc_schemas library
python docs/generate_docs.py
```
This will output the generated html documents in `docs/docs`. If the updated docs are pushed up and merged
into master, they will be viewable at https://cimac-cidc.github.io/cidc-schemas/.
## Using the Command-Line Interface
This project comes with a command-line interface for validating schemas and generating/validating assay and manifest templates.
### Install the CLI
Clone the repository and cd into it
```bash
git clone git@github.com:CIMAC-CIDC/cidc-schemas.git
cd cidc-schemas
```
Install the `cidc_schemas` package (this adds the `cidc_schemas` CLI to your console)
```bash
python setup.py install
```
Run `cidc_schemas --help` to see available options.
If you're making changes to the module and want those changes to be reflected in the CLI without reinstalling the `cidc_schemas` module every time, run
```bash
python3 -m cidc_schemas.cli [args]
```
### Generate templates
Create a template for a given template configuration.
```bash
cidc_schemas generate_template -m templates/manifests/pbmc_template.json -o pbmc.xlsx
```
### Validate filled-out templates
Check that a populated template file is valid with respect to a template specification.
```bash
cidc_schemas validate_template -m templates/manifests/pbmc_template.json -x template_examples/pbmc_template.xlsx
```
### Validate JSON schemas
Check that a JSON schema conforms to the JSON Schema specifications.
```bash
cidc_schemas validate_schema -f shipping_core.json
```
没有合适的资源?快使用搜索试试~ 我知道了~
资源详情
资源评论
资源推荐
收起资源包目录
PyPI 官网下载 | cidc_schemas-0.24.2.tar.gz (207个子文件)
setup.cfg 395B
MANIFEST.in 380B
wes_analysis_config.yaml.j2 2KB
rna_level1_analysis_config.yaml.j2 2KB
CT_1.json 24KB
wes_template.json 21KB
wes_analysis_template.json 21KB
mif_template.json 17KB
sample.json 17KB
CT_cytof_with_analysis.json 15KB
pbmc_template.json 14KB
plasma_template.json 14KB
rna_level1_analysis_template.json 12KB
normal_blood_dna_template.json 12KB
tumor_tissue_dna_template.json 12KB
normal_tissue_dna_template.json 11KB
rna_template.json 11KB
tumor_tissue_rna_template.json 11KB
h_and_e_template.json 11KB
tissue_slide_template.json 10KB
CT_1PA_multiWES.json 9KB
cytof_template.json 9KB
CT_ihc.json 7KB
ihc_template.json 7KB
strict_meta_schema.json 6KB
olink_template.json 6KB
cytof_analysis_template.json 5KB
olink_assay.json 5KB
clinical_trial.json 4KB
tcr_fastq_template.json 3KB
shipping_core.json 3KB
rna_fastq_template.json 3KB
participant.json 3KB
artifact_core.json 3KB
rna_bam_template.json 3KB
elisa_template.json 3KB
wes_fastq_template.json 3KB
micsss_antibody.json 3KB
ihc_entry.json 3KB
rna_assay-v0.json 3KB
cytof_entry.json 3KB
wes_bam_template.json 3KB
tcr_analysis_template.json 3KB
test_schema.json 3KB
available_assays.json 2KB
mif_assay.json 2KB
cytof_assay.json 2KB
artifact_elisa_xlsx.json 2KB
mif_antibody.json 2KB
artifact_npx.json 2KB
artifact_image.json 2KB
CT_minimal.json 2KB
aliquot.json 2KB
wes_assay.json 2KB
ihc_assay.json 2KB
micsss_assay.json 2KB
mif_export.json 2KB
artifact_fastq_gz.json 2KB
artifact_vcf_gz.json 2KB
artifact_bam_bai.json 2KB
artifact_binary.json 2KB
artifact_csv.json 2KB
artifact_tsv.json 2KB
artifact_tbi.json 2KB
artifact_xlsx.json 2KB
artifact_json.json 2KB
artifact_text.json 2KB
artifact_yaml.json 2KB
artifact_fcs.json 2KB
artifact_vcf.json 2KB
artifact_bam.json 2KB
artifact_maf.json 2KB
artifact_zip.json 2KB
artifact_gz.json 2KB
mapping.json 2KB
tumor_normal_pairing_template.json 2KB
cytof_antibody.json 1KB
elisa_antibody.json 1KB
salmon.json 1KB
tcr_assay.json 1KB
collection_event.json 1KB
wes_pair_analysis.json 1KB
participants_annotations_template.json 1KB
image.json 1KB
ihc_antibody.json 1KB
ngs_assay_core.json 1KB
cytof_analysis.json 1KB
mif_roi.json 1KB
somatic.json 1KB
elisa_assay.json 1KB
reads_core.json 1KB
mif_input.json 1000B
coverage_metrics.json 974B
reads_with_index.json 962B
antibody.json 960B
imaging_data.json 926B
report.json 895B
tcr_batch.json 865B
wes_entry.json 853B
tcr_replicates.json 837B
共 207 条
- 1
- 2
- 3
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0