Number of rows and columns in the sample annotation: 120, 9

Sample annotation

DT::datatable(sa, filter = 'top')

Quality control checks

# check for duplicated rows
if(sum(duplicated(sa)) > 0){
  print("The sample annotation has the following duplicated rows. Remove them.")
  sa[duplicated(sa)]
}

Check for RNA_IDs without a value

if(nrow(sa[is.na(RNA_ID)]) > 0){
  print("The sample annotation has some non-existent RNA_IDs. Fill them.")
  sa[is.na(RNA_ID)]
}

Check for nonexistent BAM files

sa[, aux1 := file.exists(RNA_BAM_FILE)]
if(any(sa$aux1 == F)){
  print('The following BAM files do not exist: ')
  DT::datatable(sa[aux1 == F])
}

Check for nonexistent VCF files

if(! all(sa[,is.na(DNA_VCF_FILE)])){
  sa[, aux1 := file.exists(DNA_VCF_FILE)]
  if(any(sa$aux1 == F)){
    print('The following VCF files do not exist: ')
    DT::datatable(sa[aux1 == F])
  }
}

Check for RNA_IDs with more than one RNA_BAM_FILE

if(sum(duplicated(unique(sa[,.(RNA_ID, RNA_BAM_FILE)])$RNA_ID)) > 0){
  print('The following RNA_IDs and RNA_BAM_FILEs do not have a 1:1 match. Correct them.')
  DT::datatable(duplicated(unique(sa[,.(RNA_ID, RNA_BAM_FILE)])$RNA_ID))
}

Barplot with DROP groups

unique(sa[,.(RNA_ID, DROP_GROUP)])$DROP_GROUP %>% strsplit(',') %>% unlist %>%
  table %>% barplot(xlab = 'DROP groups', ylab = 'Number of samples')

# Obtain genes that overlap with HPO terms
IyctLS0KIycgdGl0bGU6IFNhbXBsZSBBbm5vdGF0aW9uIE92ZXJ2aWV3CiMnIGF1dGhvcjoKIycgd2I6CiMnICBsb2c6CiMnICAgLSBzbmFrZW1ha2U6ICdgc20gc3RyKHRtcF9kaXIgLyAiU2FtcGxlQW5ub3RhdGlvbi5SZHMiKWAnCiMnICBwYXJhbXM6CiMnICAgLSBocG9GaWxlOiAnYHNtIGNmZy5nZXQoImhwb0ZpbGUiKWAnCiMnICBpbnB1dDogCiMnICAgLSBzYW1wbGVBbm5vdGF0aW9uOiAnYHNt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