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
308 stars 64 forks source link

repLoad cannot read 10X cellranger-5.0.0 vdj result file #358

Open februaryfang opened 1 year ago

februaryfang commented 1 year ago

🐛 Bug

cellranger-5.0.0 immunarch-0.9.0

immdata <- repLoad(file_path, .mode = "paired")

== Step 1/3: loading repertoire files... ==

Processing "Cellranger_aggr/BCR/" ... -- [1/4] Parsing "Cellranger_aggr/BCR/JK.csv" -- 10x (filt.contigs) Error in sum(df[[.count]]) : invalid 'type' (character) of argument In addition: Warning messages: 1: The following named parsers don't match the column names: barcode,is_cell,contig_id,high_confidence,length,chain,v_gene,d_gene,j_gene,c_gene,full_length,productive,cdr3,cdr3_nt,reads,umis,raw_clonotype_id,raw_consensus_id 2: In .which_recomb_type(df[[.vgenes]]) : Can't determine the type of V(D)J recombination. No insertions will be presented in the resulting data table.

file_path <- paste0(system.file(package = "immunarch"), "/extdata/sc/flu.csv.gz") igdata <- repLoad(file_path, .mode = "paired")

== Step 1/3: loading repertoire files... ==

Processing "" ... -- [1/1] Parsing "/mnt/icfs/work/singlecelldevelopment/miniconda3/envs/immunarchIR/lib/R/library/immunarch/extdata/sc/flu.csv.gz" -- 10x (filt.contigs) Error in df[, vec_names]: ! Can't subset columns that don't exist. ✖ Columns cdr1_nt, cdr1, cdr2_nt, cdr2, fwr1_nt, etc. don't exist. Run rlang::last_error() to see where the error occurred.

my data: head -3 Cellranger_aggr/BCR/JK.csv

barcode,is_cell,contig_id,high_confidence,length,chain,v_gene,d_gene,j_gene,c_gene,full_length,productive,cdr3,cdr3_nt,reads,umis,raw_clonotype_id,raw_consensus_id GCTGCAGGTCATGCCG-1,true,GCTGCAGGTCATGCCG-1_contig_2,true,587,IGH,IGHV4-39,,IGHJ4,IGHG2,true,true,CAHSKGAMKHFEIW,TGTGCGCATTCAAAGGGTGCCATGAAGCATTTTGAGATCTGG,286,2,clonotype1009,clonotype1009_consensus_1 GCTGCAGGTCATGCCG-1,true,GCTGCAGGTCATGCCG-1_contig_1,true,551,IGK,IGKV1-12,,IGKJ4,IGKC,true,true,CQQANSFPLSF,TGTCAACAGGCTAACAGTTTCCCTCTCAGTTTC,392,5,clonotype1009,clonotype1009_consensus_2

file_path <- paste0(system.file(package = "immunarch"), "/extdata/sc/flu.csv.gz")

To Reproduce

Expected behavior

Additional context

vadimnazarov commented 1 year ago

Hi, could you provide a couple of datasets to reproduce it please?

vadimnazarov commented 1 year ago

Could you check if the latest cellranger version works please? Here: https://support.10xgenomics.com/single-cell-gene-expression/software/overview/welcome