Skip to content

Commit

Permalink
Upgraded conda environment to include updated packages due to availab…
Browse files Browse the repository at this point in the history
…ility issues
  • Loading branch information
Negar Janani committed Aug 28, 2024
1 parent d57fd93 commit ae04e74
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
13 changes: 7 additions & 6 deletions code/process.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"import pandas\n",
"import networkx\n",
"\n",
"import utilities"
"import utilities\n",
"from math import gcd\n"
]
},
{
Expand Down Expand Up @@ -387,7 +388,7 @@
" key = 'direct_not_annotations' if utilities.is_NOT_qaulifier(row.Qualifier) else 'direct_annotations'\n",
"\n",
" gene = row['GeneID']\n",
" graph.node[go_id][key].add(gene)\n",
" graph.nodes[go_id][key].add(gene)\n",
" \n",
" return graph"
]
Expand All @@ -401,12 +402,12 @@
"def propagate_annotations(graph):\n",
" \"\"\"Infer annotations through propagations\"\"\"\n",
" for node in networkx.topological_sort(graph):\n",
" data = graph.node[node]\n",
" data = graph.nodes[node]\n",
" inferred = data['inferred_annotations']\n",
" inferred -= data['direct_not_annotations']\n",
" inferred |= data['direct_annotations']\n",
" for subsuming_node in graph.successors(node):\n",
" subsuming_data = graph.node[subsuming_node]\n",
" subsuming_data = graph.nodes[subsuming_node]\n",
" subsuming_data['inferred_annotations'] |= inferred"
]
},
Expand Down Expand Up @@ -628,7 +629,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -642,7 +643,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.7"
"version": "3.11.5"
}
},
"nbformat": 4,
Expand Down
18 changes: 9 additions & 9 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ name: gene-ontology
channels:
- conda-forge
dependencies:
- conda-forge::networkx=2.2
- conda-forge::numpy=1.15.3
- conda-forge::pandas=0.23.4
- conda-forge::python=3.6.7
- conda-forge::requests=2.20.0
- conda-forge::notebook=5.7.0
- conda-forge::nbconvert=5.4.0
- conda-forge::ipykernel=5.1.0
- conda-forge::networkx=2.6
- conda-forge::numpy=1.24.3
- conda-forge::pandas=2.0.3
- conda-forge::python=3.8.19
- conda-forge::requests=2.32.3
- conda-forge::notebook=7.2.1
- conda-forge::nbconvert=7.16.4
- conda-forge::ipykernel=6.29.5
- pip:
- obonet==0.2.3
- obonet==1.1.0

0 comments on commit ae04e74

Please sign in to comment.