Skip to content

Commit

Permalink
cleans up trim_seq and bloom_example
Browse files Browse the repository at this point in the history
  • Loading branch information
jwdebelius committed Nov 11, 2016
1 parent 555aa5e commit 698a4e1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 34 deletions.
2 changes: 1 addition & 1 deletion bloom/filter_seqs_from_biom.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def remove_seqs(table, seqs):
biom.Table
"""
filter_seqs = {str(s) for s in seqs}
_filter = lambda v, i, m: i in filter_seqs
_filter = lambda v, i, m: i not in filter_seqs
return table.filter(_filter, axis='observation', inplace=False)


Expand Down
40 changes: 7 additions & 33 deletions ipynb/bloom_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 2,
"metadata": {
"collapsed": false
},
Expand All @@ -36,15 +36,15 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"data_dir = '../data/'\n",
"results_dir = '../results'\n",
"seqs_file = '30_seqs.fna'\n",
"seqs_file = '../data/newbloom.all.fna'\n",
"biom_file = 'erc.qiita-1481.biom'\n",
"filtered_file = 'filtered.fna'\n",
"\n",
Expand All @@ -53,32 +53,6 @@
"filtered_file = os.path.join(results_dir, filtered_file)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"And we'll unzip the zip file to extract the sequences."
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"gunzip: can't stat: ../data/30_seqs.fna.gz (../data/30_seqs.fna.gz.gz): No such file or directory\r\n"
]
}
],
"source": [
"!gunzip ../data/30_seqs.fna.gz"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -91,7 +65,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 5,
"metadata": {
"collapsed": false
},
Expand All @@ -111,7 +85,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 8,
"metadata": {
"collapsed": false
},
Expand All @@ -130,7 +104,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 9,
"metadata": {
"collapsed": true
},
Expand All @@ -141,7 +115,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 10,
"metadata": {
"collapsed": false
},
Expand Down

0 comments on commit 698a4e1

Please sign in to comment.