@sjcrh/proteinpaint-rust 2.129.6-2b2fdc7ee.0 → 2.130.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -3
- package/package.json +1 -1
- package/src/gdcGRIN2.rs +482 -136
- package/src/test_cerno.rs +102 -21185
- package/src/wilcoxon.rs +5 -16
package/src/wilcoxon.rs
CHANGED
|
@@ -48,6 +48,7 @@ use serde::{Deserialize, Serialize};
|
|
|
48
48
|
use std::io;
|
|
49
49
|
|
|
50
50
|
mod stats_functions; // Import Wilcoxon function
|
|
51
|
+
#[cfg(test)]
|
|
51
52
|
mod test_examples; // Contains examples to test the wilcoxon rank sum test
|
|
52
53
|
|
|
53
54
|
#[derive(Debug, Serialize, Deserialize)]
|
|
@@ -101,14 +102,8 @@ fn main() {
|
|
|
101
102
|
if vec1.len() == 0 || vec2.len() == 0 {
|
|
102
103
|
// If one of the vectors has a length of zero, wilcoxon test is not performed and a pvalue of NULL is given.
|
|
103
104
|
output_string += &serde_json::to_string(&OutputJson {
|
|
104
|
-
group1_id: json_string[i]["group1_id"]
|
|
105
|
-
|
|
106
|
-
.unwrap()
|
|
107
|
-
.to_string(),
|
|
108
|
-
group2_id: json_string[i]["group2_id"]
|
|
109
|
-
.as_str()
|
|
110
|
-
.unwrap()
|
|
111
|
-
.to_string(),
|
|
105
|
+
group1_id: json_string[i]["group1_id"].as_str().unwrap().to_string(),
|
|
106
|
+
group2_id: json_string[i]["group2_id"].as_str().unwrap().to_string(),
|
|
112
107
|
group1_values: vec1,
|
|
113
108
|
group2_values: vec2,
|
|
114
109
|
pvalue: None,
|
|
@@ -129,14 +124,8 @@ fn main() {
|
|
|
129
124
|
//}
|
|
130
125
|
//println!("pvalue:{}", pvalue);
|
|
131
126
|
output_string += &serde_json::to_string(&OutputJson {
|
|
132
|
-
group1_id: json_string[i]["group1_id"]
|
|
133
|
-
|
|
134
|
-
.unwrap()
|
|
135
|
-
.to_string(),
|
|
136
|
-
group2_id: json_string[i]["group2_id"]
|
|
137
|
-
.as_str()
|
|
138
|
-
.unwrap()
|
|
139
|
-
.to_string(),
|
|
127
|
+
group1_id: json_string[i]["group1_id"].as_str().unwrap().to_string(),
|
|
128
|
+
group2_id: json_string[i]["group2_id"].as_str().unwrap().to_string(),
|
|
140
129
|
group1_values: vec1,
|
|
141
130
|
group2_values: vec2,
|
|
142
131
|
pvalue: Some(pvalue),
|