Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove feature_id search on ExpressionLevel #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions python_notebooks/1kg_rna_analysis_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,9 @@
" if counter > 5:\n",
" break\n",
" counter += 1\n",
" if expression.feature_id != \"\":\n",
" expression_levels.append(expression)\n",
" expression_levels.append(expression)\n",
" print(\"Expression Level: {}\".format(expression.name))\n",
" print(\" id: {}\".format(expression.id))\n",
" print(\" feature: {}\".format(expression.feature_id))\n",
" print(\" expression: {} {}\".format(expression.expression, getUnits(expression.units)))\n",
" print(\" read_count: {}\".format(expression.raw_read_count))\n",
" print(\" confidence_interval: {} - {}\\n\".format(\n",
Expand All @@ -154,7 +152,7 @@
},
"source": [
"### Finding Features in the other RNA Quantifications\n",
"We can also easily examine the expression level of these features in the other RNA Quantifications by specifying the feature_id in the `expressionLevelSearch`."
"We can also easily examine the expression level of these features in the other RNA Quantifications by specifying the name in the `expressionLevelSearch`."
]
},
{
Expand All @@ -165,14 +163,13 @@
},
"outputs": [],
"source": [
"feature_ids = [expression_levels[1].feature_id]\n",
"names = [expression_levels[1].name]\n",
"for rna_quantification_id in rna_quantification_ids[1:]:\n",
" for expression in local_client.search_expression_levels(\n",
" rna_quantification_id=rna_quantification_id, feature_ids=feature_ids):\n",
" rna_quantification_id=rna_quantification_id, names=names):\n",
" print(\"RNA Quantification: {}\".format(rna_quantification_id))\n",
" print(\"Expression Level: {}\".format(expression.name))\n",
" print(\" id: {}\".format(expression.id))\n",
" print(\" feature: {}\".format(expression.feature_id))\n",
" print(\" expression: {} {}\\n\".format(expression.expression, getUnits(expression.units)))\n"
]
},
Expand Down Expand Up @@ -202,8 +199,7 @@
" if counter > max_features:\n",
" break\n",
" counter += 1\n",
" if expression.feature_id != \"\":\n",
" expression_dict[expression.name] = expression.expression\n",
" expression_dict[expression.name] = expression.expression\n",
" return expression_dict\n",
"\n",
"\n",
Expand Down Expand Up @@ -275,7 +271,7 @@
" if counter > max_features:\n",
" break\n",
" counter += 1\n",
" if expression.feature_id != \"\" and expression.raw_read_count > 0:\n",
" if expression.raw_read_count > 0:\n",
" expression_dict[expression.name] = expression.raw_read_count\n",
" return quantification.name, expression_dict\n",
"\n",
Expand Down