Closed Biscuite-wzy closed 2 years ago
Hi Biscuite-wzy,
Thanks for reporting this. The line that gives the error is trying to perform a calculation, but apparently it doesn't have the right data type for it (here is the function, line 45).
It might be due to the fact that the file where the function is taking these numbers from is not structured like it should be. It is the ortholog peak database (where the estimated modes of the ortholog distributions are stored), so could you have a look in there if the columns are correctly structured? E.g. One is missing, one is duplicated or the values in them don't look correct (especially under Mode_SD
). Here below I took the example from the docs to show how the database is supposed to look like:
Best, Cecilia
Hi,
I have had a look in there the columns are correctly structured, as follows. Here I have replaced the full name of the species with an x. But several values in Mode_SD are zero, does that cause this error ?
Best wishes
787117923 @.***
------------------ 原始邮件 ------------------ 发件人: "VIB-PSB/ksrates" @.>; 发送时间: 2022年6月23日(星期四) 晚上6:35 @.>; @.**@.>; 主题: Re: [VIB-PSB/ksrates] TypeError: cannot convert the series to <class 'float'> (Issue #42)
Hi Biscuite-wzy,
Thanks for reporting this. The line that gives the error is trying to perform a calculation, but apparently it doesn't have the right data type for it (here is the function, line 45). It might be due to the fact that the file where the function is taking these numbers from is not structured like it should be. It is the ortholog peak database (where the estimated modes of the ortholog distributions are stored), so could you have a look in there if the columns are correctly structured? E.g. One is missing, one is duplicated or the values in them don't look correct (especially under Mode_SD). Here below I took the example from the docs to show how the database is supposed to look like:
Best, Cecilia
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
Hi @Biscuite-wzy,
I'm afraid your post doesn't have the image attached! Could you reload it? Thanks.
Cecilia
Oh, sorry! It may not be able to attach the image, now I attach the text, as follows,
Species1 Species2 Mode Mode_SD
Cxxx ricxxxx_Sxxxx axxxx Cxxx ricxxxx Sxxxx axxxx 0.024708414872798404 0.004435378327805361 Dxxx rexxx_Fxxx qxxxx Dxxx rexxx Fxxx qxxxx 0.08082974559686885 0.004282444310959067 Txxx cvxxx_Sxxx sxxxx Txxx cvxxx Sxxx sxxxx 0.08317025440313108 0.0 Dxxx rexxx_Pxxx gxxxx Dxxx rexxx Pxxx gxxxx 0.08317025440313108 0.0
By looking at the layout of the text above it seems that only the headers (Species1
etc...) are separated by a tab, while the other fields below (Cxxx ricxxxx_Sxxxx
etc...) are separated by a space. However the code expects a tab! This way the function can't understand which numbers to parse for the calculation and it takes the whole line as a Series.
Would you check if the lines have a space as separator and, in case, would you replace each of them with a tab and try to run it again?
Hi @Biscuite-wzy,
Have you had the chance to check the spacing in the table?
I don't think that 0.0
values would be a problem.
Cheers, Cecilia
Hi, I'll close this issue due to inactivity. Should you encounter similar problems, we'll reopen it!
Cecilia
Hi, Thanks for your reply! I have found out the cause of this error, which was caused by an incorrect species name in the configure file.
787117923 @.***
------------------ 原始邮件 ------------------ 发件人: "VIB-PSB/ksrates" @.>; 发送时间: 2022年7月12日(星期二) 晚上9:33 @.>; @.**@.>; 主题: Re: [VIB-PSB/ksrates] TypeError: cannot convert the series to <class 'float'> (Issue #42)
Hi @Biscuite-wzy,
Have you had the chance to check the spacing in the table? I don't think that 0.0 values would be a problem.
Cheers, Cecilia
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
I see, thanks for letting us know :) Best, Cecilia
Hmm, this might actually be something to be caught in an error message, instead of letting it crash that way! Would you let me know which kind of incorrect name you were using?
Hi, I met an error when I run the step " ksrates orthologs-adjustment". I do not know how to resolve it, can you help me? I would appreciate it. Here I have replaced the species name with A, B,C,D,....in INFO.