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

Error in st.cal_qc #137

Open
tianchen2019 opened this issue Mar 2, 2022 · 0 comments
Open

Error in st.cal_qc #137

tianchen2019 opened this issue Mar 2, 2022 · 0 comments

Comments

@tianchen2019
Copy link

my code is :
import stream as st
adata=st.read(file_name='/outs/filtered_peak_bc_matrix/matrix.mtx',
file_sample='/outs/filtered_peak_bc_matrix/barcodes.tsv',
file_feature='/outs/filtered_peak_bc_matrix/peaks.bed',
file_format='mtx',workdir='./result_atac')
adata.var.index =adata.var[0].astype(str) + '' + adata.var[1].astype(str) +'' + adata.var[2].astype(str)
st.cal_qc(adata2,assay='atac')
the error is :
ValueError Traceback (most recent call last)
/tmp/ipykernel_352024/3261032759.py in
----> 1 st.cal_qc(adata,assay='atac')

~/app/ENTER/envs/stream1/lib/python3.7/site-packages/stream/core.py in cal_qc(adata, expr_cutoff, assay)
438
439 n_counts = adata.X.sum(axis=0)
--> 440 adata.var['n_counts'] = n_counts
441 n_cells = (adata.X>=expr_cutoff).sum(axis=0)
442 adata.var['n_cells'] = n_cells

~/app/ENTER/envs/stream1/lib/python3.7/site-packages/pandas/core/frame.py in setitem(self, key, value)
3610 else:
3611 # set column
-> 3612 self._set_item(key, value)
3613
3614 def _setitem_slice(self, key: slice, value):

~/app/ENTER/envs/stream1/lib/python3.7/site-packages/pandas/core/frame.py in _set_item(self, key, value)
3782 ensure homogeneity.
3783 """
-> 3784 value = self._sanitize_column(value)
3785
3786 if (

~/app/ENTER/envs/stream1/lib/python3.7/site-packages/pandas/core/frame.py in _sanitize_column(self, value)
4507
4508 if is_list_like(value):
-> 4509 com.require_length_match(value, self.index)
4510 return sanitize_array(value, self.index, copy=True, allow_2d=True)
4511

~/app/ENTER/envs/stream1/lib/python3.7/site-packages/pandas/core/common.py in require_length_match(data, index)
530 if len(data) != len(index):
531 raise ValueError(
--> 532 "Length of values "
533 f"({len(data)}) "
534 "does not match length of index "

ValueError: Length of values (1) does not match length of index (156605)
my package version is:
image

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