Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
adrien
iPython-Notebook
Commits
54277647
Commit
54277647
authored
Apr 16, 2015
by
Adrien Leger
Browse files
Merge branch 'master' of
https://github.com/a-slide/iPython-Notebook
parents
eba97b8a
3633d56d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Notebooks/gb_to_fa.ipynb
0 → 100644
View file @
54277647
{
"metadata": {
"name": "gb_to_fa"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#\u00a0Script to convert gb to fasta"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"from glob import iglob\n",
"from Bio import SeqIO\n",
"from gzip import open as gopen\n",
"\n",
"for filename in iglob(\"Baculo/*.gb\"):\n",
" print filename\n",
" gb = SeqIO.read(open(filename, \"rb\"), \"genbank\")\n",
" gb.id = gb.name\n",
" gb.description = \"\"\n",
" with gopen(filename.split(\".\")[0]+\".fa.gz\", \"wb\") as fasta:\n",
" fasta.write(gb.format(\"fasta\"))\n",
" "
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Baculo/Bacmid_WT.gb\n",
"Baculo/pSR_CAPrh10 (R2Crh10).gb"
]
},
{
"output_type": "stream",
"stream": "stdout",
"text": [
"\n",
"Baculo/pFB_AAV_GFP_p2.gb\n",
"Baculo/pSR660 (R2C8).gb\n"
]
}
],
"prompt_number": 26
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
}
],
"metadata": {}
}
]
}
\ No newline at end of file
README.md
View file @
54277647
# iPython-Notebook
Repo to store my iPython notebooks for NGS data analyses
Repo to store my iPython notebooks for NGS data analyses
*
[
VCF_analysis
](
http://nbviewer.ipython.org/github/a-slide/iPython-Notebook/blob/master/Notebooks/VCF_analysis.ipynb
)
*
[
gb_to_fa
](
http://nbviewer.ipython.org/github/a-slide/iPython-Notebook/blob/master/Notebooks/gb_to_fa.ipynb
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment