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

Error in combineTCR() with contig_mixcr.csv file #309

Closed
linderss opened this issue Jan 23, 2024 · 2 comments
Closed

Error in combineTCR() with contig_mixcr.csv file #309

linderss opened this issue Jan 23, 2024 · 2 comments

Comments

@linderss
Copy link

Hi,

thanks Nick for your great package. I wanted to analyse public dataset from Gueguen et al where "filtered_contig_annotations_mixcr.csv" files are available. I haven't had any experience with mixcr before and I'm unsure how to fix the following error.

samples<- c("P47_Tumor_VDJ","P55_Tumor_VDJ","P57_Blood_VDJ", "P57_Tumor_VDJ","P58_Blood_VDJ","P58_Tumor_VDJ","P60_Blood_VDJ","P60_Juxta_VDJ","P60_Tumor_VDJ","P61_Blood_VDJ","P61_Juxta_VDJ","P61_Tumor_VDJ")
file_paths <- paste0("/data/path/", samples,"/outs/filtered_contig_annotations_mixcr.csv")

contig_list <- lapply(file_paths, read.csv)

combined <- combineTCR(contig_list, samples = c("P47_Tumor_VDJ","P55_Tumor_VDJ","P57_Blood_VDJ", "P57_Tumor_VDJ","P58_Blood_VDJ","P58_Tumor_VDJ","P60_Blood_VDJ","P60_Juxta_VDJ","P60_Tumor_VDJ","P61_Blood_VDJ","P61_Juxta_VDJ","P61_Tumor_VDJ"), filterMulti = FALSE, removeMulti = FALSE)

The error i get is the following (which makes sense because my contig list does not have these columns, see screenshot below):

Error in `mutate()`:
ℹ In argument: `TCR1 = ifelse(...)`.
Caused by error:
! object 'v_gene' not found
Backtrace:
  1. scRepertoire::combineTCR(...)
 14. stringr::str_replace_na(v_gene)
 15. stringi::stri_replace_na(string, replacement)

Is there any way to use these contig files with scRepertoire?

image

image

@ncborcherding
Copy link
Member

Hey @linderss,

Looks like the headers/format for the linked contigs are slightly off than the expected clones.tsv output for MiXCR.

Here is an example of the expected input.

Probably the quickest fix is manually altering the contig_annotation files from the repo you link. Happy to help with this, but it seems to be a bespoke issue with formating of that repo.

Nick

@ncborcherding
Copy link
Member

I am going to close this issue due to inactivity.

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