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

Adds topological features into better tracing #898

Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
a7d7ade
add topoly to dependancy list
MaxGamill-Sheffield Aug 31, 2024
18f243b
added total_branch_length into grainstats
MaxGamill-Sheffield Sep 2, 2024
435f928
tidy up new pruning method
MaxGamill-Sheffield Sep 3, 2024
427619e
pruning change applied throughput codebase
MaxGamill-Sheffield Sep 3, 2024
560d0b1
dis trace pruning re-structured
MaxGamill-Sheffield Sep 3, 2024
4b7d258
ordered traces adds topology & outputs molstats & splining takes mols…
MaxGamill-Sheffield Sep 3, 2024
83258bf
broad-exception-caught
MaxGamill-Sheffield Sep 3, 2024
ce90215
Added segment index image
MaxGamill-Sheffield Sep 4, 2024
351700a
Add min, median, mid, connections values to skan DF
MaxGamill-Sheffield Sep 5, 2024
25bd01e
fix argument missmatch
MaxGamill-Sheffield Sep 5, 2024
51c5ce2
Make grains outputs multi-coloured so dark grains aren't hidden
MaxGamill-Sheffield Sep 9, 2024
4bdba9e
moves nodestats TS object after ordered to pickup changes
MaxGamill-Sheffield Sep 11, 2024
5f279e1
got writhe calc working - i think
MaxGamill-Sheffield Sep 11, 2024
f836e67
move get_two_combinations into tracing_funcs
MaxGamill-Sheffield Sep 11, 2024
6f9464a
self'd img_to_node dict & tidy pre-commit errors
MaxGamill-Sheffield Sep 11, 2024
a98c65e
Merge branch 'maxgamill-sheffield/800-better-tracing' into maxgamill-…
MaxGamill-Sheffield Sep 11, 2024
a72f9a7
swapped dashes to underscores in my additions to skan df
MaxGamill-Sheffield Sep 16, 2024
a6d24b4
comments out tidy branches and finishes a docstring
MaxGamill-Sheffield Sep 16, 2024
a34e513
removes double dilation away from nodes so unpaired branches finish a…
MaxGamill-Sheffield Sep 16, 2024
7c14124
Merge branch 'maxgamill-sheffield/800-better-tracing' into maxgamill-…
MaxGamill-Sheffield Sep 18, 2024
10514de
fixes merge errors
MaxGamill-Sheffield Sep 18, 2024
4f56d44
fixes bug plotting reversed crossing not normal & tidies
MaxGamill-Sheffield Sep 18, 2024
3c24622
fix molstats duplication bug by adding mol_num df field
MaxGamill-Sheffield Sep 18, 2024
68f997d
moved second topology calculation to end of metrics as it messed up s…
MaxGamill-Sheffield Sep 18, 2024
8821855
+1 to ordered_trace_mask vals so 0 isn't missing in img
MaxGamill-Sheffield Sep 23, 2024
8086692
renamed tracing module grain and molstats vars
MaxGamill-Sheffield Sep 24, 2024
f4919b1
Start to test disordered_trace_grain, starting with height biasing
SylviaWhittle Sep 3, 2024
14101a6
test_disordered_trace_grain: Add test case for no pruning
SylviaWhittle Sep 3, 2024
730043f
test_disordered_trace_grain: Add test case for pruning small tail
SylviaWhittle Sep 3, 2024
e3462dc
test_disordered_trace_grain: Add test case for re-adding holes
SylviaWhittle Sep 4, 2024
4801a50
[WIP] Unpack and create test catenane image
SylviaWhittle Sep 6, 2024
b78b838
Replace example catenane with multiple catenanes
SylviaWhittle Sep 6, 2024
2b28188
Add grain mask for spliced catenane test image
SylviaWhittle Sep 6, 2024
c6f796e
Example catenanes: Replace grain mask with labelled grain mask
SylviaWhittle Sep 6, 2024
fbc895c
Add test_trace_image_disordered
SylviaWhittle Sep 6, 2024
5706ba2
Rename test files to not have 'result' in the filenames
SylviaWhittle Sep 6, 2024
6329d2c
Fix dict_almost_equal not being able to handle np.nan equal
SylviaWhittle Sep 9, 2024
211da3b
Fix test_analyse_node_branches by adding singlet_branch_vectors
SylviaWhittle Sep 9, 2024
c15f390
Fix pair_odd_branches not present in class constructor for test_conne…
SylviaWhittle Sep 9, 2024
05038ce
Add test_nodestats_image
SylviaWhittle Sep 9, 2024
b9d8008
Fix nodestats_catenane fixture pair_odd_branches argument not present
SylviaWhittle Sep 9, 2024
3fb2e19
Fix test_analyse_nodes
SylviaWhittle Sep 9, 2024
91b0970
Parametrize test_nodestats_image
SylviaWhittle Sep 9, 2024
6cc4418
Parametrize test_trace_image_disordered
SylviaWhittle Sep 9, 2024
353fe11
Include all test resources by default except under processed
SylviaWhittle Sep 10, 2024
0305f15
Exclude __pycache__ again
SylviaWhittle Sep 10, 2024
94ef1c3
Add replication intermediate parameterisation to test_trace_image_dis…
SylviaWhittle Sep 10, 2024
21eebae
Add missing file for test_analyse_node_branches
SylviaWhittle Sep 10, 2024
5539b8c
Add parameterisation for replication intermediates to test_nodestats_…
SylviaWhittle Sep 10, 2024
169e29c
Add test_ordered_tracing.py
SylviaWhittle Sep 11, 2024
f22b863
Add test_ordered_tracing_image with catenane parameterisation
SylviaWhittle Sep 11, 2024
da4b351
test_ordered_tracing > add parameterization for repliation intermediate
SylviaWhittle Sep 11, 2024
31e1003
Add test_splining
SylviaWhittle Sep 11, 2024
b7f45d2
Add test_splining_image
SylviaWhittle Sep 11, 2024
f57c196
test_splining_image > add replication intermediate parameterization
SylviaWhittle Sep 11, 2024
68bfd37
splining_image: Fix documentation not listing one of the outputs
SylviaWhittle Sep 11, 2024
1d62430
Move dict_almost_equal to io.py due to not being able to import it in…
SylviaWhittle Sep 11, 2024
c0607fe
Add missing test data files
SylviaWhittle Sep 11, 2024
3e0e77a
Add replication intermediate example image
SylviaWhittle Sep 11, 2024
91564b4
Remove tracing test image creation notebook
SylviaWhittle Sep 11, 2024
4c2504d
Linting documentation
SylviaWhittle Sep 11, 2024
0d41419
tests: Removes .pkl and .npy resources no longer used
ns-rse Sep 11, 2024
980f317
Fix find_connections returning list rather than string for csv compat…
SylviaWhittle Sep 12, 2024
eda855e
Don't compress images using 16-bit encoding as it messes with tests d…
SylviaWhittle Sep 12, 2024
da763bc
Delete the test image creation notebook again but keep it in git history
SylviaWhittle Sep 12, 2024
2f89d90
Use TopoStats' grains finding for example cat and RI segmentation
SylviaWhittle Sep 16, 2024
a1d1c5d
Fix ordered_tracing documentation
SylviaWhittle Sep 16, 2024
a46ba5b
Update test catenane and RI with correct config provided by Max
SylviaWhittle Sep 16, 2024
be4ee23
Parametrize all variables for test_trace_image_disordered
SylviaWhittle Sep 17, 2024
715b2ac
Update test ordered tracing to accept the molstats df
SylviaWhittle Sep 17, 2024
956516f
Fix wrong values used for generating images and masks
SylviaWhittle Sep 17, 2024
1d2e5cd
Create parameterisations for pairing odd branches or not and remove o…
SylviaWhittle Sep 17, 2024
aadbeae
Move ordered tracing test files into tests/ordered_tracing/
SylviaWhittle Sep 17, 2024
48930a4
Tidy up nomenclature and condense debug code
SylviaWhittle Sep 18, 2024
2e896d0
Move test files to relevant directory under tests/resources/tracing/
SylviaWhittle Sep 18, 2024
06a6417
Remove old test files and clean up
SylviaWhittle Sep 18, 2024
410fad0
Update ordered tracing and splining tests after Max's fix
SylviaWhittle Sep 18, 2024
ecbbcfb
Update tests again for latest tracing hotfix
SylviaWhittle Sep 18, 2024
dceb548
Remove singularly used fixtures
SylviaWhittle Sep 18, 2024
bcd2777
Remove comments that describe object structure
SylviaWhittle Sep 18, 2024
e9122e4
Remove temp notebook
SylviaWhittle Sep 24, 2024
97160a2
Move the debugging plotting code to a function instead, thanks @ns-rse
SylviaWhittle Sep 30, 2024
3b74e4d
Update nomenclature | disordered tracing | grainstats_additions > gra…
SylviaWhittle Sep 30, 2024
7d3e91a
Update nomenclature | nodestats | grainstats_additions > grainstats
SylviaWhittle Sep 30, 2024
b9761e0
Update nomenclature | ordered tracing | grainstats_additions > grains…
SylviaWhittle Sep 30, 2024
3213a8d
Update nomenclature | splining | grainstats_additions > grainstats
SylviaWhittle Sep 30, 2024
f9d63bb
Remove unused files
SylviaWhittle Sep 30, 2024
8b09629
Fix files removed required by tests
SylviaWhittle Sep 30, 2024
219790c
Documentation linting
SylviaWhittle Sep 30, 2024
8ece357
Better definition of resource paths
SylviaWhittle Sep 30, 2024
91f74fa
Better definition of resource paths
SylviaWhittle Sep 30, 2024
8b69efb
Fix variable names
SylviaWhittle Sep 30, 2024
263f07c
Merge pull request #897 from AFM-SPM/SylviaWhittle/topology_tests
SylviaWhittle Sep 30, 2024
7dcd29d
replace px_2_nm with pixel_to_nanometre across new codebase + chg gra…
MaxGamill-Sheffield Oct 1, 2024
1858abf
change docstring combinatorics to cominatoric
MaxGamill-Sheffield Oct 1, 2024
ae7808e
change all instances of 'combs' to 'combinations'
MaxGamill-Sheffield Oct 1, 2024
ecd2868
get_two_combs() -> list(itertools.combinations()) + 'conf'->'confiden…
MaxGamill-Sheffield Oct 1, 2024
d4d6cae
Update topostats/validation.py
MaxGamill-Sheffield Oct 1, 2024
059a18b
use revert pylint use of rsplit to split for accessing last element
MaxGamill-Sheffield Oct 1, 2024
a324f24
Merge branch 'maxgamill-sheffield/topology' of https://github.com/AFM…
MaxGamill-Sheffield Oct 1, 2024
aa1d8ac
change skan columns to use '_' not '-'
MaxGamill-Sheffield Oct 1, 2024
d0c44ae
now plots ordered trace img when image_set=False
MaxGamill-Sheffield Oct 1, 2024
c9aaf64
Alphebetise dependencies
SylviaWhittle Oct 2, 2024
ed31997
Merge branch 'maxgamill-sheffield/800-better-tracing' into maxgamill-…
SylviaWhittle Oct 2, 2024
3b67b3a
[pre-commit.ci] Fixing issues with pre-commit
pre-commit-ci[bot] Oct 2, 2024
d0751ad
removed -1 pruning.max_length flag
MaxGamill-Sheffield Oct 2, 2024
7001b42
added rainbow / maskcmap to all grains imgs
MaxGamill-Sheffield Oct 2, 2024
9a73090
reduced terminal ouput to just essentials
MaxGamill-Sheffield Oct 2, 2024
fe64eb4
Fix test_analyse_nodes (p2nm -> pixel_to_nm_scaling)
SylviaWhittle Oct 7, 2024
75f1e66
Fix test_nodestats_image
SylviaWhittle Oct 7, 2024
83294e2
Fix test_trace_image_disordered (csv column names)
SylviaWhittle Oct 7, 2024
8bf0b78
Fix test_splining_image (couple extra spline points)
SylviaWhittle Oct 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ dependencies = [
"tifffile",
"AFMReader",
"tqdm",
"topoly",
]

[project.optional-dependencies]
Expand Down
27 changes: 19 additions & 8 deletions topostats/plotting_dictionary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,18 +125,21 @@ mask_grains:
filename: "17-mask_grains"
title: "Mask for Grains"
image_type: "binary"
mask_cmap: "binary"
savefig_dpi: 100
core_set: false
labelled_regions_01:
filename: "18-labelled_regions"
title: "Labelled Regions"
image_type: "binary"
mask_cmap: "rainbow"
ns-rse marked this conversation as resolved.
Show resolved Hide resolved
savefig_dpi: 100
core_set: false
tidied_border:
filename: "19-tidy_borders"
title: "Tidied Borders"
image_type: "binary"
mask_cmap: "rainbow"
savefig_dpi: 100
core_set: false
removed_noise:
Expand Down Expand Up @@ -178,6 +181,7 @@ coloured_boxes:
filename: "25-labelled_image_bboxes"
title: "Labelled Image with Bounding Boxes"
image_type: "binary"
mask_cmap: "rainbow"
savefig_dpi: 100
core_set: false
grain_image:
Expand Down Expand Up @@ -218,23 +222,30 @@ pruned_skeleton:
mask_cmap: "blue"
core_set: false
savefig_dpi: 600
branch_indexes:
filename: "23-segment_indexes"
title: "Skeleton Segment Indexes"
image_type: "non-binary"
mask_cmap: "viridis"
core_set: false
savefig_dpi: 600
branch_types:
filename: "23-branch_types"
title: "Skeleton Branch Types"
filename: "24-segment_types"
title: "Skeleton Segment Types"
image_type: "non-binary"
mask_cmap: "viridis"
core_set: false
savefig_dpi: 600
# Nodestats troubleshooting images
convolved_skeletons:
filename: "24-convolved_skeleton"
filename: "25-convolved_skeleton"
title: "Skeletons and Nodes"
image_type: "non-binary"
mask_cmap: "blue_purple_green"
core_set: false
savefig_dpi: 600
node_centres:
filename: "25-node_centres"
filename: "26-node_centres"
title: "Skeletons and Highlighted Nodes"
image_type: "non-binary"
mask_cmap: "blue_purple_green"
Expand Down Expand Up @@ -276,29 +287,29 @@ ordered_traces:
core_set: false
savefig_dpi: 600
trace_segments:
filename: "26-trace_segments"
filename: "27-trace_segments"
title: "Trace Segments"
image_type: "non-binary"
mask_cmap: "gist_rainbow"
savefig_dpi: 600
core_set: false
over_under:
filename: "27-molecule_crossings"
filename: "28-molecule_crossings"
title: "Visualised Molecule Crossings"
image_type: "non-binary"
mask_cmap: "blue_purple_green"
core_set: false
savefig_dpi: 600
all_molecules:
filename: "28-all_molecules"
filename: "29-all_molecules"
title: "Individual Molecules"
image_type: "non-binary"
mask_cmap: "blue_purple_green"
savefig_dpi: 600
core_set: false
# Splining
fitted_trace:
filename: "27-fitted-traces"
filename: "30-fitted-traces"
title: "Fitted Trace"
image_type: "non-binary"
mask_cmap: "blue_purple_green"
Expand Down
Loading
Loading