Skip to content

Error: undefined columns selected #125

@jordanwhitlock

Description

@jordanwhitlock

Hi there! I am currently attempting to use vision on my own gene signature and I keep running into the following error:

Error in `[.data.frame`(sigMatrix, , keep_significant, drop = FALSE) : 
  undefined columns selected

Any help is greatly appreciated!

I have run VISION successfully using hallmark .gmt files from MSigDB. It appears this error is specific to my own signatures. I saw the other threads where this same issue was addressed (#82, #76, #71). As mentioned in the other issues I have checked that there are no duplicate gene signatures, that there are no NAs present, and that the metaData does not have any data with the same name as the signature.

An example of the code I am running is below including how signatures were added to the object. A subset of the object I am using is attached as well:

kidney_vision_aki_pkd_intermediate.Rdata.zip

# set up signatures of interest
signatures <- here("data/unprocessed/mh.all.v2023.1.Mm.symbols.gmt")

# create vision object
vision <- Vision(subset, signatures = signatures, pool = FALSE)

# adding PKD signatures (renaming because UP and DN are loaded in as the same name)
test <- addSignatures(vision, signatures = here("data/unprocessed/PIONTEK_PKD1_TARGETS_UP.v2023.1.Mm.gmt"))
vision@sigData[["PIONTEK_PKD1_TARGETS_UP"]] <- test@sigData[["PIONTEK_PKD1_TARGETS"]]

test <- addSignatures(vision, signatures = here("data/unprocessed/PIONTEK_PKD1_TARGETS_DN.v2023.1.Mm.gmt"))
vision@sigData[["PIONTEK_PKD1_TARGETS_DN"]] <- test@sigData[["PIONTEK_PKD1_TARGETS"]]

# adding custom signatures for AKI up and down

aki_upgenes <- createGeneSignature(
  name = "AKI_UP",
  sigData = c(Adam8 = 1, Adamts1 = 1, Adm = 1, Akap12 = 1, Akr1b8 = 1, Aldh1a2 = 1, Aloxe3 = 1, Anxa1 = 1, Anxa3 = 1, Apobec3 = 1, Arf2 = 1, Asns = 1, Atf3 = 1, Bcl3 = 1, Birc3 = 1, Cd14 = 1, Cd44 = 1, Cd68 = 1, Cd9 = 1, Cd93 = 1, Cebpd = 1, Chrnb1 = 1, Clcf1 = 1, Cldn4 = 1, Cldn7 = 1, Ctgf = 1, Ctsc = 1, Cyr61 = 1, Ddx21 = 1, Dusp10 = 1, Dusp5 = 1, Edn1 = 1, Efhd2 = 1, Elf4 = 1, Emp1 = 1, Entpd1 = 1, Epha2 = 1, F2r = 1, F3 = 1, Fam57a = 1, Flnc = 1, Fndc4 = 1, Fosl1 = 1, Fosl2 = 1, Fut2 = 1, Fxyd5 = 1, Gas7 = 1, Gdf15 = 1, Gprc5a = 1, Havcr1 = 1, Hbegf = 1, Hilpda = 1, Hmox1 = 1, Hpcal4 = 1, Igf2bp2 = 1, Il1f6 = 1, Il34 = 1, Irak3 = 1, Itga5 = 1, Klf4 = 1, Klf6 = 1, Klf7 = 1, Krtp28 = 1, Krt20 = 1, Lamc2 = 1, Lif = 1, Lrp8 = 1, Lrrc32 = 1, Lrrc8c = 1, Maff = 1, Map3k6 = 1, Map4k4 = 1, Mapk6 = 1, Mmp3 = 1, Mthfd1l = 1, Myc = 1, Myh9 = 1, Nek6 = 1, Ngf = 1, Nras = 1, Nt5c1a = 1, Nucb2 = 1, Oasl1 = 1, Pdgfb = 1, Pdk4 = 1, Pdlim7 = 1, Plat = 1, Plaur = 1, Plin2 = 1, Plk3 = 1, Plp2 = 1, Ppm1j = 1, Ppp1r14b = 1, Pprc1 = 1, Procr = 1, Prrg4 = 1, Ptger4 = 1, Ptgs2 = 1, Ptpn12 = 1, Pvr = 1, Pxdc1 = 1, Qsox1 = 1, Rab31 = 1, Rad18 = 1, Rap2b = 1, Rbm3 = 1, Rell1 = 1, Rhbdf2 = 1, Rin1 = 1, Rnd1 = 1, Rnd3 = 1, Rras2 = 1, Rtn4 = 1, Runx1 = 1, Samd4 = 1, Sbno2 = 1, Sema7a = 1, Serpinb1a = 1, Serpine1 = 1, Sfn = 1, Slc16a1 = 1, Slc25a24 = 1, Slc38a2 = 1, Slc7a5 = 1, Slc7a6 = 1, Smad1 = 1, Smox = 1, Socs3 = 1, Sox9 = 1, Sphk1 = 1, Sprr1a = 1, Sprr2f = 1, Sprr2g = 1, Spry2 = 1, Spsb1 = 1, St3gal1 = 1, Stil = 1, Syt12 = 1, Taf1d = 1, Taf4b = 1, Tcerg1 = 1, Tgfbr1 = 1, Thbd = 1, Timp1 = 1, Tinagl1 = 1, Tmcc3 = 1, Tmed5 = 1, Tmem173 = 1, Tnc = 1, Tnfrsf12a = 1, Tnfrsf1a = 1, Tpm3 = 1, Trmt61a = 1, Tubb6 = 1, Txnrd1 = 1, Uchl1 = 1, Vopp1 = 1)
)


aki_downgenes <- createGeneSignature( name = "AKI_DN",
  sigData = c(`1700040L02Rik` = -1,  Abhd14b = -1, Acad12 = -1, Acmsd = -1, Acot11 = -1, Acox2 = -1, Acss2 = -1, Ak4 = -1, Akr1c14 = -1, Akr1c18 = -1, Aldh4a1 = -1, Apeh = -1, Atp6v1b1 = -1, BC067074 = -1, Bcat1 = -1, Bdh1 = -1, Bhmt2 = -1, Bphl = -1, Bsnd = -1, Casr = -1, Cbs = -1, Cdkl1 = -1, Ceacam2 = -1, Cmah = -1, Crot = -1, Cth = -1, Cubn = -1, Cyp2j11 = -1, D3Ertd751e = -1, Dhdh = -1, Dnajc28 = -1, Fam107a = -1, Fggy = -1, Fmo5 = -1, Fras1 = -1, G6pc = -1, Galm = -1, Gatb = -1, Gatm = -1, Glyctk = -1, Gm10804 = -1, Hgd = -1, Hnmt = -1, Hsd3b2 = -1, Hykk = -1, Ift122 = -1, Inpp5j = -1, Kcnj1 = -1, Keg1 = -1, Klhl3 = -1, Kmo = -1, Lrrc31 = -1, Lyplal1 = -1, Map2k6 = -1, Mccc1 = -1, Mccc2 = -1, Mep1b = -1, Mgam = -1, Nccrp1 = -1, Oxgr1 = -1, Pbld1 = -1, Pde4c = -1, Pfkm = -1, Pnkd = -1, Pter = -1, Ranbp3l = -1, Rhcg = -1, Serpina1d = -1, Serpina1f = -1, Sfrp1 = -1, Shmt2 = -1, Slc15a2 = -1, Slc16a9 = -1, Slc22a13 = -1, Slc22ap28 = -1, Slc22a26 = -1, Slc23a1 = -1, Slc25a21 = -1, Slc8a1 = -1, Slco4c1 = -1, Smarca2 = -1, Snx29 = -1, Suox = -1, Tln2 = -1, Tmem207 = -1, Tmem25 = -1, Tpmt = -1, Ugt8a = -1)
) 

sigs <- c(aki_upgenes, aki_downgenes)

vision <- addSignatures(vision, signatures = sigs)

# subset vision object for pathways of interest (PKD and AKI)
sigs <- vision@sigData
names <- c("AKI_UP", "AKI_DN", "PIONTEK_PKD1_TARGETS_DN", "PIONTEK_PKD1_TARGETS_UP")

# adding in metaData and source to ensure no blanks or NA are in the VISION object
subset <- sigs[names(sigs) %in% names]
subset$AKI_UP@metaData <- "https://www.frontiersin.org/articles/10.3389/fgene.2020.00411/full"
subset$AKI_DN@metaData <- "see AKI UP metaData"
subset$AKI_UP@source <- "Supp table of DEGs"
subset$AKI_DN@source<- "Supp table of DEGs"

vision@sigData <- subset

# analyze signatures on vision object 
vision <- analyze(vision) #note: this is where the error is occuring

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions