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

Error in File Import #165

Closed lejim closed 3 years ago

lejim commented 3 years ago

Hi, I trying to implement the immunarch tool for my data. While the tutorial looks very clear, I got an immediate issue with importing my data.


file_path = paste0(system.file(package="immunarch"), "/Desktop/Test_file.tsv") immdata_v1 <- repLoad(file_path)

== Step 1/3: loading repertoire files... == Error in if (file.info(path)$isdir) { : missing value where TRUE/FALSE needed

I have data formats from Mixcr and TRUST4, and I am getting the same error for both when using repLoad command.

Can anyone help me understand what I'm missing?

ivan-balashov commented 3 years ago

Hi, lejim! My name is Ivan, I am a developer of the Immunarch package. Thank you for using our software!

It looks like you need to fix file_path variable in your case. You don't need to combine file path of Immunarch package and file path to your files. You should use as file path absolute or relative file path to you directory with files which you want to import with repLoad. For example, I've placed my files in the directory "/Users/ivan/Documents/imm_data_dir/project_data_dir/" and I will use next: immdata_v1<-repLoad('/Users/ivan/Documents/imm_project_dir/project_data_dir/') Also, if you use Rstudio, you can copy your files to the projects directory and use the relative path. immdata_v1<-repLoad('project_data_dir/')

If you don't know your projects dir, you can get it with getwd() R command.

I hope this answer was helpful in solving your problem.

Best regards, Ivan

lejim commented 3 years ago

Hi Ivan,

I appreciate your prompt reply and advice. It worked smoothly now, both import and overall analysis. So, thank you for developing such a simple and straightforward tool. Using it to analyse my data saved me a lot of time.

Overall, I was very glad to be able to implement almost all the analysis in the Immunarch package straight away (which is really wonderful). The only analysis that did not work for me (using the TRUST4 generated file inputs) was a total diversity estimator (rarefaction analysis). I am hoping to be able to implement this part quickly as well.

Best regards, Lejla

tsvvas commented 3 years ago

Hi Lejla,

It seems like your issue was solved. I will close it now. If you have any questions, feel free to open a new issue!

Best regards, Vasily