2017-05-31 158 views
0

我想運行程序genipe做一些全基因組生存分析。我已經安裝genipe和所有相關的目錄。然而,當我去運行程序出現錯誤:Python程序「genipe」 - TypeError:__init __()得到了一個意想不到的關鍵字參數'正常化'

「類型錯誤:_ 初始化 _()得到了一個意想不到的關鍵字參數‘正常化’」

我沒有任何編輯的genipe的腳本和我運行genipe沒有問題在不同的服務器上,所以我不知道什麼是錯的!任何幫助將不勝感激。

非常感謝,

卡拉

編輯: 我使用Python 3.6.1版

回溯如下:

Traceback (most recent call last): 
    File "https://stackoverflow.com/users/k1640238/miniconda/envs/genipe_pyvenv/lib/python3.6/multiprocessing/pool.py", line 119, in worker 
    result = (True, func(*args, **kwds)) 
    File "https://stackoverflow.com/users/k1640238/miniconda/envs/genipe_pyvenv/lib/python3.6/multiprocessing/pool.py", line 44, in mapstar 
    return list(map(*args)) 
    File "https://stackoverflow.com/users/k1640238/miniconda/envs/genipe_pyvenv/lib/python3.6/site-packages/genipe/tools/imputed_stats.py", line 965, in process_impute2_site 
    use_ml=site_info.use_ml, 
    File "https://stackoverflow.com/users/k1640238/miniconda/envs/genipe_pyvenv/lib/python3.6/site-packages/genipe/tools/imputed_stats.py", line 1048, in fit_cox 
    cf = CoxPHFitter(alpha=0.95, tie_method="Efron", normalize=False) 
TypeError: __init__() got an unexpected keyword argument 'normalize' 
""" 

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

Traceback (most recent call last): 
    File "https://stackoverflow.com/users/k1640238/miniconda/envs/genipe_pyvenv/lib/python3.6/site-packages/genipe/tools/imputed_stats.py", line 811, in compute_statistics 
    for result in pool.map(process_impute2_site, sites_to_process): 
    File "https://stackoverflow.com/users/k1640238/miniconda/envs/genipe_pyvenv/lib/python3.6/multiprocessing/pool.py", line 260, in map 
    return self._map_async(func, iterable, mapstar, chunksize).get() 
    File "https://stackoverflow.com/users/k1640238/miniconda/envs/genipe_pyvenv/lib/python3.6/multiprocessing/pool.py", line 608, in get 
    raise self._value 
TypeError: __init__() got an unexpected keyword argument 'normalize' 

[2017-05-31 14:18:53 ERROR] __init__() got an unexpected keyword argument 'normalize' 
multiprocessing.pool.RemoteTraceback: 
""" 
Traceback (most recent call last): 
    File "https://stackoverflow.com/users/k1640238/miniconda/envs/genipe_pyvenv/lib/python3.6/multiprocessing/pool.py", line 119, in worker 
    result = (True, func(*args, **kwds)) 
    File "https://stackoverflow.com/users/k1640238/miniconda/envs/genipe_pyvenv/lib/python3.6/multiprocessing/pool.py", line 44, in mapstar 
    return list(map(*args)) 
    File "https://stackoverflow.com/users/k1640238/miniconda/envs/genipe_pyvenv/lib/python3.6/site-packages/genipe/tools/imputed_stats.py", line 965, in process_impute2_site 
    use_ml=site_info.use_ml, 
    File "https://stackoverflow.com/users/k1640238/miniconda/envs/genipe_pyvenv/lib/python3.6/site-packages/genipe/tools/imputed_stats.py", line 1048, in fit_cox 
    cf = CoxPHFitter(alpha=0.95, tie_method="Efron", normalize=False) 
TypeError: __init__() got an unexpected keyword argument 'normalize' 
""" 

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

Traceback (most recent call last): 
    File "https://stackoverflow.com/users/k1640238/miniconda/envs/genipe_pyvenv/bin/imputed-stats", line 11, in <module> 
    sys.exit(main()) 
    File "https://stackoverflow.com/users/k1640238/miniconda/envs/genipe_pyvenv/lib/python3.6/site-packages/genipe/tools/imputed_stats.py", line 161, in main 
    options=args, 
    File "https://stackoverflow.com/users/k1640238/miniconda/envs/genipe_pyvenv/lib/python3.6/site-packages/genipe/tools/imputed_stats.py", line 811, in compute_statistics 
    for result in pool.map(process_impute2_site, sites_to_process): 
    File "https://stackoverflow.com/users/k1640238/miniconda/envs/genipe_pyvenv/lib/python3.6/multiprocessing/pool.py", line 260, in map 
    return self._map_async(func, iterable, mapstar, chunksize).get() 
    File "https://stackoverflow.com/users/k1640238/miniconda/envs/genipe_pyvenv/lib/python3.6/multiprocessing/pool.py", line 608, in get 
    raise self._value 
TypeError: __init__() got an unexpected keyword argument 'normalize' 
+0

爲了能夠解決這個問題,真的需要整個回溯和你的Python版本。 – obskyr

+0

我編輯過的問題包含了回溯和版本。 – Caragh

回答

1

lifeline changelog這個關鍵字參數具有判斷已從此特定功能中刪除。生命線是一個包含這個特殊功能的包,並且是used by genipe

你可以自己安裝以前版本的生命線,看看它是否有助於或等待genipe庫中的更新。

從您的評論中查看更多的錯誤,看起來好像是this is problematic code。您正嘗試使用dmatrices,但似乎沒有定義。可能是因爲提到try/catch塊找不到statsmodel安裝,因此也沒有導入patsy

嘗試手動安裝其他軟件包,從

,看看你會得到任何錯誤,那麼......

+0

非常感謝勘誤,我會嘗試安裝以前的版本,看看是否有效。 – Caragh

+0

我已經恢復到以前版本的生命線。但是我仍然有類似的問題。我已經安裝了Genipe指令中指定的所有軟件包版本。 – Caragh

+0

錯誤:test_fit_cox_interaction_snp1(genipe.tests.test_imputed_stats.TestImputedStatsCox) 使用交互,第一個SNP測試'fit_cox'函數。 回溯(最近通話最後一個): 文件 「/miniconda/envs/genipe_pyvenv/lib/python3.6/site-packages/genipe/tests/test_imputed_stats.py」,線路866,在test_fit_cox_interaction_snp1 公式=公式, 文件「/ miniconda/envs/genipe_pyvenv/lib/python3。6/site-packages/genipe/tools/imputed_stats.py「,第1128行,in fit_cox y,X = dmatrices(公式,data = data,return_type =」dataframe「) NameError:名稱'dmatrices'未定義 – Caragh

0

見勘誤的答案在上面,我使用了一些依賴關係的錯誤版本,但即使如此,該程序仍然給我錯誤。但是當我恢復到python 3.4時,該程序起作用。

相關問題