{"action":"closed","issue":{"url":"https://api.github.com/repos/bpteague/cytoflow/issues/112","repository_url":"https://api.github.com/repos/bpteague/cytoflow","labels_url":"https://api.github.com/repos/bpteague/cytoflow/issues/112/labels{/name}","comments_url":"https://api.github.com/repos/bpteague/cytoflow/issues/112/comments","events_url":"https://api.github.com/repos/bpteague/cytoflow/issues/112/events","html_url":"https://github.com/bpteague/cytoflow/issues/112","id":230524099,"node_id":"MDU6SXNzdWUyMzA1MjQwOTk=","number":112,"title":"gm = flow.GaussianMixture1DOp","user":{"login":"kkiwimag","id":10065588,"node_id":"MDQ6VXNlcjEwMDY1NTg4","avatar_url":"https://avatars2.githubusercontent.com/u/10065588?v=4","gravatar_id":"","url":"https://api.github.com/users/kkiwimag","html_url":"https://github.com/kkiwimag","followers_url":"https://api.github.com/users/kkiwimag/followers","following_url":"https://api.github.com/users/kkiwimag/following{/other_user}","gists_url":"https://api.github.com/users/kkiwimag/gists{/gist_id}","starred_url":"https://api.github.com/users/kkiwimag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kkiwimag/subscriptions","organizations_url":"https://api.github.com/users/kkiwimag/orgs","repos_url":"https://api.github.com/users/kkiwimag/repos","events_url":"https://api.github.com/users/kkiwimag/events{/privacy}","received_events_url":"https://api.github.com/users/kkiwimag/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-05-22T21:25:38Z","updated_at":"2019-01-05T04:08:51Z","closed_at":"2019-01-05T04:08:51Z","author_association":"NONE","body":"`gm = flow.GaussianMixture1DOp(name = \"Transfected_GM\",\r\n                              channel = \"Pacific Blue-A\",\r\n                              posteriors = True,\r\n                              num_components = 2,\r\n                              scale='log')\r\ngm.estimate(ex_beads,subset = \"Morpho1 == True and Morpho2 == True\")\r\n#gm.default_view().plot(ex_beads)\r\nex_gm = gm.apply(ex_beads)\r\n\r\nex_gm.add_condition(\"Transfected\", \r\n                    \"bool\",\r\n                    ((ex_gm[\"Transfected_GM\"] == \"Transfected_GM_2\") & \r\n                     (ex_gm[\"Transfected_GM_Posterior\"] > 0.95)))`\r\n\r\n---------------------------------------------------------------------------\r\nTypeError                                 Traceback (most recent call last)\r\n<ipython-input-29-f9665326b892> in <module>()\r\n      6 gm.estimate(ex_beads,subset = \"Morpho1 == True and Morpho2 == True\")\r\n      7 #gm.default_view().plot(ex_beads)\r\n----> 8 ex_gm = gm.apply(ex_beads)\r\n      9 \r\n     10 ex_gm.add_condition(\"Transfected\", \r\n\r\n/Users/katherine/cytoflow/cytoflow/operations/gaussian_1d.pyc in apply(self, experiment)\r\n    410                         g = group\r\n    411 \r\n--> 412                     mean_stat.loc[g] = self._scale.inverse(gmm.means_[c][0])\r\n    413                     stdev_stat.loc[g] = self._scale.inverse(np.sqrt(gmm.covariances_[c][0]))[0]\r\n    414                     interval_stat.loc[g] = (self._scale.inverse(gmm.means_[c][0] - np.sqrt(gmm.covariances_[c][0][0])),\r\n\r\n/anaconda/lib/python2.7/site-packages/pandas/core/indexing.pyc in __setitem__(self, key, value)\r\n    139             key = com._apply_if_callable(key, self.obj)\r\n    140         indexer = self._get_setitem_indexer(key)\r\n--> 141         self._setitem_with_indexer(indexer, value)\r\n    142 \r\n    143     def _has_valid_type(self, k, axis):\r\n\r\n/anaconda/lib/python2.7/site-packages/pandas/core/indexing.pyc in _setitem_with_indexer(self, indexer, value)\r\n    329                 if self.ndim == 1:\r\n    330                     index = self.obj.index\r\n--> 331                     new_index = index.insert(len(index), indexer)\r\n    332 \r\n    333                     # we have a coerced indexer, e.g. a float\r\n\r\n/anaconda/lib/python2.7/site-packages/pandas/indexes/category.pyc in insert(self, loc, item)\r\n    566         code = self.categories.get_indexer([item])\r\n    567         if (code == -1):\r\n--> 568             raise TypeError(\"cannot insert an item into a CategoricalIndex \"\r\n    569                             \"that is not already an existing category\")\r\n    570 \r\n\r\nTypeError: cannot insert an item into a CategoricalIndex that is not already an existing category"}}
{"actor":{"display_login":"bpteague"}}