{"id":18304159,"url":"https://github.com/tripal/chado_linker_fields","last_synced_at":"2025-04-09T10:27:15.753Z","repository":{"id":154525789,"uuid":"631278432","full_name":"tripal/chado_linker_fields","owner":"tripal","description":"Tripal fields to display content linked to a different content type through linker tables","archived":false,"fork":false,"pushed_at":"2023-08-30T15:42:38.000Z","size":327,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":5,"default_branch":"7.x-3.x","last_synced_at":"2025-02-15T04:33:48.294Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tripal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-22T14:11:56.000Z","updated_at":"2023-04-22T20:41:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"d47179d1-ee94-454d-bebc-2d711b7e755c","html_url":"https://github.com/tripal/chado_linker_fields","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tripal%2Fchado_linker_fields","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tripal%2Fchado_linker_fields/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tripal%2Fchado_linker_fields/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tripal%2Fchado_linker_fields/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tripal","download_url":"https://codeload.github.com/tripal/chado_linker_fields/tar.gz/refs/heads/7.x-3.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248018834,"owners_count":21034152,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-05T15:27:58.514Z","updated_at":"2025-04-09T10:27:15.731Z","avatar_url":"https://github.com/tripal.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chado Linker Fields Documentation\n**Tripal fields to display content linked to a different content type through linker tables**\n\nThis module provides fields for Tripal 7.x-3.10 or later to display linked content.\n**Please be aware that this module will not be compatible with Tripal versions 7.x-3.9 or earlier.**\n\n\n\n## Background\n\nA number of content types have chado linker tables that define relationships between two\ndifferent content types. For example, in the core Tripal module there is a field named\n`chado_linker__contact` that can be used, for example, to add contact information on a\nfeature, such as a gene. The correspondence information is stored in the chado table\n`feature_contact`.\nFor example, this table might contain these records:\n```\n feature_contact_id | feature_id | contact_id \n--------------------+------------+------------\n                  1 |          1 |          3\n                  2 |          2 |          3\n```\nAnd the linked contact could appear on a gene (feature) page as in this example\n\n![chado_linker__contact example image](/docs/chado_linker__contact_example.png?raw=true \"Example display of chado_linker__contact field\")\n\n\n\n## Fields Provided by This Module\n\nThis module provides linker fields for the following content types\n\n| Linker Field Name | Controlled Vocabulary Term |\n| --- | --- |\n| chado_linker__analysis | [NCIT:C25391 (Analysis)]( https://www.ebi.ac.uk/ols/ontologies/ncit/terms?iri=http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FNCIT_C25391) |\n| chado_linker__assay | [NCIT:C60819 (Assay)]( https://www.ebi.ac.uk/ols/ontologies/ncit/terms?iri=http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FNCIT_C60819) |\n| chado_linker__biomaterial | [NCIT:C43376 (Biologically-Derived Material)]( https://www.ebi.ac.uk/ols/ontologies/ncit/terms?iri=http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FNCIT_C43376) |\n| chado_linker__contact (**existing**) | local:contact |\n| chado_linker__feature | [NCIT:C73619 (Feature)]( https://www.ebi.ac.uk/ols/ontologies/ncit/terms?iri=http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FNCIT_C73619) |\n| chado_linker__featuremap | EDAM [data:1274 (map)](https://edamontology.github.io/edam-browser/#data_1274) |\n| chado_linker__organism | [NCIT:C14250 (Organism)]( https://www.ebi.ac.uk/ols/ontologies/ncit/terms?iri=http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FNCIT_C14250) |\n| chado_linker__project | [NCIT:C47885 (Project)](https://www.ebi.ac.uk/ols/ontologies/ncit/terms?iri=http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FNCIT_C47885) |\n| chado_linker__stock | [NCIT:C48288 (Stock)]( https://www.ebi.ac.uk/ols/ontologies/ncit/terms?iri=http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FNCIT_C48288) |\n| chado_linker__study | [NCIT:C63536 (Study)]( https://www.ebi.ac.uk/ols/ontologies/ncit/terms?iri=http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FNCIT_C63536) |\n\nThese fields can be used on any content type, however there must be a corresponding chado linker table, with a name based\non the two content types. For example, to link a stock to a project, the table can be named either `project_stock` or `stock_project`.\nIf Tripal does not provided a needed linker table, you can create a custom chado table yourself to store the linking information. See \n[the Tripal Documentation](https://tripal.readthedocs.io/en/latest/user_guide/custom_tables.html)\nfor more information on creating custom tables.\n\n\n\n## How to add a field to a content type\nThese fields can be added to any content with an appropriate linker table.\n\nOn your site's admin menu, navigate to\n\nStructure \u0026rarr; Tripal content types\n\nor navigate directly to\n\n`/admin/structure/bio_data`.\n\nOn a content type click on `manage fields` and then click on `+ Check for new fields`\nIf a suitable linker table exists, a corresponding linker field will be added to the content type.\nFor example, on project content type you should see this result:\n\n![project added fields example image](/docs/add_fields_to_project_example.png?raw=true \"Example of adding fields to project content type\")\n\nYou can then select the \"MANAGE DISPLAY\" tab, enable the fields if they are disabled, and\nconfigure where you would like the new fields displayed.\n\n![project manage display example image](/docs/configure_fields_on_project_example.png?raw=true \"New fields on the Manage Display tab, ready to be configured\")\n\n\n\n## Configuration of Field Settings\nOn your site's admin menu, navigate to\n\nTripal \u0026rarr; Data Storage \u0026rarr; Chado \u0026rarr; Field Settings\n\nor navigate directly to\n\n`/admin/tripal/storage/chado/field_settings`\n\nThe configuration form provides two settings:\n\n![field settings form image](/docs/field_settings_form.png?raw=true \"Appearance of the Field Settings administrative form\")\n\n## Maximum records to display\nThis setting is used to configure when a field converts to a summary view.\nThis is necessary when the number of records to display is too large for your site to handle.\nFor example, a Genome Assembly may be linked to all of the gene predictions in\nthat assembly, which will likely be tens of thousands of genes. Displaying this many records, even if a\npager is used, will likely overwhelm any Tripal site. In this case a summary view is returned.\n\nExample of a summary view on an analysis (Gene Prediction) page:\n\n![analysis_feature summary example image](/docs/analysis_feature_summary_example.png?raw=true \"Example of a summary view on an analysis (Gene Prediction) page\")\n\n## Maximum field height\nThis setting is used to configure the maximum height of a single record displayed by a field.\nFor example, if linking an analysis to an organism, the analysis record may have an extensive\ndescription, and if multiple analyses are linked, the resulting page that is displayed may be\nunwieldy. When the content exceeds the specified height, a scrollbar will be provided.\n\nExample of an analysis with scroll bar on a project page:\n\n![maximum height example image](/docs/max_height_example.png?raw=true \"Example of an analysis with scroll bar on a project page\")\n\n\n\n## Existing Linker Tables\nCore Tripal provides the following linker tables compatible with the fields in this module.\nOther modules may define additional linker tables.\nPlease note that a linker table must have a primary key to be usable by these fields.\nFor example, the `analysis_organism` materialized view in core Tripal does not have a primary key,\nso it will not be recognized by these linker fields. However, the\n[tripal_eutils module](https://github.com/NAL-i5K/tripal_eutils)\ndoes define an `organism_analysis` custom table, which can be used.\n```\nanalysis_pub\nanalysisfeature\nassay_biomaterial\nassay_project\ncell_line_feature\ncell_line_library\ncell_line_pub\nfeature_contact\nfeaturemap_contact\nfeaturemap_organism\nfeaturemap_pub\nlibrary_contact\nlibrary_feature\nlibrary_pub\norganism_pub\nphylotree_pub\nproject_analysis\nproject_contact\nproject_feature\nproject_pub\nproject_stock\nstock_feature\nstock_featuremap\nstock_library\nstock_pub\nstockcollection_stock\nstudy_assay\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftripal%2Fchado_linker_fields","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftripal%2Fchado_linker_fields","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftripal%2Fchado_linker_fields/lists"}