getzlab / deTiN

DeTiN is designed to measure tumor-in-normal contamination and improve somatic variant detection sensitivity when using a contaminated matched control.
BSD 3-Clause "New" or "Revised" License
49 stars 21 forks source link

error message "can't set using a multi-index" when running example data #34

Open jp3117 opened 3 years ago

jp3117 commented 3 years ago

hi,

we just installed deTin recently. Python3.7 was required. We also installed all packages. When we tried to run the example data with the command recommended:

python3.7 deTiN/deTiN.py --mutation_data_path example_data/HCC_10_90.call_stats.pon_removed.txt --cn_data_path example_data/HCC-1143_100_T-sim-final.acs.seg --tumor_het_data example_data/HCC_10_90.tumor.hets.tsv --normal_het_data example_data/HCC_10_90.normal.hets.tsv --exac_data_path example_data/exac.pickle_high_af --output_name 10_percent_TiN_simulation --indel_data_path example_data/MuTect2.call_stats.txt --indel_data_type MuTect2 --output_dir example_data/

We got the error message as:

joint TiN estimate = 0.08 Traceback (most recent call last): File "deTiN/deTiN.py", line 611, in main() File "deTiN/deTiN.py", line 572, in main do.reclassify_mutations() File "deTiN/deTiN.py", line 387, in reclassify_mutations self.SSNVs.loc[:, ('p_somatic_given_TiN')] = np.nan_to_num(np.true_divide(numerator, denominator)) File "/usr/local/lib/python3.7/site-packages/pandas/core/indexing.py", line 670, in setitem iloc._setitem_with_indexer(indexer, value) File "/usr/local/lib/python3.7/site-packages/pandas/core/indexing.py", line 1601, in _setitem_with_indexer self._setitem_with_indexer(new_indexer, value) File "/usr/local/lib/python3.7/site-packages/pandas/core/indexing.py", line 1667, in _setitem_with_indexer "cannot set using a multi-index " ValueError: cannot set using a multi-index selection indexer with a different length than the value

Thank you very much for your help.

npatel-ah commented 3 years ago

Downgrading pandas to 1.0.0 and matplotlib to 3.1.3 resolved the same error. Hope that helps.

jp3117 commented 3 years ago

Thank you very much for your help. it works now.