/// <summary> /// Read the clinical patient file and store the data into directory. The key is tumor type plus bar code. /// Also read the /// </summary> /// <param name="clinicalData"></param> /// <param name="tumorType"></param> /// <param name="queryHeaders"></param> private void ReadClinData(IDictionary <string, IAnnotation> clinicalData, string tumorType, ICollection <string> queryHeaders) { var clinfile = TCGAUtils.GetClinicPatientFile(_options.TCGADirectory, tumorType); if (!File.Exists(clinfile)) { return; } var data = new TCGAClinicalInformationFormat().ReadFromFile(clinfile); foreach (var entry in data) { clinicalData[GetSampleKey(tumorType, entry.BarCode())] = entry; } var configheader = TemplateDirectory + "/" + Path.GetFileNameWithoutExtension(clinfile) + ".header.xml"; if (!File.Exists(configheader)) { configheader = TemplateDirectory + "/clinical_patient_tcga.header.xml"; } var fd = HeaderDefinition.LoadFromFile(configheader); foreach (var line in fd.Properties) { if (!queryHeaders.Contains(line)) { queryHeaders.Add(line); } } }