Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem running scATAC-seq with taiji #43

Open
youjingyuan opened this issue Nov 12, 2023 · 0 comments
Open

Problem running scATAC-seq with taiji #43

youjingyuan opened this issue Nov 12, 2023 · 0 comments

Comments

@youjingyuan
Copy link

Hi,

I am running the QC part of taiji and encountered the following error:


[INFO][11-12 23:23] SCATAC_Pre_Cluster(7e8b..): Running ...
Read Data
Use jaccard distance
Compute similarity matrix
Traceback (most recent call last):
File "/home/jingyuan/.local/bin/taiji-utils", line 8, in
sys.exit(main())
^^^^^^
File "/home/jingyuan/.local/lib/python3.11/site-packages/taiji_utils/init.py", line 151, in main
args.func(args)
File "/home/jingyuan/.local/lib/python3.11/site-packages/taiji_utils/init.py", line 12, in reduce
spectral(args)
File "/home/jingyuan/.local/lib/python3.11/site-packages/taiji_utils/Spectral.py", line 38, in spectral
res = Spectral(mat, n_dim=args.dim, distance=args.distance).coordinates[:, 1:]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jingyuan/.local/lib/python3.11/site-packages/taiji_utils/Spectral.py", line 62, in init
self.normalizer = Normalizer(jm, self.coverage)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jingyuan/.local/lib/python3.11/site-packages/taiji_utils/Spectral.py", line 101, in init
self.model = LinearRegression().fit(X, y)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jingyuan/.local/lib/python3.11/site-packages/sklearn/base.py", line 1152, in wrapper
return fit_method(estimator, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jingyuan/.local/lib/python3.11/site-packages/sklearn/linear_model/_base.py", line 678, in fit
X, y = self.validate_data(
^^^^^^^^^^^^^^^^^^^^
File "/home/jingyuan/.local/lib/python3.11/site-packages/sklearn/base.py", line 622, in validate_data
X, y = check_X_y(X, y, **check_params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/jingyuan/.local/lib/python3.11/site-packages/sklearn/utils/validation.py", line 1146, in check_X_y
X = check_array(
^^^^^^^^^^^^
File "/home/jingyuan/.local/lib/python3.11/site-packages/sklearn/utils/validation.py", line 751, in check_array
raise TypeError(
TypeError: np.matrix is not supported. Please convert to a numpy array with np.asarray. For more information see: https://numpy.org/doc/stable/reference/generated/numpy.matrix.html
[ERROR][11-12 23:23] SCATAC_Pre_Cluster(7e8b..) Failed:
Ran commands:
taiji-utils reduce /scratch/42548086/tmp_dir
-e61da8f959579a79/forebrain_E11.5_rep1_filt.mat.gz /scratch/42548086/tmp_dir
-e61da8f959579a79/forebrain_E11.5_rep1_spectral.tsv.gz
which taiji-utils

  Exception: error running: taiji-utils reduce /scratch/42548086/tmp_dir_-e61da8f959579a79/forebrain_E11.5_rep1_filt.mat.gz /scratch/42548086/tmp_dir_-e61da8f959579a79/forebrain_E11.5_rep1_spectral.tsv.gz
  exit status: 1
  stderr: Traceback (most recent call last):
    File "/home/jingyuan/.local/bin/taiji-utils", line 8, in <module>
    sys.exit(main())
  ^^^^^^
    File "/home/jingyuan/.local/lib/python3.11/site-packages/taiji_utils/__init__.py", line 151, in main
  args.func(args)
  File "/home/jingyuan/.local/lib/python3.11/site-packages/taiji_utils/__init__.py", line 12, in reduce
  spectral(args)
  File "/home/jingyuan/.local/lib/python3.11/site-packages/taiji_utils/Spectral.py", line 38, in spectral
  res = Spectral(mat, n_dim=args.dim, distance=args.distance).coordinates[:, 1:]
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/jingyuan/.local/lib/python3.11/site-packages/taiji_utils/Spectral.py", line 62, in __init__
  self.normalizer = Normalizer(jm, self.coverage)
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/jingyuan/.local/lib/python3.11/site-packages/taiji_utils/Spectral.py", line 101, in __init__
  self.model = LinearRegression().fit(X, y)
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/jingyuan/.local/lib/python3.11/site-packages/sklearn/base.py", line 1152, in wrapper
  return fit_method(estimator, *args, **kwargs)
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/jingyuan/.local/lib/python3.11/site-packages/sklearn/linear_model/_base.py", line 678, in fit
  X, y = self._validate_data(
    ^^^^^^^^^^^^^^^^^^^^
      File "/home/jingyuan/.local/lib/python3.11/site-packages/sklearn/base.py", line 622, in _validate_data
    X, y = check_X_y(X, y, **check_params)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/jingyuan/.local/lib/python3.11/site-packages/sklearn/utils/validation.py", line 1146, in check_X_y
    X = check_array(
      ^^^^^^^^^^^^
        File "/home/jingyuan/.local/lib/python3.11/site-packages/sklearn/utils/validation.py", line 751, in check_array
      raise TypeError(
        TypeError: np.matrix is not supported. Please convert to a numpy array with np.asarray. For more information see: https://numpy.org/doc/stable/reference/generated/numpy.matrix.html
        
        CallStack (from HasCallStack):
          error, called at src/Control/Workflow/Interpreter/Exec.hs:146:37 in SciFlow-0.8.0-IRKsT2ba9M716PeGlwt2FT:Control.Workflow.Interpreter.Exec
        [INFO][11-12 23:23] SCATAC_Pre_Cluster(0215..): Running ...
        Read Data
        Use jaccard distance
        Compute similarity matrix
        Traceback (most recent call last):
          File "/home/jingyuan/.local/bin/taiji-utils", line 8, in <module>
          sys.exit(main())
        ^^^^^^
          File "/home/jingyuan/.local/lib/python3.11/site-packages/taiji_utils/__init__.py", line 151, in main
        args.func(args)
        File "/home/jingyuan/.local/lib/python3.11/site-packages/taiji_utils/__init__.py", line 12, in reduce
        spectral(args)
        File "/home/jingyuan/.local/lib/python3.11/site-packages/taiji_utils/Spectral.py", line 38, in spectral
        res = Spectral(mat, n_dim=args.dim, distance=args.distance).coordinates[:, 1:]
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File "/home/jingyuan/.local/lib/python3.11/site-packages/taiji_utils/Spectral.py", line 62, in __init__
        self.normalizer = Normalizer(jm, self.coverage)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File "/home/jingyuan/.local/lib/python3.11/site-packages/taiji_utils/Spectral.py", line 101, in __init__
        self.model = LinearRegression().fit(X, y)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File "/home/jingyuan/.local/lib/python3.11/site-packages/sklearn/base.py", line 1152, in wrapper
        return fit_method(estimator, *args, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File "/home/jingyuan/.local/lib/python3.11/site-packages/sklearn/linear_model/_base.py", line 678, in fit
        X, y = self._validate_data(
          ^^^^^^^^^^^^^^^^^^^^
            File "/home/jingyuan/.local/lib/python3.11/site-packages/sklearn/base.py", line 622, in _validate_data
          X, y = check_X_y(X, y, **check_params)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/home/jingyuan/.local/lib/python3.11/site-packages/sklearn/utils/validation.py", line 1146, in check_X_y
          X = check_array(
            ^^^^^^^^^^^^
              File "/home/jingyuan/.local/lib/python3.11/site-packages/sklearn/utils/validation.py", line 751, in check_array
            raise TypeError(
              TypeError: np.matrix is not supported. Please convert to a numpy array with np.asarray. For more information see: https://numpy.org/doc/stable/reference/generated/numpy.matrix.html
              [ERROR][11-12 23:23] SCATAC_Pre_Cluster(0215..) Failed: 
                Ran commands: 
                taiji-utils reduce /scratch/42548086/tmp_dir_-72882c3eb78d8439/forebrain_P0_rep1_filt.mat.gz /scratch/42548086/tmp_dir_-72882c3eb78d8439/forebrain_P0_rep1_spectral.tsv.gz
              which taiji-utils
              
              Exception: error running: taiji-utils reduce /scratch/42548086/tmp_dir_-72882c3eb78d8439/forebrain_P0_rep1_filt.mat.gz /scratch/42548086/tmp_dir_-72882c3eb78d8439/forebrain_P0_rep1_spectral.tsv.gz
              exit status: 1
              stderr: Traceback (most recent call last):
                File "/home/jingyuan/.local/bin/taiji-utils", line 8, in <module>
                sys.exit(main())
              ^^^^^^
                File "/home/jingyuan/.local/lib/python3.11/site-packages/taiji_utils/__init__.py", line 151, in main
              args.func(args)
              File "/home/jingyuan/.local/lib/python3.11/site-packages/taiji_utils/__init__.py", line 12, in reduce
              spectral(args)
              File "/home/jingyuan/.local/lib/python3.11/site-packages/taiji_utils/Spectral.py", line 38, in spectral
              res = Spectral(mat, n_dim=args.dim, distance=args.distance).coordinates[:, 1:]
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/home/jingyuan/.local/lib/python3.11/site-packages/taiji_utils/Spectral.py", line 62, in __init__
              self.normalizer = Normalizer(jm, self.coverage)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/home/jingyuan/.local/lib/python3.11/site-packages/taiji_utils/Spectral.py", line 101, in __init__
              self.model = LinearRegression().fit(X, y)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/home/jingyuan/.local/lib/python3.11/site-packages/sklearn/base.py", line 1152, in wrapper
              return fit_method(estimator, *args, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/home/jingyuan/.local/lib/python3.11/site-packages/sklearn/linear_model/_base.py", line 678, in fit
              X, y = self._validate_data(
                ^^^^^^^^^^^^^^^^^^^^
                  File "/home/jingyuan/.local/lib/python3.11/site-packages/sklearn/base.py", line 622, in _validate_data
                X, y = check_X_y(X, y, **check_params)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  File "/home/jingyuan/.local/lib/python3.11/site-packages/sklearn/utils/validation.py", line 1146, in check_X_y
                X = check_array(
                  ^^^^^^^^^^^^
                    File "/home/jingyuan/.local/lib/python3.11/site-packages/sklearn/utils/validation.py", line 751, in check_array
                  raise TypeError(
                    TypeError: np.matrix is not supported. Please convert to a numpy array with np.asarray. For more information see: https://numpy.org/doc/stable/reference/generated/numpy.matrix.html
                    
                    CallStack (from HasCallStack):
                      error, called at src/Control/Workflow/Interpreter/Exec.hs:146:37 in SciFlow-0.8.0-IRKsT2ba9M716PeGlwt2FT:Control.Workflow.Interpreter.Exec
                    [ERROR][11-12 23:23] Program exits with errors

It says that, "np.matrix is not supported. Please convert to a numpy array with np.asarray.". I am using python 3.11.4. Many thanks in advance!

Best,
JY

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant