powellgenomicslab / DropletQC

Nuclear fraction QC metric to detect empty droplets and damaged cells in scRNA-seq data
https://powellgenomicslab.github.io/DropletQC/
Other
29 stars 3 forks source link

Can't run identify_empty_drops function #12

Open zgb963 opened 2 months ago

zgb963 commented 2 months ago

Hello

I was previously trying to use the identify_empty_drops function on my sample output from 10X cellranger count pipeline but it doesn't seem to be working. I've put an example below.

nf_SAMPLE_3_C_MI2_S1 <- nuclear_fraction_tags(outs=str_glue('cellranger_S1_UPDATED_outs_2_15_24'))
head(nf_SAMPLE_3_C_MI2_S1)
                   nuclear_fraction
AAACCCAAGCTAGATA-1        0.8710067
AAACCCAAGCTCACTA-1        0.8320000
AAACCCACAACAAGAT-1        0.8727669
AAACCCACACTGCGAC-1        0.8316214
AAACCCAGTCGGTAAG-1        0.8542520
AAACCCAGTTTGTGGT-1        0.8305165

identify_empty_drops(nf_SAMPLE_3_C_MI2_S1)
Error in `[.data.frame`(nf_umi, , 2) : undefined columns selected

Do I defined the column, but then I get another error

identify_empty_drops(nf_SAMPLE_3_C_MI2_S1$nuclear_fraction)
Error: A data frame should be supplied to the nf_umi argument, but an object of class numeric was provided

I then tried this but got the same error.

empty_drops_SAMPLE_3_C_MI2_S1 <- identify_empty_drops(nf_umi = nf_SAMPLE_3_C_MI2_S1$nuclear_fraction)
Error: A data frame should be supplied to the nf_umi argument, but an object of class numeric was provided

Am I using this function correctly? I don't see anywhere in the paper/documentation or online an example of how to run identify_empty_drops or identify_damaged_cells.

Could it also be that since my reads were run with the 10x cellranger count pipeline (already removes empty droplets), dropletQC won't work?

WalterMuskovic commented 2 months ago

Hi @zgb963, sorry for the delayed reply. The expected input to the identify_empty_drops function is a data frame, containing two columns; the nuclear fraction estimates in the first column and the total UMI count for each barcode in the second column. You can see more about the function with ?identify_empty_drops() and a worked example in the vignette.