cole-trapnell-lab / garnett

Automated cell type classification
MIT License
104 stars 25 forks source link

Garnett cluster graphs #36

Closed lwhitmore closed 4 years ago

lwhitmore commented 4 years ago

Hi! I am pretty new to single cell so I appologize if this a dumb question.

I am attempting to use garnett to classify our PBMC cells and this is how I am loading the data

SAMPLE <- load_cellranger_data(sample_path, umi_cutoff=100)

SAMPLE.counts    <- SAMPLE@assays@data@listData$counts
gene_meta_data   <- rowData(SAMPLE)
cell_meta_data   <- colData(SAMPLE)

cds              <- new_cell_data_set(SAMPLE.counts,
                                      cell_metadata = cell_meta_data,
                                      gene_metadata = gene_meta_data)

    pbmc_classifier <- readRDS(pbmc_classifier) # 10x classifier available on garnett website 
    pbmc_cds <- classify_cells(cds, pbmc_classifier,
                           db = org.Hs.eg.db,
                           cluster_extend = TRUE,
                           cds_gene_id_type = "ENSEMBL")

From here I am unclear how to generate cluster graphs with the cell type labels. The example in the tutorial already comes with tsne coordinates in phenotype data but mine doesn't. Do I now normalize the data with preprocess_cds and then get the reduced coordinates through reduce_dimension function and combined the pbmc_cds and resulting data together?

Let me know if I am doing something obviously wrong. Also Just to be clear garnett does the classification with the raw count values not the normalized ones that occur through preprocess_cds?

Leanne

lwhitmore commented 4 years ago

Sorry this should not have been labeled bug