-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathe040_manejo_datos_clinicos.r.Rout
More file actions
697 lines (672 loc) · 78.1 KB
/
Copy pathe040_manejo_datos_clinicos.r.Rout
File metadata and controls
697 lines (672 loc) · 78.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
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
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
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
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
R version 3.1.2 (2014-10-31) -- "Pumpkin Helmet"
Copyright (C) 2014 The R Foundation for Statistical Computing
Platform: x86_64-unknown-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> ## e040_manejo_datos_clinicos.r
> ## 2015-03-26 julenmendieta92@gmail.com
> ## Script para manejar los datos clinicos y ver los diferentes datos clinicos que hay y en cuantos de los cánceres.
> date ()
[1] "Tue May 26 10:53:05 2015"
> Sys.info ()[c("nodename", "user")]
nodename user
"crom01" "jmendieta"
> commandArgs ()
[1] "/opt/soft/libs/R/3.1.2_atlas/lib64/R/bin/exec/R"
[2] "-f"
[3] "e040_manejo_datos_clinicos.r"
[4] "--restore"
[5] "--save"
[6] "--no-readline"
> rm (list = ls ())
> R.version.string ##"R version 3.2.0 (2015-04-16)"
[1] "R version 3.1.2 (2014-10-31)"
>
> try (source (".job.r")); try (.job)
.job.r has been sourced
$name
[1] "tcga_download"
$dir
$dir$data
[1] "~/datos/2015/tcga_download"
$dir$code
[1] "~/trabajos/2015/tcga_download"
$dir$scripts
[1] "~/trabajos/2015/tcga_download/scripts"
$dir$docs
[1] "~/trabajos/2015/tcga_download/documents"
$dir$raw
[1] "~/datos/2015/tcga_download/data_raw"
$dir$annotation
[1] "~/datos/2015/tcga_download/data_annotation"
$dir$proces
[1] "~/datos/2015/tcga_download/data_processed"
$dir$plots
[1] "~/datos/2015/tcga_download/results/plots"
$dir$res
[1] "~/datos/2015/tcga_download/results/files"
$testmode
[1] FALSE
$dec
[1] "."
$idsep
[1] " /// "
>
> options (width = 170)
> #options (width = 1000)
>
> setwd (file.path (.job$dir$raw, "clinical"))
> ficheros <- dir (pattern = "clinical_patient", recursive= TRUE) #Guardamos en ficheros el stream de cada carpeta y los ficheros que contiene
>
> setwd (file.path (.job$dir$proces))
>
> load (file.path (.job$dir$proces, "clinical_info_all.RData"))
> summary(datosClinicos)
Length Class Mode
LAML 64 data.frame list
ACC 68 data.frame list
BLCA 76 data.frame list
BRCA 93 data.frame list
CESC 105 data.frame list
CHOL 74 data.frame list
COAD 65 data.frame list
DLBC 69 data.frame list
ESCA 77 data.frame list
GBM 35 data.frame list
HNSC 63 data.frame list
KICH 55 data.frame list
KIRC 56 data.frame list
KIRP 58 data.frame list
LGG 67 data.frame list
LIHC 70 data.frame list
LUAD 62 data.frame list
LUSC 60 data.frame list
MESO 61 data.frame list
OV 42 data.frame list
PAAD 68 data.frame list
PCPG 40 data.frame list
PRAD 60 data.frame list
READ 63 data.frame list
SARC 66 data.frame list
SKCM 52 data.frame list
STAD 53 data.frame list
TGCT 84 data.frame list
THCA 69 data.frame list
THYM 36 data.frame list
UCEC 59 data.frame list
UCS 56 data.frame list
UVM 59 data.frame list
>
> load (file.path (.job$dir$proces, "estadistica_columnas_datos_clinicos.RData"))
> presenciaColumnas <- mat
> mat <- NULL
>
> table (rowSums (presenciaColumnas)) #Esto nos muestra cuantas cabeceras hay solo en x ficheros (cuantas en 1, cuantas en 2, cuantas en 4 etc.)
1 2 3 4 5 6 7 8 10 11 12 13 14 15 16 17 19 21 22 26 28 31 32 33
459 88 29 11 5 5 2 2 5 3 1 1 3 1 2 1 1 5 2 1 4 1 10 11
> colnames (presenciaColumnas) <- NULL
> touse <- rowSums (presenciaColumnas) == length(datosClinicos) #Guardamos solo las cabeceras que esten en todos los ficheros
> touse
ablation_embolization_tx_adjuvant abnormal_lymphocyte_percent age_at_diagnosis
FALSE FALSE FALSE
age_at_diagnosis.1 age_at_initial_pathologic_diagnosis ajcc_clinical_tumor_stage
FALSE FALSE FALSE
ajcc_metastasis_clinical_cm ajcc_metastasis_pathologic_pm ajcc_nodes_clinical_cn
FALSE FALSE FALSE
ajcc_nodes_pathologic_pn ajcc_path_pt_incidental_prostate ajcc_pathologic_tumor_stage
FALSE FALSE FALSE
ajcc_staging_edition ajcc_tumor_clinical_ct ajcc_tumor_pathologic_pt
FALSE FALSE FALSE
alcohol_consumption_frequency alcohol_consumption_per_day alcohol_exposure_intensity
FALSE FALSE FALSE
alcohol_history_documented allergy_animals_insects_dx_age allergy_animals_insects_dx_indicator
FALSE FALSE FALSE
allergy_animals_insects_dx_type allergy_food_dx_age allergy_food_dx_indicator
FALSE FALSE FALSE
allergy_food_dx_type alpha_fetoprotien_at_procurement alpha_fetoprotien_norm_range_lower
FALSE FALSE FALSE
alpha_fetoprotien_norm_range_upper anatomic_neoplasm_subdivision anatomic_neoplasm_subdivision_other
FALSE FALSE FALSE
anatomic_organ_subdivision antireflux_treatment antireflux_treatment_type
FALSE FALSE FALSE
asbestos_exposure_age_first asbestos_exposure_age_last asbestos_exposure_source
FALSE FALSE FALSE
asbestos_exposure_type asbestos_exposure_years asthma_eczema_allergy_first_dx
FALSE FALSE FALSE
atra_exposure atypical_mitotic_figures axillary_staging_method
FALSE FALSE FALSE
axillary_staging_method_other b_cell_genotype_method bands_24hr_of_banking
FALSE FALSE FALSE
barretts_esophagus basophils_count basophils_count.1
FALSE FALSE FALSE
bcg_complete_response_months bcg_tx_90_days_prior_to_resection bcg_tx_complete_response
FALSE FALSE FALSE
bcg_tx_induction_courses_indicator bcg_tx_maintenance_courses_indicator bcr_patient_barcode
FALSE FALSE TRUE
bcr_patient_uuid bilateral_diagnosis_timing_type bilirubin_total
TRUE FALSE FALSE
bilirubin_total_norm_range_lower bilirubin_total_norm_range_upper biochemical_recurrence_indicator
FALSE FALSE FALSE
birth_country birth_days_to blast_count
FALSE FALSE FALSE
bone_marrow_biopsy_performed bone_marrow_involvement bone_marrow_sample_histology
FALSE FALSE FALSE
bone_scan_results brachytherapy_total_dose_point_a brachytherapy_type
FALSE FALSE FALSE
brachytherapy_type_other braf_gene_analysis_indicator braf_gene_analysis_result
FALSE FALSE FALSE
braf_mutation_result breslow_thickness_at_diagnosis ca_19_9_level
FALSE FALSE FALSE
ca_19_9_level_lower ca_19_9_level_upper cancer_procurement_city
FALSE FALSE FALSE
cancer_procurement_state_province carbon_monoxide_diffusion_dlco cause_of_death
FALSE FALSE FALSE
cause_of_death_source cea_level_pretreatment cells_used_for_analysis_source
FALSE FALSE FALSE
cent17_copy_number cervix_suv_results chemo_concurrent_course
FALSE FALSE FALSE
chemo_concurrent_dose chemo_concurrent_fractions_total chemo_concurrent_reason_not_given
FALSE FALSE FALSE
chemo_concurrent_reason_not_other chemo_concurrent_type chemo_concurrent_type_other
FALSE FALSE FALSE
child_pugh_classification cholangitis_tissue_evidence circumferential_resection_margin_crm
FALSE FALSE FALSE
clark_level_at_diagnosis clinical_m clinical_n
FALSE FALSE FALSE
clinical_stage clinical_status_within_3_mths_surgery clinical_t
FALSE FALSE FALSE
colon_polyps_at_procurement_indicator columnar_metaplasia_goblet_cell_indicator contiguous_organ_invaded
FALSE FALSE FALSE
contiguous_organ_resection contiguous_organ_resection_other corpus_involvement
FALSE FALSE FALSE
creatinine_level_preresection creatinine_norm_range_lower creatinine_norm_range_upper
FALSE FALSE FALSE
creatinine_prior_tx ct_scan_ab_pelvis_indicator ct_scan_ab_pelvis_results
FALSE FALSE FALSE
ct_scan_preop_results ct_scan_preop_results.1 cyto_abnormality_type_other
FALSE FALSE FALSE
cyto_and_immuno_test_percentage cyto_and_immuno_test_performed cyto_risk_group
FALSE FALSE FALSE
cytogenetic_abnormality_type cytogenetics_testing_performed cytoplasm_presence_less_than_equal_25_percent
FALSE FALSE FALSE
days_to_bilateral_tumor_dx days_to_biochemical_recurrence_first days_to_birth
FALSE FALSE FALSE
days_to_bone_scan days_to_ct_scan_ab_pelvis days_to_death
FALSE FALSE FALSE
days_to_definitive_surgical_procedure_performed days_to_diagnostic_computed_tomography_performed days_to_diagnostic_mri_performed
FALSE FALSE FALSE
days_to_fdg_or_ct_pet_performed days_to_initial_pathologic_diagnosis days_to_last_followup
FALSE FALSE FALSE
days_to_mri days_to_performance_status_assessment days_to_post_orchi_serum_test
FALSE FALSE FALSE
days_to_pre_orchi_serum_test days_to_psa_most_recent death_days_to
FALSE FALSE FALSE
definitive_surgical_procedure diabetes_diagnosis_days_to diabetes_diagnosis_indicator
FALSE FALSE FALSE
diffuse_architecture discontinuous_lesions_count disease_code
FALSE FALSE FALSE
disease_detected_on_screening disease_multifocal_indicator ebv_positive_malignant_cells_percent
FALSE FALSE FALSE
ebv_status_malignan_cells_method ecog_score egfr_amplification_status
FALSE FALSE FALSE
egfr_mutation_identified_type egfr_mutation_status eml4_alk_analysis_type
FALSE FALSE FALSE
eml4_alk_translocation_status epstein_barr_viral_status er_ihc_score
FALSE FALSE FALSE
er_positivity_method er_positivity_scale_other er_positivity_scale_used
FALSE FALSE FALSE
er_status_by_ihc er_status_ihc_percent_positive erythrocyte_sedimentation_rate
FALSE FALSE FALSE
esoph_columnar_metaplasia_indicator esoph_non_ca_degree_of_dysplasia esophageal_tumor_location_centered
FALSE FALSE FALSE
esophageal_tumor_location_involved ethnicity extracapsular_extension
FALSE TRUE FALSE
extracapsular_extension_present extracapsular_spread_pathologic extranocular_nodule_size
FALSE FALSE FALSE
extranodal_involvement_site extranodal_involvment_other extranodal_lymphomatous_involvement
FALSE FALSE FALSE
extranodal_site_involvement extrascleral_extension extrathyroidal_extension
FALSE FALSE FALSE
extravascular_matrix_patterns eye_color fab_category
FALSE FALSE FALSE
family_cancer_type_txt family_history_brain_tumor family_history_cancer_indicator
FALSE FALSE FALSE
family_history_cancer_number_relatives family_history_cancer_relationship family_history_cancer_type
FALSE FALSE FALSE
family_history_colorectal_cancer family_history_esoph_gastic_cancer family_history_of_stomach_cancer
FALSE FALSE FALSE
family_history_other_cancer family_history_testicular_cancer family_history_thyroid_cancer
FALSE FALSE FALSE
fedpet_or_ct_results fev1_fvc_ratio_postbroncholiator fev1_fvc_ratio_prebroncholiator
FALSE FALSE FALSE
fev1_percent_ref_postbroncholiator fev1_percent_ref_prebroncholiator first_surgical_procedure_other
FALSE FALSE FALSE
first_symptom_longest_duration first_treatment_success fish_abnormality_detected
FALSE FALSE FALSE
fish_performed_indicator fish_performed_outcome follicular_component_percent
FALSE FALSE FALSE
form_completion_date gender gene_expression_profile
FALSE TRUE FALSE
genetic_abnormality_method_other genetic_abnormality_method_other.1 genetic_abnormality_results
FALSE FALSE FALSE
genetic_abnormality_results.1 genetic_abnormality_tested genetic_abnormality_tested_other
FALSE FALSE FALSE
genotypic_analysis_detected genotypic_analysis_results_other genotyping_results_gene_mutation_not_reported_reason
FALSE FALSE FALSE
gleason_pattern_primary gleason_pattern_secondary gleason_pattern_tertiary
FALSE FALSE FALSE
gleason_score grade_tier_system h_pylori_infection
FALSE FALSE FALSE
height_cm_at_diagnosis hematocrit_24hr_of_banking hemoglobin_24hr_of_banking
FALSE FALSE FALSE
hemoglobin_level hepatic_inflammation_adj_tissue her2_and_cent17_cells_count
FALSE FALSE FALSE
her2_and_cent17_scale_other her2_cent17_ratio her2_copy_number
FALSE FALSE FALSE
her2_fish_method her2_fish_status her2_ihc_percent_positive
FALSE FALSE FALSE
her2_ihc_score her2_positivity_method_text her2_positivity_scale_other
FALSE FALSE FALSE
her2_status_by_ihc histologic_diagnosis histologic_diagnosis_other
FALSE FALSE FALSE
histologic_diagnosis_percent histologic_diagnosis.1 histologic_subtype
FALSE FALSE FALSE
histological_type histor_hay_fever history_adrenal_hormone_excess
FALSE FALSE FALSE
history_asbestos_exposure history_asthma history_barretts_esophageal_indicator
FALSE FALSE FALSE
history_basis_adrenal_hormone_dx history_chronic_pancreatitis history_chronic_pancreatitis_days_to
FALSE FALSE FALSE
history_colon_polyps history_colorectal_cancer history_dust_mold_allergy
FALSE FALSE FALSE
history_eczema history_exposure_leukemogenic_agents history_fertility
FALSE FALSE FALSE
history_headaches history_hematologic_disorder history_hepato_carcinoma_risk_factors
FALSE FALSE FALSE
history_hormonal_contraceptives_use history_hpylori_infection_indicator history_hypospadias
FALSE FALSE FALSE
history_if_barretts_goblet_cell_indicator history_immunological_disease history_immunological_disease_other
FALSE FALSE FALSE
history_immunosuppresive_dx history_immunosuppressive_disease history_immunosuppressive_tx_other
FALSE FALSE FALSE
history_ionizing_rt_to_head history_lgg_dx_of_brain_tissue history_menopausal_hormone_therapy
FALSE FALSE FALSE
history_myasthenia_gravis history_neoadjuvant_hydroxyurea_tx history_neoadjuvant_medication
FALSE FALSE FALSE
history_neoadjuvant_steroid_tx history_neoadjuvant_treatment history_neoadjuvant_tx_type
FALSE TRUE FALSE
history_of_undescended_testis history_other_malignancy history_other_malignancy.1
FALSE TRUE FALSE
history_pheo_or_para_anatomic_site history_pheo_or_para_include_benign history_radiation_exposure
FALSE FALSE FALSE
history_reflux_disease_indicator history_reflux_disease_treatment history_relevant_infectious_dx
FALSE FALSE FALSE
history_seizures history_tamoxifen_use history_thyroid_disease
FALSE FALSE FALSE
history_thyroid_disease_other hiv_status hpv_status_ish
FALSE FALSE FALSE
hpv_status_p16 hpv_types_other hpv_types_positive
FALSE FALSE FALSE
hpv_typing_method hpv_typing_method_other hydroxyurea_tx_days
FALSE FALSE FALSE
hypertension_diagnosis hysterectomy_type i_131_radiation_first_tx_dose
FALSE FALSE FALSE
i_131_radiation_first_tx_method i_131_radiation_subsequent_tx i_131_radiation_tx_cumulative_dose
FALSE FALSE FALSE
icd_10 icd_o_3_histology icd_o_3_site
FALSE FALSE FALSE
idh1_mutation_found idh1_mutation_test_indicator idh1_mutation_test_method
FALSE FALSE FALSE
ifn_tx_90_days_prior_to_resection igcccg_stage igh_genotype_result
FALSE FALSE FALSE
igk_genotype_result immunophenotypic_analysis_method immunopheotypic_analysis_results
FALSE FALSE FALSE
immunopheotypic_analysis_tested incidental_prostate_cancer_indicator informed_consent_verified
FALSE FALSE TRUE
inherited_genetic_syndrome_indicator inherited_genetic_syndrome_specified initial_diagnosis_esophageal_ca_type
FALSE FALSE FALSE
initial_pathologic_diagnosis_method initial_pathologic_dx_days_to initial_pathologic_dx_year
FALSE FALSE FALSE
intratubular_germ_cell_neoplasm invasion_of_tumor_capsule invasive_adenocarcinoma_indicator
FALSE FALSE FALSE
ishak_fibrosis_score jewish_religion_heritage_indicator karnofsky_score
FALSE FALSE FALSE
keratinization_squamous_cell kras_gene_analysis_indicator kras_mutation_codon
FALSE FALSE FALSE
kras_mutation_found kras_mutation_identified_type last_contact_days_to
FALSE FALSE FALSE
laterality ldh_level ldh_norm_range_upper
FALSE FALSE FALSE
leiomyo_major_vessel_involvement leiomyosarcoma_uterine_involvement level_of_non_descent
FALSE FALSE FALSE
location_lung_parenchyma loci_abnormal_count loci_tested_count
FALSE FALSE FALSE
locoregional_recurrence_indicator lymph_node_dissection_method lymph_node_dissection_method.1
FALSE FALSE FALSE
lymph_node_involvement_site lymph_node_neck_dissection_indicator lymph_node_sprd_radiograph_evidence
FALSE FALSE FALSE
lymph_nodes_aortic_examined_count lymph_nodes_aortic_pos_by_he lymph_nodes_aortic_pos_by_ihc
FALSE FALSE FALSE
lymph_nodes_aortic_pos_total lymph_nodes_examined lymph_nodes_examined_count
FALSE FALSE FALSE
lymph_nodes_examined_he_count lymph_nodes_examined_ihc_count lymph_nodes_examined_positive
FALSE FALSE FALSE
lymph_nodes_pelvic_examined_count lymph_nodes_pelvic_pos__by_he lymph_nodes_pelvic_pos_by_ihc
FALSE FALSE FALSE
lymph_nodes_pelvic_pos_total lymph_nodes_preop_imaging lymph_nodes_preop_imaging_type
FALSE FALSE FALSE
lymph_nodes_supraclavicular lymphocytes_count lymphovascular_invasion
FALSE FALSE FALSE
lymphovascular_invasion_indicator lymphovascular_invasion_present lymphovascular_involvement
FALSE FALSE FALSE
malignant_neoplasm_metastatic_involvement_site margin_status margin_status_reexcision
FALSE FALSE FALSE
margins_involved_hysterectomy masaoka_stage maximum_tumor_bulk_anatomic_site
FALSE FALSE FALSE
menopause_status mesothelioma_detection_method metamyelocytes_24hr_of_banking
FALSE FALSE FALSE
metaphases_count metastasis_site metastasis_site_other
FALSE FALSE FALSE
metastatic_disease_confirmed metastatic_dx_confirmed_by metastatic_dx_confirmed_by_other
FALSE FALSE FALSE
metastatic_site_other metastatic_tumor_indicator metastatic_tumor_site
FALSE FALSE FALSE
metastatic_tumor_site.1 method_initial_path_dx method_initial_path_dx_other
FALSE FALSE FALSE
mib_1_positive_percent_range micromet_detection_by_ihc microsatellite_instability
FALSE FALSE FALSE
mismatch_rep_proteins_loss_ihc mismatch_rep_proteins_tested_by_ihc mitoses_per_50_hpf
FALSE FALSE FALSE
mitotic_count mitotic_rate molecular_abnormality_detected
FALSE FALSE FALSE
molecular_abnormality_percent molecular_abnormality_results molecular_analysis_method_type
FALSE FALSE FALSE
molecular_studies_others_performed molecular_test_result monocytes_count
FALSE FALSE FALSE
mpnst_nf_familial_or_sporadic mpnst_nf_indicator mpnst_nf1_genetic_testing_indicator
FALSE FALSE FALSE
mpnst_nf1_mutations_identified mpnst_plexiform_neurofibroma_site mri_at_diagnosis
FALSE FALSE FALSE
mri_results myelocytes_24hr_of_banking necrosis
FALSE FALSE FALSE
necrosis_percent neoplasm_histologic_grade new_tumor_event_dx_indicator
FALSE FALSE FALSE
new_tumor_event_melanoma_count new_tumor_event_prior_to_bcr_tumor noninvasive_bladder_ca_tx_type
FALSE FALSE FALSE
noninvasive_bladder_history nte_cent_17_her2_ratio nte_er_ihc_intensity_score
FALSE FALSE FALSE
nte_er_positivity_other_scale nte_er_status nte_er_status_ihc__positive
FALSE FALSE FALSE
nte_her2_fish_status nte_her2_positivity_ihc_score nte_her2_status
FALSE FALSE FALSE
nte_her2_status_ihc__positive nte_lesion_pathologic_depth nte_lesion_pathologic_length
FALSE FALSE FALSE
nte_lesion_pathologic_width nte_lesion_radiologic_depth nte_lesion_radiologic_length
FALSE FALSE FALSE
nte_lesion_radiologic_width nte_pr_ihc_intensity_score nte_pr_status_by_ihc
FALSE FALSE FALSE
nte_pr_status_ihc__positive nuclear_grade_iii_iv number_of_relatives_diagnosed
FALSE FALSE FALSE
number_of_relatives_with_stomach_cancer occupation_current occupation_primary
FALSE FALSE FALSE
occupation_primary_chemical_exposure occupation_primary_industry occupation_primary_years_worked
FALSE FALSE FALSE
other_hepato_carcinoma_risk_factors other_hysterectomy_type other_immunosuppressive_disease
FALSE FALSE FALSE
other_involved_margins other_metastatic_involvement_anatomic_site other_pos_node_location
FALSE FALSE FALSE
pathologic_n pathologic_t patient_id
FALSE FALSE TRUE
patient_to_undergo_surgery pcr_primer_pairs pelvic_extension_comment
FALSE FALSE FALSE
percent_blasts_peripheral_blood percent_cellularity performance_status_days_to
FALSE FALSE FALSE
performance_status_other_timing performance_status_timing perineural_invasion
FALSE FALSE FALSE
peritoneal_washing pharm_tx_mitotane_adjuvant pharm_tx_mitotane_for_macro_disease
FALSE FALSE FALSE
pharm_tx_mitotane_indicator pharm_tx_mitotane_theraputic_at_prog pharm_tx_mitotane_theraputic_at_rec
FALSE FALSE FALSE
pharm_tx_mitotane_theraputic_levels pharm_tx_mitotane_theraputic_macro pharmaceutical_tx_adjuvant
FALSE FALSE FALSE
pharmaceutical_tx_total_dose_units platelet_count platelet_count_preresection
FALSE FALSE FALSE
platelet_norm_range_lower platelet_norm_range_upper pleurodesis_performed_90_days
FALSE FALSE FALSE
pleurodesis_performed_prior pos_lymph_node_location post_orchi_afp
FALSE FALSE FALSE
post_orchi_hcg post_orchi_ldh post_orchi_lh
FALSE FALSE FALSE
post_orchi_lymph_node_dissection post_orchi_testosterone postoperative_tx
FALSE FALSE FALSE
pr_positivity_define_method pr_positivity_ihc_intensity_score pr_positivity_scale_other
FALSE FALSE FALSE
pr_positivity_scale_used pr_status_by_ihc pr_status_ihc_percent_positive
FALSE FALSE FALSE
pre_orchi_afp pre_orchi_hcg pre_orchi_ldh
FALSE FALSE FALSE
pre_orchi_lh pre_orchi_testosterone pregnancies_count_ectopic
FALSE FALSE FALSE
pregnancies_count_induced_abortion pregnancies_count_live_birth pregnancies_count_miscarriage
FALSE FALSE FALSE
pregnancies_count_stillbirth pregnancies_count_total pregnancies_full_term_count
FALSE FALSE FALSE
pregnant_at_diagnosis pregnant_at_diagnosis.1 primary_at_dx_count
FALSE FALSE FALSE
primary_melanoma_known_dx primary_melanoma_mitotic_rate primary_melanoma_skin_type
FALSE FALSE FALSE
primary_melanoma_tumor_ulceration primary_multiple_at_dx primary_occupation
FALSE FALSE FALSE
project_code prolymphocytes_24hr_of_banking promonocytes_24hr_of_banking
FALSE FALSE FALSE
promyelocytes_count prospective_collection prothrom_time_inr_norm_range_lower
FALSE FALSE FALSE
prothrombin_time_inr_at_procurement prothrombin_time_norm_range_upper psa_most_recent_results
FALSE FALSE FALSE
pulmonary_function_test_indicator race radiation_therapy_dose_paraaortic_nodes
FALSE TRUE FALSE
radiation_therapy_xrt_dose radiation_therapy_xrt_method_prep radiation_therapy_xrt_sensitizers
FALSE FALSE FALSE
radiation_therapy_xrt_type radiation_treatment_adjuvant radiation_type_other
FALSE FALSE FALSE
ras_mutation_result related_symptom_first_present related_tumors_outside_adrenal_glands
FALSE FALSE FALSE
relation_testicular_cancer relative_family_cancer_hx_text residual_disease_largest_nodule
FALSE FALSE FALSE
residual_tumor ret ret_ptc_rearrangement_result
FALSE FALSE FALSE
retrospective_collection rt_tx_reason_not_completed rt_tx_reason_not_completed_other
FALSE FALSE FALSE
rt_tx_total_dose_to_pelvis sarcomatoid_features sarcomatoid_percent_of_tumor
FALSE FALSE FALSE
section_myasthenia_gravis segs_24hr_of_banking serum_albumin_norm_range_lower
FALSE FALSE FALSE
serum_albumin_norm_range_upper serum_albumin_preresection serum_calcium_level
FALSE FALSE FALSE
serum_markers serum_mesothelin_lower_limit serum_mesothelin_prior_tx
FALSE FALSE FALSE
serum_mesothelin_upper_limit sinusoid_invasion site_of_primary_tumor_other
FALSE FALSE FALSE
specimen_non_node_tumor_deposits steroid_therapy_administered submitted_tumor_dx_days_to
FALSE FALSE FALSE
submitted_tumor_site submitted_tumor_site.1 supratentorial_localization
FALSE FALSE FALSE
surgery_for_positive_margins surgery_for_positive_margins_other surgical_approach_at_diagnosis
FALSE FALSE FALSE
surgical_procedure surgical_procedure_first surgical_procedure_other
FALSE FALSE FALSE
suv_of_pleura_max symp_changes_mental_status symp_changes_motor_movement
FALSE FALSE FALSE
symp_changes_sensory symp_changes_visual synchronous_tumor_histology_pct
FALSE FALSE FALSE
synchronous_tumor_histology_type synovial_ss18ssx_fusion_status synovial_ss18ssx_testing_method
FALSE FALSE FALSE
system_version targeted_molecular_therapy test_performed_indicator
FALSE FALSE FALSE
testis_tumor_macroextent testis_tumor_macroextent_other testis_tumor_microextent
FALSE FALSE FALSE
tissue_source_site tobacco_smoking_age_started tobacco_smoking_history_indicator
TRUE FALSE FALSE
tobacco_smoking_pack_years_smoked tobacco_smoking_year_started tobacco_smoking_year_stopped
FALSE FALSE FALSE
total_dose treatment_outcome_first_course treatment_prior_to_surgery_indicator
FALSE FALSE FALSE
tumor_basal_diameter tumor_basal_diameter_mx tumor_burden_pathologic
FALSE FALSE FALSE
tumor_burden_radiologic tumor_focality tumor_grade
FALSE FALSE FALSE
tumor_infiltrating_lymphocytes tumor_infiltrating_macrophages tumor_invasion_percent
FALSE FALSE FALSE
tumor_level tumor_morphology_percentage tumor_resected_max_dimension
FALSE FALSE FALSE
tumor_response tumor_sample_procurement_country tumor_sample_procurement_country.1
FALSE FALSE FALSE
tumor_sample_type tumor_shape_pathologic_clinical tumor_site
FALSE FALSE FALSE
tumor_size_width tumor_size_width.1 tumor_size_width.2
FALSE FALSE FALSE
tumor_status tumor_thickness tumor_thickness_measurement
FALSE FALSE FALSE
tumor_tissue_site tumor_tissue_site_other tumor_total_depth
FALSE FALSE FALSE
tumor_total_necrosis tumor_type undescended_testis_corrected
FALSE FALSE FALSE
undescended_testis_corrected_age undescended_testis_method_left undescended_testis_method_right
FALSE FALSE FALSE
vascular_invasion vascular_invasion_indicator viral_hepatitis_serology
FALSE FALSE FALSE
vital_status wbc_24hr_of_banking weight_kg_at_diagnosis
TRUE FALSE FALSE
weiss_score_overall weiss_venous_invasion well_diff_liposarc_prior_dx_days_to
FALSE FALSE FALSE
well_diff_liposarc_prior_dx_indicator well_diff_liposarc_resection_days_to white_cell_count
FALSE FALSE FALSE
year_of_initial_pathologic_diagnosis zone_of_origin
FALSE FALSE
> presenciaColumnas[touse,]
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24]
bcr_patient_barcode TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
bcr_patient_uuid TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
ethnicity TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
gender TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
history_neoadjuvant_treatment TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
history_other_malignancy TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
informed_consent_verified TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
patient_id TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
race TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
tissue_source_site TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
vital_status TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
[,25] [,26] [,27] [,28] [,29] [,30] [,31] [,32] [,33]
bcr_patient_barcode TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
bcr_patient_uuid TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
ethnicity TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
gender TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
history_neoadjuvant_treatment TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
history_other_malignancy TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
informed_consent_verified TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
patient_id TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
race TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
tissue_source_site TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
vital_status TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
> rownames (presenciaColumnas)[touse] #Muestra los nombres de las cabeceras q estan en todos los ficheros
[1] "bcr_patient_barcode" "bcr_patient_uuid" "ethnicity" "gender" "history_neoadjuvant_treatment"
[6] "history_other_malignancy" "informed_consent_verified" "patient_id" "race" "tissue_source_site"
[11] "vital_status"
>
>
>
> # ###PROBLEMA: ¿Pregunto al usuario mejor cual quiere que sea el mínimo de columnas?
> # tamanyofich <- length(ficheros)
> # ##Voy a poner un bucle para incluir datos hasta tener un numero aceptable (digamos 10):
> # while(table(touse)[[2]] < 10) { #Mientras que el numero de TRUE en touse sea menor que 10
> # touse[rowSums (mat) == tamanyofich - 1] = TRUE
> # tamanyofich <- tamanyofich - 1
> # }
> # ##
> #
> # touse
> # mat[touse,]
> # rownames (mat)[touse] #Muestra los nombres de las 10 cabeceras mas frecuentes
>
> setwd (file.path (.job$dir$raw, "clinical"))
>
> #Con esto guardamos las columnas que son comunes a todos los ficheros
>
> tablist <- list ()
> for (fi in ficheros) {
+ nombres <- unlist (strsplit (readLines (fi)[1], split = "\t"))
+ datos0 <- read.table (fi, header = TRUE, sep = "\t", quote = "", col.names = nombres, as.is = TRUE, na.strings = c("[Not Available]", "[Not Applicable]", "[Not Evaluated]", "[Unknown]", "NA"), skip = 3)
+ #Con esto miramos cuantas columnas de las presentes en todos los datos tenemos hasta ahora
+ table (colnames(datos0) %in% rownames (presenciaColumnas)[touse])
+ mantener <- colnames(datos0) %in% rownames (presenciaColumnas)[touse]
+ #Y las guardamos
+ datos0 <- datos0[mantener]
+ ##Hasta aqui
+
+ #Guardamos el tag
+ tag <- sapply (strsplit (sapply (strsplit (fi, split = "_"), function (x) x[2]), split = "\\."), function (x) x[1])
+
+ print (dim (datos0))
+ tablist[[tag]] <- datos0
+
+ #Con este bucle guardamos en una lista todos los datos que hay en cada fichero
+ }
[1] 199 11
[1] 91 11
[1] 396 11
[1] 1085 11
[1] 305 11
[1] 35 11
[1] 453 11
[1] 46 11
[1] 182 11
[1] 593 11
[1] 522 11
[1] 110 11
[1] 532 11
[1] 272 11
[1] 491 11
[1] 363 11
[1] 520 11
[1] 494 11
[1] 85 11
[1] 586 11
[1] 184 11
[1] 178 11
[1] 492 11
[1] 170 11
[1] 255 11
[1] 466 11
[1] 442 11
[1] 132 11
[1] 505 11
[1] 122 11
[1] 539 11
[1] 56 11
[1] 79 11
>
> save (list = "tablist", file = file.path (.job$dir$proces, "datos_clinicos_comunes.RData"))
>
> ###EXIT
> warnings ()
NULL
> sessionInfo ()
R version 3.1.2 (2014-10-31)
Platform: x86_64-unknown-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
> q ("no")
> proc.time()
user system elapsed
2.190 0.199 8.067