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

Question about "false_graph_filtering" function #6

Open
JaesikKim opened this issue Jan 28, 2023 · 3 comments
Open

Question about "false_graph_filtering" function #6

JaesikKim opened this issue Jan 28, 2023 · 3 comments

Comments

@JaesikKim
Copy link

JaesikKim commented Jan 28, 2023

Hi. Thanks for your very interesting work!

I'm trying to replicate/reimplement your work on other cancer dataset.
But, I cannot get the underlying idea of this function

This is applied after generation of superpatch network, but without running this, it looks already generating good superpatch graph..
Can you please explain what and why applying this function?

And one more relevant question is about threshold.
The spatial threshold for edge is 5.5, and the theshold for false_graph_filtering is 4.3 in the code.
Can you explain why you set these values?
Accoding to the paper, the superpatch graph is defined within length of 5 tiles. How is this related to the thresholds you used?

(멋진연구 감사합니다. Feel free to answer in Korean if you prefer.. I don't mind at all!)
Jaesik

@liuxiaoping2020
Copy link

I have faced similar question:

When I run "supernode_generation.py" for the first step, it seems that it only run to

model_ft = model_ft.to(device)
model_ft.eval()
with tqdm(total=len(final_files)) as pbar_tot:
for image in final_files:
supernode_generation(image, model_ft, device, Argument, save_dir)
pbar_tot.update()

and generated 2 subdirectories, namely, "oringal", and "superpatch". In the "oringal" directory, it generated 3 kinds of files, examples of which are"TCGA-2F-A9KT-01Z-00-DX1_feature_list.csv", "TCGA-2F-A9KT-01Z-00-DX1_node_dict.pkl", "TCGA-2F-A9KT-01Z-00-DX1_node_location_list.csv", respectively. In the "superpatch" directory, it generated two kinds of files, examples of which are "TCGA-2F-A9KP-01Z-00-DX1_0.75_graph_torch.pt" and "TCGA-2F-A9KT-01Z-00-DX1_0.75.csv" respectively.

However, as you indicated, the output file should be: Compressed network as ".pt", Node position information in "_node_location_list.csv", Superpatch aggregated dictionary in "_artifact_sophis_final.csv". It seems that the final line (false_graph_filtering(4.3)) of "supernode_generation.py" did not work. I have checked the defination of "false_graph_filtering", and I found there is a "root_dir" specified through "root_dir = './Sample_data_for_demo/Graph_test/'" , however, I could not found a directory named "Graph_test" in the root directory. Thus, I guess the false_graph_filtering(4.3) might be work when we did not specified a true directory of "root_dir".

How to change/specify the "root_dir"? or can you help me address the problem?

Best regards

@liuxiaoping2020
Copy link

@JaesikKim can you run the funciton "false_graph_filtering", it seems that the "root_dir" in the function should be specified rather than the default value gived by the funciton. and can you tell me how you specified the root_dir to make the function work? thanks

@JaesikKim
Copy link
Author

@liuxiaoping2020 In my case, I changed a few lines in false_graph_filtering to run just for a single file, and it ran well. You can take a look at my modified code if you want.

But, I still cannot get the idea behind this function. Do you have any idea?

false_graph_filtering.py.zip

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