Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
babinyurii authored May 16, 2022

Verified

This commit was signed with the committer’s verified signature.
snyk-bot Snyk bot
1 parent 589055a commit 6df62b4
Showing 2 changed files with 279 additions and 19 deletions.
7 changes: 7 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
matplotlib==3.4.3
pandas==1.3.4
numpy==1.20.3
seaborn==0.11.2
biopython==1.78
loguru==0.5.3

291 changes: 272 additions & 19 deletions run_apobec.ipynb
Original file line number Diff line number Diff line change
@@ -4,7 +4,120 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### this cell is to run apobec from the current folder "
"#### now script takes one of the two arguments to change the position of the nucleotide to count:\n",
"```python\n",
"count_first_in_duplex\n",
"\n",
"count_second_in_duplex\n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### to run from the installation use commands below: "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import apobec"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%run -m apobec.count_snp_duplex count_first_in_duplex"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%run -m apobec.count_snp_duplex count_second_in_duplex"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%run -m apobec.create_bars"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%run -m apobec.snp_rate"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### the commands below are to run from the current folder"
]
},
{
@@ -20,20 +133,20 @@
"text": [
"\n",
" ---------------\n",
" job started at 2022-02-18 11:08:37 ...\n",
" job started at 2022-05-16 20:42:41 ...\n",
" ---------------\n",
" \n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "aa7eced278fb488f82bb6734eba3fd22",
"model_id": "9e1973b90bdc446f828dba0a687aebe0",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"IntProgress(value=0, bar_style='success', max=3)"
"IntProgress(value=0, bar_style='success', max=7)"
]
},
"metadata": {},
@@ -43,55 +156,195 @@
"name": "stdout",
"output_type": "stream",
"text": [
"exception detected. see log for more details\n",
"\n",
" \n",
" file processed: 2\n",
" time taken: 0.0 hours 1.0 minutes 33 seconds\n",
" file processed: 7\n",
" time taken: 0.0 hours 14.0 minutes 26 seconds\n",
" \n",
" the results are in the folder 'output_apobec'\n",
" \n",
" ---------------\n",
" ... job finished at 2022-02-18 11:10:10\n",
" ... job finished at 2022-05-16 20:57:08\n",
" ---------------\n",
" \n",
" \n"
]
}
],
"source": [
"%run ./apobec/count_snp_duplex.py"
"%run ./apobec/count_snp_duplex.py count_first_in_duplex"
]
},
{
"cell_type": "markdown",
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" ---------------\n",
" job started at 2022-05-16 20:57:08 ...\n",
" ---------------\n",
" \n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "1afcecf4a0e94ff79c5a1cb51defcdc3",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"IntProgress(value=0, bar_style='success', max=7)"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" \n",
" file processed: 7\n",
" time taken: 0.0 hours 14.0 minutes 26 seconds\n",
" \n",
" the results are in the folder 'output_apobec'\n",
" \n",
" ---------------\n",
" ... job finished at 2022-05-16 21:11:35\n",
" ---------------\n",
" \n",
" \n"
]
}
],
"source": [
"### to run from the installation use: "
"%run ./apobec/count_snp_duplex.py count_second_in_duplex"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 6,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" ---------------\n",
" job started at 2022-05-16 21:11:35 ...\n",
" ---------------\n",
" \n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "6b825f64404244d9b914a3ec5dad89eb",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"IntProgress(value=0, bar_style='success', max=14)"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" \n",
" file processed: 14\n",
" time taken: 0.0 hours 0.0 minutes 8 seconds\n",
" \n",
" the results are in the folder 'output_duplex_plots'\n",
" \n",
" ---------------\n",
" ... job finished at 2022-05-16 21:11:44\n",
" ---------------\n",
" \n",
" \n"
]
}
],
"source": [
"import apobec"
"%run ./apobec/create_bars.py"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 7,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" ---------------\n",
" job started at 2022-05-16 21:11:44 ...\n",
" ---------------\n",
" \n",
"collecting snp...\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "4a7d534b1f7d49e78b8d45682797b090",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"IntProgress(value=0, bar_style='success', max=7)"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"snp collected...\n",
"plot consctructed...\n",
"spreadsheet saved...\n",
"\n",
" \n",
" file processed: 7\n",
" time taken: 0.0 hours 0.0 minutes 12 seconds\n",
" \n",
" the results are in the folder 'output_apobec'\n",
" \n",
" note: difference in the output files names \n",
" is denoted by the time when script finished its work.\n",
" \n",
" ---------------\n",
" ... job finished at 2022-05-16 21:11:57\n",
" ---------------\n",
" \n",
" \n"
]
}
],
"source": [
"%run -m apobec.count_snp_duplex"
"%run ./apobec/snp_rate.py"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
@@ -105,7 +358,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.5"
"version": "3.9.7"
}
},
"nbformat": 4,

0 comments on commit 6df62b4

Please sign in to comment.