{"id":34701913,"url":"https://github.com/hubmapconsortium/asct-b-generator","last_synced_at":"2026-05-22T21:32:25.458Z","repository":{"id":38083981,"uuid":"427470665","full_name":"hubmapconsortium/asct-b-generator","owner":"hubmapconsortium","description":"CLI to convert a simple CSV file into ASCT+B format","archived":false,"fork":false,"pushed_at":"2023-03-06T15:14:52.000Z","size":312,"stargazers_count":2,"open_issues_count":8,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-14T03:54:43.436Z","etag":null,"topics":["human-reference-atlas"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hubmapconsortium.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-12T19:13:35.000Z","updated_at":"2024-04-12T20:02:04.000Z","dependencies_parsed_at":"2022-07-27T16:02:43.313Z","dependency_job_id":null,"html_url":"https://github.com/hubmapconsortium/asct-b-generator","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/hubmapconsortium/asct-b-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hubmapconsortium%2Fasct-b-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hubmapconsortium%2Fasct-b-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hubmapconsortium%2Fasct-b-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hubmapconsortium%2Fasct-b-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hubmapconsortium","download_url":"https://codeload.github.com/hubmapconsortium/asct-b-generator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hubmapconsortium%2Fasct-b-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33369599,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-21T12:23:38.849Z","status":"online","status_checked_at":"2026-05-22T02:00:06.671Z","response_time":265,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["human-reference-atlas"],"created_at":"2025-12-24T22:53:15.002Z","updated_at":"2026-05-22T21:32:25.453Z","avatar_url":"https://github.com/hubmapconsortium.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ASCT+B Generator\n\nThis program converts a simple CSV file into a HuBMAP CCF ASCT+B table.\n\nIn the sampledata directory, an included file \"demo-input.txt\" was generated by Excel using the \"demo-input.xlsx\" file (Save As \"Tab delimited Text\"). The generated output is a CSV file. The example file \"demo-output.csv\" was generated by the program.\n\n## Change Log\n\nSee the [ChangeLog](CHANGELOG.md) for the latest developments.\n\n## Known Issues\n\nSee the [Issue Tracker](https://github.com/hubmapconsortium/asct-b-generator/issues?q=is%3Aissue+is%3Aopen+label%3A%22known+issue%22) for known issues.\n\n## Assumptions\n\nThe following assumptions are built into the program.\n  1. The ASCT+B table format allows anatomical structures that are not \"leaves\" to contain biomarkers or references.\n  2. All anatomical structures must be uniquely named, for example, there can not be two structures called \"ovary\" but there can be \"left ovary\" and \"right ovary\".\n  3. Cell type is only one level.\n  3. Commas can not be used in names for anatomical structures, cells, or features.\n  3. ***It is assumed that the \"author preferred name\" is unique across anatomical structures and ontology IDs.***\n\n## Data validation\n\nThe program performs the following data validation checks.\n  1. Check that there is only one root to the anatomical structure.\n  1. Enforce the parent requirements for anatomical structure. By default an anatomical structure can have multiple parents. For example, the primary ovarian follicle and the primordial ovarian follicle both have a granulosa cell layer. A command line argument can change this behavior such that anatomical structures can have only one parent.\n  2. Check that anatomical structures, cells, biomarkers and references are appropriately defined. By default the program requires all features be explicitely defined, although a command line argument can disable this requirement.\n  3. Check that anatomical structures, cell types, biomarkers and references all have unique names.\n  3. Check that names do not contain commas.\n  3. Check that biomarkers and references are only applied to anatomical structures and cell types.\n\n## Requirements\n\nThis program has only been tested on a Mac OS using Python 3. Although it should work on a Linux system.\n\nThe program requires the anytree Python package.\n```\nhttps://pypi.org/project/anytree/\n\n```\nThe anytree package can be installed as follows.\n```\npython3 -m pip install anytree --user\n```\n\n## Usage\n\n```\nusage: process.py [-h] [-m] [-u] [-d] [-v] input output\n\nGenerate ASCT+B table.\n\npositional arguments:\n  input          Input file\n  output         Output file (CSV)\n\noptional arguments:\n  -h, --help     show this help message and exit\n  -m, --missing  Ignore missing cell types, biomarkers and references. For example, if a cell type is marked as containing a biomarker that wasn't defined, this flag would prevent the program from exiting with an error and instead the ASCT+B table would be generated. When the flag isn't used, all features must be defined.\n  -u, --unique   Make sure all anatomical structures have one and only one parent.\n  -d, --dot      Output tree as a DOT file for plotting with Graphviz.\n  -v, --verbose  Print the tree to the terminal.\n```\n\nTo process the demo input file and generate a CSV file that can be opened by Excel\n\n```\nprocess.py \u003cinput CSV file\u003e \u003coutput CSV file\u003e\n```\n\n\n```\nprocess.py demo-input.txt demo-output.csv\n```\n\n## Input file (CSV)\n\nThe comma delimited file (tab separated is also supported) must contain a header line and the following twelve columns:\n\nNAME (REF DOI)\tLABEL (REF DETAILS)\tID (REF NOTES)\tNOTE\tABBR\tTYPE\tCHILDREN\tCELLS\tGENES\tPROTEINS\tPROTEOFORMS\tLIPIDS\tMETABOLITES\tFTUs\tREFERENCES\n\nThe **Type** value needs to be \"AS\" for anatomical structures and \"CT\" for cell types. It doesn't matter what type values are used for the other items, so long as it's not either AS or CT.\n\n**Children** is a comma separated list of child anatomical structure (AS) objects. These children need to be either anatomical structures (AS). The **Cells**, **Genes**, **Proteins**, **Proteoforms**, etc fields should be comma separated lists of the appropriate objects (e.g., **Cells**, should be a comma separated list of relevant cells). In all cases the objects **Name** or **Ref DOI** should be used. \n\nThe first line in the input file is assumed to contain a header and is ignored.\n\nThe following example is incomplete and just included to exemplify the field values and usage:\n\n```\nNAME (REF DOI)\tLABEL (REF DETAILS)\tID (REF NOTES)\tNOTE\tABBR\tTYPE\tCHILDREN\tCELLS\tGENES\tPROTEINS\tPROTEOFORMS\tLIPIDS\tMETABOLITES\tFTU\tREFERENCES (NAME/DOI)\novary\t\tUBERON:0000992\tAS\tcentral ovary, lateral ovary, medial ovary, mesovarium, ovarian ligament\thilum of ovary\ncentral ovary\t\t\tAS\tcentral inferior ovary, central superior ovary\t\nlateral ovary\t\t\tAS\tlateral inferior ovary, lateral superior ovary\t\nmedial ovary\t\t\tAS\tmedial inferior ovary, medial superior ovary\t\nmesovarium\t\tUBERON:0001342\tAS\t\t\novarian ligament\t\tUBERON:0008847\tAS\t\t\nhilum of ovary\t\t\tAS\tovarian artery, ovarian vein, pampiniform plexus, rete ovarii\thilar cell\ncorona radiata\t\tCL:0000713\tCT\t\t\t\t\t\t\t\t\tdoi:10.1093/oxfordjournals.humrep.a136365\nhilar cell\t\tCL:0002095\tCT\t\t\t\talkaline phosphatase, acid phosphatase, non-specific esterase, inhibin, calretinin, melan-A, cholesterol esters\t\t\t\t\tMcKay et al 1961, Boss et al 1965, Mills et al 2020, Jungbluth et al 1998, Pelkey et al 1998\nmural granulosa cell\t\t\tCT\t\t\t\t\t\t\t\t\tdoi:10.1093/oxfordjournals.humrep.a136365\nprimary oocyte\t\tCL:0000654\tCT\t\t\t\t\t\t\t\t\tdoi:10.1093/oxfordjournals.humrep.a136365\nsecondary oocyte\t\tCL:0000655\tCT\t\t\t\t\t\t\t\t\tdoi:10.1093/oxfordjournals.humrep.a136365\ncolumnar ovarian surface epithelial columnar cell\t\t\tCT\t\t\t\tcalretinin, mesothelin\t\t\t\t\tMills et al 2020, Reeves et al 1971, Hummitzsch et al 2013, Blaustein et al 1979, McKay et al 1961\nflattened cuboidal ovarian surface epithelial cell\t\t\tCT\t\t\t\toviduct-specific glycoprotein-1, E-cadherin\t\t\t\t\tMills et al 2020, Reeves et al 1971, Hummitzsch et al 2013, Blaustein et al 1979, McKay et al 1961\noviduct-specific glycoprotein-1\t\t\tProtein\t\t\t\t\t\t\t\t\t\nmesothelin\t\t\tProtein\t\t\t\t\t\t\t\t\t\nE-cadherin\t\t\tProtein\t\t\t\t\t\t\t\t\t\ndoi:10.1093/oxfordjournals.humrep.a136365\tPMID: 3558758\t\tReference\t\t\t\t\t\t\t\t\t\nMcKay et al 1961\tMcKay, D., Pinkerton, J., Hertig, A. \u0026 Danziger, S. (1961). The Adult Human Ovary: A Histochemical Study. Obstetrics \u0026 Gynecology, 18(1), 13-39. \t\tReference\t\t\t\t\t\t\t\t\t\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhubmapconsortium%2Fasct-b-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhubmapconsortium%2Fasct-b-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhubmapconsortium%2Fasct-b-generator/lists"}