immunomind / immunarch

🧬 Immunarch: an R Package for Fast and Painless Exploration of Single-cell and Bulk T-cell/Antibody Immune Repertoires
https://immunarch.com
Apache License 2.0
297 stars 65 forks source link

Issue with Reconstructing Bcell clonal lineages #356

Open JLimen opened 1 year ago

JLimen commented 1 year ago

Hi,

I am working with mouse B cell repertoires processed with MIXCR (for consistency for this project I am still using MIXCR v3.0.13). The alignment was done on the VDJregion so I can export all the required fields for the downstream analysis. My file has the following fields present: cloneId, cloneCount, cloneFraction, nSeqCDR3, nSeqCDR1, nSeqCDR2, nSeqFR1, nSeqFR2, nSeqFR3, nSeqFR4, aaSeqCDR3, bestVHit, bestDHit, bestJHit, bestCHit. I am able to load the data in R with immunarch and look into it in terms of diversity etc... But now I would like to reconstruct Bcell clonal lineages. When I use the following command I am getting the error below. Any insight would be very helpful, Thanks !

best

Julien

command: Lineages_align <- immdata_mixcr$data %>% seqCluster(seqDist(immdata_mixcr$data, .col = 'CDR3.nt', .group_by_seqLength = TRUE), .perc_similarity = 0.8) %>% repGermline(.threads = 2, .species = "MusMusculus") %>% repAlignLineage(.min_lineage_sequences = 6, .align_threads = 2, .nofail = TRUE)

error: Error in map2(): ℹ In index: 1. ℹ With name: clones_100. Caused by error in get(): ! object 'generate_germline_sequence' not found Run rlang::last_error() to see where the error occurred. Warning messages: 1: There was 1 warning in mutate(). ℹ In argument: length_value = map_chr(.y, ~ifelse(all(.x == .x[1]), yes = .x[1], no = glue("range_{min(.x)}:{max(.x)}"))). Caused by warning: ! Automatic coercion from integer to character was deprecated in purrr 1.0.0. ℹ Please use an explicit call to as.character() within map_chr() instead. ℹ The deprecated feature was likely used in the immunarch package. Please report the issue at https://github.com/immunomind/immunarch/issues. This warning is displayed once every 8 hours. Call lifecycle::last_lifecycle_warnings() to see where this warning was generated. 2: In seqCluster(., seqDist(immdata_mixcr$data, .col = "CDR3.nt", .group_by_seqLength = TRUE), : Number of sequence provided in .data and .dist are not matching!

System: Mac osx 12.3.1, R 4.2.0 Immunarch 0.9.0

samkleeman1 commented 1 year ago

Same problem

royfrancis commented 3 months ago

Same here