@sjcrh/proteinpaint-rust 2.81.5 → 2.84.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 CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.81.5",
2
+ "version": "2.84.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.81.5"
41
+ "pp_release_tag": "v2.84.0"
42
42
  }
package/src/DEanalysis.rs CHANGED
@@ -235,7 +235,8 @@ fn input_data_from_text(
235
235
  // Check headers for samples
236
236
  let lines: Vec<&str> = buffer.split('\n').collect::<Vec<&str>>();
237
237
  let total_lines = lines.len();
238
- let headers: Vec<&str> = lines[0].split('\t').collect::<Vec<&str>>();
238
+ let header_binding = lines[0].replace("\r", "");
239
+ let headers: Vec<&str> = header_binding.split('\t').collect::<Vec<&str>>();
239
240
  //println!("headers:{:?}", headers);
240
241
  let mut case_indexes_original: Vec<usize> = Vec::with_capacity(case_list.len());
241
242
  let mut control_indexes_original: Vec<usize> = Vec::with_capacity(control_list.len());
@@ -282,7 +283,7 @@ fn input_data_from_text(
282
283
  let lines_slice = &lines[..];
283
284
  for line_iter in 1..lines_slice.len() - 1 {
284
285
  // Subtracting 1 from total length of lines_slice because the last one will be empty
285
- let line = lines_slice[line_iter];
286
+ let line = lines_slice[line_iter].replace("\r", "");
286
287
  let mut index = 0;
287
288
  for field in line.split('\t').collect::<Vec<&str>>() {
288
289
  if index == gene_name_index.unwrap() {
@@ -377,7 +378,7 @@ fn input_data_from_text(
377
378
  if remainder == thread_num {
378
379
  //println!("buffer:{}", buffer);
379
380
  // Thread analyzing a particular line must have the same remainder as the thread_num, this avoids multiple threads from parsing the same line
380
- let line = lines[line_iter];
381
+ let line = lines[line_iter].replace("\r", "");
381
382
  let mut index = 0;
382
383
  for field in line.split('\t').collect::<Vec<&str>>() {
383
384
  if index == gene_name_index.unwrap() {