diff --git a/src/api/comp_control_method.yaml b/src/api/comp_control_method.yaml index 85b6e8a3f..ef73bd31e 100644 --- a/src/api/comp_control_method.yaml +++ b/src/api/comp_control_method.yaml @@ -1,3 +1,4 @@ + functionality: namespace: "control_methods" info: @@ -15,9 +16,9 @@ functionality: - name: --layer type: string direction: input - default: lognorm + default: scgen_pearson description: Which layer of pertubation data to use to find tf-gene relationships. - required: true + required: false - name: --prior_data __merge__: file_prior.yaml direction: input diff --git a/src/api/comp_metric.yaml b/src/api/comp_metric.yaml index f50aad02f..d1ba181b1 100644 --- a/src/api/comp_metric.yaml +++ b/src/api/comp_metric.yaml @@ -25,12 +25,16 @@ functionality: direction: input default: ridge description: name of regretion to use - multiple: true + multiple: false + info: + test_default: ridge - name: --subsample type: integer direction: input default: -1 description: number of samples randomly drawn from perturbation data + info: + test_default: 200 test_resources: - type: python_script diff --git a/src/api/file_multiomics_atac_h5ad.yaml b/src/api/file_multiomics_atac_h5ad.yaml index de891bf67..3acf53026 100644 --- a/src/api/file_multiomics_atac_h5ad.yaml +++ b/src/api/file_multiomics_atac_h5ad.yaml @@ -1,5 +1,5 @@ type: file -example: resources/grn-benchmark/multiomics_atac.h5ad +example: resources_test/grn-benchmark/multiomics_atac.h5ad info: label: multiomics atac summary: "Peak data for multiomics data." diff --git a/src/api/file_multiomics_rna_h5ad.yaml b/src/api/file_multiomics_rna_h5ad.yaml index 061601e15..8197a74bf 100644 --- a/src/api/file_multiomics_rna_h5ad.yaml +++ b/src/api/file_multiomics_rna_h5ad.yaml @@ -1,5 +1,5 @@ type: file -example: resources/grn-benchmark/multiomics_rna.h5ad +example: resources_test/grn-benchmark/multiomics_rna.h5ad info: label: multiomics rna summary: "RNA expression for multiomics data." diff --git a/src/api/file_perturbation_h5ad.yaml b/src/api/file_perturbation_h5ad.yaml index 94d2b1b4c..878ba8ba9 100644 --- a/src/api/file_perturbation_h5ad.yaml +++ b/src/api/file_perturbation_h5ad.yaml @@ -46,9 +46,9 @@ info: - name: pearson type: double description: "Normalized values using pearson residuals" - required: true + required: false - name: lognorm type: double description: "Normalized values using shifted logarithm " - required: true + required: false \ No newline at end of file diff --git a/src/control_methods/negative_control/script.py b/src/control_methods/negative_control/script.py index 81602878c..3a697f6e2 100644 --- a/src/control_methods/negative_control/script.py +++ b/src/control_methods/negative_control/script.py @@ -6,9 +6,9 @@ ## VIASH START par = { "perturbation_data": "resources/grn-benchmark/perturbation_data.h5ad", - "layer": "lognorm", + "layer": "scgen_pearson", "prior_data": "resources/grn-benchmark/prior_data.h5ad", - "output": "resources/grn-benchmark/negative_control.csv", + "prediction": "output/negative_control.csv", } ## VIASH END print('Reading input data') @@ -30,5 +30,5 @@ def create_negative_control(gene_names) -> np.ndarray: pivoted_net = pivoted_net[pivoted_net['weight'] != 0] print('Saving') -pivoted_net.to_csv(par["output"]) +pivoted_net.to_csv(par["prediction"]) diff --git a/src/control_methods/positive_control/script.py b/src/control_methods/positive_control/script.py index 36afad1a2..cf6a8d807 100644 --- a/src/control_methods/positive_control/script.py +++ b/src/control_methods/positive_control/script.py @@ -7,9 +7,9 @@ ## VIASH START par = { "perturbation_data": "resources/grn-benchmark/perturbation_data.h5ad", - "layer": "lognorm", + "layer": "scgen_pearson", "prior_data": "resources/grn-benchmark/prior_data.h5ad", - "prediction": "resources/grn-benchmark/positive_control.csv", + "prediction": "output/positive_control.csv", } ## VIASH END print('Reading input data') diff --git a/src/metrics/regression_1/main.py b/src/metrics/regression_1/main.py index 193e4e1b5..7296afa0a 100644 --- a/src/metrics/regression_1/main.py +++ b/src/metrics/regression_1/main.py @@ -53,7 +53,7 @@ def cv_5(genes_n): def run_method_1( net: pd.DataFrame, train_df: pd.DataFrame, - reg_type: str = 'GRB', + reg_type: str = 'GB', exclude_missing_genes: bool = False, verbose: int = 0) -> None: """ @@ -73,8 +73,8 @@ def run_method_1( regr = lightgbm_wrapper(dict(random_state=32, n_estimators=100, min_samples_leaf=2, min_child_samples=1, feature_fraction=0.05, verbosity=-1)) elif reg_type=='RF': regr = lightgbm_wrapper(dict(boosting_type='rf',random_state=32, n_estimators=100, feature_fraction=0.05, verbosity=-1)) - else: + print(f'{reg_type} is not defined') raise ValueError("define first") n_tfs = net.shape[1]