-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
519 additions
and
136 deletions.
There are no files selected for viewing
This file contains 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 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,91 @@ | ||
NEW | ||
|
||
```mermaid | ||
--- | ||
title: Cellxgene Ingestion State Machine | ||
--- | ||
stateDiagram-v2 | ||
Validate: Validate | ||
ValidateAnndata: ValidateAnndata | ||
note left of ValidateAnndata | ||
DatasetStatusKey.VALIDATION, DatasetValidationStatus.VALIDATING | ||
1 download anndata file | ||
DatasetStatusKey.H5AD, DatasetValidationStatus.VALIDATING | ||
2 validate anndata file | ||
DatasetStatusKey.H5AD, DatasetValidationStatus.VALID | ||
3 upload anndata file | ||
Fail: DatasetStatusKey.H5AD, DatasetValidationStatus.INVALID | ||
DatasetStatusKey.VALIDATION, DatasetProcessingStatus.FAILURE | ||
end note | ||
ValidateFragment: ValidateFragment | ||
note left of ValidateFragment | ||
1 download fragment file and anndata file | ||
DatasetStatusKey.ATAC_SEQ_FRAGMENT, DatasetValidationStatus.VALIDATING | ||
2 validate fragment file | ||
DatasetStatusKey.ATAC_SEQ_FRAGMENT, DatasetValidationStatus.VALID | ||
DatasetStatusKey.ATAC_SEQ_FRAGMENT, DatasetConversionStatus.CONVERTING | ||
3 generate index | ||
DatasetStatusKey.ATAC_SEQ_FRAGMENT, DatasetConversionStatus.CONVERTED | ||
DatasetStatusKey.ATAC_SEQ_FRAGMENT, DatasetConversionStatus.UPLOADING | ||
4 upload fragment file and index | ||
DatasetStatusKey.ATAC_SEQ_FRAGMENT, DatasetUploadStatus.UPLOADED | ||
Fail: DatasetStatusKey.FRAGMENT, DatasetValidationStatus.INVALID | ||
end note | ||
AddLabels: AddLabels | ||
note left of AddLabels | ||
1 download original h5ad | ||
DatasetStatusKey.H5AD, DatasetConversionStatus.CONVERTING | ||
1 Add labels to anndata file | ||
DatasetStatusKey.H5AD, DatasetConversionStatus.CONVERTED | ||
2 extract metadata | ||
DatasetStatusKey.H5AD, DatasetConversionStatus.UPLOADING | ||
3 upload anndata file | ||
DatasetStatusKey.H5AD, DatasetConversionStatus.UPLOADED | ||
DatasetStatusKey.VALIDATION, DatasetProcessingStatus.SUCCESS | ||
Fail: DatasetStatusKey.H5AD, DatasetConversionStatus.FAILED | ||
DatasetStatusKey.H5AD, DatasetProcessingStatus.H5AD | ||
end note | ||
CxgSeuratParallel: CxgSeuratParallel | ||
HandleSuccess: HandleSuccess | ||
HandleErrors: HandleErrors | ||
CheckForErrors: CheckForErrors | ||
ConversionError: ConversionError | ||
DownloadValidateError: DownloadValidateError | ||
EndPass: EndPass | ||
Cxg: Cxg | ||
Seurat: Seurat | ||
CatchCxgFailure: CatchCxgFailure | ||
CatchSeuratFailure: CatchSeuratFailure | ||
[*] --> Validate | ||
state Validate { | ||
[*] --> ValidateAnndata: has anndata | ||
ValidateAnndata --> [*] | ||
state hasFragment <<choice>> | ||
[*] --> hasFragment: has fragment | ||
hasFragment --> ValidateFragment: yes | ||
hasFragment --> [*]: no | ||
ValidateFragment --> [*] | ||
} | ||
Validate --> AddLabels: | ||
AddLabels --> CxgSeuratParallel | ||
state CxgSeuratParallel { | ||
[*] --> Cxg | ||
Cxg --> CatchCxgFailure | ||
Cxg --> [*] | ||
[*] --> Seurat | ||
Seurat --> CatchSeuratFailure | ||
Seurat --> [*] | ||
} | ||
CxgSeuratParallel --> HandleSuccess | ||
HandleSuccess --> CheckForErrors | ||
CheckForErrors --> DownloadValidateError: $.error | ||
CheckForErrors --> ConversionError: $[0].error or $[1].error | ||
CheckForErrors --> EndPass: Default | ||
Validate --> HandleErrors | ||
AddLabels --> HandleErrors | ||
HandleErrors --> CheckForErrors | ||
ConversionError --> [*] | ||
DownloadValidateError --> [*] | ||
EndPass --> [*] | ||
``` |
This file contains 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 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 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 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
Oops, something went wrong.