webgestalt_lib 0.3.2

Library for computing enrichment for different analytes using ORA or GSEA.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/// Collection of utilities to save results to a file/folder


use std::fs::File;
use std::io::prelude::*;


pub fn save_nta(
    path: String,
    result: crate::methods::nta::NTAResult,
) -> Result<(), Box<std::io::Error>> {
    let mut file = File::create(path)?;
    let json = serde_json::to_string(&result).unwrap();
    file.write_all(json.as_bytes())?;
    Ok(())
}