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

sigprofiler issue #369

Closed
ShixiangWang opened this issue Jul 1, 2021 · 4 comments
Closed

sigprofiler issue #369

ShixiangWang opened this issue Jul 1, 2021 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@ShixiangWang
Copy link
Owner

This was reported by Ziyu and a PR is waiting for this issue. @taoziyu97 Please push a PR at your spare time.

@ShixiangWang ShixiangWang added the bug Something isn't working label Jul 1, 2021
@taoziyu97
Copy link
Collaborator

Message received.
I‘m still debugging it by using SBS data.

@ShixiangWang
Copy link
Owner Author

Ok.

@taoziyu97
Copy link
Collaborator

taoziyu97 commented Jul 6, 2021

使用SBS数据,CNV数据分别对调用SigProfilerExtractor的函数Sigprofiler.R进行反复调试发现

  • 1.1.0版本中对于CNV 使用method = S 的48个分类(method = X的不会报错)会出现如下报错:
Traceback (most recent call last):
  File "/Users/taozy/Library/r-miniconda/envs/sigminer_sigprofiler/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 3080, in get_loc
    return self._engine.get_loc(casted_key)
  File "pandas/_libs/index.pyx", line 70, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/index.pyx", line 101, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/hashtable_class_helper.pxi", line 4554, in pandas._libs.hashtable.PyObjectHashTable.get_item
  File "pandas/_libs/hashtable_class_helper.pxi", line 4562, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'Mutation Types'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/taozy/Library/r-miniconda/envs/sigminer_sigprofiler/lib/python3.7/site-packages/SigProfilerExtractor/sigpro.py", line 486, in sigProfilerExtractor
    data["Mutation Types"]= pd.Categorical(data["Mutation Types"], orderlist1)
  File "/Users/taozy/Library/r-miniconda/envs/sigminer_sigprofiler/lib/python3.7/site-packages/pandas/core/frame.py", line 3024, in __getitem__
    indexer = self.columns.get_loc(key)
  File "/Users/taozy/Library/r-miniconda/envs/sigminer_sigprofiler/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 3082, in get_loc
    raise KeyError(key) from err
KeyError: 'Mutation Types'

对sigprofiler.R中第102行代码:tibble::rownames_to_column("MutationType")修改为tibble::rownames_to_column("Mutation Types")后,能够顺利运行

  • 1.1.3 版本中无论是SBS还是不同的CNV分类方法都不会报错。

  • 经过调试总结:将MutationType改成Mutation Types在1.1.0和1.1.3版本中都不会报错,SBS和各类CNV都能够运行。

@ShixiangWang
Copy link
Owner Author

Got it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants