Use Case: Gregor AnVIL Repository Managed with git-drs
--
Goal
Create a Git repository for the Gregor project that stores reviewable project structure, manifests, analysis code, and DRS pointer files in Git while using git-drs to hydrate large data files from the Gregor data hosted on the AnVIL platform.
The repository should let project users clone normal Git history, inspect which Gregor data objects are referenced, and download only the files they need through AnVIL DRS access controls.
Primary User Story
As a Gregor project analyst, I want a Git repository that contains git-drs pointer files for Gregor datasets on AnVIL so that I can version analyses and data references together without committing large controlled-access files to Git.
Supporting User Stories
Bootstrap repository owner
As a repository owner, I want a bootstrap utility that queries the AnVIL DRS server and creates git-drs pointer files so that I can initialize or refresh the repository from authoritative AnVIL metadata instead of hand-writing pointers.
Project analyst
As an analyst, I want to clone the repository and run git drs pull for selected files or directories so that I can hydrate only the Gregor files required for my current analysis.
Data steward
As a data steward, I want pointer files to be generated from AnVIL DRS records so that Git history records stable DRS identifiers, object sizes, checksums where available, and intended repository paths.
Reviewer or collaborator
As a reviewer, I want pull requests to show changes to manifests, analysis code, and DRS pointers so that I can evaluate which data inputs changed without downloading controlled-access payloads.
Scope
In scope:
- Create a new Git repository initialized for
git-drs.
- Configure a
git-drs remote for the AnVIL-hosted Gregor DRS service or compatible gateway.
- Write a bootstrap utility that interacts with the AnVIL DRS server.
- Generate repository-relative pointer files and local
git-drs metadata from AnVIL DRS object metadata.
- Track generated data paths with
.gitattributes so Git stores pointers instead of large payloads.
- Support selective hydration with
git drs pull -I <pattern>.
- Document the bootstrap and refresh workflow.
Out of scope for the first increment:
- Bypassing AnVIL authentication or authorization.
- Mirroring all Gregor payload bytes into Git or a separate unmanaged bucket.
- Editing AnVIL source metadata from the Git repository.
- Replacing Terra/AnVIL workspace data management.
Assumptions
- Gregor data objects are discoverable through an AnVIL DRS endpoint or an AnVIL-compatible service that returns GA4GH DRS object metadata.
- Users have valid AnVIL credentials and authorization for the Gregor objects they hydrate.
- The bootstrap utility can map AnVIL DRS objects to deterministic repository paths using a manifest, workspace table export, DRS object metadata, or a project-specific naming policy.
git-drs can hydrate pointer files through configured DRS access URLs after authentication.
Proposed Repository Layout
gregor-drs-repo/
README.md
.gitattributes
manifests/
gregor-drs-manifest.tsv
data/
<study-or-cohort>/
<sample-or-family>/
<file>.cram
<file>.crai
workflows/
notebooks/
scripts/
bootstrap-gregor-anvil-drs
Bootstrap Utility Requirement
A bootstrap utility needs to be written because the initial repository state should be derived from the AnVIL DRS server rather than manually assembled.
The utility should:
- Authenticate to AnVIL using the supported local credential mechanism.
- Read an input manifest, workspace table export, or query parameters that identify the Gregor DRS objects to include.
- Call the AnVIL DRS server for each object.
- Validate required metadata, including DRS ID, name or suggested path, size, checksum when available, and access method metadata.
- Create or update
git-drs pointer files at deterministic repository-relative paths.
- Create or update any local metadata files required by
git-drs for pointer hydration.
- Write a manifest that records the DRS ID, repository path, size, checksum, source AnVIL workspace or table row, and bootstrap timestamp.
- Leave payload bytes unhydrated by default.
- Be idempotent so it can refresh pointer metadata when AnVIL records change.
- Report additions, changes, deletions, and metadata conflicts before the user commits.
Acceptance Criteria
- A maintainer can create an empty Git repository and configure it with
git-drs for the Gregor AnVIL DRS endpoint.
- The bootstrap utility can generate pointer files for a representative Gregor manifest without downloading payload bytes.
- Generated files are tracked by
.gitattributes with the git-drs filter.
git status shows reviewable pointer and manifest changes after bootstrap.
- A collaborator can clone the repository, authenticate to AnVIL, and run
git drs pull -I <path-or-pattern> to hydrate selected files.
- Pointer refreshes are deterministic: rerunning the bootstrap utility with unchanged AnVIL metadata produces no Git diff.
- Metadata conflicts, missing checksums, inaccessible DRS IDs, and path collisions are reported clearly.
- Documentation explains required credentials, bootstrap inputs, expected outputs, and common troubleshooting steps.
Example Workflow
mkdir gregor-drs-repo
cd gregor-drs-repo
git init
git drs install
git drs init
git drs remote add gen3 anvil GREGOR/AnVIL --cred ~/.config/anvil/credentials.json
git drs track "data/**"
git add .gitattributes
scripts/bootstrap-gregor-anvil-drs \
--drs-endpoint https://drs.anvilproject.org \
--manifest manifests/gregor-source.tsv \
--output-manifest manifests/gregor-drs-manifest.tsv \
--data-root data
git add README.md .gitattributes manifests/ data/ scripts/
git commit -m "Bootstrap Gregor AnVIL DRS pointers"
A collaborator can then hydrate a subset:
git clone <gregor-drs-repo-url>
cd gregor-drs-repo
git drs remote add gen3 anvil GREGOR/AnVIL --cred ~/.config/anvil/credentials.json
git drs pull -I "data/cohort-a/**"
Open Design Questions
- Which AnVIL endpoint and authentication flow should be considered canonical for Gregor DRS discovery?
- Should the bootstrap utility be a new
git-drs subcommand or a project-local script in the Gregor repository?
- What manifest format should be the source of truth for DRS IDs and desired repository paths?
- How should the utility represent DRS records that lack checksums?
- Should deleted or withdrawn AnVIL records remove pointers automatically or require an explicit tombstone workflow?
- What validation is required before publishing a refreshed pointer commit?
Use Case: Gregor AnVIL Repository Managed with
git-drs--
Goal
Create a Git repository for the Gregor project that stores reviewable project structure, manifests, analysis code, and DRS pointer files in Git while using
git-drsto hydrate large data files from the Gregor data hosted on the AnVIL platform.The repository should let project users clone normal Git history, inspect which Gregor data objects are referenced, and download only the files they need through AnVIL DRS access controls.
Primary User Story
As a Gregor project analyst, I want a Git repository that contains
git-drspointer files for Gregor datasets on AnVIL so that I can version analyses and data references together without committing large controlled-access files to Git.Supporting User Stories
Bootstrap repository owner
As a repository owner, I want a bootstrap utility that queries the AnVIL DRS server and creates
git-drspointer files so that I can initialize or refresh the repository from authoritative AnVIL metadata instead of hand-writing pointers.Project analyst
As an analyst, I want to clone the repository and run
git drs pullfor selected files or directories so that I can hydrate only the Gregor files required for my current analysis.Data steward
As a data steward, I want pointer files to be generated from AnVIL DRS records so that Git history records stable DRS identifiers, object sizes, checksums where available, and intended repository paths.
Reviewer or collaborator
As a reviewer, I want pull requests to show changes to manifests, analysis code, and DRS pointers so that I can evaluate which data inputs changed without downloading controlled-access payloads.
Scope
In scope:
git-drs.git-drsremote for the AnVIL-hosted Gregor DRS service or compatible gateway.git-drsmetadata from AnVIL DRS object metadata..gitattributesso Git stores pointers instead of large payloads.git drs pull -I <pattern>.Out of scope for the first increment:
Assumptions
git-drscan hydrate pointer files through configured DRS access URLs after authentication.Proposed Repository Layout
Bootstrap Utility Requirement
A bootstrap utility needs to be written because the initial repository state should be derived from the AnVIL DRS server rather than manually assembled.
The utility should:
git-drspointer files at deterministic repository-relative paths.git-drsfor pointer hydration.Acceptance Criteria
git-drsfor the Gregor AnVIL DRS endpoint..gitattributeswith thegit-drsfilter.git statusshows reviewable pointer and manifest changes after bootstrap.git drs pull -I <path-or-pattern>to hydrate selected files.Example Workflow
A collaborator can then hydrate a subset:
Open Design Questions
git-drssubcommand or a project-local script in the Gregor repository?