chipexo_promoter_sig
Find the promoter signature of the chipexo data. This is calculated as the most significant peak in each promoter region.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
chipexo_data_path |
str
|
path to the chipexo allevents file. |
required |
chipexo_orig_chr_convention |
str
|
chromosome convention of the chipexo allevents file. |
required |
promoter_data_path |
str
|
path to the promoter data file. |
required |
promoter_orig_chr_convention |
str
|
chromosome convention of the promoter data file. |
required |
chrmap_data_path |
str
|
path to the chromosome map file. |
required |
unified_chr_convention |
str
|
chromosome convention to convert to. |
required |
Returns:
Type | Description |
---|---|
DataFrame
|
pandas.DataFrame: A pandas DataFrame containing the promoter signature of the chipexo data. |
Example
import pandas as pd import tempfile
Create temporary chipexo data file¶
with tempfile.NamedTemporaryFile(mode=’w+’, … suffix=’.tsv’) as chipexo_file: … _ = chipexo_file.write(‘chr\tcoord\tYPD_log2Fold\t’ … ‘ YPD_log2P\nchr1\t150\t2.0\t0.05\n’)
Create temporary promoter data file¶
with tempfile.NamedTemporaryFile(mode=’w+’, … suffix=’.tsv’) as promoter_file: … _ = promoter_file.write(‘chr\tstart\tend\t’ … ‘associated_feature\nchr1\t100\t’ … ‘200\tpromoter1\n’)
Create temporary chromosome map file¶
with tempfile.NamedTemporaryFile(mode=’w+’, … suffix=’.tsv’) as chrmap_file: … - = chrmap_file.write(‘chr\tucsc\nchr1\tchr1\n’)
Call the function¶
result = chipexo_promoter_sig(chipexo_file.name, ‘chr’, … promoter_file.name, ‘chr’, … chrmap_file.name, ‘ucsc’) isinstance(result, pd.DataFrame) True
Source code in callingcardstools/Analysis/yeast/chipexo_promoter_sig.py
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 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
|