read_in_data
Read in data from a file and return a dataframe with the following columns: gene_id, {binding/expression}_effect, {binding/expression}_pvalue, source
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data_path |
str
|
path to the data file |
required |
identifier_col |
str
|
name of the feature identifier column in the data |
required |
effect_col |
str
|
name of the effect column in the data |
required |
pval_col |
str
|
name of the pvalue column in the data |
required |
source |
str
|
source of the data |
required |
data_type |
str
|
type of data, either ‘binding’ or ‘expression’ |
required |
Returns:
Type | Description |
---|---|
DataFrame
|
pd.DataFrame: dataframe with the following columns: feature, {binding/expression}_effect, {binding/expression}_pvalue, source |
Raises:
Type | Description |
---|---|
FileExistsError
|
if data_path does not exist |
KeyError
|
if identifier_col, effect_col, or pval_col is not in the
data, or if the |
AttributeError
|
if there are NA values in the effect or pvalue columns |
Source code in callingcardstools/Analysis/yeast/read_in_data.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
|