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

how to check whether there is TCR alpha alpha in the scTCRseq. #404

Closed
synatkeamsk opened this issue Sep 10, 2024 · 3 comments
Closed

how to check whether there is TCR alpha alpha in the scTCRseq. #404

synatkeamsk opened this issue Sep 10, 2024 · 3 comments

Comments

@synatkeamsk
Copy link

Hi Nick and team,

Hope you are well. I have a quick question. I recently had a quick discussion with one of our collaborators and she asked whether there is TCR alpha alpha in our sequencing data. I looked at my data frame of each sample (kindly review attach file), I saw only TRA and TRB. I am not sure is there is a quick way to check whether there is TCR alpha alpha in my dataset or they are only TCR alpha and beta using scRepertoire package.

TCR sequencing data

Kind Regards,

synat

@ncborcherding
Copy link
Owner

Hey Synat,

If you are using the output of combineTCR() you can use the following code to isolate possible dual A T cells:

lapply(combined, function(x) {
  x$TRA.chains <- stringr::str_split(x$CTaa, "_", simplify = TRUE)[,1]
  dual.pos <- grep(";", x$TRA.chains)
  x[dual.pos,]
  
}) -> filtered.combined

Nick

@synatkeamsk
Copy link
Author

synatkeamsk commented Sep 10, 2024

Thanks, Nick for your code to filter out possible CTaa. Do you know which column (chain column?) that may possibly contains CTaa? I would like to manually check individual sample a bit to make sure whether I can see CTaa by eyes. So I can use code sth like df[df$chain == "CTaa", ] to check. Now I could not find CTaa somewhere in my dataframe. Sorry if the question is a bit naive and thank for your help.

Kind Regards,

Synat

@ncborcherding
Copy link
Owner

Hey Synat,

That code is for after you use combineTCR(). If you are looking at the filtered_contig_annotations file, you could use a dplyr approach to summarise the cells with more than 1 alpha chain:

df %>%
  filter(chain == "TRA") %>%
  group_by(barcode) %>%
  n()

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

2 participants