Skip to content
Draft
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
204 changes: 204 additions & 0 deletions docs/Babel.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "14afaf6a-3ee7-42db-8881-4e158fe933fe",
"metadata": {},
"outputs": [],
"source": [
"# Babel"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "9a18b461-6c0e-43fa-bf28-68dc8720adf5",
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"import subprocess\n",
"\n",
"os.chdir(\"..\")"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "79ee7d5c-f1da-4a19-985f-2ea00e1c0361",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"/Users/gaurav/Developer/translator/babel\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Assuming unrestricted shared filesystem usage.\n",
"INFO snakemake.logging [2025-12-10T08:23:37-0500]: Assuming unrestricted shared filesystem usage.\n",
"INFO snakemake.logging [2025-12-10T08:23:37-0500]: None\n",
"host: Ashman.local\n",
"INFO snakemake.logging [2025-12-10T08:23:37-0500]: host: Ashman.local\n",
"Building DAG of jobs...\n",
"INFO snakemake.logging [2025-12-10T08:23:37-0500]: Building DAG of jobs...\n",
"Using shell: /opt/homebrew/bin/bash\n",
"INFO snakemake.logging [2025-12-10T08:23:37-0500]: Using shell: /opt/homebrew/bin/bash\n",
"Provided cores: 5\n",
"INFO snakemake.logging [2025-12-10T08:23:37-0500]: Provided cores: 5\n",
"Rules claiming more threads will be scaled down.\n",
"INFO snakemake.logging [2025-12-10T08:23:37-0500]: Rules claiming more threads will be scaled down.\n",
"Job stats:\n",
"job count\n",
"----------------------------------------- -------\n",
"check_macromolecular_complex 1\n",
"check_macromolecular_complex_completeness 1\n",
"macromolecular_complex 1\n",
"total 3\n",
"\n",
"INFO snakemake.logging [2025-12-10T08:23:37-0500]: Job stats:\n",
"job count\n",
"----------------------------------------- -------\n",
"check_macromolecular_complex 1\n",
"check_macromolecular_complex_completeness 1\n",
"macromolecular_complex 1\n",
"total 3\n",
"\n",
"Select jobs to execute...\n",
"INFO snakemake.logging [2025-12-10T08:23:37-0500]: Select jobs to execute...\n",
"Execute 2 jobs...\n",
"INFO snakemake.logging [2025-12-10T08:23:37-0500]: Execute 2 jobs...\n",
"\n",
"[Wed Dec 10 03:23:37 2025]\n",
"localrule check_macromolecular_complex_completeness:\n",
" input: babel_outputs/compendia/MacromolecularComplex.txt\n",
" output: babel_outputs/reports/macromolecular_complex_completeness.txt\n",
" jobid: 9\n",
" reason: Updated input files: babel_outputs/compendia/MacromolecularComplex.txt\n",
" resources: tmpdir=/var/folders/xk/0z8klmh13x35_vp_vkzd_yf00000gn/T\n",
"INFO snakemake.logging [2025-12-10T08:23:37-0500]: Rule: check_macromolecular_complex_completeness, Jobid: 9\n",
"INFO snakemake.logging [2025-12-10T08:23:37-0500]: Shell command: None\n",
"[Wed Dec 10 03:23:37 2025]\n",
"localrule check_macromolecular_complex:\n",
" input: babel_outputs/compendia/MacromolecularComplex.txt\n",
" output: babel_outputs/reports/MacromolecularComplex.txt\n",
" jobid: 10\n",
" reason: Updated input files: babel_outputs/compendia/MacromolecularComplex.txt\n",
" resources: tmpdir=/var/folders/xk/0z8klmh13x35_vp_vkzd_yf00000gn/T\n",
"INFO snakemake.logging [2025-12-10T08:23:37-0500]: Rule: check_macromolecular_complex, Jobid: 10\n",
"INFO snakemake.logging [2025-12-10T08:23:37-0500]: Shell command: None\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"babel_outputs/compendia/MacromolecularComplex.txt\n",
"Missing identifiers: 0\n",
"\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"[Wed Dec 10 03:23:39 2025]\n",
"Finished jobid: 9 (Rule: check_macromolecular_complex_completeness)\n",
"INFO snakemake.logging [2025-12-10T08:23:39-0500]: Finished jobid: 9 (Rule: check_macromolecular_complex_completeness)\n",
"1 of 3 steps (33%) done\n",
"INFO snakemake.logging [2025-12-10T08:23:39-0500]: None\n",
"[Wed Dec 10 03:23:39 2025]\n",
"Finished jobid: 10 (Rule: check_macromolecular_complex)\n",
"INFO snakemake.logging [2025-12-10T08:23:39-0500]: Finished jobid: 10 (Rule: check_macromolecular_complex)\n",
"2 of 3 steps (67%) done\n",
"INFO snakemake.logging [2025-12-10T08:23:39-0500]: None\n",
"Select jobs to execute...\n",
"INFO snakemake.logging [2025-12-10T08:23:39-0500]: Select jobs to execute...\n",
"Execute 1 jobs...\n",
"INFO snakemake.logging [2025-12-10T08:23:39-0500]: Execute 1 jobs...\n",
"\n",
"[Wed Dec 10 03:23:39 2025]\n",
"localrule macromolecular_complex:\n",
" input: babel_outputs/synonyms/MacromolecularComplex.txt, babel_outputs/metadata/MacromolecularComplex.txt.yaml, babel_outputs/reports/macromolecular_complex_completeness.txt, babel_outputs/reports/MacromolecularComplex.txt\n",
" output: babel_outputs/synonyms/MacromolecularComplex.txt.gz, babel_outputs/reports/macromolecular_complex_done\n",
" jobid: 0\n",
" reason: Input files updated by another job: babel_outputs/reports/macromolecular_complex_completeness.txt, babel_outputs/reports/MacromolecularComplex.txt\n",
" resources: tmpdir=/var/folders/xk/0z8klmh13x35_vp_vkzd_yf00000gn/T\n",
"INFO snakemake.logging [2025-12-10T08:23:39-0500]: Rule: macromolecular_complex, Jobid: 0\n",
"INFO snakemake.logging [2025-12-10T08:23:39-0500]: Shell command: None\n",
"gzip_files: Compressing: ['babel_outputs/synonyms/MacromolecularComplex.txt']\n",
"INFO src.snakefiles.util [2025-12-10T08:23:39-0500]: Compressing: ['babel_outputs/synonyms/MacromolecularComplex.txt']\n",
"gzip_files: Compressed babel_outputs/synonyms/MacromolecularComplex.txt to babel_outputs/synonyms/MacromolecularComplex.txt.gz using the gzip module.\n",
"INFO src.snakefiles.util [2025-12-10T08:23:39-0500]: Compressed babel_outputs/synonyms/MacromolecularComplex.txt to babel_outputs/synonyms/MacromolecularComplex.txt.gz using the gzip module.\n",
"gzip_files: Done compressing: ['babel_outputs/synonyms/MacromolecularComplex.txt']\n",
"INFO src.snakefiles.util [2025-12-10T08:23:39-0500]: Done compressing: ['babel_outputs/synonyms/MacromolecularComplex.txt']\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"done <_io.TextIOWrapper name='babel_outputs/reports/macromolecular_complex_done' mode='w' encoding='UTF-8'>\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"[Wed Dec 10 03:23:40 2025]\n",
"Finished jobid: 0 (Rule: macromolecular_complex)\n",
"INFO snakemake.logging [2025-12-10T08:23:40-0500]: Finished jobid: 0 (Rule: macromolecular_complex)\n",
"3 of 3 steps (100%) done\n",
"INFO snakemake.logging [2025-12-10T08:23:40-0500]: None\n",
"Removing temporary output babel_outputs/synonyms/MacromolecularComplex.txt.\n",
"INFO snakemake.logging [2025-12-10T08:23:40-0500]: Removing temporary output babel_outputs/synonyms/MacromolecularComplex.txt.\n",
"Complete log(s): /Users/gaurav/Developer/translator/babel/.snakemake/log/2025-12-10T032336.775363.snakemake.log\n",
"INFO snakemake.logging [2025-12-10T08:23:40-0500]: Complete log(s): /Users/gaurav/Developer/translator/babel/.snakemake/log/2025-12-10T032336.775363.snakemake.log\n"
]
},
{
"data": {
"text/plain": [
"CompletedProcess(args=['uv', 'run', 'snakemake', '-c', '5', 'macromolecular_complex'], returncode=0)"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"CORES=5\n",
"\n",
"print(os.getcwd())\n",
"subprocess.run([\"uv\", \"run\", \"snakemake\", \"-c\", str(CORES), \"macromolecular_complex\"])"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.14.0"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading