Skip to content

Commit 86ce10d

Browse files
AroneySwwood
authored andcommitted
update galah to include contig clustering
1 parent 7eb2a26 commit 86ce10d

File tree

5 files changed

+71
-9
lines changed

5 files changed

+71
-9
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ version-compare = "0.2.0"
3232
# bird_tool_utils = "0.5.0"
3333
bird_tool_utils = { git = "https://github.com/wwood/bird_tool_utils" }
3434
# bird_tool_utils = { path = "../bird_tool_utils" }
35-
galah = "0.4.0"
36-
# galah = { git = "https://github.com/wwood/galah" }
35+
# galah = "0.4.0"
36+
galah = { git = "https://github.com/wwood/galah", rev = "a351847532c82a22743fd8e6da5643689960d46a" }
3737
bird_tool_utils-man = "0.4.0"
3838
roff = "0.2.*"
3939
needletail = "0.5.*"

pixi.lock

Lines changed: 34 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pixi.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ samtools = ">=1.9"
1818
coreutils = "*"
1919
minimap2 = ">=2.24,<2.29" # Restrict due to test_no_zeros_bug1_minimap2 failing with slightly different values
2020
bwa = ">=0.7.17"
21+
skani = ">=0.2.2"
2122
fastani = ">=1.3"
2223
extern = "*"
2324

src/bin/coverm.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,8 @@ fn dereplicate(m: &clap::ArgMatches, genome_fasta_files: &Vec<String>) -> Vec<St
813813
// Generate clusterer and check for dependencies
814814
let clusterer = galah::cluster_argument_parsing::generate_galah_clusterer(
815815
genome_fasta_files,
816+
&None, // No additional genome files
817+
false, // Not using a different mode
816818
m,
817819
&coverm::cli::COVERM_CLUSTER_COMMAND_DEFINITION,
818820
)
@@ -843,6 +845,7 @@ fn dereplicate(m: &clap::ArgMatches, genome_fasta_files: &Vec<String>) -> Vec<St
843845
cluster_outputs,
844846
&cluster_indices,
845847
&clusterer.genome_fasta_paths,
848+
None, // No additional output parameter needed
846849
);
847850

848851
reps

src/cli.rs

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,13 @@ lazy_static! {
2929
dereplication_ani_argument: "dereplication-ani".to_string(),
3030
dereplication_prethreshold_ani_argument: "dereplication-prethreshold-ani".to_string(),
3131
dereplication_quality_formula_argument: "dereplication-quality-formula".to_string(),
32-
dereplication_cluster_method_argument: "dereplication-cluster-method".to_string(),
3332
dereplication_precluster_method_argument: "dereplication-precluster-method".to_string(),
33+
dereplication_cluster_method_argument: "dereplication-cluster-method".to_string(),
3434
dereplication_aligned_fraction_argument: "dereplication-aligned-fraction".to_string(),
35+
dereplication_small_genomes_argument: "dereplication-small-genomes".to_string(),
36+
dereplication_cluster_contigs_argument: "dereplication-cluster-contigs".to_string(),
37+
dereplication_small_contigs_argument: "dereplication-small-contigs".to_string(),
38+
dereplication_large_contigs_argument: "dereplication-large-contigs".to_string(),
3539
dereplication_fraglen_argument: "dereplication-fragment-length".to_string(),
3640
dereplication_output_cluster_definition_file: "dereplication-output-cluster-definition"
3741
.to_string(),
@@ -1470,24 +1474,44 @@ Ben J. Woodcroft <benjwoodcroft near gmail.com>
14701474
])
14711475
.default_value(galah::DEFAULT_QUALITY_FORMULA),
14721476
)
1473-
.arg(
1474-
Arg::new("dereplication-cluster-method")
1475-
.long("dereplication-cluster-method")
1476-
.value_parser(galah::CLUSTER_METHODS)
1477-
.default_value(galah::DEFAULT_CLUSTER_METHOD),
1478-
)
14791477
.arg(
14801478
Arg::new("dereplication-precluster-method")
14811479
.long("dereplication-precluster-method")
14821480
.value_parser(galah::PRECLUSTER_METHODS)
14831481
.default_value(galah::DEFAULT_PRECLUSTER_METHOD),
14841482
)
1483+
.arg(
1484+
Arg::new("dereplication-cluster-method")
1485+
.long("dereplication-cluster-method")
1486+
.value_parser(galah::CLUSTER_METHODS)
1487+
.default_value(galah::DEFAULT_CLUSTER_METHOD),
1488+
)
14851489
.arg(
14861490
Arg::new("dereplication-aligned-fraction")
14871491
.long("dereplication-aligned-fraction")
14881492
.default_value(galah::DEFAULT_ALIGNED_FRACTION)
14891493
.value_parser(clap::value_parser!(f32)),
14901494
)
1495+
.arg(
1496+
Arg::new("dereplication-small-genomes")
1497+
.long("dereplication-small-genomes")
1498+
.action(clap::ArgAction::SetTrue),
1499+
)
1500+
.arg(
1501+
Arg::new("dereplication-cluster-contigs")
1502+
.long("dereplication-cluster-contigs")
1503+
.action(clap::ArgAction::SetTrue),
1504+
)
1505+
.arg(
1506+
Arg::new("dereplication-small-contigs")
1507+
.long("dereplication-small-contigs")
1508+
.action(clap::ArgAction::SetTrue),
1509+
)
1510+
.arg(
1511+
Arg::new("dereplication-large-contigs")
1512+
.long("dereplication-large-contigs")
1513+
.action(clap::ArgAction::SetTrue),
1514+
)
14911515
.arg(
14921516
Arg::new("dereplication-fragment-length")
14931517
.long("dereplication-fragment-length")

0 commit comments

Comments
 (0)