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

fig 4 and fig 5 issues #11

Open
Joaquin-c4 opened this issue Apr 25, 2023 · 0 comments
Open

fig 4 and fig 5 issues #11

Joaquin-c4 opened this issue Apr 25, 2023 · 0 comments

Comments

@Joaquin-c4
Copy link

Hi, julia

I send you the errors that I get when running the code

fig 4

first error in this cell of the section Read yeast go annotations downloaded from Uniprot:

yeast_go = format_uniprot_annotations(yeast_go)
yeast_go

AttributeError Traceback (most recent call last)
Cell In[13], line 1
----> 1 yeast_go = format_uniprot_annotations(yeast_go)
2 yeast_go

Cell In[9], line 32, in format_uniprot_annotations(df, sep, regex)
28 # iterate proteins
29 for e,row in df.iterrows():
30
31 # iterate annotation types
---> 32 for t,a in row.iteritems():
33 try:
34 # skip empty strings
35 if str(a) in ["", "nan"]:

File ~\anaconda3\envs\prot_vis\lib\site-packages\pandas\core\generic.py:5989, in NDFrame.getattr(self, name)
5982 if (
5983 name not in self._internal_names_set
5984 and name not in self._metadata
5985 and name not in self._accessors
5986 and self._info_axis._can_hold_identifiers_and_holds_name(name)
5987 ):
5988 return self[name]
-> 5989 return object.getattribute(self, name)

AttributeError: 'Series' object has no attribute 'iteritems'

#then i cant run all the cells linked to the output "yeast_go"

fig 5
#from this part i was able to run the code until the "radar plot" section when trynging to execute this cell...

fig_radar = px.line_polar(ap4_av_profiles.stack("Fraction").reset_index().rename({0: "value"}, axis=1),
r="value", theta="Fraction", line_group="Compartment", line_close=True,
color="Compartment", color_discrete_sequence=px.colors.qualitative.D3)
.update_layout(width=500, height=230, font_size=8, margin=dict(t=20, b=0, r=0, l=20), template="simple_white")
.update_polars(radialaxis=dict(showgrid=True, gridcolor="darkgrey"),
angularaxis=dict(showgrid=True, gridcolor="darkgrey"))
fig_radar

AttributeError Traceback (most recent call last)
Cell In[30], line 1
----> 1 fig_radar = px.line_polar(ap4_av_profiles.stack("Fraction").reset_index().rename({0: "value"}, axis=1),
2 r="value", theta="Fraction", line_group="Compartment", line_close=True,
3 color="Compartment", color_discrete_sequence=px.colors.qualitative.D3)
4 .update_layout(width=500, height=230, font_size=8, margin=dict(t=20, b=0, r=0, l=20), template="simple_white")
5 .update_polars(radialaxis=dict(showgrid=True, gridcolor="darkgrey"),
6 angularaxis=dict(showgrid=True, gridcolor="darkgrey"))
7 fig_radar

File ~\anaconda3\envs\prot_vis\lib\site-packages\pandas\core\generic.py:5989, in NDFrame.getattr(self, name)
5982 if (
5983 name not in self._internal_names_set
5984 and name not in self._metadata
5985 and name not in self._accessors
5986 and self._info_axis._can_hold_identifiers_and_holds_name(name)
5987 ):
5988 return self[name]
-> 5989 return object.getattribute(self, name)

AttributeError: 'Series' object has no attribute 'stack'

thank you

joaquin

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