Package: biocohort 0.1.1

Samuel Bharti

biocohort: Cohort Objects for Subjects and Samples in Omics Studies

Keeps the subjects, samples, and analysis outputs of a study in one validated object. It starts from a sample manifest with one row per sample, which is read, checked, and split into a subject table and a sample map. Species and assay are plain values in those tables rather than fixed types, so the same object serves any organism and any omics assay. From that object the package writes the sample sheet a pipeline expects, pairs tumor and normal samples on demand, and records where each analysis writes its output so the files can be loaded back in by subject or by pair. Manual corrections are kept in an audit trail. Results can also be translated across genome builds or species, with liftover for coordinates and ortholog mapping for genes.

Authors:Samuel Bharti [aut, cre, cph], Barret Schloerke [ths], Carson Sievert [ths], Posit Software, PBC [cph, fnd]

biocohort_0.1.1.tar.gz
biocohort_0.1.1.zip(r-4.7-any)biocohort_0.1.1.zip(r-4.6-any)
biocohort_0.1.1.tar.gz(r-4.7-any)biocohort_0.1.1.tar.gz(r-4.6-any)
biocohort_0.1.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
biocohort/json (API)

# Install 'biocohort' in R:
install.packages('biocohort', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/samuelbharti/biocohort/issues

Pkgdown/docs site:https://www.samuelbharti.com

Datasets:

On CRAN:

Conda:

3.18 score 5 scripts 520 downloads 63 exports 30 dependencies

Last updated from:60ce0bbfe9. Checks:6 OK. Indexed: no.

TargetResultTimeFilesSyslog
linux-develOK193
source / vignettesOK193
linux-releaseOK189
windows-develOK105
windows-releaseOK139
wasm-releaseOK139

Exports:analysis_filesanalysis_listanalysis_registeranalysis_specanalysis_spec_newAnalysisSpecapply_correctionsas_coldatacheck_pathsCohortcohort_contrastscohort_derivecohort_filtercohort_groupscohort_newcohort_qccohort_readcohort_savecompletenesscorrections_logderive_logensure_dirjoin_metadataliftover_backendsliftover_crossmapliftover_intervalsliftover_rtracklayerliftover_vcfload_analysesload_analysismanifest_from_wideortholog_babelgeneortholog_backendsortholog_genesorthologizeproject_pathproject_rootqc_logread_correctionsread_dotenvread_manifestread_manifest_csvread_study_yamlregister_liftover_backendregister_ortholog_backendsample_pairssample_sheetsample_sheet_templatessamplesStudystudy_newsubjectSubjectsubject_newsubjectstranslatetranslation_reporttranslation_statsTranslationResultvalidate_cohortvalidate_manifestwrite_manifestwrite_study_yaml

Dependencies:backportsbitbit64checkmateclicliprcpp11crayondplyrfsgenericsgluehmslifecyclemagrittrpillarpkgconfigprettyunitsprogressR6readrrlangS7tibbletidyselecttzdbutf8vctrsvroomwithr

Get started with biocohort
From a manifest to a cohort | A wide table instead | Reading the cohort back | Writing a pipeline sample sheet | Registering an analysis | Saving and loading a cohort | Translating features across species | Where to go next

Last update: 2026-09-18
Started: 2026-09-18

Glossary
Core entities | Sample and assay concepts | Data tables | Registry and analysis | Data organization | Genotype and phenotype | Object structure | File and path references | Further reading

Last update: 2026-09-18
Started: 2026-09-18

Naming conventions
Column names | Subject-level metadata (subject_tbl) | Sample mapping columns (sample_map) | Completeness summary columns (completeness_tbl) | Assay type values | Sample ID formats | Object names | R objects and variables | Example object creation | Function names | File names | Package code files | Data files | Example manifest file names | Variable and parameter naming | Documentation and markdown | A quick check before adding something new | Further reading

Last update: 2026-09-18
Started: 2026-09-18

Readme and manuals

Help Manual

Help pageTopics
biocohort: Subject and Sample Rosters for Omics Studiesbiocohort-package biocohort
Retrieve analysis file manifests from a cohortanalysis_files
List registered analysis specificationsanalysis_list
Register an analysis specification in a cohortanalysis_register
Retrieve an analysis specification from registryanalysis_spec
Create an AnalysisSpec objectanalysis_spec_new
S7 AnalysisSpec classAnalysisSpec
Apply documented corrections to a manifestapply_corrections
Build sample metadata for a count matrixas_coldata
Check that a cohort's file paths exist on diskcheck_paths
S7 Cohort classCohort
Every pairwise contrast between a cohort's groupscohort_contrasts
Derive a column from cutoffs on an existing numeric columncohort_derive
Keep a subset of a cohort's subjects or assayscohort_filter
Group a cohort's subjects by one or more columnscohort_groups
Create a Cohort objectcohort_new
Flag or drop subjects or samples for quality controlcohort_qc
Read a cohort saved with cohort_save()cohort_read
Save a cohort to an RDS filecohort_save
Per-assay sample counts for a cohortcompleteness
Return the audit table of a corrected manifestcorrections_log
Read a cohort's derived-column logderive_log
Create a folder when it is absentensure_dir
Example Cohort Datasetexample_cohort
Add cohort metadata to an analysis objectjoin_metadata
List registered liftover backendsliftover_backends
Liftover backend backed by CrossMapliftover_crossmap
Liftover a set of genomic intervals across assemblies or speciesliftover_intervals
Liftover backend backed by rtracklayerliftover_rtracklayer
Liftover a VCF of variants with CrossMap (allele-aware)liftover_vcf
Load registered analyses into a cohort from diskload_analyses
Load an analysis's feature table from diskload_analysis
Reshape a wide sample table into a long-format manifestmanifest_from_wide
Ortholog backend backed by babelgeneortholog_babelgene
List registered ortholog backendsortholog_backends
Map gene-level features to orthologs in another speciesortholog_genes
Deprecated alias for translate()orthologize
Build a path under the project rootproject_path
Find the project root folderproject_root
Read a cohort's QC logqc_log
Read a corrections table from a fileread_corrections
Read a dotenv file into the environmentread_dotenv
Read and validate a long-format manifest fileread_manifest
Read and validate a long-format manifest CSV fileread_manifest_csv
Build a cohort from a study YAML fileread_study_yaml
Register a liftover backendregister_liftover_backend
Register a gene-ortholog backendregister_ortholog_backend
Derive sample pairs from a sample mapsample_pairs
Write a pipeline sample sheet from a cohortsample_sheet
List the built-in sample sheet templatessample_sheet_templates
Read the sample map of a cohortsamples
S7 Study classStudy
Create a Study objectstudy_new
Build one Subject from a cohortsubject
S7 Subject classSubject
Create a Subject objectsubject_new
Read the subject table of a cohortsubjects
Translate features (or a whole cohort) across species or assembliestranslate
Retrieve per-analysis translation results from a cohorttranslation_report
Summary statistics for a translationtranslation_stats
Result of a cross-species or cross-assembly translationTranslationResult
Validate a Cohort objectvalidate_cohort
Validate and structure a long-format sample manifestvalidate_manifest
Write a manifest or a cohort's tables to a delimited filewrite_manifest
Write a cohort as a study YAML filewrite_study_yaml