JiekaiLab / scTE

MIT License
87 stars 27 forks source link

ValueError: X needs to be 2-dimensional, not 1-dimensional. #46

Open ruocensong opened 1 year ago

ruocensong commented 1 year ago

Hi,

I used the test.bam in the folder to run scTE -i test.bam -o out -x mm10.exclusive.idx --hdf5 True -CB CR -UMI UR

And I got this problem. How could I to figure out this problem, please? Thank you.

Sample = out Reference annotation index = mm10.exclusive.idx Minimum number of genes required = 200 Minimum number of counts required = None Number of threads = 1

INFO : Loading the genome annotation index... 2022-11-01 12:23:40 INFO : Loaded 'mm10.exclusive.idx' binary file with 3900779 items ['1', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '2', '3', '4', '5', '6', '7', '8', '9', 'M', 'X', 'Y'] INFO : Finished loading the genome annotation index... 2022-11-01 12:24:30

INFO : Processing BAM/SAM files ...2022-11-01 12:24:30 INFO : Input SAM/BAM file appears to be valid CR UR good

sh: 1: gzip: Exec format error INFO : Done BAM/SAM files processing ...2022-11-01 12:24:36

INFO : Splitting ...2022-11-01 12:24:36 INFO : Executing single thread path INFO : Finished processing sample files 2022-11-01 12:24:36

INFO : Fetching from the annotation index... 2022-11-01 12:24:36 sh: 1: gzip: Exec format error /usr/bin/gunzip: 57: exec: gzip: Exec format error INFO : Done fetching... 2022-11-01 12:24:36

INFO : Calculating expression... 2022-11-01 12:24:36 Traceback (most recent call last): File "/home/zhaolab/anaconda3/bin/scTE", line 4, in import('pkg_resources').run_script('scTE==1.0', 'scTE') File "/home/zhaolab/anaconda3/lib/python3.9/site-packages/pkg_resources/init.py", line 656, in run_script self.require(requires)[0].run_script(script_name, ns) File "/home/zhaolab/anaconda3/lib/python3.9/site-packages/pkg_resources/init.py", line 1453, in run_script exec(code, namespace, namespace) File "/home/zhaolab/anaconda3/lib/python3.9/site-packages/scTE-1.0-py3.9.egg/EGG-INFO/scripts/scTE", line 169, in main() File "/home/zhaolab/anaconda3/lib/python3.9/site-packages/scTE-1.0-py3.9.egg/EGG-INFO/scripts/scTE", line 155, in main len_res, genenumber, filename = Countexpression(filename=args.out, allelement=allelement, genenumber=args.genenumber, cellnumber=args.cellnumber, hdf5=args.hdf5) File "/home/zhaolab/anaconda3/lib/python3.9/site-packages/scTE-1.0-py3.9.egg/scTE/base.py", line 505, in Countexpression adata = ad.AnnData(np.asarray(data),var = var,obs = obs) File "/home/zhaolab/anaconda3/lib/python3.9/site-packages/anndata/_core/anndata.py", line 307, in init self._init_as_actual( File "/home/zhaolab/anaconda3/lib/python3.9/site-packages/anndata/_core/anndata.py", line 462, in _init_as_actual _check_2d_shape(X) File "/home/zhaolab/anaconda3/lib/python3.9/site-packages/anndata/_core/anndata.py", line 96, in _check_2d_shape raise ValueError( ValueError: X needs to be 2-dimensional, not 1-dimensional.

jphe commented 1 year ago

the test.bam file is extremely small, so will raise error when convert the csv to h5ad format. Can you set the --hdf5 to False and try agin?

ruocensong commented 1 year ago

the test.bam file is extremely small, so will raise error when convert the csv to h5ad format. Can you set the --hdf5 to False and try agin?

Thank you so much. It's working now.