ncborcherding / scRepertoire

A toolkit for single-cell immune profiling
https://www.borch.dev/uploads/screpertoire/
MIT License
311 stars 54 forks source link

loadContigs error when read TRUST4 output containing only 1 row #429

Closed WuRAFY closed 3 weeks ago

WuRAFY commented 3 weeks ago

Firstly thanks for the tool. When I load a bunch of TRUST4 files with the function loadContigs, I found that the error below would happen if the file list containing a file with only one row.

Error in `colnames<-`(`*tmp*`, value = c("v_gene", "d_gene", "j_gene",  : 
  attempt to set 'colnames' on an object with less than two dimensions

Here is the one-row file https://1drv.ms/u/c/1aa2c7aee02dd080/Ebv7ISMqDRJFqwjPiBXMcxMBnmUu8EkOBzXPs6HR6AOaIA?e=MlpAoT

FY

Qile0317 commented 3 weeks ago

@WuRAFY Thanks for reporting, found the issue and fix is on the way. An ugly quickfix in the meanwhile would be to manually reconstruct the intended output since it is just 1 row.

Qile0317 commented 3 weeks ago

@WuRAFY #430 fixes the issue. If you are in urgent need of using the function, you can update your package with my fork using devtools::install_github("Qile0317/scRepertoire@429") the development branch devtools::install_github("ncborcherding/scRepertoire@dev")