Closed aishu291 closed 4 years ago
Hi @aishu291
Thank you for letting us know about the issue! Can you provide a full code for your script, from data loading via repLoad
to the diversity calculations?
ALTCL_top30 <- repLoad("/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30/", "mixcr")
== Step 1/3: loading repertoire files... ==
Processing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30/" ... -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GI11_exome_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GI14_exome_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS21_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS22_exome_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS23_exome_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS24_exome_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS25_exome_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS27_exome_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS28_exome_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS32_exome_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS33_exome_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS36_exome_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS37_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS38_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS39_exome_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS40_exome_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS41_exome_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS42_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS46_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS56_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS57_exome_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS58_exome_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS59_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS60_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS61_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS62_exome_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS63_exome_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS64_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS65_exome_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS66_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS67_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS68_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS69_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS70_exome_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS71_exome_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS72_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS73_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS74_exome_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS75_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS76_exome_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS77_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS78_exome_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS79_exome_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS89_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS90_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS93_exome_30_trb.txt" -- mixcr -- Parsing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30//GPS94_exome_30_trb.txt" -- mixcr
== Step 2/3: checking metadata files and merging... ==
Processing "/Users/aishwaryaiyer/Documents/TRB/ALTCL/top30/" ... -- Metadata file not found; creating a dummy metadata...
== Step 3/3: splitting data by barcodes and chains... ==
Done!
ALTCL_diversity = repDiversity(ALTCL_top30, "gini.simp") Error: Can't subset columns that don't exist. x Column
CDR3.aa
doesn't exist. Runrlang::last_error()
to see where the error occurred. rlang::last_error() <error/vctrs_error_subscript_oob> Can't subset columns that don't exist. x ColumnCDR3.aa
doesn't exist. Backtrace:
- immunarch::repDiversity(ALTCL_top30, "gini.simp")
- vctrs:::stop_subscript_oob(...)
- vctrs:::stop_subscript(...) Run
rlang::last_trace()
to see the full context. rlang::last_trace() <error/vctrs_error_subscript_oob> Can't subset columns that don't exist. x ColumnCDR3.aa
doesn't exist. Backtrace: █- ├─immunarch::repDiversity(ALTCL_top30, "gini.simp")
- │ └─base::lapply(...)
- │ └─immunarch:::FUN(X[[i]], ...)
- │ └─
%>%
(...)- │ ├─base::withVisible(eval(quote(
_fseq
(_lhs
)), env, env))- │ └─base::eval(quote(
_fseq
(_lhs
)), env, env)- │ └─base::eval(quote(
_fseq
(_lhs
)), env, env)- │ └─immunarch:::
_fseq
(_lhs
)- │ └─magrittr::freduce(value,
_function_list
)- │ └─function_list[i]
- │ ├─dplyr::select(., .col, IMMCOL$count)
- │ └─dplyr:::select.data.frame(., .col, IMMCOL$count)
- │ └─tidyselect::vars_select(tbl_vars(.data), !!!enquos(...))
- │ └─tidyselect:::eval_select_impl(...)
- │ ├─tidyselect:::with_subscript_errors(...)
- │ │ ├─base::tryCatch(...)
- │ │ │ └─base:::tryCatchList(expr, classes, parentenv, handlers)
- │ │ │ └─base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
- │ │ │ └─base:::doTryCatch(return(expr), name, parentenv, handler)
- │ │ └─tidyselect:::instrument_base_errors(expr)
- │ │ └─base::withCallingHandlers(...)
- │ └─tidyselect:::vars_select_eval(...)
- │ └─tidyselect:::walk_data_tree(expr, data_mask, context_mask)
- │ └─tidyselect:::eval_c(expr, data_mask, context_mask)
- │ └─tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
- │ └─tidyselect:::walk_data_tree(new, data_mask, context_mask)
- │ └─tidyselect:::as_indices_sel_impl(...)
- │ └─tidyselect:::as_indices_impl(x, vars, strict = strict)
- │ └─tidyselect:::chr_as_locations(x, vars)
- │ └─vctrs::vec_as_location(x, n = length(vars), names = vars)
- └─vctrs:::stop_subscript_oob(...)
- └─vctrs:::stop_subscript(...)
Hello @aishu291
Thank you for the very detailed answer! This is an ideal answer all developers would like to see. 👍
The immune repertoire data is stored in the "data" element in the data list:
ALTCL_diversity = repDiversity(ALTCL_top30$data, "gini.simp")
Understood. Thank you!
My pleasure! @aishu291 did it work?
Yes it did! Once again thank you for your quick response!
Hi, I am trying to use the repDiversity on some of our samples. The data was analyzed using MiXCR but I converted the files to immunarch format. In both formats I get the following error.
ALTCL_diversity = repDiversity(ALTCL_top30, "gini.simp") Error: Can't subset columns that don't exist. x Column
CDR3.aa
doesn't exist.This is example of my file columns-
Please help me resolve the error. Thank you!