Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Patro committed May 12, 2022
2 parents 53aadb8 + a120443 commit 9f992f4
Show file tree
Hide file tree
Showing 18 changed files with 423 additions and 314 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@ env:
jobs:
Formatting:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v2.4.2

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
Expand All @@ -29,21 +32,26 @@ jobs:

build:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest

strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2.4.2
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose

Linting:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v2.4.2

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk
.idea/
77 changes: 45 additions & 32 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,40 +1,51 @@
[package]
name = "alevin-fry"
version = "0.5.0"
authors = ["Avi Srivastava <[email protected]>", "Hirak Sarkar <[email protected]>", "Dongze He <[email protected]>", "Mohsen Zakeri <[email protected]>", "Rob Patro <[email protected]>"]
edition = "2018"
version = "0.5.1"
authors = [
"Avi Srivastava <[email protected]>",
"Hirak Sarkar <[email protected]>",
"Dongze He <[email protected]>",
"Mohsen Zakeri <[email protected]>",
"Rob Patro <[email protected]>",
]
edition = "2021"
description = "A suite of tools for the rapid, accurate and memory-frugal processing single-cell and single-nucleus sequencing data."
license-file = "LICENSE"
readme= "README.md"
readme = "README.md"
repository = "https://github.com/COMBINE-lab/alevin-fry"
homepage = "https://github.com/COMBINE-lab/alevin-fry"
documentation = "https://alevin-fry.readthedocs.io/en/latest/"
include = [
"/libradicl/src/*.rs",
"/src/*.rs",
"/Cargo.toml",
"/README.md",
"/LICENSE",
"/CONTRIBUTING.md",
"/CODE_OF_CONDUCT.md"
"/libradicl/src/*.rs",
"/src/*.rs",
"/Cargo.toml",
"/README.md",
"/LICENSE",
"/CONTRIBUTING.md",
"/CODE_OF_CONDUCT.md",
]
keywords = [
"single-cell",
"preprocessing",
"RNA-seq",
"single-nucleus",
"RNA-velocity",
]
keywords = ["single-cell", "preprocessing",
"RNA-seq", "single-nucleus", "RNA-velocity"]
categories = ["command-line-utilities", "science"]

[workspace]

[dependencies]
# for release
# libradicl = "0.4.4"
# for local development
libradicl = { path = "libradicl", version = "0.4.4" }
[dependencies]
# for local development, look in the libradicl directory
# but when published, pull the specified version
libradicl = { path = "libradicl", version = "0.4.5" }
anyhow = "1.0.57"
arrayvec = "0.7.2"
ahash = "0.7.6"
bincode = "1.3.3"
bstr = "0.2.17"
crossbeam-channel = "0.5.2"
crossbeam-queue = "0.3.4"
crossbeam-channel = "0.5.4"
crossbeam-queue = "0.3.5"
indicatif = "0.16.2"
needletail = "0.4.1"
petgraph = "0.6.0"
Expand All @@ -44,28 +55,30 @@ serde = { version = "1.0.136", features = ["derive"] }
serde_json = "1.0.79"
sprs = "0.11.0"
slog = "2.7.0"
slog-term = "2.8.1"
slog-term = "2.9.0"
slog-async = "2.7.0"
smallvec = "1.8.0"
snap = "1"
snap = "1.0.5"
rand = "0.8.5"
chrono = "0.4.19"
csv = "1.1.6"
mimalloc = { version = "0.1.26", default-features = false }
mimalloc = { version = "0.1.29", default-features = false }
num-format = "0.4.0"
num_cpus = "1.13.0"
num_cpus = "1.13.1"
bio-types = "0.12.1"
itertools = "0.10.1"
itertools = "0.10.3"
thiserror = "1.0.30"
quickersort = "3.0.1"
statrs = "0.15.0"
rust-htslib = { version = "0.38.2", default-features = false, features = ["bzip2", "lzma"] }
sce = { git = "https://github.com/parazodiac/SingleCellExperiment", version = "0.1.1" }
statrs = "0.15.0"
rust-htslib = { version = "0.39.5", default-features = false, features = [
"bzip2",
"lzma",
] }
sce = { git = "https://github.com/parazodiac/SingleCellExperiment", version = "0.1.2" }

clap = { version = ">=3.1.0", features = ["derive", "wrap_help", "cargo"] }
clap = { version = ">=3.1.18", features = ["derive", "wrap_help", "cargo"] }

[profile.release]
#debug = true
lto="thin"
lto = "thin"
#codegen-units=1
opt-level=3
opt-level = 3
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
author = 'Dongze He, Mohsen Zakeri, Hirak Sarkar, Charlotte Soneson, Avi Srivastava, Rob Patro'

# The full version, including alpha/beta/rc tags
release = '0.4.3'
release = '0.5.1'

master_doc = 'index'

Expand Down
43 changes: 21 additions & 22 deletions libradicl/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,41 +1,40 @@
[package]
name = "libradicl"
version = "0.4.4"
authors = ["Avi Srivastava <[email protected]>", "Hirak Sarkar <[email protected]>", "Dongze He <[email protected]>", "Mohsen Zakeri <[email protected]>", "Rob Patro <[email protected]>"]
edition = "2018"
version = "0.4.5"
authors = [
"Avi Srivastava <[email protected]>",
"Hirak Sarkar <[email protected]>",
"Dongze He <[email protected]>",
"Mohsen Zakeri <[email protected]>",
"Rob Patro <[email protected]>",
]
edition = "2021"
description = "support library for alevin-fry"
license-file = "LICENSE"
readme= "README.md"
readme = "README.md"
repository = "https://github.com/COMBINE-lab/alevin-fry"
homepage = "https://github.com/COMBINE-lab/alevin-fry"
documentation = "https://alevin-fry.readthedocs.io/en/latest/"
include = [
"src/*.rs",
"/Cargo.toml",
"/README.md",
"/LICENSE",
include = ["src/*.rs", "/Cargo.toml", "/README.md", "/LICENSE"]
keywords = [
"single-cell",
"preprocessing",
"RNA-seq",
"single-nucleus",
"RNA-velocity",
]
keywords = ["single-cell", "preprocessing",
"RNA-seq", "single-nucleus", "RNA-velocity"]
categories = ["command-line-utilities", "science"]

[dependencies]
snap = "1"
scroll = "0.11.0"
num = "0.4.0"
ahash = "0.7.6"
slog = "2.7.0"
bstr = "0.2.17"
serde = { version = "1.0.136", features = ["derive"] }
csv = "1.1.6"
dashmap = "^5.1.0"
crossbeam-channel = "0.5.2"
bio-types = "0.12.1"
quickersort = "3.0.1"
needletail = "0.4.1"
flate2 = "1.0.22"
smallvec = "1.8.0"
serde_json = "1.0.79"
sprs = "0.11.0"
rust-htslib = { version = "0.38.2", default-features = false, features = ["bzip2", "lzma"] }
sce = { git = "https://github.com/parazodiac/SingleCellExperiment", version = "0.1.1" }
rust-htslib = { version = "0.39.5", default-features = false, features = [
"bzip2",
"lzma",
] }
61 changes: 22 additions & 39 deletions libradicl/src/rad_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,25 +190,25 @@ pub fn decode_int_type_tag(type_id: u8) -> Option<RadIntId> {

fn read_into_u64<T: Read>(reader: &mut T, rt: &RadIntId) -> u64 {
let mut rbuf = [0u8; 8];
let v: u64;
match rt {

let v: u64 = match rt {
RadIntId::U8 => {
reader.read_exact(&mut rbuf[0..1]).unwrap();
v = rbuf.pread::<u8>(0).unwrap() as u64;
rbuf.pread::<u8>(0).unwrap() as u64
}
RadIntId::U16 => {
reader.read_exact(&mut rbuf[0..2]).unwrap();
v = rbuf.pread::<u16>(0).unwrap() as u64;
rbuf.pread::<u16>(0).unwrap() as u64
}
RadIntId::U32 => {
reader.read_exact(&mut rbuf[0..4]).unwrap();
v = rbuf.pread::<u32>(0).unwrap() as u64;
rbuf.pread::<u32>(0).unwrap() as u64
}
RadIntId::U64 => {
reader.read_exact(&mut rbuf[0..8]).unwrap();
v = rbuf.pread::<u64>(0).unwrap();
rbuf.pread::<u64>(0).unwrap()
}
}
};
v
}

Expand Down Expand Up @@ -290,7 +290,7 @@ impl ReadRecord {
}

// make sure these are sorted in this step.
quickersort::sort(&mut rec.refs[..]);
rec.refs.sort_unstable();
rec
}

Expand Down Expand Up @@ -332,7 +332,7 @@ impl ReadRecord {
}

// make sure these are sorted in this step.
quickersort::sort(&mut rec.refs[..]);
rec.refs.sort_unstable();
rec
}
}
Expand Down Expand Up @@ -374,36 +374,19 @@ impl Chunk {
let bc_size = bct.bytes_for_type();

let _na = buf.pread::<u32>(0).unwrap();
let bc;
match bct {
RadIntId::U8 => {
bc = buf.pread::<u8>(na_size).unwrap() as u64;
}
RadIntId::U16 => {
bc = buf.pread::<u16>(na_size).unwrap() as u64;
}
RadIntId::U32 => {
bc = buf.pread::<u32>(na_size).unwrap() as u64;
}
RadIntId::U64 => {
bc = buf.pread::<u64>(na_size).unwrap();
}
}
let umi;
match umit {
RadIntId::U8 => {
umi = buf.pread::<u8>(na_size + bc_size).unwrap() as u64;
}
RadIntId::U16 => {
umi = buf.pread::<u16>(na_size + bc_size).unwrap() as u64;
}
RadIntId::U32 => {
umi = buf.pread::<u32>(na_size + bc_size).unwrap() as u64;
}
RadIntId::U64 => {
umi = buf.pread::<u64>(na_size + bc_size).unwrap();
}
}

let bc = match bct {
RadIntId::U8 => buf.pread::<u8>(na_size).unwrap() as u64,
RadIntId::U16 => buf.pread::<u16>(na_size).unwrap() as u64,
RadIntId::U32 => buf.pread::<u32>(na_size).unwrap() as u64,
RadIntId::U64 => buf.pread::<u64>(na_size).unwrap(),
};
let umi = match umit {
RadIntId::U8 => buf.pread::<u8>(na_size + bc_size).unwrap() as u64,
RadIntId::U16 => buf.pread::<u16>(na_size + bc_size).unwrap() as u64,
RadIntId::U32 => buf.pread::<u32>(na_size + bc_size).unwrap() as u64,
RadIntId::U64 => buf.pread::<u64>(na_size + bc_size).unwrap(),
};
(bc, umi)
}
}
Expand Down
Loading

0 comments on commit 9f992f4

Please sign in to comment.