Skip to content

Commit

Permalink
update example
Browse files Browse the repository at this point in the history
  • Loading branch information
urmi-21 committed Apr 27, 2020
1 parent 2e3a027 commit 73aab61
Showing 1 changed file with 23 additions and 13 deletions.
36 changes: 23 additions & 13 deletions case_studies/Integrating third-party tools.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[93mLogs will be saved to 2020-03-16-15_33_08_pyrpipe.log\u001b[0m\n",
"\u001b[93mLogs will be saved to 2020-04-27-17_20_37_pyrpipe.log\u001b[0m\n",
"\u001b[94m$ ls -l\u001b[0m\n",
"\u001b[94mSTDOUT:\n",
"total 32\n",
"drwxr-xr-x 7 usingh usingh 4096 Mar 16 15:19 Athaliana_transcript_assembly\n",
"drwxr-xr-x 2 usingh usingh 4096 Mar 7 16:33 Human_annotation_snakemake\n",
"-rw-r--r-- 1 usingh usingh 9786 Mar 7 16:33 Integrating third-party tools.ipynb\n",
"drwxr-xr-x 9 usingh usingh 4096 Mar 16 15:32 Maize_lncRNA_prediction\n",
"drwxr-xr-x 2 usingh usingh 4096 Mar 16 15:33 pyrpipe_logs\n",
"drwxr-xr-x 3 usingh usingh 4096 Mar 7 16:33 sample_data\n",
"drwxr-xr-x 4 usingh usingh 4096 Mar 21 00:45 Athaliana_transcript_assembly\n",
"drwxr-xr-x 2 usingh usingh 4096 Mar 21 00:45 Human_annotation_snakemake\n",
"-rw-r--r-- 1 usingh usingh 10952 Apr 27 17:20 Integrating third-party tools.ipynb\n",
"drwxr-xr-x 6 usingh usingh 4096 Mar 23 13:16 Maize_lncRNA_prediction\n",
"drwxr-xr-x 2 usingh usingh 4096 Apr 27 17:20 pyrpipe_logs\n",
"drwxr-xr-x 3 usingh usingh 4096 Feb 27 12:16 sample_data\n",
"\u001b[0m\n",
"\u001b[92mTime taken:0:00:00\u001b[0m\n"
]
Expand All @@ -37,7 +37,7 @@
"True"
]
},
"execution_count": 1,
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -224,19 +224,29 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(0, b'364K\\tsample_data/blast_out2\\n', None)\n"
"(0, b'364K\\tsample_data/blast_out2\\n', None)\n",
"364K\tsample_data/blast_out2\n",
"\n"
]
}
],
"source": [
"print(pe.getShellOutput(['du', '-sh','sample_data/blast_out2']))"
"result=pe.getShellOutput(['du', '-sh','sample_data/blast_out2'])\n",
"#result contains return code, stdout, stderr\n",
"print(result)\n",
"\n",
"#check if command was successful\n",
"if result[0] == 0:\n",
" #get the stdout as string\n",
" print(result[1].decode(\"utf-8\"))\n",
" "
]
},
{
Expand Down Expand Up @@ -308,7 +318,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.5"
"version": "3.6.9"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 73aab61

Please sign in to comment.