easypheno.utils.check_functions

Module Contents

Functions

check_all_specified_arguments(arguments)

Check all specified arguments for plausibility

check_exist_directories(list_of_dirs, create_if_not_exist = False)

Check if each directory within a list exists

check_exist_files(list_of_files)

Check if each file within a list exists

compare_snp_id_vectors(snp_id_vector_small_equal, snp_id_vector_big_equal)

Compare two SNP id vectors if they contain the same ids

easypheno.utils.check_functions.check_all_specified_arguments(arguments)

Check all specified arguments for plausibility

Parameters

arguments (dict) – all arguments provided by the user

easypheno.utils.check_functions.check_exist_directories(list_of_dirs, create_if_not_exist=False)

Check if each directory within a list exists

Parameters
  • list_of_dirs (list) – list with directories as pathlib.Path

  • create_if_not_exist (bool) – bool if non-existing directories should be created

Returns

True if all exist, False otherwise

Return type

bool

easypheno.utils.check_functions.check_exist_files(list_of_files)

Check if each file within a list exists

Parameters

list_of_files (list) – list with files as pathlib.Path

Returns

True if all exist, False otherwise

Return type

bool

easypheno.utils.check_functions.compare_snp_id_vectors(snp_id_vector_small_equal, snp_id_vector_big_equal)

Compare two SNP id vectors if they contain the same ids

Parameters
  • snp_id_vector_small_equal (numpy.array) – vector 1 with SNP ids, can be a (smaller) subset of snp_id_vector_big_equal

  • snp_id_vector_big_equal (numpy.array) – vector 2 with SNP ids, can contain more SNP ids than snp_id_vector_small_equal

Returns

True if snp_id_vector_small_equal is a subset of the other vector

Return type

bool