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

Test data error #5

Open
Tang-pro opened this issue May 13, 2024 · 1 comment
Open

Test data error #5

Tang-pro opened this issue May 13, 2024 · 1 comment

Comments

@Tang-pro
Copy link

Hi, @yollct
`subprocess.call("wget https://zenodo.org/record/7228475/files/tutorial_alt_sorted_bc_tpm.csv?download=1 -O alt_sorted_bc_tpm.csv", shell=True)
subprocess.call("wget https://zenodo.org/record/7228475/files/tutorial_alt_genelist.csv?download=1 -O alt_genelist.csv", shell=True)

data = pd.read_csv("alt_sorted_bc_tpm.csv", sep="\t")
genelist = pd.read_csv("alt_genelist.csv", sep="\t")

geneid= list(map(lambda x: str(int(x)) if not np.isnan(x) else x, genelist['gene'].tolist()))
transcriptid = genelist['isoforms'].to_list()

dset = spy.dataset(ts=data,
transcript_id=transcriptid,
gene_id = geneid,
species=9606,
timepts=4, reps1=3)`

thr error message is Traceback (most recent call last):
File "", line 1, in
File "/public/home/zwliu/miniconda3/lib/python3.10/site-packages/spycone/DataSet.py", line 197, in init
self._get_gene_level()
File "/public/home/zwliu/miniconda3/lib/python3.10/site-packages/spycone/DataSet.py", line 226, in _get_gene_level
self.genelevel_symb.append(self.symbs[v[0]])
IndexError: too many indices for array: array is 0-dimensional, but 1 were indexed

What is the reason for this and how to solve it? If it is not a model species, can the species parameter be eliminated?

@yollct
Copy link
Owner

yollct commented May 14, 2024

Hi,

I guess this error is due to the symbs parameter is None, could you please try inputting something there, like with geneid?

Best,

Chit Tong

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

2 participants