Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

combining expression: Metadata NA #55

Closed
ankushs0128 opened this issue Jan 14, 2021 · 3 comments
Closed

combining expression: Metadata NA #55

ankushs0128 opened this issue Jan 14, 2021 · 3 comments

Comments

@ankushs0128
Copy link

ankushs0128 commented Jan 14, 2021

Thank you very much for the nice tools.
We have a scRNA seq+Citeseq and TCR seq data. The data contains 3 runs which we are merging and each run contains different disease samples. So we would like to extrapolate clonotype information for the disease samples rather than runs? Is it possible to perform this analysis using scRepertoire?

Apart from this, we are also encountering an error in
Combining expression function is adding NA values to CTgene, ctstrict, ctgene+nt and the UMAP plot therefore only contains NA values.
What could be the potential problem and how can this be rectified?

Hers is how I´m combining the expression

Seurat <- combineExpression(
          combined, 
          cd4t_integrated, 
          cloneCall="gene+nt", 
          groupBy = "none",
          cloneTypes = c(Rare = 1e-4, Small = 0.001, Medium = 0.01, Large = 0.1, Hyperexpanded = 1),
          )

DimPlot(Seurat, label = T) + NoLegend()
Seurat <-cd4t_integrated

slot(Seurat, "meta.data")$cloneType <- factor(slot(Seurat, "meta.data")$cloneType, 
                levels = c("Hyperexpanded (0.1 < X <= 1)", "Large (0.01 < X <= 0.1)", 
                            "Medium ( 0.001 < X <=  0.01)", "Small (0.00001 < X <= 0.001)","Rare (0.00004 < X <= 0.0)", NA))
DimPlot(sce, group.by = "cloneType") +
    scale_color_manual(values = colorblind_vector(5), na.value="grey")

Screen shot of clonotype group
Screenshot 2021-01-14 at 21 43 35

Thanks in advance

@ncborcherding
Copy link
Owner

Hey Ankush,

We have a scRNA seq+Citeseq and TCR seq data. The data contains 3 runs which we are merging and each run contains different disease samples. So we would like to extrapolate clonotype information for the disease samples rather than runs? Is it possible to perform this analysis using scRepertoire?

Yes this is possible, it might take some front-end work before combineTCR(). I would suggest you organized your contig_list by the disease samples rather then runs.

Apart from this, we are also encountering an error in Combining expression function is adding NA values to CTgene, ctstrict, ctgene+nt and the UMAP plot therefore only contains NA values. What could be the potential problem and how can this be rectified?

The most common error is that produces this result is the seurat object barcodes and the combined_TCR object barcodes do not match. Here was a pretty easy solution that a user came up with to change the barcodes in the combine_TCR object.

Seurat <- combineExpression(
combined,
cd4t_integrated,
cloneCall="gene+nt",
groupBy = "none",
cloneTypes = c(Rare = 1e-4, Small = 0.001, Medium = 0.01, Large = 0.1, Hyperexpanded = 1),
)

I also want to mention that that combineExpression() does not yet use proportion as inputs for cloneTypes, but frequency counts (I know this is not ideal, I am actively testing the inclusion of proportions).

Hope that helps and let me know if you have any more questions.

Nick

@ncborcherding
Copy link
Owner

Hey Ankush,

I am going to close this as I haven't heard back in a week. Feel free to respond and open this up again.

I would mention, I just added the proportional cloneType option in the refine branch. You can find out more here.

Thanks,
Nick

@rachanapandey250
Copy link

I am getting NA values getting added after using combineTCR to CTgene, ctstrict, ctgene+nt, and the UMAP plot, therefore. I am running it for 4 different samples having four different treatments. For input, I am using the filtered contig annotation file from the cell ranger. The column names are as follows:
barcode | is_cell | contig_id | high_confidence | length | chain | v_gene | d_gene | j_gene | c_gene | full_length | productive | fwr1 | fwr1_nt | cdr1 | cdr1_nt | fwr2 | fwr2_nt | cdr2 | cdr2_nt | fwr3 | fwr3_nt | cdr3 | cdr3_nt | fwr4 | fwr4_nt | reads | umis | raw_clonotype_id | raw_consensus_id | exact_subclonotype_id

The code I used is this:
contig_list <- list(
til_1, til_2, til_3, til_4,
spl_1, spl_2, spl_3, spl_4)

combined <- combineTCR(
contig_list,
samples = c(rep("til", 4), rep("spl", 4)),
ID = rep(c("1", "2", "3", "4"), 2),
cells = "T-AB")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants