immunarch icon indicating copy to clipboard operation
immunarch copied to clipboard

ImmunoSEQ v4b geneUsageAnalysis Error

Open tdfy opened this issue 5 years ago • 4 comments

🐛 Bug

Good Afternoon,

I received the following error while using your gene usage function.

> imm_gu_cor = geneUsageAnalysis(imm_gu, .method = "cor", .verbose = F)
Error: Assigned data `.laplace` must be compatible with existing data.
i Error occurred for column `Names`.
x Can't convert <double> to <character>.
Run `rlang::last_error()` to see where the error occurred.

It looks like "/" in the variable gene "Names" column trips everything up.

"TRBV12-3/12-4 "

I replaced "/" with "-" and the error was resolved.

tdfy avatar Jun 26 '20 18:06 tdfy

Hi @tdfy

Thank you, we will fix that! And I hope we will be able to rewrite the geneUsageAnalysis function completely soon...

vadimnazarov avatar Jun 30 '20 16:06 vadimnazarov

I am having the same problem. Have you fixed this? Thank you.

k-blenman avatar Jul 24 '20 19:07 k-blenman

Hi there,

You may use the other software (not mixcr) to generate the CDR3s. First, it is a probabilistic inference, so we get the best two or more segments. I use command like to split the segment and choose the first one, since the first one get the highest score. If you did not use mixcr. I can share you some command lines to split. as bellow. if your separator is "/", please change "," to "/", if you wanna get the second one, please change "1" to "2", and so on. execute the command in R, and use your "repLoaded" data. not in linux for(i in names(imm.data$data)){ imm.data$data[[i]]$V.name <- strsplit(imm.data$data[[i]]$V.name, ",") imm.data$data[[i]]$V.name <- sapply(imm.data$data[[i]]$V.name, "[", 1) } it may take some time long.

Cheers

Decen

decenwang avatar Jul 25 '20 02:07 decenwang

Thank you. I will try this.

k-blenman avatar Jul 25 '20 02:07 k-blenman

Closing this issue for now. The next version of Immunarch will most likely check the correctness of columns. More details on the next version of Immunarch are here: https://b-t.cr/t/immunarch-will-significantly-evolve-but-it-will-break-things-and-we-need-your-help/1123

vadimnazarov avatar Oct 24 '23 00:10 vadimnazarov