Skip to content

Commit

Permalink
Working on the first half of blast
Browse files Browse the repository at this point in the history
  • Loading branch information
joannmudge committed Feb 7, 2025
1 parent fd6d210 commit 1908e4f
Showing 1 changed file with 63 additions and 16 deletions.
79 changes: 63 additions & 16 deletions module_notebooks/06-searching-graphs-with-blast.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,45 @@
"\n",
"### BLAST the graph manually\n",
"\n",
"Create a FASTA file containing the graph sequence\n",
"```\n",
"gfatools gfa2fa yprp.chrVIII.pggb.gfa > yprp.chrVIII.pggb.fa\n",
"```\n",
"Create a FASTA file containing the graph sequence"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!gfatools gfa2fa yprp.chrVIII.pggb.gfa > yprp.chrVIII.pggb.fa"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Build a BLAST database for the FASTA using `makeblastdb`.\n",
"\n",
"Build a BLAST database for the FASTA\n",
"```\n",
"makeblastdb -in yprp.chrVIII.pggb.fa -input_type fasta -dbtype nucl\n",
"```\n",
"+ **-in yprp.chrVIII.pggb.fa**\n",
" + the file to build a database for\n",
"+ **-input_type fasta**\n",
" + the input file is a FASTA\n",
"+ **-dbtype nucl**\n",
" + the type of sequence in the input file is DNA\n",
" \n",
"The parameters:\n",
"\n",
"-in fasta_file_from_graph   the file to build a database for \n",
"-input_type fasta                 the format of the input file (fasta) \n",
"-dbtype nucl                         type of sequence (nucl=DNA)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!makeblastdb -in yprp.chrVIII.pggb.fa -input_type fasta -dbtype nucl"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
" \n",
"Query the database for [CUP1](https://www.yeastgenome.org/locus/S000001095) and [YHR054C](https://www.yeastgenome.org/locus/S000001096)\n",
"```\n",
"blastn -db yprp.chrVIII.pggb.fa -query S288C_YHR053C_CUP1-1_genomic.fsa\n",
Expand Down Expand Up @@ -87,7 +110,31 @@
]
}
],
"metadata": {},
"metadata": {
"environment": {
"kernel": "conda-env-nigms-pangenomics-nigms-pangenomics",
"name": "workbench-notebooks.m127",
"type": "gcloud",
"uri": "us-docker.pkg.dev/deeplearning-platform-release/gcr.io/workbench-notebooks:m127"
},
"kernelspec": {
"display_name": "nigms-pangenomics",
"language": "python",
"name": "conda-env-nigms-pangenomics-nigms-pangenomics"
},
"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.8"
}
},
"nbformat": 4,
"nbformat_minor": 4
}

0 comments on commit 1908e4f

Please sign in to comment.