-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
3da5702
commit f9fc094
Showing
1 changed file
with
129 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Staphylococcus aureus validation\n", | ||
"\n", | ||
"## Step 1: Import Libraries" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import subprocess\n", | ||
"import pandas as pd\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Set input & output filepaths\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"\n", | ||
"saureus_total_csv_fpath = \"/data/bnf/dev/ryan/pipelines/jasen/validations/saureus/saureus_total.csv\"\n", | ||
"saureus_total_sh_fpath = \"/data/bnf/dev/ryan/pipelines/jasen/validations/saureus/saureus_total.csv\"\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Run jasentool validate" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"saureus_validate_cmd = [\n", | ||
" 'jasentool', 'validate',\n", | ||
" '--input_dir', '/fs1/results_dev/jasen/saureus/analysis_result/',\n", | ||
" '--db_name', 'cgviz',\n", | ||
" '--db_collection', 'sample',\n", | ||
" '--output_dir', '/data/bnf/dev/ryan/validation/saureus',\n", | ||
" '--combined_output'\n", | ||
"]\n", | ||
"\n", | ||
"# Execute the command\n", | ||
"saureus_validate_results = subprocess.run(saureus_validate_cmd, capture_output=True, text=True)\n", | ||
"\n", | ||
"# Print the outputs\n", | ||
"print(\"Saureus validate standard output:\")\n", | ||
"print(saureus_validate_results.stdout)\n", | ||
"\n", | ||
"print(\"Saureus validate standard error:\")\n", | ||
"print(saureus_validate_results.stderr)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"## Run jasentool missing to create a csv of all the samples " | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"saureus_missing_cmd = [\n", | ||
" 'jasentool', 'missing',\n", | ||
" '--db_name', 'cgviz',\n", | ||
" '--db_collection', 'sample',\n", | ||
" '--analysis_dir', '/fs1/results/jasen/saureus/analysis_result/',\n", | ||
" '--restore_dir', '/fs1/ryan/pipelines/jasen/reruns/seqdata/',\n", | ||
" '--restore_file', saureus_total_sh_fpath,\n", | ||
" '-o', saureus_total_csv_fpath\n", | ||
" ]\n", | ||
"\n", | ||
"# Execute the command\n", | ||
"saureus_missing_results = subprocess.run(saureus_missing_cmd, capture_output=True, text=True)\n", | ||
"\n", | ||
"# Print the outputs\n", | ||
"print(\"Saureus missing standard output:\")\n", | ||
"print(saureus_missing_results.stdout)\n", | ||
"\n", | ||
"print(\"Saureus missing standard error:\")\n", | ||
"print(saureus_missing_results.stderr)" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "jasentool", | ||
"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.12.2" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |