Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/calypr/.nav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ title: Calypr
nav:
- index.md
- Quick Start Guide: quick-start.md
- Quickstart: quickstart/
- Data: data/
- Project Management: project-management/
- Analysis: analysis/
Expand Down
8 changes: 8 additions & 0 deletions docs/calypr/project-management/calypr-admin/add-users.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,11 @@ data-client collaborator add [project_id] user-read-only@example.com

## 2. Approvals
In order to implement these requests, **an authorized user will need to sign** the request before the user can use the remote repository. See `data-client collaborator approve --help`

## 3. Remove a Collaborator

To remove a user from a project:

```sh
data-client collaborator remove [project_id] user@example.com
```
Comment on lines +29 to +33
7 changes: 7 additions & 0 deletions docs/calypr/quickstart/.nav.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
title: Quickstart

nav:
- index.md
- Create a Project: create-project.md
- Upload & Download Files: upload-download.md
- Manage Collaborators: collaborators.md
103 changes: 103 additions & 0 deletions docs/calypr/quickstart/collaborators.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
---
title: Manage Collaborators
---

# Manage Collaborators

Project access in CALYPR uses a request-and-approve model. A project administrator adds a user, and a steward (someone with the `requestor` role at the institution level) approves the request before access is granted.

All collaborator management is done with the `data-client` tool.

---

## Add a Collaborator

```bash
./data-client collaborator add [project_id] [email] --profile=<profile-name>
```

Grant **read** access (default):

```bash
./data-client collaborator add SEQ-MyProject user@example.com --profile=mycommons
```

Grant **write** access:

```bash
./data-client collaborator add SEQ-MyProject user@example.com --profile=mycommons --write
```

If you have admin permissions, auto-approve the request in one step:

```bash
./data-client collaborator add SEQ-MyProject user@example.com --profile=mycommons --write --approve
```

---

## Remove a Collaborator

```bash
./data-client collaborator rm SEQ-MyProject user@example.com --profile=mycommons
```

Auto-approve the revocation (requires admin):

```bash
./data-client collaborator rm SEQ-MyProject user@example.com --profile=mycommons --approve
```

---

## View Pending Requests

See all requests waiting for approval:

```bash
./data-client collaborator pending --profile=mycommons
```

---

## Approve a Request

If you are a project administrator or steward, approve a pending request by its ID:

```bash
./data-client collaborator approve [request_id] --profile=mycommons
```

---

## List Active Collaborators

List access requests for your project:

```bash
# All active requests
./data-client collaborator ls --profile=mycommons --active

# Your own requests
./data-client collaborator ls --profile=mycommons --mine

# Requests for a specific user (admin only)
./data-client collaborator ls --profile=mycommons --username=user@example.com
```

---

## Roles Summary

| Role | Can add collaborators | Can approve requests |
|---|---|---|
| Project member | No | No |
| Project administrator | Yes | Yes (own project) |
| Institution steward | No | Yes (own institution) |

---

## Next Steps

- [Upload & Download Files](upload-download.md) — share data with your new collaborators
- [data-client Access & Collaboration](../../tools/data-client/access_requests.md) — full command reference
97 changes: 97 additions & 0 deletions docs/calypr/quickstart/create-project.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
---
title: Create a Project
---

# Create a Project

!!! info "Admin-assisted setup"
Project creation is currently handled by the CALYPR team. Submit a request and they will provision your project and send you the details you need to get started.

## Step 1 — Request a Project

Email `support@calypr.org` with:

- Your CALYPR account email
- A short project name and description
- The institution or program it belongs to

The team will respond with:

| Detail | Example |
|---|---|
| GitHub repository URL | `https://github.com/calypr/my-project` |
| Project ID | `SEQ-MyProject` |
| DRS server URL | `https://calypr-public.ohsu.edu` |
| S3 bucket name | `calypr-my-project` |

---

## Step 2 — Install Git DRS

If you haven't already, install Git LFS and Git DRS.

**Initialize Git LFS** (once per machine):

```bash
git lfs install --skip-smudge
```

**Install Git DRS:**

```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/calypr/git-drs/refs/heads/main/install.sh)"
```

Add Git DRS to your PATH:

```bash
echo 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.bash_profile
source ~/.bash_profile
```

---

## Step 3 — Clone and Initialize

Clone the repository provided by the CALYPR team:

```bash
git clone https://github.com/calypr/my-project.git
cd my-project
git drs init
```

`git drs init` configures the Git hooks needed for DRS-backed file uploads.

---

## Step 4 — Configure the DRS Remote

Use the project details from Step 1:

```bash
git drs remote add gen3 production \
--cred ~/.gen3/credentials.json \
--url https://calypr-public.ohsu.edu \
--project SEQ-MyProject \
--bucket calypr-my-project
```

Verify the remote was added:

```bash
git drs remote list
```

```
* production gen3 https://calypr-public.ohsu.edu
```

The `*` marks your default remote.

---

## Next Steps

- [Upload & Download Files](upload-download.md) — add your first data files
- [Manage Collaborators](collaborators.md) — invite team members
39 changes: 39 additions & 0 deletions docs/calypr/quickstart/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
title: Quickstart
---

# Quickstart

Get up and running with CALYPR in three steps.

## Prerequisites

Before you begin, make sure you have:

- **Git** installed ([download](https://git-scm.com))
- **Git LFS** installed — [macOS](https://formulae.brew.sh/formula/git-lfs): `brew install git-lfs` / [Linux/Windows](https://git-lfs.com)
- **A CALYPR account** — contact your project administrator or email `support@calypr.org`
- **Gen3 API credentials** downloaded from your [Profile page](https://calypr-public.ohsu.edu/Profile)

!!! tip "API credentials expire every 30 days"
Download fresh credentials from your Profile page when they expire and re-run `git drs remote add` to update your configuration.

---

## Steps

<div class="grid cards" markdown>

- :octicons-repo-16: **[1. Create a Project](create-project.md)**

Request a new project and configure your local repository.

- :octicons-upload-16: **[2. Upload & Download Files](upload-download.md)**

Add data files using Git-DRS (version-controlled) or the data-client (direct transfer).

- :octicons-people-16: **[3. Manage Collaborators](collaborators.md)**

Add or remove users from your project and manage access requests.

</div>
116 changes: 116 additions & 0 deletions docs/calypr/quickstart/upload-download.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
---
title: Upload & Download Files
---

# Upload & Download Files

CALYPR supports two tools for transferring data files:

| | **Git DRS** | **data-client** |
|---|---|---|
| Best for | Version-controlled datasets, collaboration, reproducibility | Direct uploads without Git, scripted pipelines |
| Requires | Git repository initialized with `git drs init` | A configured `data-client` profile |
| Output | Files tracked in Git with DRS-backed pointer files | Files indexed in Gen3 (Indexd) with a GUID |

---

## Git DRS (recommended)

Git DRS integrates with your Git repository to track large files. Files are stored in S3 and registered with Gen3's DRS service — only lightweight pointer files live in Git.

### Upload

**1. Track the file type with Git LFS:**

```bash
git lfs track "*.bam"
git add .gitattributes
git commit -m "Track BAM files with Git LFS"
```

**2. Add, commit, and push:**

```bash
git add data/sample.bam
git commit -m "Add sample BAM file"
git push
```

On `git push`, Git DRS automatically:

1. Registers a DRS record in Gen3 (indexd)
2. Uploads the file to S3
3. Stores the pointer in the Git repository

You can verify tracked files at any time:

```bash
git lfs ls-files
```

A `*` next to a file means the content is present locally; `-` means only the pointer is checked out.

### Download

```bash
# Download all tracked files
git lfs pull

# Download by pattern
git lfs pull -I "*.bam"

# Download a specific directory
git lfs pull -I "data/**"
```

---

## data-client (direct transfer)

Use the `data-client` when you need to upload or download files outside of a Git workflow, or in batch/scripted scenarios.

### Configure a profile

If you haven't set up a profile yet:

```bash
./data-client configure --profile=mycommons
```

You'll be prompted for your Gen3 API endpoint and credentials path.

### Upload

Upload a single file:

```bash
./data-client upload --profile=mycommons --upload-path=data/sample.bam
```

Upload a directory in parallel:

```bash
./data-client upload --profile=mycommons --upload-path=data/ --batch --numparallel=5
```

Each uploaded file receives a **GUID** (Globally Unique Identifier) from Gen3. Save these GUIDs — they are required to download the files later.

### Download

```bash
./data-client download --profile=mycommons --guid=dg.1234/5678-abcd
```

To download to a specific directory:

```bash
./data-client download --profile=mycommons --guid=dg.1234/5678-abcd --dir=./downloads
```

---

## Next Steps

- [Manage Collaborators](collaborators.md) — share your project with team members
- [Git DRS Complete Guide](../../tools/git-drs/quickstart.md) — advanced workflows, multiple remotes, cross-remote promotion
- [data-client Authentication](../../tools/data-client/authentication.md) — profile setup and access verification
Loading