-
Notifications
You must be signed in to change notification settings - Fork 1
Add Docs on Targets and Stages (Prod Pipes) #159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
vivbak
wants to merge
5
commits into
main
Choose a base branch
from
multicohorts-docs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
36ff5f5
Add documentation on stages and targets -- when to use what
vivbak b4eb079
Add blank line after heading for linter
vivbak 97f512a
remove trailing punctuation in heading
vivbak a9a6fec
Fenced code should be surrounded by blank lines
vivbak 9eb530a
Remove white space
vivbak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| # Targets and Stages | ||
|
|
||
| In production pipelines, stages process different types of targets: SequencingGroup, Dataset, Cohort, or MultiCohort. Understanding the characteristics of each target and the corresponding stage type is essential for building workflows effectively. | ||
|
|
||
| ## Targets Overview | ||
|
|
||
| ### SequencingGroup | ||
|
|
||
| A SequencingGroup represents the sequence data from a single sample. It is effectively the result of running sequencing. | ||
|
|
||
| Example: | ||
|
|
||
| ```json | ||
| { | ||
| "id": "CPGAAAA", | ||
| "type": "genome", | ||
| "technology": "short-read", | ||
| "platform": "illumina" | ||
| } | ||
| ``` | ||
|
|
||
| ### Dataset | ||
|
|
||
| A Dataset is a collection of SequencingGroups belonging to the same project. The terms Dataset and Project are used interchangeably at CPG, and each dataset has a 1:1 relationship with a project. | ||
|
|
||
| Example: | ||
|
|
||
| ```json | ||
| { | ||
| "id": 14, | ||
| "name": "fewgenomes", | ||
| "dataset": "fewgenomes", | ||
| "sequencingGroups": [ | ||
| {"id": "CPGAAA"}, | ||
| {"id": "CPGBBB"}, | ||
| {"id": "CPGCCC"} | ||
| ] | ||
| } | ||
| ``` | ||
|
|
||
| ### Cohort | ||
|
|
||
| A Cohort is a curated group of SequencingGroups that share common characteristics or criteria. | ||
|
|
||
| Example: | ||
|
|
||
| ```json | ||
| { | ||
| "id": "COH501", | ||
| "name": "ExomeCohortABC", | ||
| "description": "All exomes in Dataset A, B, and C, as of Batch 15 processed on 24/08/24", | ||
| "template": "TMPL12" | ||
| } | ||
| ``` | ||
|
|
||
| ### MultiCohort | ||
|
|
||
| A MultiCohort is a collection of Cohorts. Unlike other target types, a MultiCohort is not stored or represented in metamist. | ||
|
|
||
| Example: | ||
|
|
||
| ```json | ||
| [ "COH123", "COH456", "COH675" ] | ||
| ``` | ||
|
|
||
| ## Stages Overview | ||
|
|
||
| Each stage in a production pipeline acts on a specific type of target. There are four types of stages, each designed to accommodate different targets: | ||
|
|
||
| * SequencingGroupStage | ||
| * DatasetStage | ||
| * CohortStage | ||
| * MultiCohortStage | ||
|
|
||
| ### How to Determine the Appropriate Stage Type | ||
|
|
||
| The choice of stage type depends on the nature of the output produced by the stage: | ||
|
|
||
| #### SequencingGroupStage | ||
|
|
||
| **Use this stage when:** There is one unique output per SequencingGroup. | ||
|
|
||
| **Example:** When running alignment, you produce a .cram file for each SequencingGroup. | ||
|
|
||
| #### DatasetStage | ||
|
|
||
| **Use this stage when:** There is one unique output per Dataset. | ||
|
|
||
| **Example:** When running AnnotateDataset, which splits the MT by dataset and annotates dataset-specific fields. | ||
|
|
||
| #### CohortStage | ||
|
|
||
| **Use this stage when:** There is one unique output per Cohort. | ||
|
|
||
| **Example:** When analyzing a group of SequencingGroups that share common characteristics, producing a single output per Cohort. | ||
|
|
||
| #### MultiCohortStage | ||
|
|
||
| **Use this stage when:** There is one output for the entire workflow run, which may involve multiple Cohorts. | ||
|
|
||
| **Example:** JointCalling, which produces a VCF for all the GVCFs from all SequencingGroups. Note that a MultiCohort stage can run on a single Cohort or multiple Cohorts. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be explicit here that the curation of the SGs is a process handled by you (the reader of this guide), not just a process that happens passively. Maybe a link to guidance on when & how to mint a new cohort
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe something like "In PP the term 'Cohort' relates to a single Custom Cohort, created using the XX process link to documentation. Each cohort consists of a collection of SequencingGroups, and a pipeline run can be comprised of multiple overlapping or non-overlapping Cohorts"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This distinction might be out of scope for this doc