-
Notifications
You must be signed in to change notification settings - Fork 12
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
Unable to use load_data() for class Multiomics #165
Comments
Hi @piyushm27 thanks for pointing this bug out. Just to make sure, did you pass any values to these arguments, Can you also check what's the output of |
Hi Nhat,
Initially, I didn't send any values to these arguments for my purpose. But,
used a combination of values for the arguments pathologic_satges and
tumor_normal to trace the issue.
I hope this helps.
Thanks. Regards.
--
Piyush Mathur
Final Year Undergraduate Student
Department of Bioscience and Bioengineering
Indian Institute of Technology, Jodhpur
…On Mon, Nov 8, 2021 at 11:53 AM Nhat (Jonny) Tran ***@***.***> wrote:
Hi @piyushm27 <https://github.com/piyushm27> thanks for pointing this bug
out. y in that function should be a DataFrame, so y = y.filter(target)
shouldn't give an error and y shouldn't be a tuple. I will check the unit
tests again to see nothing odds is happening.
Just to make sure, did you pass any values to these arguments, pathologic_stages,
histological_subtypes, predicted_subtypes, tumor_normal?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#165 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APMYXZEO7ZOBDGR4HNYQWDDUK5UHZANCNFSM5GO6SSGA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
I'm having the same problem after loading the example dataset. I think the problem is with the clinical data. If I only load the omics data I can use the luad_data.load_data(omics="all"), if I load the clinical data together with the omics data, I cannot even use luad_data.load_data(omics="all") |
Hi @anhdpham, thanks for pointing this out. I will dig further for a fix of this bug. Honestly the |
Description
What I was trying to get done?
I was trying to use the function load_data() of class Multiomics. Instead it gave the error elaborated below
What I Did
//The command that raised the error [Here, luad_data is an object of class Multiomics]:
X_multiomics, y = luad_data.load_data(omics="all", target=["pathologic_stage"])
//And it gave the below error:
~/*****************/site-packages/openomics/multiomics.py in load_data(self, omics, target, pathologic_stages, histological_subtypes, predicted_subtypes, tumor_normal, samples_barcode)
251
252 # Filter y target column labels
--> 253 y = y.filter(target)
254 y.dropna(axis=0, inplace=True)
255 matched_samples = y.index
AttributeError: 'tuple' object has no attribute 'filter'
I tried goiong through the function description for the arguments of the function given, and it seems I'm not passing absurd arguments.
I'm guessing that this error is raised becuase the y used in line 253 of multiomics.py is an tuple of an Index object (pandas.core.indexes.base.Index) and numpy.ndarray object instead of DataFrame object (pandas.core.frame.DataFrame).
The text was updated successfully, but these errors were encountered: