From 75b79e5947bd121b66b73ba64ebccfbe6ab4628a Mon Sep 17 00:00:00 2001 From: Donald Campbell <125581724+donaldcampbelljr@users.noreply.github.com> Date: Mon, 27 Jan 2025 12:57:44 -0500 Subject: [PATCH 1/5] add reference to issue #57 --- gtars/src/uniwig/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/gtars/src/uniwig/mod.rs b/gtars/src/uniwig/mod.rs index 7b364cc..398c414 100644 --- a/gtars/src/uniwig/mod.rs +++ b/gtars/src/uniwig/mod.rs @@ -728,6 +728,7 @@ fn process_bam( // pre-process chromosomes that are actually in the bam file BEFORE spawning threads. for chromosome in list_of_valid_chromosomes.iter() { let region = chromosome.parse().unwrap(); + //TODO if no .bai file exists, the below line will fail and won't properly tell you WHY it failed, issue #57 let mut reader = bam::io::indexed_reader::Builder::default() .build_from_path(filepath) .unwrap(); From 3698cb786c8159a4f66a27fc763cf59528ad3657 Mon Sep 17 00:00:00 2001 From: Gert Hulselmans Date: Thu, 6 Feb 2025 11:51:49 +0100 Subject: [PATCH 2/5] Allow commented lines in fragment files. Allow commented lines in fragment files as CellRanger-ATAC/CellRangerARC puts some commented lines at the start of the file. --- gtars/src/scoring/fragment_scoring.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gtars/src/scoring/fragment_scoring.rs b/gtars/src/scoring/fragment_scoring.rs index 900b83a..b036bb3 100644 --- a/gtars/src/scoring/fragment_scoring.rs +++ b/gtars/src/scoring/fragment_scoring.rs @@ -45,6 +45,10 @@ pub fn region_scoring_from_fragments( for line in reader.lines() { let line = line?; + if line.starts_with('#') { + continue; + } + // convert to fragment and then get new positions of start and end let fragment = Fragment::from_str(&line)?; From 76b789c59fc50b4fe34174b9b08d3902e5ba48ad Mon Sep 17 00:00:00 2001 From: Donald Campbell <125581724+donaldcampbelljr@users.noreply.github.com> Date: Tue, 11 Feb 2025 08:53:40 -0500 Subject: [PATCH 3/5] bump bigtools to 0.5.5, fix test --- gtars/Cargo.toml | 2 +- gtars/tests/test.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gtars/Cargo.toml b/gtars/Cargo.toml index c114fba..dfc42ce 100644 --- a/gtars/Cargo.toml +++ b/gtars/Cargo.toml @@ -24,7 +24,7 @@ noodles = { version = "0.83.0", features = ["bam", "sam", "bgzf"] } bstr = "1.10.0" rayon = "1.10.0" indicatif = "0.17.8" -bigtools = "0.5.4" +bigtools = "0.5.5" tokio = "1.40.0" os_pipe = "1.2.1" glob = "0.3.1" diff --git a/gtars/tests/test.rs b/gtars/tests/test.rs index aeeb4e3..f8a06d2 100644 --- a/gtars/tests/test.rs +++ b/gtars/tests/test.rs @@ -1037,7 +1037,8 @@ mod tests { let path = PathBuf::from(&tempdir.path()); // For some reason, you cannot chain .as_string() to .unwrap() and must create a new line. - let bwfileheader_path = path.into_os_string().into_string().unwrap(); + let mut bwfileheader_path = path.into_os_string().into_string().unwrap(); + bwfileheader_path.push_str("/final/"); let bwfileheader = bwfileheader_path.as_str(); let smoothsize: i32 = 1; From d761c399ea721b4c61f5001f057c50a2aa266acf Mon Sep 17 00:00:00 2001 From: Donald Campbell <125581724+donaldcampbelljr@users.noreply.github.com> Date: Tue, 11 Feb 2025 08:58:25 -0500 Subject: [PATCH 4/5] update changelog and version to 0.2.1 --- gtars/Cargo.toml | 2 +- gtars/docs/changelog.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gtars/Cargo.toml b/gtars/Cargo.toml index dfc42ce..b4be204 100644 --- a/gtars/Cargo.toml +++ b/gtars/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "gtars" -version = "0.2.0" +version = "0.2.1" edition = "2021" description = "Performance-critical tools to manipulate, analyze, and process genomic interval data. Primarily focused on building tools for geniml - our genomic machine learning python package." license = "MIT" diff --git a/gtars/docs/changelog.md b/gtars/docs/changelog.md index 4749db0..6fd7ed8 100644 --- a/gtars/docs/changelog.md +++ b/gtars/docs/changelog.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.2.1] +- allow comments at the beginning of fragment files +- bump bigtools to 0.5.5, fixing [#74](https://github.com/databio/gtars/issues/74) and [#77](https://github.com/databio/gtars/issues/77) + ## [0.2.0] - add position shift workflow for bam to bw (was previously added for bam to bed) - add scaling argument for bam to bw workflow [#53](https://github.com/databio/gtars/issues/53) From f0dece60d11b0e51b757856ac858c5742cd64dba Mon Sep 17 00:00:00 2001 From: Nathan LeRoy Date: Tue, 11 Feb 2025 09:21:53 -0500 Subject: [PATCH 5/5] bump bindings versions to 0.2.1 --- bindings/python/Cargo.toml | 2 +- bindings/r/src/rust/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bindings/python/Cargo.toml b/bindings/python/Cargo.toml index f34a403..0d68d5d 100644 --- a/bindings/python/Cargo.toml +++ b/bindings/python/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "gtars-py" -version = "0.2.0" +version = "0.2.1" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/bindings/r/src/rust/Cargo.toml b/bindings/r/src/rust/Cargo.toml index 4ed6d07..f9cb742 100644 --- a/bindings/r/src/rust/Cargo.toml +++ b/bindings/r/src/rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = 'gtars-r' -version = '0.2.0' +version = '0.2.1' edition = '2021' [lib]