Skip to content

Commit

Permalink
🎨 Polish
Browse files Browse the repository at this point in the history
Signed-off-by: zethson <[email protected]>
  • Loading branch information
Zethson committed Oct 1, 2024
1 parent b7a16b2 commit 5eaf275
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
13 changes: 8 additions & 5 deletions docs/nf_core_scrnaseq.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"1. Using a serverless environment trigger (e.g., AWS Lambda) to execute a Python script.\n",
"2. By using a [post-run script](https://docs.seqera.io/platform/23.4.0/launch/advanced#pre-and-post-run-scripts) on the Seqera Platform.\n",
"\n",
"Both approaches execute a script that connects to the Lamindb instance and registers the run output, similar to the one shown below.\n",
"Both approaches execute a script that connects to the Lamindb instance and registers the run input, output, and metadata, as shown below.\n",
"\n",
"This guide shows how to manually register a Nextflow run and illustrates what such an automated script could look like by registering the output of a run of the [nf-core/scrnaseq](https://nf-co.re/scrnaseq/latest) pipeline into a lamin instance."
]
Expand All @@ -42,11 +42,14 @@
"cell_type": "code",
"execution_count": null,
"id": "3358a50f",
"metadata": {},
"metadata": {
"tags": [
"hide-output"
]
},
"outputs": [],
"source": [
"import lamindb as ln\n",
"import anndata as ad"
"import lamindb as ln"
]
},
{
Expand Down Expand Up @@ -233,7 +236,7 @@
"id": "5f3f95a8",
"metadata": {
"tags": [
"hidden"
"hide-output"
]
},
"outputs": [],
Expand Down
10 changes: 5 additions & 5 deletions docs/register_scrnaseq_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@


def parse_arguments() -> argparse.Namespace:
parser = argparse.ArgumentParser(description="Register nf-core/scrnaseq run in LaminDB.")
parser.add_argument("--input", type=str, required=True, help="Nextflow run input folder path.")
parser.add_argument("--output", type=str, required=True, help="Nextflow run output folder path.")
parser = argparse.ArgumentParser()
parser.add_argument("--input", type=str, required=True)
parser.add_argument("--output", type=str, required=True)
return parser.parse_args()


def register_pipeline_io(input_dir: str, output_dir: str, global_run: ln.Run) -> None:
"""Registers input and output files and folders of a nf-core/scrnaseq run."""
"""Registers input and output files and folders for an nf-core/scrnaseq run."""
input_artifacts = ln.Artifact.from_dir(input_dir, run=False)
ln.save(input_artifacts)
global_run.input_artifacts.set(input_artifacts)
Expand All @@ -25,7 +25,7 @@ def register_pipeline_io(input_dir: str, output_dir: str, global_run: ln.Run) ->


def register_pipeline_metadata(output_dir: str, global_run: ln.Run) -> None:
"""Registers nf-core pipeline run metadata stored in the 'pipeline_info' directory."""
"""Registers nf-core pipeline run metadata stored in the 'pipeline_info' folder."""
ulabel = ln.ULabel(name="nextflow").save()
global_run.transform.ulabels.add(ulabel)

Expand Down

0 comments on commit 5eaf275

Please sign in to comment.