(
license: &str,
tax_id: Option<&str>,
features: Vec<String>,
tmin: u32,
)
| 64 | } |
| 65 | |
| 66 | pub 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 | } |
nothing calls this directly
no test coverage detected