This article lists the standard names biocohort uses for columns, R objects, functions, and files.
subject_tbl)| Column | Type | Description |
|---|---|---|
subject_id |
character | A unique subject ID. Works the same for any species. |
species |
character | The subject’s species, for example “rat” or “mouse”. Free-form, not a fixed list, and stored lower case. |
sex |
character | Biological sex: “M”, “F”, or NA if unknown. |
strain |
character | Strain or breed, for example “Fischer 344” or “B6”. |
genotype |
character | Genetic background or modification, for example “WT”, “KO”, “HET”. |
cohort |
character | Treatment group or cohort membership, for example “Control”, “Treatment_A”. |
timepoint |
character | Study visit, age, or collection date, for example “Day_0”, “Week_12”, “8wks”. |
notes |
character | Free-form annotations. |
sample_map)sample_map is the canonical, long-format sample table:
one row per sample, covering any number of assays and roles. A new assay
is a new row, never a new column or a new table.
| Column | Type | Description |
|---|---|---|
subject_id |
character | Reference to a subject in subject_tbl. |
assay |
character | The assay, a free-form value, for example "wgs",
"wes", "atac", "bulk_rna",
"scrna". |
sample_id |
character | A unique sample ID. |
role |
character | The sample’s role within its assay, for example
"tumor", "normal", or NA when it
does not apply. |
Other sample-level columns, such as fastq_1,
fastq_2, bam, lane, or
replicate, stay in sample_map when
validate_manifest() already knows the name, or when it is
passed in the sample_cols argument. A column that varies
within a subject but is not recognized or declared trips the
subject-level conflict check instead.
completeness_tbl)| Column | Type | Description |
|---|---|---|
subject_id |
character | Reference to a subject in subject_tbl. |
assay |
character | The assay, matching values in sample_map. |
n_samples |
integer | Sample count for the subject within the assay. |
assay is a free-form, lowercase value, not a fixed list.
Pick a stable label per assay and reuse it. Common examples:
| Assay | Code | Description |
|---|---|---|
| Whole genome sequencing | "wgs" |
Whole genome DNA sequencing. |
| Whole exome sequencing | "wes" |
Exome capture and sequencing. |
| ATAC-seq | "atac" |
Chromatin accessibility. |
| Bulk RNA-seq | "bulk_rna" |
Bulk transcriptomics. |
| Single-cell / single-nucleus RNA-seq | "scrna" |
Single-cell or single-nucleus transcriptomics. |
biocohort does not enforce a sample ID format. Pick one convention for a project and keep it. Putting the assay and role in the ID makes it easier to read:
{assay}_T{subject}, for example
"wes_T101", "wgs_T001".{assay}_N{subject}, for
example "wes_N101", "wgs_N001".{assay}_{subject}_{rep}, for example
"scrna_101_1", "bulk_rna_101_2".Tumor and normal pairs are not stored in
sample_map. Derive them on demand with
sample_pairs(), which builds a pair_id of
{tumor_sample_id}__{normal_sample_id}, for example
"wes_T101__wes_N101".
my_study, pilot_study, or just
study in examples.cohort, pilot_cohort,
study_cohort.subject(cohort, subject_id).name, which is also its key in the registry._tbl
suffix, or a descriptive name such as subject_data or
wes_samples.# Study
study <- study_new(
study_id = "STUDY_001",
title = "Example Genomics Study"
)
# Cohort
cohort <- cohort_new(
subject_tbl = subject_data,
sample_map = sample_data,
study = study
)
# Read one subject as a Subject object
rat_101 <- subject(cohort, "RAT_101")
# Read a stored analysis result
result <- cohort@analyses[["my_analysis_name"]]{noun}_new(), for
example study_new(), cohort_new().validate_{noun}(), for
example validate_manifest(),
validate_cohort().subjects(), samples(), or read the property
directly with @, for example
cohort@subject_tbl.read_{format}() or
write_{format}(), for example
read_manifest().sample_pairs().print() on a Cohort.classes.R.constructors.R.validate.R,
validate_manifest.R.io.R.{feature}.R,
for example analysis_registry.R, print.R.manifest_study_001.csv,
cohort_pilot_data.rda.{description}_{date}.rda or
{description}_{version}.fst.{analysis}_{date}_{version}.csv or
{analysis}_results.rda.manifest_pilot_wes_rna_v1.csv
manifest_pilot_cohort.csv
cohort_complete_metadata.csv
manifest, subject_tbl,
sample_map.is_ or
has_, for example is_valid,
has_missing.n_, for example
n_subjects, n_samples.strict,
verbose, allow_*, for example
allow_duplicates.cohort@analyses[["my_analysis"]].{title-in-kebab-case}.Rmd, for example
glossary.Rmd, naming-conventions.Rmd.@param, @return, and a runnable
@examples block. Link related functions with
[function_name()] or [ClassName].Study, Subject,
Cohort)."wes", "atac", "scrna"._id or
_sample_id.has_ or is_, or
read as a plain yes-or-no question.n_._tbl or _table.See the Glossary article for what these terms mean.