This issue stems from #30
Problem
The type column in emln node tables is used inconsistently:
- Bipartite networks (e.g. 1, 2, 6, 14, 17, 21, 23–26, 28–30, 33, 35–40, 43–51, 54, 57–58, 60, 64–65, 69, 71–73, 78):
type has exactly 2 values (e.g. plant|pollinator) representing bipartite set membership.
- Unipartite networks (e.g. 3–5, 7–12, 15, 18–20, 22, 27, 31–32, 34, 42, 47, 52, 55–56, 59, 61–63, 66–68, 70, 74–77):
type has 1 value (taxon or organism) representing a taxonomic label — unrelated to bipartite structure.
- Ambiguous networks (13, 41, 53):
type has 3–12 values representing trophic roles.
The MultilayerViz integration functions (multilayer_to_json, multilayer_to_csv) use type as a fallback for bipartite set membership, which is incorrect for unipartite networks.
Proposed fix
- Rename
type → node_type in all bipartite datasets (2-value type).
- Rename
type → taxon_group (or similar) in all non-bipartite datasets.
- Regenerate all affected
.rda files.
- Remove the
type fallback from multilayer_to_json and multilayer_to_csv — only node_type (and legacy node_group) would be accepted.
Affected datasets
- Bipartite (rename
type → node_type): 1, 2, 6, 14, 17, 21, 23–26, 28–30, 33, 35–40, 43–51, 54, 57–58, 60, 64–65, 69, 71–73, 78
- Non-bipartite taxonomy (rename
type → taxon_group): 3–5, 7–12, 15, 18–20, 22, 27, 31–32, 34, 42, 47, 52, 55–56, 59, 61–63, 66–68, 70, 74–77
- Trophic roles (decide separately): 13, 41, 53
- No
type column (no action): 16
This issue stems from #30
Problem
The
typecolumn inemlnnode tables is used inconsistently:typehas exactly 2 values (e.g.plant|pollinator) representing bipartite set membership.typehas 1 value (taxonororganism) representing a taxonomic label — unrelated to bipartite structure.typehas 3–12 values representing trophic roles.The MultilayerViz integration functions (
multilayer_to_json,multilayer_to_csv) usetypeas a fallback for bipartite set membership, which is incorrect for unipartite networks.Proposed fix
type→node_typein all bipartite datasets (2-valuetype).type→taxon_group(or similar) in all non-bipartite datasets..rdafiles.typefallback frommultilayer_to_jsonandmultilayer_to_csv— onlynode_type(and legacynode_group) would be accepted.Affected datasets
type→node_type): 1, 2, 6, 14, 17, 21, 23–26, 28–30, 33, 35–40, 43–51, 54, 57–58, 60, 64–65, 69, 71–73, 78type→taxon_group): 3–5, 7–12, 15, 18–20, 22, 27, 31–32, 34, 42, 47, 52, 55–56, 59, 61–63, 66–68, 70, 74–77typecolumn (no action): 16