Menu
Introduction
Getting Started
ID Card
Uses Cases
Technical documentations
Version
Publication date

Mar 9, 2022

Confidentiality
Public
Reactions
2
Share

PValueAdjust

Test and adjust (correct) p-value for multiple tests

  • Input: a table containing lists of p-values.

  • Output: a table containing lists of corrected p-values.

  • Config Parameters:

    • alpha (float between 0 and 1): FWER, family-wise error rate, e.g. 0.1. Except for fdr_twostage, the p-value correction is independent of the alpha specified as argument

    • methods: Method used for testing and adjustment of pvalues. Can be either the full name or initial letters. Available methods are:

      • bonferroni: one-step correction
      • fdr_bh: Benjamini/Hochberg (non-negative)
      • fdr_by: Benjamini/Yekutieli (negative)
      • fdr_tsbh: two stage fdr correction (non-negative)
      • fdr_tsbky: two stage fdr correction (non-negative)
      • sidak: one-step correction
      • holm-sidak: step down method using Sidak adjustments
      • holm: step-down method using Bonferroni adjustments
      • simes-hochberg: step-up method (independent)
      • hommel: closed method based on Simes tests (non-negative)

For more details, see https://www.statsmodels.org/dev/generated/statsmodels.stats.multitest.multipletests.html

Attributes
config_specs: ConfigSpecsinput_specs: InputSpecsmessage_dispatcher: gws_core.core.classes.observer.message_dispatcher.MessageDispatcher | Noneoutput_specs: OutputSpecsstyle: gws_core.model.typing_style.TypingStyle | None
Functions
__init__

Constructor, please do not overwrite this method, use the init method instead Leave the constructor without parameters

check_before_run

This can be overwritten to perform custom check before running task. See doc of CheckBeforeTaskResult for more information

params : ConfigParams
inputs : TaskInputs
Return type : CheckBeforeTaskResult
compute_stats

compute stats

current_data : Any
params : ConfigParams
create_tmp_dir

Create a temporary directory. This directory will be deleted after the task is run. Output file or folder are moved out of this directory before it is deleted.

Return type : str
get_and_check_message_dispatcher

Return the message dispatcher, raising if it is not set.

Return type : MessageDispatcher
get_default_output_spec_type
spec_name : str
Return type : type[gws_core.resource.resource.Resource] | None
get_message_dispatcher
Return type : MessageDispatcher
get_scenario_id
Return type : str | None
get_task_id
Return type : str | None
init

This can be overwritten to perform custom initialization of the task. This method is called just after the init and before the check_before_run method

log_debug_message
message : str
log_error_message

Log an error message, optionally appending the formatted traceback of an exception.

message : str
exception : Exception | None
log_info_message
message : str
log_message

Store a message in the progress

message : str
message to store in the progress
type_ : MessageLevel
log_success_message
message : str
log_warning_message
message : str
run

This must be overiwritten to perform the task of the task.

This is where most of your code must go

params : ConfigParams
[description]
inputs : TaskInputs
[description]
Return type : dict
run_after_task

This can be overwritten to perform action after the task run. This method is called after the resources are saved. This method is useful to delete temporary objects (like files) to clear the server after the task is run.

update_progress_value

Update the progress value

value : float
value between 0 and 100 of the progress
message : str
if provided a message is stored on the progress
classname @classmethod

Returns the name of the class

slugify : bool - False
True to slugify the class name if True
snakefy : bool - False
True to snakefy the class name if True
replace_uppercase : bool - False
Replace upper cases by "-" if True
Return type : str
full_classname @classmethod

Returns the full name of the class

slugify : bool - False
Slugify the returned class name if True
snakefy : bool - False
Snakefy the returned class name if True
Return type : str
get_brick_name @classmethod
Return type : str
get_brick_version @classmethod
Return type : Version
get_human_name @classmethod

Get the human name of the object

Return type : str
get_input_specs @classmethod

Returns the input specs of the process

Return type : InputSpecs
get_output_specs @classmethod

Returns the input specs of the process

Return type : OutputSpecs
get_short_description @classmethod

Get the short description of the object

Return type : str
get_style @classmethod

Get the style of the object

Return type : TypingStyle
get_typing_name @classmethod

Get the typing name of the object Ex: 'RESOURCE.gws_core.Table'

Return type : str
get_typing_name_obj @classmethod
Return type : TypingNameObj
inheritors @classmethod

Get all the classes that inherit this class

Return type : list
Shine Logo
Technical bricks to reuse or customize

Have you developed a brick?

Share it to accelerate projects for the entire community.