download.file(paste0(url, "/", metadata_filename), destfile = metadata_filename,
  mode = "wb")

## Make sure condition variables are factors with the right levels

md$condition <- factor(md$condition, levels = c("Ref", "BCRXL"))

file_name sample_id condition patient_id
1    PBMC8_30min_patient1_BCR-XL.fcs    BCRXL1     BCRXL   Patient1
2 PBMC8_30min_patient1_Reference.fcs      Ref1       Ref   Patient1
3    PBMC8_30min_patient2_BCR-XL.fcs    BCRXL2     BCRXL   Patient2
4 PBMC8_30min_patient2_Reference.fcs      Ref2       Ref   Patient2
5    PBMC8_30min_patient3_BCR-XL.fcs    BCRXL3     BCRXL   Patient3
6 PBMC8_30min_patient3_Reference.fcs      Ref3       Ref   Patient3