create_case_lists
genie.create_case_lists
¶
Creates case lists per cancer type
Attributes¶
CASE_LIST_TEXT_TEMPLATE = 'cancer_study_identifier: {study_id}\nstable_id: {stable_id}\ncase_list_name: {case_list_name}\ncase_list_description: {case_list_description}\ncase_list_ids: {case_list_ids}'
module-attribute
¶
Functions¶
create_case_lists_map(clinical_file_name)
¶
Creates the case list dictionary
PARAMETER | DESCRIPTION |
---|---|
clinical_file_name
|
clinical file path
|
RETURNS | DESCRIPTION |
---|---|
dict
|
key = cancer_type value = list of sample ids |
dict
|
key = seq_assay_id value = list of sample ids |
list
|
Clinical samples |
Source code in genie/create_case_lists.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
|
_write_single_oncotree_case_list(cancer_type, ids, study_id, output_directory)
¶
Writes one oncotree case list. Python verisons below 3.6 will sort the dictionary keys which causes tests to fail
PARAMETER | DESCRIPTION |
---|---|
cancer_type
|
Oncotree code cancer type
|
ids
|
GENIE sample ids
|
study_id
|
cBioPortal study id
|
output_directory
|
case list output directory
|
RETURNS | DESCRIPTION |
---|---|
case list file path |
Source code in genie/create_case_lists.py
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 |
|
write_case_list_files(clinical_file_map, output_directory, study_id)
¶
Writes the cancer_type case list file to case_lists directory
PARAMETER | DESCRIPTION |
---|---|
clinical_file_map
|
cancer type to sample id mapping from create_case_lists_map
|
output_directory
|
Directory to write case lists
|
study_id
|
cBioPortal study id
|
RETURNS | DESCRIPTION |
---|---|
list
|
oncotree code case list files |
Source code in genie/create_case_lists.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
|
create_sequenced_samples(seq_assay_map, assay_info_file_name)
¶
Gets samples sequenced
PARAMETER | DESCRIPTION |
---|---|
seq_assay_map
|
dictionary containing lists of samples per seq_assay_id
|
assay_info_file_name
|
Assay information name
|
RETURNS | DESCRIPTION |
---|---|
lists of cna and sv samples |
Source code in genie/create_case_lists.py
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
|
write_case_list_sequenced(clinical_samples, output_directory, study_id)
¶
Writes the genie sequenced and all samples. Since all samples are sequenced, _all and _sequenced are equal
PARAMETER | DESCRIPTION |
---|---|
clinical_samples
|
List of clinical samples
|
output_directory
|
Directory to write case lists
|
study_id
|
cBioPortal study id
|
RETURNS | DESCRIPTION |
---|---|
list
|
case list sequenced and all |
Source code in genie/create_case_lists.py
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
|
write_case_list_cna(cna_samples, output_directory, study_id)
¶
Writes the cna sequenced samples
PARAMETER | DESCRIPTION |
---|---|
cna_samples
|
List of cna samples
|
output_directory
|
Directory to write case lists
|
study_id
|
cBioPortal study id
|
RETURNS | DESCRIPTION |
---|---|
cna caselist path |
Source code in genie/create_case_lists.py
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
|
write_case_list_sv(samples, output_directory, study_id)
¶
Writes the structural variant (sv) sequenced samples
PARAMETER | DESCRIPTION |
---|---|
samples
|
List of sv samples
TYPE:
|
output_directory
|
Directory to write case lists
TYPE:
|
study_id
|
cBioPortal study id
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
str
|
sv caselist path
TYPE:
|
Source code in genie/create_case_lists.py
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 |
|
write_case_list_cnaseq(cna_samples, output_directory, study_id)
¶
writes both cna and mutation samples (Just _cna file for now)
PARAMETER | DESCRIPTION |
---|---|
cna_samples
|
List of cna samples
|
output_directory
|
Directory to write case lists
|
study_id
|
cBioPortal study id
|
RETURNS | DESCRIPTION |
---|---|
cnaseq path |
Source code in genie/create_case_lists.py
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 |
|
main(clinical_file_name, assay_info_file_name, output_directory, study_id)
¶
Gets clinical file and gene matrix file and processes it to obtain case list files
PARAMETER | DESCRIPTION |
---|---|
clinical_file_name
|
Clinical file path
|
assay_info_file_name
|
Assay information name
|
output_directory
|
Output directory of case list files
|
study_id
|
cBioPortal study id
|
Source code in genie/create_case_lists.py
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 |
|