Skip to content

Commit be61a16

Browse files
rob-pclaude
andcommitted
Bump minimum piscem to 0.18.0 and alevin-fry to 0.13.0, fix clippy warnings
Update all internal version checks and test mocks: - piscem: >=0.18.0 (was >=0.7.0/0.11.0/0.12.2 in various locations) - alevin-fry: >=0.13.0 (was >=0.11.2) — required for multi-barcode collation fix (trait-based grouping key, record-based sample identity) Fix all clippy warnings: - &Vec<PathBuf> -> &[PathBuf] in add_fragment_library_to_piscem - match { Ok => Some, Err => None } -> .ok() in prog_utils - Unneeded late initialization in indexing.rs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 9779218 commit be61a16

8 files changed

Lines changed: 27 additions & 33 deletions

File tree

src/atac/index.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub(crate) fn piscem_index(af_home_path: &Path, opts: &IndexOpts) -> anyhow::Res
1919

2020
match prog_utils::check_version_constraints(
2121
"piscem",
22-
">=0.11.0, <1.0.0",
22+
">=0.18.0, <1.0.0",
2323
&piscem_prog_info.version,
2424
) {
2525
Ok(af_ver) => info!("found piscem version {:#}, proceeding", af_ver),

src/atac/process.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ pub(crate) fn check_progs<P: AsRef<Path>>(
164164

165165
match prog_utils::check_version_constraints(
166166
"alevin-fry",
167-
">=0.11.2, <1.0.0",
167+
">=0.13.0, <1.0.0",
168168
&af_prog_info.version,
169169
) {
170170
Ok(af_ver) => info!("found alevin-fry version {:#}, proceeding", af_ver),
@@ -178,7 +178,7 @@ pub(crate) fn check_progs<P: AsRef<Path>>(
178178

179179
match prog_utils::check_version_constraints(
180180
"piscem",
181-
">=0.11.0, <1.0.0",
181+
">=0.18.0, <1.0.0",
182182
&piscem_prog_info.version,
183183
) {
184184
Ok(piscem_ver) => info!("found piscem version {:#}, proceeding", piscem_ver),
@@ -255,10 +255,10 @@ pub(crate) fn map_reads(af_home_path: &Path, opts: &ProcessOpts) -> anyhow::Resu
255255
add_read_args(&mut piscem_map_cmd, opts)?;
256256

257257
// if the user is requesting a mapping option that required
258-
// piscem version >= 0.7.0, ensure we have that
258+
// piscem version >= 0.18.0, ensure we have that
259259
match prog_utils::check_version_constraints(
260260
"piscem",
261-
">=0.11.0, <1.0.0",
261+
">=0.18.0, <1.0.0",
262262
&piscem_prog_info.version,
263263
) {
264264
Ok(_piscem_ver) => {
@@ -267,9 +267,9 @@ pub(crate) fn map_reads(af_home_path: &Path, opts: &ProcessOpts) -> anyhow::Resu
267267
Err(_) => {
268268
info!(
269269
r#"
270-
Simpleaf is currently using piscem version {}, but you must be using version >= 0.11.0 in order to use the
271-
mapping options specific to this, or later versions. If you wish to use these options, please upgrade your
272-
piscem version or, if you believe you have a sufficiently new version installed, update the executable
270+
Simpleaf is currently using piscem version {}, but you must be using version >= 0.18.0 in order to use the
271+
mapping options specific to this, or later versions. If you wish to use these options, please upgrade your
272+
piscem version or, if you believe you have a sufficiently new version installed, update the executable
273273
being used by simpleaf"#,
274274
&piscem_prog_info.version
275275
);

src/core/context.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ mod tests {
3535
let td = tempdir().expect("failed to create tempdir");
3636
let af_info = json!({
3737
"prog_info": {
38-
"piscem": {"exe_path": "/bin/echo", "version": "0.12.2"},
39-
"alevin_fry": {"exe_path": "/bin/echo", "version": "0.11.2"},
38+
"piscem": {"exe_path": "/bin/echo", "version": "0.18.0"},
39+
"alevin_fry": {"exe_path": "/bin/echo", "version": "0.13.0"},
4040
"macs": null
4141
}
4242
});

src/simpleaf_commands/indexing.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -542,9 +542,6 @@ pub fn build_ref_and_index(af_home_path: &Path, opts: IndexOpts) -> anyhow::Resu
542542
)?;
543543

544544
let output_index_dir = output.join("index");
545-
let index_duration;
546-
let index_cmd_string: String;
547-
548545
if rp.piscem.is_none() {
549546
bail!(
550547
"The construction of a piscem index was requested, but a valid piscem executable was not available. \n\
@@ -599,7 +596,7 @@ pub fn build_ref_and_index(af_home_path: &Path, opts: IndexOpts) -> anyhow::Resu
599596
if let Some(decoy_paths) = opts.decoy_paths {
600597
match prog_utils::check_version_constraints(
601598
"piscem",
602-
">=0.7.0, <1.0.0",
599+
">=0.18.0, <1.0.0",
603600
&piscem_prog_info.version,
604601
) {
605602
Ok(_piscem_ver) => {
@@ -613,22 +610,22 @@ pub fn build_ref_and_index(af_home_path: &Path, opts: IndexOpts) -> anyhow::Resu
613610
Err(_) => {
614611
warn!(
615612
r#"
616-
You requested to build a poison k-mer table with {:?}, but you must be using piscem version >= 0.7.0
617-
to use this feature. Simpleaf is currently using version {}. Please upgrade your piscem version or,
618-
if you believe you have a sufficiently new version installed, update the executable being used by
613+
You requested to build a poison k-mer table with {:?}, but you must be using piscem version >= 0.18.0
614+
to use this feature. Simpleaf is currently using version {}. Please upgrade your piscem version or,
615+
if you believe you have a sufficiently new version installed, update the executable being used by
619616
simpleaf"#,
620617
decoy_paths, &piscem_prog_info.version
621618
);
622619
}
623620
}
624621
}
625622

626-
index_cmd_string = prog_utils::get_cmd_line_string(&piscem_index_cmd);
623+
let index_cmd_string = prog_utils::get_cmd_line_string(&piscem_index_cmd);
627624
info!("piscem build cmd : {}", index_cmd_string);
628625

629626
let index_start = Instant::now();
630627
let _cres = exec::run_checked(&mut piscem_index_cmd, "piscem index command")?;
631-
index_duration = index_start.elapsed();
628+
let index_duration = index_start.elapsed();
632629

633630
let mut t2g_out_path: Option<PathBuf> = None;
634631
if let Some(t2g_file) = reference_stage.t2g.clone() {

src/simpleaf_commands/quant.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ fn run_mapping_stage(
434434

435435
match prog_utils::check_version_constraints(
436436
"piscem",
437-
">=0.7.0, <1.0.0",
437+
">=0.18.0, <1.0.0",
438438
&piscem_prog_info.version,
439439
) {
440440
Ok(_piscem_ver) => {
@@ -443,9 +443,9 @@ fn run_mapping_stage(
443443
Err(_) => {
444444
info!(
445445
r#"
446-
Simpleaf is currently using piscem version {}, but you must be using version >= 0.7.0 in order to use the
447-
mapping options specific to this, or later versions. If you wish to use these options, please upgrade your
448-
piscem version or, if you believe you have a sufficiently new version installed, update the executable
446+
Simpleaf is currently using piscem version {}, but you must be using version >= 0.18.0 in order to use the
447+
mapping options specific to this, or later versions. If you wish to use these options, please upgrade your
448+
piscem version or, if you believe you have a sufficiently new version installed, update the executable
449449
being used by simpleaf"#,
450450
&piscem_prog_info.version
451451
);

src/utils/af_utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,8 @@ Please consider removing and re-adding this chemistry with a valid permit list."
535535
/// with the piscem mapping command `quant_cmd`.
536536
pub fn add_fragment_library_to_piscem(
537537
fragment_geometry_str: &str,
538-
reads1: &Vec<PathBuf>,
539-
reads2: &Vec<PathBuf>,
538+
reads1: &[PathBuf],
539+
reads2: &[PathBuf],
540540
quant_cmd: &mut std::process::Command,
541541
) -> Result<()> {
542542
let reads1_str = reads1

src/utils/prog_utils.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,9 @@ pub struct ReqProgs {
230230

231231
impl ReqProgs {
232232
pub fn issue_recommended_version_messages(&self) {
233-
// Currently (2/08/2025) want to recommend piscem >= 0.12.2
233+
// Currently (3/21/2026) want to recommend piscem >= 0.18.0
234234
if let Some(ref piscem_info) = self.piscem {
235-
let desired_ver = VersionReq::parse(">=0.12.2").unwrap();
235+
let desired_ver = VersionReq::parse(">=0.18.0").unwrap();
236236
let current_ver = Version::parse(&piscem_info.version).unwrap();
237237
if desired_ver.matches(&current_ver) {
238238
// nothing to do here
@@ -364,10 +364,7 @@ pub fn get_required_progs_from_paths(
364364

365365
let opt_piscem = match piscem_exe {
366366
Some(p) => Some(p),
367-
None => match get_which_executable("piscem") {
368-
Ok(p) => Some(p),
369-
Err(_e) => None,
370-
},
367+
None => get_which_executable("piscem").ok(),
371368
};
372369

373370
let alevin_fry = match alevin_fry_exe {

tests/phase1_regressions.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ fn legacy_salmon_index_metadata_is_rejected_with_migration_error() {
1616

1717
let af_info = json!({
1818
"prog_info": {
19-
"piscem": {"exe_path": "/bin/echo", "version": "0.12.2"},
20-
"alevin_fry": {"exe_path": "/bin/echo", "version": "0.11.2"},
19+
"piscem": {"exe_path": "/bin/echo", "version": "0.18.0"},
20+
"alevin_fry": {"exe_path": "/bin/echo", "version": "0.13.0"},
2121
"macs": null
2222
}
2323
});

0 commit comments

Comments
 (0)