morris-lab / Capybara

Capybara: A computational tool to measure cell identity and fate transitions
56 stars 9 forks source link

debugs #7

Closed rigitano closed 2 years ago

rigitano commented 2 years ago

Great work and excellent support here on GitHub. I might have a little contribution to give back :

in the lines 12 and 19 of section 1.6.b

the code might be: map.df$mca.tissue instead of: map.df$tm.tissue

Best regards, Henrique

rigitano commented 2 years ago

also,

on step 2/"Get the counts of the cell types involved in the tissues selected":

pancreatic.all.meta <- mca.meta[which(mca.meta$cell.bc.tissue %in% final.cell.types.adult), ] # BUG

pancreatic.all.meta <- mca.meta[which(mca.meta$tissue %in% final.cell.types.adult), ] # correction

and on step 3/"Check the Classification Result":

classification$actual <- baron.meta[rownames(classification), "cell.type"] #BUG problematic join

baron.meta$rowname <- rownames(baron.meta) #correction baron.meta$rowname <- gsub('-', '.', baron.meta$rowname) #correction myclassification = merge(x = classification, y = baron.meta, by.x = "barcode", by.y = "rowname", all = TRUE) #correction myclassification$barcode.y <-NULL #correction myclassification$actual <-myclassification$cell.type #correction myclassification$cell.type <-NULL #correction myclassification$call <- gsub('β.cell', 'beta', myclassification$call) #correction

table.freq <- table(classification$actual, classification$call) #correction

table.freq <- table(myclassification$actual, myclassification$call) #correction