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
312 stars 66 forks source link

Error in repAlignLineage() #330

Closed Jacktpk closed 1 year ago

Jacktpk commented 1 year ago

Dear Immunarch Team,

Thank you for this fantastic package. I am trying to perform some BCR analysis following your pipeline: https://immunarch.com/articles/web_only/BCRpipeline.html. I am having issues in aligning sequences within a clonal lineage.

align_dt <- bcr_data %>%
  seqCluster(seqDist(bcr_data, .col = 'CDR3.nt', .group_by_seqLength = TRUE), 
             .perc_similarity = 0.6) %>%
  repGermline(.threads = 1) %>%
  repAlignLineage(.min_lineage_sequences = 6, .align_threads = 2, .nofail = TRUE)

This error appear:

Error in mclapply(..., mc.preschedule = mc.preschedule, mc.cores = mc.cores) : 
  'mc.cores' > 1 is not supported on Windows
In addition: Warning messages:
1: <anonymous>: ... may be used in an incorrect context: ‘.fun(piece, ...)’

2: <anonymous>: ... may be used in an incorrect context: ‘.fun(piece, ...)’

I went through all the lines of the code, both seqCluster() and repGermline() work and they add the columns needed for the next steps. The error is referred to the repAlignLineage() funtion.

Could you please help me with this? Thank you!

Alexander230 commented 1 year ago

Hi, @Jacktpk!

I'm Aleksandr Popov, a developer of Immunarch package. Thank you for using our software!

Multithread capabilities in R are currently not supported on Windows. You can work around this by running all functions of BCR pipeline with single thread. For this, add argument .threads = 1 for repGermline(), repClonalFamily() and repSomaticHypermutation(), and .prepare_threads = 1, .align_threads = 1 for repAlignLineage().

Best regards, Aleksandr

Jacktpk commented 1 year ago

Hi Aleksandr,

Thank you very much for your quick and really helpful reply. The code is now working!

Many thanks!