Skip to content
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

✨ Add nextflow execution ID tracking #11

Merged
merged 4 commits into from
Aug 22, 2023
Merged
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
32 changes: 30 additions & 2 deletions docs/guide/bulk_rna_seq.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@
},
"outputs": [],
"source": [
"!nextflow run nf-core/rnaseq -r 3.11.2 -profile test,docker --outdir rna-seq-results -name {ln.dev.run_context.run.id} -resume"
"!nextflow run nf-core/rnaseq -r 3.11.2 -profile test,docker --outdir rna-seq-results -name {ln.dev.run_context.run.id}"
]
},
{
Expand Down Expand Up @@ -317,6 +317,34 @@
"To make the count matrix queryable by biological entities (genes, experimental metadata, etc.), we can now proceed with: {doc}`docs:bulkrna`"
]
},
{
"cell_type": "markdown",
"id": "429bf863",
"metadata": {},
"source": [
"## Register the Nextflow execution id\n",
"\n",
"If we want to be able to query LaminDB for Nextflow execution ID, this here is a way to get it:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "4c14e053",
"metadata": {},
"outputs": [],
"source": [
"import subprocess\n",
"\n",
"command = f\"nextflow log | grep -F '{ln.dev.run_context.run.id}' | awk '{{print $8}}'\"\n",
"session_id = subprocess.getoutput(command)\n",
"\n",
"run = ln.Run.filter(transform__name=\"nf-core rnaseq\").order_by(\"-run_at\").first()\n",
"run.reference = session_id\n",
"run.reference_type = \"nextflow_id\"\n",
"run.save()"
]
},
{
"cell_type": "markdown",
"id": "9f607150",
Expand Down Expand Up @@ -400,7 +428,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.16"
"version": "3.10.12"
},
"nbproject": {
"id": "8124Vtle6ZrO",
Expand Down
Loading