Skip to content

Commit

Permalink
updating output
Browse files Browse the repository at this point in the history
  • Loading branch information
k3yavi committed Aug 4, 2020
1 parent b85503c commit 99aadd1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
5 changes: 3 additions & 2 deletions libradicl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ indicatif = "0.15.0"
crossbeam-channel = "0.4.3"
petgraph = "0.5.1"
executors = "0.7"
sprs = "0.7.1"
bio-types = "0.6.0"
quickersort = "3.0.1"
needletail = "0.4"
num-format = "0.4.0"
num-format = "0.4.0"
sprs = { git = "https://github.com/k3yavi/sprs" } #"0.8"
sce = { git = "https://github.com/k3yavi/SingleCellExperiment" }
10 changes: 7 additions & 3 deletions libradicl/src/quant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,8 @@ pub fn quantify(
// TODO: guess capacity better
// TODO: in the future, we may not want to hold the
// entire triplet matrix in memory at once?
let mut omat = TriMatI::<f32, u32>::new((num_genes, hdr.num_chunks as usize));
// @k3yavi: Changing this to usize for testing
let mut omat = TriMatI::<f32, usize>::new((num_genes, hdr.num_chunks as usize));

let output_path = std::path::Path::new(&output_dir);
fs::create_dir_all(output_path)?;
Expand Down Expand Up @@ -437,8 +438,11 @@ pub fn quantify(
c += 1;
});

let mat_path = output_path.join("counts.mtx");
sprs::io::write_matrix_market(&mat_path, &omat)?;
//let mat_path = output_path.join("counts.mtx");
//sprs::io::write_matrix_market(&mat_path, &omat)?;

let mat_path = output_path.join("counts.eds.gz");
sce::eds::writer(&mat_path, &omat.to_csr())?;

let gn_path = output_path.join("gene_names.txt");
let gn_file = File::create(gn_path).expect("couldn't create gene name file.");
Expand Down

0 comments on commit 99aadd1

Please sign in to comment.