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

unexpected keyword argument 'validated_adjacency_key' #16

Open
ChloeHJ opened this issue Oct 2, 2024 · 3 comments
Open

unexpected keyword argument 'validated_adjacency_key' #16

ChloeHJ opened this issue Oct 2, 2024 · 3 comments

Comments

@ChloeHJ
Copy link

ChloeHJ commented Oct 2, 2024

Hi,

Thanks for an amazing package. I was trying to run tutorial on pancreatic_islets_scrnaseq_example and I was getting errors:
fs.tl.apply_biological_flow(adata,
flowsig_network_key = 'flowsig_network',
adjacency_key = 'adjacency',
validated_adjacency_key = 'adjacency_validated'
)
TypeError: apply_biological_flow() got an unexpected keyword argument 'validated_adjacency_key'

I've tried changing the argument based on the latest code, but still giving me error
fs.tl.apply_biological_flow(adata,
flowsig_network_key = 'flowsig_network',
adjacency_key = 'adjacency',
validated_key = 'validated'
)

          163 # Get the adjacency
      --> 164 adjacency = adata.uns[flowsig_network_key]['network'][adjacency_key]
          165 flow_vars = adata.uns[flowsig_network_key]['flow_var_info'].index.tolist()
          166 flow_var_info = adata.uns[flowsig_network_key]['flow_var_info']
      
      KeyError: 'network'

Similarly, the code below as throwing out error as well:
edge_threshold = 0.7
fs.tl.filter_low_confidence_edges(adata,
edge_threshold = edge_threshold,
flowsig_network_key = 'flowsig_network',
adjacency_key = 'adjacency',
filtered_adjacency_key = 'adjacency_filtered')
TypeError: filter_low_confidence_edges() got an unexpected keyword argument 'filtered_adjacency_key'

Are these still under development? I would love to give it a try but wasn't sure if they are not yet ready for use

Thanks and best wishes
Chloe

@axelalmet
Copy link
Owner

Hi Chloe,

Thanks for the question and I'm very sorry for taking so long to respond!

I reran the pancreatic islets example and didn't get this error. The only reason I can think of why you have this issue is that, for some reason, the output of fs.tl.learn_intercellular_flows hasn't been saved correctly. Would you mind rerunning learn_intercellular_flows and then trying to run fs.tl.apply_biological_flow and fs.tl.filter_low_confidence_edges?

You have however pointed out correctly that the tutorial is out of date regarding the command arguments to specify for fs.tl.apply_biological_flow and fs.tl.filter_low_confidence_edges. I've updated the tutorial in flowsig repository to reflect those changes. Thanks for catching that!

Best wishes,
Axel.

@BlanQwall
Copy link

Hi Axel, I just got the same issue. I check the function's arguments. It seems that there's no validated_adjacency_key but validated_key for apply_biological_flow, and no filtered_adjacency_key but filtered_key for filter_low_confidence_edges. Maybe that's the reason?

@axelalmet
Copy link
Owner

Hi ChloeHJ and BlanQwall,

Very sorry for my extremely late reply. You're completely right! The README.md has the correct commands but the tutorials were wrong. I have updated the tutorial notebooks/scripts so that they have the right arguments specified.

Best wishes,
Axel.

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

3 participants