diff --git a/webgestalt_lib/src/methods/multiomics.rs b/webgestalt_lib/src/methods/multiomics.rs index 774e9a9..2fb40c4 100644 --- a/webgestalt_lib/src/methods/multiomics.rs +++ b/webgestalt_lib/src/methods/multiomics.rs @@ -28,16 +28,16 @@ pub enum AnalysisType { ORA, } -pub struct GSEAJob<'a> { - pub gmt: &'a Vec, - pub rank_list: &'a Vec, +pub struct GSEAJob { + pub gmt: Vec, + pub rank_list: Vec, pub config: GSEAConfig, } -pub struct ORAJob<'a> { - pub gmt: &'a Vec, - pub interest_list: &'a AHashSet, - pub reference_list: &'a AHashSet, +pub struct ORAJob { + pub gmt: Vec, + pub interest_list: AHashSet, + pub reference_list: AHashSet, pub config: ORAConfig, } @@ -66,7 +66,7 @@ pub fn multiomic_gsea(jobs: Vec, method: MultiOmicsMethod) -> Vec> = AHashMap::default(); let mut results: Vec> = Vec::new(); for job in jobs { - let res = gsea(job.rank_list.to_vec(), job.gmt.to_vec(), job.config, None); + let res = gsea(job.rank_list, job.gmt, job.config, None); for row in res.iter() { let set = row.set.clone(); phash.entry(set).or_default().push(row.p); @@ -125,12 +125,7 @@ pub fn multiomic_ora(jobs: Vec, method: MultiOmicsMethod) -> Vec> = AHashMap::default(); let mut results: Vec> = Vec::new(); for job in jobs { - let res = get_ora( - job.interest_list, - job.reference_list, - job.gmt.to_vec(), - job.config, - ); + let res = get_ora(&job.interest_list, &job.reference_list, job.gmt, job.config); for row in res.iter() { let set = row.set.clone(); phash.entry(set).or_default().push(row.p);