borenstein-lab / fishtaco

FishTaco (Functional Shifts Taxonomic Contributors) is a metagenomic computational framework that aims to identify the driver taxa of microbiome functional shifts
Other
23 stars 4 forks source link

error for enet_path in test_fishtaco.py #14

Closed ramay closed 2 years ago

ramay commented 2 years ago

Hi, I am trying to install fishtaco and have run into a few problems.

  1. Conda fishtaco package did not work. I found out the fishtaco code in the conda package is outdated and does not have the changes made on the github page for updates to sklearn.model_selection.

  2. I installed it from github but when I run test_fishtaco, it fails for elastic net with this error message:

Traceback (most recent call last):
  File "/home/hena.ramay/miniconda3/envs/fishtaco/bin/run_fishtaco.py", line 186, in <module>
    main(vars(given_args))
  File "/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/compute_contribution_to_DA.py", line 734, in main
    enet, validation_rsqr = learn_non_neg_elastic_net_with_prior.learn(cov_train, res_train, params)
  File "/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/learn_non_neg_elastic_net_with_prior.py", line 121, in learn
    _ = enet_path(cov_inner_train, response_inner_train,
  File "/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/sklearn/linear_model/_coordinate_descent.py", line 509, in enet_path
    raise ValueError("Unexpected parameters in params", params.keys())
ValueError: ('Unexpected parameters in params', dict_keys(['fit_intercept', 'normalize', 'return_models']))

Following is the output form test_fishtaco.py. I have printed out the values for variables being sent to enet_path. Can you please help me in figuring out what I need to do here?


==============================================================
Testing compute_differential_abundance.py
Path to examples:/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco
==============================================================
Given parameters:  {'input_file': '/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/examples/METAPHLAN_taxa_vs_SAMPLE_for_K00001.tab', 'class_file': '/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/examples/SAMPLE_vs_CLASS.tab', 'class_header': True, 'row_metadata': None, 'output_file': 'test_compute_differential_abundance.tab', 'method': 'Wilcoxon', 'control_label': '0', 'case_label': '1', 'verbose': True, 'alpha': 0.05}
Loading files... Done.
Number of samples: 213
Number of controls: 107
Number of cases: 106
Number of functions: 10
Computing differential abundance... Done.
Writing output... Done.
.==============================================================
Testing compute_pathway_abundance.py
Path to examples:/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco
==============================================================
Given parameters:  {'ko_abun_file': '/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/examples/KO_vs_SAMPLE_MUSiCC.tab', 'ko_to_pathway_file': '/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/data/KOvsPATHWAY_BACTERIAL_KEGG_2013_07_15.tab', 'output_file': 'test_compute_pathway_abundance.tab', 'output_counts_file': 'test_compute_pathway_abundance_counts.tab', 'mapping_method': 'naive', 'compute_method': 'sum', 'transpose_ko_abundance': False, 'transpose_output': False, 'verbose': True}
Reading files...
Done.
Writing output...
Done.
.==============================================================
Testing compute_contribution_to_DA.py (FDR correction)
Path to examples:/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco
==============================================================
Given parameters:
{'taxa_abun_file': '/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/examples/METAPHLAN_taxa_vs_SAMPLE_for_K00001.tab', 'function_abun_file': '/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/examples/WGS_KO_vs_SAMPLE_MUSiCC_only_K00001.tab', 'class_file': '/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/examples/SAMPLE_vs_CLASS.tab', 'taxa_to_function_file': '/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/examples/METAPHLAN_taxa_vs_KO_only_K00001.tab', 'apply_inference': False, 'case_label': '1', 'control_label': '0', 'output_pref': 'fishtaco_out_FDR_correction', 'map_function_level': 'none', 'map_function_file': None, 'perform_inference_on_ko_level': False, 'multiple_hypothesis_correction': 'FDR', 'max_da_functions_cases_controls': None, 'taxa_assessment_method': 'single_taxa', 'score_to_compute': 'wilcoxon', 'max_score_cutoff': '100', 'na_rep': '0', 'number_of_permutations': '5', 'number_of_shapley_orderings_per_taxa': '100', 'da_result_file': None, 'single_function_filter': 'K00001', 'multi_function_filter_list': None, 'functional_profile_already_corrected_with_musicc': True, 'write_log': True, 'num_cv': 5, 'alpha': 0.05, 'residual_mode': 'remove_residual', 'normalization_mode': 'scale_permuted', 'permutation_mode': 'blocks'}
Reading input files...
Done.
Reducing taxa, function, and class data to contain the exact same set of samples...
Done.
Filtering for a single function: K00001
Done.
#controls = 107, #cases = 106
Computing a differential abundance score for each taxa...
Done.
Computing a differential abundance score for each function...
Done.
Selecting only functions that are enriched in samples with the label: 1...
Done.
#DA functions:1 #Taxa:10 #Samples:213
Calculating agreement between metagenome-based and taxa-based functional profiles...
Calculating differential abundance values for each function...
Creating 5 permutations...
Done.
0:K00001 took 0.056569814682006836 seconds to run.
Writing output...
Done.
Testing output...
Deleting temporary files...
.==============================================================
Testing compute_contribution_to_DA.py (de novo inference)
Path to examples:/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco
==============================================================
Given parameters:
{'taxa_abun_file': '/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/examples/METAPHLAN_taxa_vs_SAMPLE_for_K00001.tab', 'function_abun_file': '/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/examples/WGS_KO_vs_SAMPLE_MUSiCC_only_K00001.tab', 'class_file': '/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/examples/SAMPLE_vs_CLASS.tab', 'taxa_to_function_file': None, 'apply_inference': True, 'case_label': '1', 'control_label': '0', 'output_pref': 'fishtaco_out_de_novo_inf', 'map_function_level': 'none', 'map_function_file': None, 'perform_inference_on_ko_level': False, 'multiple_hypothesis_correction': 'Bonf', 'max_da_functions_cases_controls': None, 'taxa_assessment_method': 'single_taxa', 'score_to_compute': 'wilcoxon', 'max_score_cutoff': '100', 'na_rep': '0', 'number_of_permutations': '5', 'number_of_shapley_orderings_per_taxa': '100', 'da_result_file': None, 'single_function_filter': 'K00001', 'multi_function_filter_list': None, 'functional_profile_already_corrected_with_musicc': True, 'write_log': True, 'num_cv': 5, 'alpha': 0.05, 'residual_mode': 'remove_residual', 'normalization_mode': 'scale_permuted', 'permutation_mode': 'blocks'}
Reading input files...
No input of genomic content given to FishTaco, inferring the mapping of taxa to functions from taxonomic and functional profiles
Done.
Reducing taxa, function, and class data to contain the exact same set of samples...
Done.
Filtering for a single function: K00001
Done.
#controls = 107, #cases = 106
Computing a differential abundance score for each taxa...
Done.
Computing a differential abundance score for each function...
Done.
Selecting only functions that are enriched in samples with the label: 1...
Done.
#DA functions:1 #Taxa:10 #Samples:213
Inferring the genomic content of each taxa...
0 : K00001
************************************************
cov_inner_train:
[[0.   0.   0.02 ... 0.   0.   0.  ]
 [0.03 0.05 0.41 ... 0.03 0.04 0.06]
 [0.   0.05 0.08 ... 0.02 0.01 0.01]
 ...
 [0.   0.   0.04 ... 0.   0.   0.01]
 [0.03 0.02 0.45 ... 0.01 0.01 0.1 ]
 [0.   0.   0.02 ... 0.   0.   0.  ]]
response_inner_train:
[1.26 0.73 0.65 1.06 0.35 0.25 1.01 0.27 1.   0.54 0.27 0.44 0.56 0.87 0.51 0.79 0.43 0.73 0.32 1.25 0.52 0.36 1.01 0.47 0.89 1.19 0.92 0.69 0.26 1.13 0.78 0.89 0.3  0.74 0.81 0.46 0.27 1.17 1.13
 0.51 0.72 0.85 0.38 0.43 0.88 0.72 0.88 0.7  0.42 1.19 0.87 0.28 0.84 0.64 0.71 0.32 0.26 0.76 1.26 0.3  0.24 0.5  0.58 0.56 0.62 0.33 0.6  1.15 0.33 0.43 0.87 0.84 0.73 0.39 0.56 0.37 0.25 0.78
 1.24 0.4  0.8  0.56 0.78 1.15 0.33 0.48 0.26 0.34 0.86 0.63 0.51 1.34 0.42 0.43 0.51 0.86 0.51 0.57 0.57 0.61 0.23 0.72 0.45 0.26 0.51 0.69 0.24 0.77 0.47 0.76 0.37 0.4  0.3  0.52 0.41 0.77 0.6
 0.75 0.51 0.73 0.37 0.27 0.35 1.02 0.48 0.4  0.52 0.55 0.51 0.37 0.82 0.71 1.07 0.69 1.13]
l1_ratio
0.5
************************************************
Traceback (most recent call last):
  File "/home/hena.ramay/miniconda3/envs/fishtaco/bin/run_fishtaco.py", line 186, in <module>
    main(vars(given_args))
  File "/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/compute_contribution_to_DA.py", line 734, in main
    enet, validation_rsqr = learn_non_neg_elastic_net_with_prior.learn(cov_train, res_train, params)
  File "/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/learn_non_neg_elastic_net_with_prior.py", line 121, in learn
    _ = enet_path(cov_inner_train, response_inner_train,
  File "/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/sklearn/linear_model/_coordinate_descent.py", line 509, in enet_path
    raise ValueError("Unexpected parameters in params", params.keys())
ValueError: ('Unexpected parameters in params', dict_keys(['fit_intercept', 'normalize', 'return_models']))
Testing output...
F==============================================================
Testing compute_contribution_to_DA.py (filter by list)
Path to examples:/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco
==============================================================
Given parameters:
{'taxa_abun_file': '/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/examples/METAPHLAN_taxa_vs_SAMPLE_for_K00001.tab', 'function_abun_file': '/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/examples/WGS_KO_vs_SAMPLE_MUSiCC_only_K00001_K00054.tab', 'class_file': '/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/examples/SAMPLE_vs_CLASS.tab', 'taxa_to_function_file': '/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/examples/METAPHLAN_taxa_vs_KO_only_K00001_K00054.tab', 'apply_inference': False, 'case_label': '1', 'control_label': '0', 'output_pref': 'fishtaco_out_filtering_by_function_list', 'map_function_level': 'none', 'map_function_file': None, 'perform_inference_on_ko_level': False, 'multiple_hypothesis_correction': 'Bonf', 'max_da_functions_cases_controls': None, 'taxa_assessment_method': 'single_taxa', 'score_to_compute': 'wilcoxon', 'max_score_cutoff': '100', 'na_rep': '0', 'number_of_permutations': '5', 'number_of_shapley_orderings_per_taxa': '100', 'da_result_file': None, 'single_function_filter': None, 'multi_function_filter_list': 'K00001,K00007,K00020', 'functional_profile_already_corrected_with_musicc': True, 'write_log': True, 'num_cv': 5, 'alpha': 0.05, 'residual_mode': 'remove_residual', 'normalization_mode': 'scale_permuted', 'permutation_mode': 'blocks'}
Reading input files...
Done.
Reducing taxa, function, and class data to contain the exact same set of samples...
Done.
Filtering for the following functions: K00001,K00007,K00020
Done.
#controls = 107, #cases = 106
Computing a differential abundance score for each taxa...
Done.
Computing a differential abundance score for each function...
Done.
Selecting only functions that are enriched in samples with the label: 1...
Done.
#DA functions:3 #Taxa:10 #Samples:213
Calculating agreement between metagenome-based and taxa-based functional profiles...
Calculating differential abundance values for each function...
Creating 5 permutations...
Done.
0:K00001 took 0.05357718467712402 seconds to run.
1:K00007 took 0.05191183090209961 seconds to run.
2:K00020 took 0.05183863639831543 seconds to run.
Writing output...
Done.
Testing output...
Deleting temporary files...
.==============================================================
Testing compute_contribution_to_DA.py (no inference)
Path to examples:/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco
==============================================================
Given parameters:
{'taxa_abun_file': '/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/examples/METAPHLAN_taxa_vs_SAMPLE_for_K00001.tab', 'function_abun_file': '/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/examples/WGS_KO_vs_SAMPLE_MUSiCC_only_K00001.tab', 'class_file': '/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/examples/SAMPLE_vs_CLASS.tab', 'taxa_to_function_file': '/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/examples/METAPHLAN_taxa_vs_KO_only_K00001.tab', 'apply_inference': False, 'case_label': '1', 'control_label': '0', 'output_pref': 'fishtaco_out_no_inf', 'map_function_level': 'none', 'map_function_file': None, 'perform_inference_on_ko_level': False, 'multiple_hypothesis_correction': 'Bonf', 'max_da_functions_cases_controls': None, 'taxa_assessment_method': 'single_taxa', 'score_to_compute': 'wilcoxon', 'max_score_cutoff': '100', 'na_rep': '0', 'number_of_permutations': '5', 'number_of_shapley_orderings_per_taxa': '100', 'da_result_file': None, 'single_function_filter': 'K00001', 'multi_function_filter_list': None, 'functional_profile_already_corrected_with_musicc': True, 'write_log': True, 'num_cv': 5, 'alpha': 0.05, 'residual_mode': 'remove_residual', 'normalization_mode': 'scale_permuted', 'permutation_mode': 'blocks'}
Reading input files...
Done.
Reducing taxa, function, and class data to contain the exact same set of samples...
Done.
Filtering for a single function: K00001
Done.
#controls = 107, #cases = 106
Computing a differential abundance score for each taxa...
Done.
Computing a differential abundance score for each function...
Done.
Selecting only functions that are enriched in samples with the label: 1...
Done.
#DA functions:1 #Taxa:10 #Samples:213
Calculating agreement between metagenome-based and taxa-based functional profiles...
Calculating differential abundance values for each function...
Creating 5 permutations...
Done.
0:K00001 took 0.055394649505615234 seconds to run.
Writing output...
Done.
Testing output...
Deleting temporary files...
.==============================================================
Testing compute_contribution_to_DA.py (predict function)
Path to examples:/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco
==============================================================
Given parameters:
{'taxa_abun_file': '/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/examples/METAPHLAN_taxa_vs_SAMPLE_for_K00001.tab', 'function_abun_file': None, 'class_file': '/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/examples/SAMPLE_vs_CLASS.tab', 'taxa_to_function_file': '/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/examples/METAPHLAN_taxa_vs_KO_only_K00001.tab', 'apply_inference': False, 'case_label': '1', 'control_label': '0', 'output_pref': 'fishtaco_out_predict_function', 'map_function_level': 'none', 'map_function_file': None, 'perform_inference_on_ko_level': False, 'multiple_hypothesis_correction': 'Bonf', 'max_da_functions_cases_controls': None, 'taxa_assessment_method': 'single_taxa', 'score_to_compute': 'wilcoxon', 'max_score_cutoff': '100', 'na_rep': '0', 'number_of_permutations': '5', 'number_of_shapley_orderings_per_taxa': '100', 'da_result_file': None, 'single_function_filter': 'K00001', 'multi_function_filter_list': None, 'functional_profile_already_corrected_with_musicc': False, 'write_log': True, 'num_cv': 5, 'alpha': 0.05, 'residual_mode': 'remove_residual', 'normalization_mode': 'scale_permuted', 'permutation_mode': 'blocks'}
Reading input files...
No input of functional abundance given to FishTaco, predicting from taxonomic abundance and genomic content...
Reading files...
Done.
Writing output...
Done.
Done.
Reducing taxa, function, and class data to contain the exact same set of samples...
Done.
Filtering for a single function: K00001
Done.
#controls = 107, #cases = 106
Computing a differential abundance score for each taxa...
Done.
Computing a differential abundance score for each function...
Done.
Selecting only functions that are enriched in samples with the label: 1...
Done.
#DA functions:1 #Taxa:10 #Samples:213
Calculating agreement between metagenome-based and taxa-based functional profiles...
Calculating differential abundance values for each function...
Creating 5 permutations...
Done.
0:K00001 took 0.051674604415893555 seconds to run.
Writing output...
Done.
Testing output...
Deleting temporary files...
.==============================================================
Testing compute_contribution_to_DA.py (prior-based inference)
Path to examples:/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco
==============================================================
Given parameters:
{'taxa_abun_file': '/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/examples/METAPHLAN_taxa_vs_SAMPLE_for_K00001.tab', 'function_abun_file': '/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/examples/WGS_KO_vs_SAMPLE_MUSiCC_only_K00001.tab', 'class_file': '/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/examples/SAMPLE_vs_CLASS.tab', 'taxa_to_function_file': '/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/examples/METAPHLAN_taxa_vs_KO_only_K00001.tab', 'apply_inference': True, 'case_label': '1', 'control_label': '0', 'output_pref': 'fishtaco_out_prior_based_inf', 'map_function_level': 'none', 'map_function_file': None, 'perform_inference_on_ko_level': False, 'multiple_hypothesis_correction': 'Bonf', 'max_da_functions_cases_controls': None, 'taxa_assessment_method': 'single_taxa', 'score_to_compute': 'wilcoxon', 'max_score_cutoff': '100', 'na_rep': '0', 'number_of_permutations': '5', 'number_of_shapley_orderings_per_taxa': '100', 'da_result_file': None, 'single_function_filter': 'K00001', 'multi_function_filter_list': None, 'functional_profile_already_corrected_with_musicc': True, 'write_log': True, 'num_cv': 5, 'alpha': 0.05, 'residual_mode': 'remove_residual', 'normalization_mode': 'scale_permuted', 'permutation_mode': 'blocks'}
Reading input files...
Done.
Reducing taxa, function, and class data to contain the exact same set of samples...
Done.
Filtering for a single function: K00001
Done.
#controls = 107, #cases = 106
Computing a differential abundance score for each taxa...
Done.
Computing a differential abundance score for each function...
Done.
Selecting only functions that are enriched in samples with the label: 1...
Done.
#DA functions:1 #Taxa:10 #Samples:213
Inferring the genomic content of each taxa...
0 : K00001
************************************************
cov_inner_train:
[[2.85e-04 3.32e-03 5.29e-03 ... 1.41e-03 6.04e-04 5.15e-04]
 [2.64e-04 7.47e-04 5.05e-02 ... 4.71e-04 1.58e-03 4.56e-03]
 [1.01e-04 3.42e-04 7.23e-03 ... 4.70e-04 4.93e-04 8.96e-04]
 ...
 [2.83e-04 9.90e-05 1.08e-02 ... 9.90e-05 9.90e-05 9.90e-05]
 [1.75e-03 1.16e-03 2.97e-02 ... 3.36e-04 9.57e-04 6.65e-03]
 [1.84e-04 1.22e-04 1.05e-03 ... 9.43e-05 1.04e-04 1.60e-04]]
response_inner_train:
[0.65 0.44 1.06 0.35 1.07 0.25 1.   0.79 0.27 0.44 0.56 0.51 0.79 0.43 1.69 1.25 0.49 0.52 1.01 0.47 0.89 0.69 0.47 1.13 0.89 1.38 0.27 0.78 1.13 0.52 0.51 0.43 0.72 0.48 0.54 0.88 0.88 0.7  0.42
 1.19 0.87 0.34 0.84 1.04 0.64 0.71 0.32 0.69 0.43 0.75 0.67 0.56 0.62 0.6  1.15 0.33 0.59 0.87 0.61 0.84 0.5  0.5  0.73 0.39 1.27 0.37 1.07 1.1  0.46 0.33 0.78 0.62 0.44 1.24 0.4  0.8  0.78 0.33
 0.68 0.48 1.16 0.28 0.61 0.96 0.26 0.39 0.74 0.86 0.63 0.51 0.74 0.42 0.43 0.86 0.57 0.57 0.61 0.91 0.23 0.71 1.28 0.45 0.26 0.33 0.51 0.69 0.24 0.77 0.47 0.76 0.37 0.3  0.52 0.71 0.41 0.7  0.77
 0.68 0.58 0.36 0.73 0.72 0.31 0.37 0.27 0.88 0.4  0.76 1.07 0.37 0.82 0.28 0.71 0.69 1.13]
l1_ratio
0.5
************************************************
Traceback (most recent call last):
  File "/home/hena.ramay/miniconda3/envs/fishtaco/bin/run_fishtaco.py", line 186, in <module>
    main(vars(given_args))
  File "/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/compute_contribution_to_DA.py", line 734, in main
    enet, validation_rsqr = learn_non_neg_elastic_net_with_prior.learn(cov_train, res_train, params)
  File "/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/learn_non_neg_elastic_net_with_prior.py", line 121, in learn
    _ = enet_path(cov_inner_train, response_inner_train,
  File "/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/sklearn/linear_model/_coordinate_descent.py", line 509, in enet_path
    raise ValueError("Unexpected parameters in params", params.keys())
ValueError: ('Unexpected parameters in params', dict_keys(['fit_intercept', 'normalize', 'return_models']))
Testing output...
F==============================================================
Testing compute_contribution_to_DA.py (Shapley value)
Path to examples:/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco
==============================================================
Given parameters:
{'taxa_abun_file': '/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/examples/METAPHLAN_taxa_vs_SAMPLE_for_K00001.tab', 'function_abun_file': '/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/examples/WGS_KO_vs_SAMPLE_MUSiCC_only_K00001.tab', 'class_file': '/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/examples/SAMPLE_vs_CLASS.tab', 'taxa_to_function_file': '/home/hena.ramay/miniconda3/envs/fishtaco/lib/python3.9/site-packages/fishtaco/examples/METAPHLAN_taxa_vs_KO_only_K00001.tab', 'apply_inference': False, 'case_label': '1', 'control_label': '0', 'output_pref': 'fishtaco_out_shapley', 'map_function_level': 'none', 'map_function_file': None, 'perform_inference_on_ko_level': False, 'multiple_hypothesis_correction': 'Bonf', 'max_da_functions_cases_controls': None, 'taxa_assessment_method': 'multi_taxa', 'score_to_compute': 'wilcoxon', 'max_score_cutoff': '100', 'na_rep': '0', 'number_of_permutations': '100', 'number_of_shapley_orderings_per_taxa': '10', 'da_result_file': None, 'single_function_filter': 'K00001', 'multi_function_filter_list': None, 'functional_profile_already_corrected_with_musicc': True, 'write_log': True, 'num_cv': 5, 'alpha': 0.05, 'residual_mode': 'remove_residual', 'normalization_mode': 'scale_permuted', 'permutation_mode': 'blocks'}
Reading input files...
Done.
Reducing taxa, function, and class data to contain the exact same set of samples...
Done.
Filtering for a single function: K00001
Done.
#controls = 107, #cases = 106
Computing a differential abundance score for each taxa...
Done.
Computing a differential abundance score for each function...
Done.
Selecting only functions that are enriched in samples with the label: 1...
Done.
#DA functions:1 #Taxa:10 #Samples:213
Calculating agreement between metagenome-based and taxa-based functional profiles...
Calculating differential abundance values for each function...
Creating 100 permutations...
Done.
Computing permuted shapley orderings scores for 100 orderings...
engal commented 2 years ago

Hi, It looks like sklearn made a change to enet_path that was included in the most recent sklearn version. If you revert to the most recent stable version prior to the current version (sklearn 0.24.2), I think that should fix the error.

ramay commented 2 years ago

Thank you very much @engal ! Switching to sklearn 0.24.2 worked.