MCPcopy Create free account
hub / github.com/SingleRust/SingleRust / construct_network_from_panglaodb

Function construct_network_from_panglaodb

src/connectors/omnipath.rs:66–88  ·  view source on GitHub ↗
(
    license: &str,
    tax_id: Option<&str>,
    features: Vec<String>,
    tmin: u32,
)

Source from the content-addressed store, hash-verified

64}
65
66pub fn construct_network_from_panglaodb(
67 license: &str,
68 tax_id: Option<&str>,
69 features: Vec<String>,
70 tmin: u32,
71) -> anyhow::Result<PathwayNetwork> {
72 let df = load_resource("panglaodb", license, tax_id)?;
73 let names: Vec<String> = df
74 .column("cell_type")?
75 .str()?
76 .into_iter()
77 .filter_map(|opt| opt.map(|s| s.to_string()))
78 .collect();
79 let targets: Vec<String> = df
80 .column("genesymbol")?
81 .str()?
82 .into_iter()
83 .filter_map(|opt| opt.map(|s| s.to_string()))
84 .collect();
85 Ok(PathwayNetwork::new_from_vec(
86 names, targets, None, features, tmin,
87 ))
88}

Callers

nothing calls this directly

Calls 1

load_resourceFunction · 0.85

Tested by

no test coverage detected