diff --git a/templates/7_fill_anchors.tera.sh b/templates/7_fill_anchors.tera.sh index a4061df..e226104 100644 --- a/templates/7_fill_anchors.tera.sh +++ b/templates/7_fill_anchors.tera.sh @@ -31,7 +31,7 @@ mkdir -p 7_fill_anchors log_info "overlap: between anchor-long" -dazz overlap2 \ +anchr overlap2 \ --parallel {{ opt.parallel }} \ ${FILE_ANCHOR} \ ${FILE_LONG} \ @@ -40,7 +40,7 @@ dazz overlap2 \ cd 7_fill_anchors -CONTIG_COUNT=$(faops n50 -H -N 0 -C anchor.fasta) +CONTIG_COUNT=$(hnsm n50 -H -N 0 -C anchor.fasta) log_debug "contigs: ${CONTIG_COUNT}" log_info "group: anchor-long" @@ -84,7 +84,7 @@ log_info "Build contigs" cat \ group/non_grouped.fasta \ group/*.contig.fasta | - faops filter -l 0 -a 1000 stdin contig.fasta + hnsm filter -a 1000 stdin -o contig.fasta log_info Done. diff --git a/tests/cli_pl.rs b/tests/cli_pl.rs index 18abe7c..2cf0dbe 100644 --- a/tests/cli_pl.rs +++ b/tests/cli_pl.rs @@ -78,16 +78,15 @@ fn command_overlap2() -> anyhow::Result<()> { eprintln!("bin = {:#?}", bin); } - let curdir = std::env::current_dir().unwrap(); - let tempdir = tempfile::TempDir::new().unwrap(); - assert!(std::env::set_current_dir(&tempdir).is_ok()); let mut cmd = Command::cargo_bin("anchr")?; let output = cmd .arg("overlap2") .arg("tests/ovlpr/1_4.anchor.fasta") .arg("tests/ovlpr/1_4.pac.fasta") + .arg("-d") + .arg(tempdir.path().display().to_string()) .output() .unwrap(); let stdout = String::from_utf8(output.stdout).unwrap(); @@ -97,7 +96,6 @@ fn command_overlap2() -> anyhow::Result<()> { assert!(&tempdir.path().join("anchorLong.db").is_file()); assert!(&tempdir.path().join("anchorLong.ovlp.tsv").is_file()); - assert!(std::env::set_current_dir(&curdir).is_ok()); assert!(tempdir.close().is_ok()); Ok(())