sidhomj / DeepTCR

Deep Learning Methods for Parsing T-Cell Receptor Sequencing (TCRSeq) Data
https://sidhomj.github.io/DeepTCR/
MIT License
110 stars 40 forks source link

Issue loading single cell data #85

Open leeanapeters opened 2 months ago

leeanapeters commented 2 months ago

Hi, thank you for the great tool!

I am experiencing some issues loading paired single cell data. I have csvs for each of my samples that have a barcode column and cdr3, v, and j (d coverage was low so I removed that column) genes for each chain. There are no NA values or empty values that I can see so I'm not sure why it is throwing an empty array error.

Any help would be appreciated!

DTCR_WF.Get_Data(directory='pln/',Load_Prev_Data=False,aggregate_by_aa=True, ... aa_column_beta=7,v_beta_column=5,j_beta_column=6, ... aa_column_alpha=4, v_alpha_column=2,j_alpha_column=3,count_column=8) Loading Data... Traceback (most recent call last): File "", line 3, in File "/#/RIMA/miniconda3/envs/deeptcr3.7/lib/python3.7/site-packages/DeepTCR/DeepTCR.py", line 336, in Get_Data Y = OH.fit_transform(Y.reshape(-1,1)) File "/#/RIMA/miniconda3/envs/deeptcr3.7/lib/python3.7/site-packages/sklearn/preprocessing/_encoders.py", line 488, in fit_transform return super().fit_transform(X, y) File "/#/RIMA/miniconda3/envs/deeptcr3.7/lib/python3.7/site-packages/sklearn/base.py", line 847, in fit_transform return self.fit(X, **fit_params).transform(X) File "/#/RIMA/miniconda3/envs/deeptcr3.7/lib/python3.7/site-packages/sklearn/preprocessing/_encoders.py", line 461, in fit self._fit(X, handle_unknown=self.handle_unknown, force_all_finite="allow-nan") File "/#/RIMA/miniconda3/envs/deeptcr3.7/lib/python3.7/site-packages/sklearn/preprocessing/_encoders.py", line 78, in _fit X, force_all_finite=force_all_finite File "/#/RIMA/miniconda3/envs/deeptcr3.7/lib/python3.7/site-packages/sklearn/preprocessing/_encoders.py", line 44, in _check_X X_temp = check_array(X, dtype=None, force_all_finite=force_all_finite) File "/#/RIMA/miniconda3/envs/deeptcr3.7/lib/python3.7/site-packages/sklearn/utils/validation.py", line 800, in check_array % (n_samples, array.shape, ensure_min_samples, context) ValueError: Found array with 0 sample(s) (shape=(0, 1)) while a minimum of 1 is required.

leeanapeters commented 2 months ago

Apparently i needed to specify sep="," and then it loaded!