Skip to content

Commit

Permalink
update readmes (#371)
Browse files Browse the repository at this point in the history
  • Loading branch information
rcannood authored Feb 14, 2024
1 parent 2f33516 commit 3494b86
Show file tree
Hide file tree
Showing 7 changed files with 80 additions and 189 deletions.
20 changes: 16 additions & 4 deletions src/common/helper_functions/read_api_files.R
Original file line number Diff line number Diff line change
Expand Up @@ -194,16 +194,28 @@ render_file <- function(spec) {
spec$info$label <- basename(spec$info$example)
}

example <-
if (is.null(spec$info$example) || is.na(spec$info$example)) {
""
} else {
paste0("Example file: `", spec$info$example, "`")
}

description <-
if (is.null(spec$info$description) || is.na(spec$info$description)) {
""
} else {
paste0("Description:\n\n", spec$info$description)
}

strip_margin(glue::glue("
§## File format: {spec$info$label}
§
§{spec$info$summary %||% ''}
§
§Example file: `{spec$info$example %|% '<Missing>'}`
§
§Description:
§{example}
§
§{spec$info$description %||% ''}
§{description}
§
§Format:
§
Expand Down
46 changes: 12 additions & 34 deletions src/tasks/batch_integration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,13 @@ A subset of the common dataset.

Example file: `resources_test/common/pancreas/dataset.h5ad`

Description:

NA

Format:

<div class="small">

AnnData object
obs: 'cell_type', 'batch'
var: 'hvg'
var: 'hvg', 'feature_name'
obsm: 'X_pca'
obsp: 'knn_distances', 'knn_connectivities'
layers: 'counts', 'normalized'
Expand All @@ -132,6 +128,7 @@ Slot description:
| `obs["cell_type"]` | `string` | Cell type information. |
| `obs["batch"]` | `string` | Batch information. |
| `var["hvg"]` | `boolean` | Whether or not the feature is considered to be a ‘highly variable gene’. |
| `var["feature_name"]` | `string` | A human-readable name for the feature, usually a gene symbol. |
| `obsm["X_pca"]` | `double` | The resulting PCA embedding. |
| `obsp["knn_distances"]` | `double` | K nearest neighbors distance matrix. |
| `obsp["knn_connectivities"]` | `double` | K nearest neighbors connectivities matrix. |
Expand Down Expand Up @@ -178,17 +175,13 @@ Unintegrated AnnData HDF5 file.

Example file: `resources_test/batch_integration/pancreas/dataset.h5ad`

Description:

NA

Format:

<div class="small">

AnnData object
obs: 'batch', 'label'
var: 'hvg'
var: 'hvg', 'feature_name'
obsm: 'X_pca'
obsp: 'knn_distances', 'knn_connectivities'
layers: 'counts', 'normalized'
Expand All @@ -205,6 +198,7 @@ Slot description:
| `obs["batch"]` | `string` | Batch information. |
| `obs["label"]` | `string` | label information. |
| `var["hvg"]` | `boolean` | Whether or not the feature is considered to be a ‘highly variable gene’. |
| `var["feature_name"]` | `string` | A human-readable name for the feature, usually a gene symbol. |
| `obsm["X_pca"]` | `double` | The resulting PCA embedding. |
| `obsp["knn_distances"]` | `double` | K nearest neighbors distance matrix. |
| `obsp["knn_connectivities"]` | `double` | K nearest neighbors connectivities matrix. |
Expand All @@ -223,17 +217,13 @@ Solution dataset

Example file: `resources_test/batch_integration/pancreas/solution.h5ad`

Description:

NA

Format:

<div class="small">

AnnData object
obs: 'batch', 'label'
var: 'hvg'
var: 'hvg', 'feature_name'
obsm: 'X_pca'
obsp: 'knn_distances', 'knn_connectivities'
layers: 'counts', 'normalized'
Expand All @@ -250,6 +240,7 @@ Slot description:
| `obs["batch"]` | `string` | Batch information. |
| `obs["label"]` | `string` | label information. |
| `var["hvg"]` | `boolean` | Whether or not the feature is considered to be a ‘highly variable gene’. |
| `var["feature_name"]` | `string` | A human-readable name for the feature, usually a gene symbol. |
| `obsm["X_pca"]` | `double` | The resulting PCA embedding. |
| `obsp["knn_distances"]` | `double` | K nearest neighbors distance matrix. |
| `obsp["knn_connectivities"]` | `double` | K nearest neighbors connectivities matrix. |
Expand Down Expand Up @@ -421,17 +412,13 @@ An integrated AnnData HDF5 file.
Example file:
`resources_test/batch_integration/pancreas/integrated_embedding.h5ad`

Description:

NA

Format:

<div class="small">

AnnData object
obs: 'batch', 'label'
var: 'hvg'
var: 'hvg', 'feature_name'
obsm: 'X_pca', 'X_emb'
obsp: 'knn_distances', 'knn_connectivities'
layers: 'counts', 'normalized'
Expand All @@ -448,6 +435,7 @@ Slot description:
| `obs["batch"]` | `string` | Batch information. |
| `obs["label"]` | `string` | label information. |
| `var["hvg"]` | `boolean` | Whether or not the feature is considered to be a ‘highly variable gene’. |
| `var["feature_name"]` | `string` | A human-readable name for the feature, usually a gene symbol. |
| `obsm["X_pca"]` | `double` | The resulting PCA embedding. |
| `obsm["X_emb"]` | `double` | integration embedding prediction. |
| `obsp["knn_distances"]` | `double` | K nearest neighbors distance matrix. |
Expand All @@ -469,17 +457,13 @@ Integrated AnnData HDF5 file.
Example file:
`resources_test/batch_integration/pancreas/integrated_graph.h5ad`

Description:

NA

Format:

<div class="small">

AnnData object
obs: 'batch', 'label'
var: 'hvg'
var: 'hvg', 'feature_name'
obsm: 'X_pca'
obsp: 'knn_distances', 'knn_connectivities', 'connectivities', 'distances'
layers: 'counts', 'normalized'
Expand All @@ -496,6 +480,7 @@ Slot description:
| `obs["batch"]` | `string` | Batch information. |
| `obs["label"]` | `string` | label information. |
| `var["hvg"]` | `boolean` | Whether or not the feature is considered to be a ‘highly variable gene’. |
| `var["feature_name"]` | `string` | A human-readable name for the feature, usually a gene symbol. |
| `obsm["X_pca"]` | `double` | The resulting PCA embedding. |
| `obsp["knn_distances"]` | `double` | K nearest neighbors distance matrix. |
| `obsp["knn_connectivities"]` | `double` | K nearest neighbors connectivities matrix. |
Expand All @@ -519,17 +504,13 @@ Integrated AnnData HDF5 file.
Example file:
`resources_test/batch_integration/pancreas/integrated_feature.h5ad`

Description:

NA

Format:

<div class="small">

AnnData object
obs: 'batch', 'label'
var: 'hvg'
var: 'hvg', 'feature_name'
obsm: 'X_pca'
obsp: 'knn_distances', 'knn_connectivities'
layers: 'counts', 'normalized', 'corrected_counts'
Expand All @@ -546,6 +527,7 @@ Slot description:
| `obs["batch"]` | `string` | Batch information. |
| `obs["label"]` | `string` | label information. |
| `var["hvg"]` | `boolean` | Whether or not the feature is considered to be a ‘highly variable gene’. |
| `var["feature_name"]` | `string` | A human-readable name for the feature, usually a gene symbol. |
| `obsm["X_pca"]` | `double` | The resulting PCA embedding. |
| `obsp["knn_distances"]` | `double` | K nearest neighbors distance matrix. |
| `obsp["knn_connectivities"]` | `double` | K nearest neighbors connectivities matrix. |
Expand All @@ -566,10 +548,6 @@ Metric score file

Example file: `score.h5ad`

Description:

NA

Format:

<div class="small">
Expand Down
14 changes: 1 addition & 13 deletions src/tasks/denoising/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Slot description:
| `obs["soma_joinid"]` | `integer` | (*Optional*) If the dataset was retrieved from CELLxGENE census, this is a unique identifier for the cell. |
| `obs["size_factors"]` | `double` | (*Optional*) The size factors created by the normalisation method, if any. |
| `var["feature_id"]` | `string` | (*Optional*) Unique identifier for the feature, usually a ENSEMBL gene id. |
| `var["feature_name"]` | `string` | (*Optional*) A human-readable name for the feature, usually a gene symbol. |
| `var["feature_name"]` | `string` | A human-readable name for the feature, usually a gene symbol. |
| `var["soma_joinid"]` | `integer` | (*Optional*) If the dataset was retrieved from CELLxGENE census, this is a unique identifier for the feature. |
| `var["hvg"]` | `boolean` | Whether or not the feature is considered to be a ‘highly variable gene’. |
| `var["hvg_score"]` | `integer` | A ranking of the features by hvg. |
Expand Down Expand Up @@ -183,10 +183,6 @@ The subset of molecules used for the training dataset

Example file: `resources_test/denoising/pancreas/train.h5ad`

Description:

NA

Format:

<div class="small">
Expand Down Expand Up @@ -214,10 +210,6 @@ The subset of molecules used for the test dataset

Example file: `resources_test/denoising/pancreas/test.h5ad`

Description:

NA

Format:

<div class="small">
Expand Down Expand Up @@ -307,10 +299,6 @@ A denoised dataset as output by a denoising method.

Example file: `resources_test/denoising/pancreas/denoised.h5ad`

Description:

NA

Format:

<div class="small">
Expand Down
Loading

0 comments on commit 3494b86

Please sign in to comment.