@sjcrh/proteinpaint-rust 2.120.1 → 2.120.2-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/package.json +2 -2
- package/src/DEanalysis.rs +8 -1
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.120.
|
|
2
|
+
"version": "2.120.2-0",
|
|
3
3
|
"name": "@sjcrh/proteinpaint-rust",
|
|
4
4
|
"description": "Rust-based utilities for proteinpaint",
|
|
5
5
|
"main": "index.js",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"tape": "^5.2.2"
|
|
40
40
|
},
|
|
41
|
-
"pp_release_tag": "v2.120.
|
|
41
|
+
"pp_release_tag": "v2.120.2-0"
|
|
42
42
|
}
|
package/src/DEanalysis.rs
CHANGED
|
@@ -664,6 +664,14 @@ fn main() {
|
|
|
664
664
|
//println!("filtering time:{:?}", filtering_time.elapsed());
|
|
665
665
|
//println!("filtered_matrix_rows:{:?}", filtered_matrix.nrows());
|
|
666
666
|
//println!("filtered_matrix_cols:{:?}", filtered_matrix.ncols());
|
|
667
|
+
if filtered_matrix.nrows() == 0 {
|
|
668
|
+
// Its possible after filtering there might not be any genes left in the matrix, in such a case the rust code must exit gracefully with an error.
|
|
669
|
+
panic!("Number of genes after filtering = 0, cannot proceed any further")
|
|
670
|
+
}
|
|
671
|
+
if filtered_matrix.ncols() == 0 {
|
|
672
|
+
// Its possible after filtering there might not be any samples left in the matrix, in such a case the rust code must exit gracefully with an error.
|
|
673
|
+
panic!("Number of samples after filtering = 0, cannot proceed any further")
|
|
674
|
+
}
|
|
667
675
|
//let cpm_normalization_time = Instant::now();
|
|
668
676
|
let mut normalized_matrix = cpm(&filtered_matrix);
|
|
669
677
|
//println!(
|
|
@@ -1214,7 +1222,6 @@ fn calc_factor_quantile(
|
|
|
1214
1222
|
for i in 0..input_matrix.nrows() {
|
|
1215
1223
|
row_vec.push(input_matrix[(i, j)] as f64);
|
|
1216
1224
|
}
|
|
1217
|
-
//println!("row_vec:{:?}", row_vec);
|
|
1218
1225
|
let quan = calc_quantile(row_vec, P);
|
|
1219
1226
|
//println!("quan:{}", quan);
|
|
1220
1227
|
let num = quan / lib_sizes[j];
|