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 `df[, make.names(df_columns)]` #373

Closed royfrancis closed 1 year ago

royfrancis commented 1 year ago

I get the following error when reading in MIXCR output that was given to me.

Full output ``` > mr <- repLoad("data/raw/bulk-gex/GEX_mixcr") == Step 1/3: loading repertoire files... == Processing "data/raw/bulk-gex/GEX_mixcr" ... -- [1/11] Parsing "data/raw/bulk-gex/GEX_mixcr/mixcr.sh" -- unsupported format, skipping -- [2/11] Parsing "data/raw/bulk-gex/GEX_mixcr/MS_GEX.clns" -- unsupported format, skipping -- [3/11] Parsing "data/raw/bulk-gex/GEX_mixcr/MS_GEX.clonotypes.ALL.txt" -- mixcr -- [4/11] Parsing "data/raw/bulk-gex/GEX_mixcr/MS_GEX.clonotypes.IGH.txt" -- mixcr -- [5/11] Parsing "data/raw/bulk-gex/GEX_mixcr/MS_GEX.clonotypes.IGK.txt" -- mixcr -- [6/11] Parsing "data/raw/bulk-gex/GEX_mixcr/MS_GEX.clonotypes.IGL.txt" -- mixcr -- [7/11] Parsing "data/raw/bulk-gex/GEX_mixcr/MS_GEX.clonotypes.TRA.txt" -- mixcr -- [8/11] Parsing "data/raw/bulk-gex/GEX_mixcr/MS_GEX.clonotypes.TRB.txt" -- mixcr -- [9/11] Parsing "data/raw/bulk-gex/GEX_mixcr/MS_GEX.clonotypes.TRD.txt" -- mixcr -- [10/11] Parsing "data/raw/bulk-gex/GEX_mixcr/MS_GEX.clonotypes.TRG.txt" -- mixcr -- [11/11] Parsing "data/raw/bulk-gex/GEX_mixcr/MS_GEX.matrix.tsv" -- mixcr [!] Warning: can't find a column with clonal counts. Setting all clonal counts to 1. Did you apply repLoad to MiXCR file *_alignments.txt? If so please consider moving all *.clonotypes.*.txt MiXCR files to a separate folder and apply repLoad to the folder. Note: The *_alignments.txt file IS NOT a repertoire file suitable for any analysis. Error in `df[, make.names(df_columns)]`: ! Can't subset columns that don't exist. ✖ Columns `NA.` and `NA.` don't exist. Run `rlang::last_trace()` to see where the error occurred. Warning message: In readLines(f, 1) : line 1 appears to contain an embedded nul ```

I have the following files as MIXCR output:

├── MS_GEX.clns
├── MS_GEX.clonotypes.ALL.txt
├── MS_GEX.clonotypes.IGH.txt
├── MS_GEX.clonotypes.IGK.txt
├── MS_GEX.clonotypes.IGL.txt
├── MS_GEX.clonotypes.TRA.txt
├── MS_GEX.clonotypes.TRB.txt
├── MS_GEX.clonotypes.TRD.txt
├── MS_GEX.clonotypes.TRG.txt
├── MS_GEX.matrix.tsv
├── MS_GEX.report
├── MS_GEX.vdjca
└── mixcr.sh

The input to MIXCR was zUMIs output from SS3 data.

> packageVersion("immunarch")
[1] ‘0.9.0’
royfrancis commented 1 year ago

It worked when I tried loading individual file:

mr <- repLoad("data/raw/bulk-vdj/mixcr/MS_lesion_merged.clonotypes.ALL.txt")