Repository: gbouras13/hybracter (language: python)

Issue:
[Feature request] Add r1041_e82_400bps_bacterial_methylation to --medakaModel
Hi @gbouras13 ,

We analyzed some samples using the latest version, v0.10.1, but encountered an issue where `medaka` fails to detect the model version, defaulting instead to `r1041_e82_400bps_sup_v5.0.0`.

```
[Tue Dec  3 15:11:04 2024]
Finished job 18.
21 of 29 steps (72%) done
Attempting to automatically select model version.
WARNING: Failed to detect a model version, will use default: 'r1041_e82_400bps_sup_v5.0.0'
Checking program versions
This is medaka 2.0.1
Program    Version    Required   Pass     
bcftools   1.21       1.11       True     
bgzip      1.21       1.11       True     
minimap2   2.28       2.11       True     
samtools   1.21       1.11       True     
tabix      1.21       1.11       True     
WARNING: Output 03_assembly/03.1_hybracter/BA00000413/processing/incomplete/medaka_incomplete/BA00000413 already exists, may use old results.
Aligning basecalls to draft
Running medaka consensus
Polished assembly written to 03_assembly/03.1_hybracter/BA00000413/processing/incomplete/medaka_incomplete/BA00000413/consensus.fasta, have a nice day.

```

We have also attached the log file for your reference:
[hybracter.log](https://github.com/user-attachments/files/17988826/hybracter.log)

In addition, we tried specifying the model `--medakaModel r1041_e82_400bps_bacterial_methylation`, but it appears that `hybracter` doesn't support this model.

```
(hybracter-v0.10.1) user@user-System-Product-Name:~$ hybracter long-single -l 02_fastq/BA00000413.fastq.gz -s BA00000413 -c 5200000 -o 03_assembly/03.1_hybracter/BA00000413 -t 64 --subsample_depth 120 --min_depth 100 --medakaModel r1041_e82_400bps_bacterial_methylation --medaka_override

hybracter version 0.10.1


 _           _                    _            
| |__  _   _| |__  _ __ __ _  ___| |_ ___ _ __ 
| '_ \| | | | '_ \| '__/ _` |/ __| __/ _ \ '__|
| | | | |_| | |_) | | | (_| | (__| ||  __/ |   
|_| |_|\__, |_.__/|_|  \__,_|\___|\__\___|_|   
       |___/


Usage: hybracter long-single [OPTIONS] [SNAKE_ARGS]...
Try 'hybracter long-single -h' for help.

Error: Invalid value for '--medakaModel': 'r1041_e82_400bps_bacterial_methylation' is not one of 'r1041_e82_400bps_sup_v5.0.0', 'r1041_e82_400bps_hac_v5.0.0', 'r1041_e82_400bps_hac_v4.3.0', 'r1041_e82_400bps_sup_v4.3.0', 'r1041_e82_400bps_hac_v4.2.0', 'r1041_e82_400bps_sup_v4.2.0', 'r941_sup_plant_g610', 'r941_min_fast_g507', 'r941_prom_fast_g507', 'r941_min_fast_g303', 'r941_min_high_g303', 'r941_min_high_g330', 'r941_prom_fast_g303', 'r941_prom_high_g303', 'r941_prom_high_g330', 'r941_min_high_g344', 'r941_min_high_g351', 'r941_min_high_g360', 'r941_prom_high_g344', 'r941_prom_high_g360', 'r941_prom_high_g4011', 'r10_min_high_g303', 'r10_min_high_g340', 'r103_min_high_g345', 'r103_min_high_g360', 'r103_prom_high_g360', 'r103_fast_g507', 'r103_hac_g507', 'r103_sup_g507', 'r104_e81_fast_g5015', 'r104_e81_sup_g5015', 'r104_e81_hac_g5015', 'r104_e81_sup_g610', 'r1041_e82_400bps_hac_g615', 'r1041_e82_400bps_fast_g615', 'r1041_e82_400bps_fast_g632', 'r1041_e82_260bps_fast_g632', 'r1041_e82_400bps_hac_g632', 'r1041_e82_400bps_sup_g615', 'r1041_e82_260bps_hac_g632', 'r1041_e82_260bps_sup_g632', 'r1041_e82_400bps_hac_v4.0.0', 'r1041_e82_400bps_sup_v4.0.0', 'r1041_e82_260bps_hac_v4.0.0', 'r1041_e82_260bps_sup_v4.0.0', 'r1041_e82_260bps_hac_v4.1.0', 'r1041_e82_260bps_sup_v4.1.0', 'r1041_e82_400bps_hac_v4.1.0', 'r1041_e82_400bps_sup_v4.1.0', 'r941_min_high_g340_rle', 'r941_min_hac_g507', 'r941_min_sup_g507', 'r941_prom_hac_g507', 'r941_prom_sup_g507', 'r941_e81_fast_g514', 'r941_e81_hac_g514', 'r941_e81_sup_g514'.
```

Could you please let us know if it is possible to add the `r1041_e82_400bps_bacterial_methylation` model to the `--medakaModel` list?

Thank you very much!

Best regards,
Eddie




Discussion / hints:
@llk578496 - certainly - this is an easy and useful request, I'll get it on it soon.

George

Fix patch:
diff --git a/HISTORY.md b/HISTORY.md
index 39104c86..57787b71 100644
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -1,5 +1,14 @@
 # History
 
+## v0.11.0 Updates (4 December 2024)
+
+* Replaces [kmc](https://github.com/refresh-bio/KMC) with [lrge](https://github.com/mbhall88/lrge) when using `--auto`, a much faster tool designed for the purpose of estimating genome size from long reads. It is very very fast and robust. 
+    * If you input has more than 5000 long reads (it should!), [lrge](https://github.com/mbhall88/lrge) will run in default settings. If it has under this, then it will run a (slightly) more computationally expensive all-vs-all mode with all input reads. In practice, if you have such low read counts, you should take all downstream analysis (inclduing lrge and hybracter) with a lot of caution anyway. 
+    * According to the [preprint](https://www.biorxiv.org/content/10.1101/2024.11.27.625777v1) (and my less exhaustive testing), lrge is more accurate and much faster than kmc, but I would still be careful using it on data that has lower quality than < Q15. 
+* Nothing else changes - the estimated chromosome size used by Hybracter will still be 80% of the estimate, as it needs to account for plasmids
+* Adds `r1041_e82_400bps_bacterial_methylation` as an option for `--medakaModel` thanks to [this issue](https://github.com/gbouras13/hybracter/issues/108).
+* Note this won't work if you run `hybracter` on a Mac (as medaka v2 is not available)
+
 ## v0.10.1 Updates (14 November 2024)
 
 * Adds retry functionality for dnaapler with 1 thread if there is an error - for some genomes on some systems, [it was observed](https://github.com/gbouras13/hybracter/issues/54) that using the default resources (8 threads, 16GB RAM) will lead to an error in dnaapler. 
diff --git a/README.md b/README.md
index 7d12da25..9c431636 100644
--- a/README.md
+++ b/README.md
@@ -30,6 +30,7 @@
   - [Pipeline](#pipeline)
   - [Benchmarking](#benchmarking)
   - [Recent Updates](#recent-updates)
+    - [v0.11.0 Updates (4 December 2024)](#v0110-updates-4-december-2024)
     - [v0.10.0 Updates (17 October 2024)](#v0100-updates-17-october-2024)
     - [v0.9.0 Updates (18 September 2024)](#v090-updates-18-september-2024)
   - [Why Would You Run Hybracter?](#why-would-you-run-hybracter)
@@ -173,6 +174,15 @@ To summarise the conclusions:
 
 ## Recent Updates
 
+### v0.11.0 Updates (4 December 2024)
+
+* Replaces [kmc](https://github.com/refresh-bio/KMC) with [lrge](https://github.com/mbhall88/lrge) when using `--auto`, a much faster tool designed for the purpose of estimating genome size from long reads. It is very very fast and robust. 
+    * If your input has more than 5000 long reads (it should!), [lrge](https://github.com/mbhall88/lrge) will run in default settings. If it has under this, then it will run a (slightly) more computationally expensive all-vs-all mode with all input reads. In practice, if you have such low read counts, you should take all downstream analysis (inclduing lrge and hybracter) with a lot of caution anyway. 
+    * According to the [preprint](https://www.biorxiv.org/content/10.1101/2024.11.27.625777v1) (and my less exhaustive testing), lrge is more accurate and much faster than kmc, but I would still be careful using it on data that has lower quality than < Q15. 
+* Nothing else changes - the estimated chromosome size used by Hybracter will still be 80% of the estimate, as it needs to account for plasmids
+* Adds `r1041_e82_400bps_bacterial_methylation` as an option for `--medakaModel` thanks to [this issue](https://github.com/gbouras13/hybracter/issues/108).
+* Note this won't work if you run `hybracter` on a Mac (as medaka v2 is not available)
+
 ### v0.10.0 Updates (17 October 2024)
 
 * Updates Medaka to v2.0.1, implementing the `--bacteria` option by default.
diff --git a/docs/citation.md b/docs/citation.md
index 587870e6..e8a9ac66 100644
--- a/docs/citation.md
+++ b/docs/citation.md
@@ -54,5 +54,5 @@ Pypolca:
 Snakemake:
 * Mölder F, Jablonski KP, Letcher B et al. Sustainable data analysis with Snakemake [version 1; peer review: 1 approved, 1 approved with reservations]. F1000Research 2021, 10:33 (https://doi.org/10.12688/f1000research.29032.1).
 
-KMC:
-* Marek Kokot, Maciej Długosz, Sebastian Deorowicz, KMC 3: counting and manipulating k-mer statistics, Bioinformatics, Volume 33, Issue 17, 01 September 2017, Pages 2759–2761, (https://doi.org/10.1093/bioinformatics/btx304).
+lrge:
+* Hall, M. B.; Coin, L. J. M. Genome Size Estimation from Long Read Overlaps. bioRxiv 2024, 2024.11.27.625777. doi:10.1101/2024.11.27.625777.
diff --git a/docs/index.md b/docs/index.md
index d41c0eaf..240aadc9 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -13,7 +13,7 @@ It scales massively using the embarassingly parallel power of HPC and Snakemake
 
 ![Image](hybracter.png)
 
-- A. Reads are quality controlled and subsampled with [Filtlong](https://github.com/rrwick/Filtlong), [Porechop](https://github.com/rrwick/Porechop), [fastp](https://github.com/OpenGene/fastp), [Seqkit](https://github.com/shenwei356/seqkit) and optionally contaminant removal using modules from [trimnami](https://github.com/beardymcjohnface/Trimnami). Chromosome length is optionally estimated with [kmc](https://github.com/refresh-bio/KMC).
+- A. Reads are quality controlled and subsampled with [Filtlong](https://github.com/rrwick/Filtlong), [Porechop](https://github.com/rrwick/Porechop), [fastp](https://github.com/OpenGene/fastp), [Seqkit](https://github.com/shenwei356/seqkit) and optionally contaminant removal using modules from [trimnami](https://github.com/beardymcjohnface/Trimnami). Chromosome length is optionally estimated with [lrge](https://github.com/mbhall88/lrge).
 - B. Long-read assembly is conducted with [Flye](https://github.com/fenderglass/Flye). Each sample is clssified if the chromosome(s) were assembled (marked as 'complete') or not (marked as 'incomplete') based on the given minimum chromosome length.
 - C. For complete isolates, plasmid recovery with [Plassembler](https://github.com/gbouras13/plassembler).
 - D. For all isolates, long read polishing with [Medaka](https://github.com/nanoporetech/medaka).
diff --git a/docs/output.md b/docs/output.md
index 5c8a3c84..474c2471 100644
--- a/docs/output.md
+++ b/docs/output.md
@@ -93,7 +93,7 @@ The `processing` directory will contain a number of intermediate directories who
 
 ##### 2. `qc` directory
 
- This directory will contain the filtered, trimmed and contaminant removed FASTQ reads (where applicable) for each sample, along with the kmc estimated chromosome size (which will be used if you specify `--auto`)
+ This directory will contain the filtered, trimmed and contaminant removed FASTQ reads (where applicable) for each sample, along with the estimated chromosome size (which will be used if you specify `--auto`)
 
 ##### 3. `plassembler` directory
 
diff --git a/docs/run.md b/docs/run.md
index e5667c09..5c329888 100644
--- a/docs/run.md
+++ b/docs/run.md
@@ -38,8 +38,8 @@ hybracter hybrid -i <input.csv> -o <output_dir> -t <threads>  [other arguments]
 * You can turn off pypolca polishing using `--no_pypolca` - I wouldn't though!
 * You can change the `--depth_filter` from 0.25x chromosome coverage. This will filter out all Plassembler contigs below this depth.
 * By default, `hybracter hybrid` takes the last polishing round as the final assembly  (`--logic last`). We would not recommend changing this to `--logic best`, as picking the best polishing round according to ALE with  `--logic best` is not guaranteed to give the most accurate assembly (See our [paper](https://doi.org/10.1099/mgen.0.001244)).
-* You can estimate the chromosome size with kmc by using `--auto`
-    * **Note: if you have low quality long read sets (e.g. R9 FAST/HAC or sub Q15 reads), `--auto` is _not_ recommended. Users have reported that it can tend to overestimate the chromosome size as more erroneous 21-mers will be counted by kmc than expected. Please specify a chromosome size for this type of data.**
+* You can estimate the chromosome size with lrge by using `--auto`
+    * **Note: if you have low quality long read sets (e.g. R9 FAST/HAC or sub Q15 reads), use `--auto` with care. Users have reported that it can tend to overestimate the chromosome size with kmc - for lrge, some tests have shown similar (but not so bad) behaviour. This is not really solvable - it is simply a limitation of low quality data!**
 * You can set a minimum long-read depth with `--min_depth`. Hybracter will error out if your estimated long-reads coverage is lower than this.
 * If you are running hybracter on a Mac, please use `--mac` (or find a Linux machine). This will make sure Medaka v1.8.0 is installed, as newer versions don't work on Macs.
 * From v0.10.0, Hybracter will implement the `--bacteria` flag designed specifically for bacterial genomes. See Ryan Wick's [blogpost](https://rrwick.github.io/2024/10/17/medaka-v2.html) for some more explanation and benchmarking. If you do not want to use `--bactera`, please use `--medaka_override` to make sure hybracter uses your `--medakaModel`. This is likely most useful for R9 data.
@@ -246,8 +246,8 @@ hybracter long -i <input.csv> -o <output_dir> -t <threads> [other arguments]
 * You can turn off Medaka polishing using `--no_medaka` - recommended for Q20+ modern Nanopore and PacBio reads
 * You can change the `--depth_filter` from 0.25x chromosome coverage. This will filter out all Plassembler contigs below this depth.
 * You can force `hybracter long` to pick the last polishing round (not the best according to pyrodigal mean CDS length) with `--logic last`. `hybracter long` defaults to picking the best i.e. `--logic best`.
-* You can estimate the chromosome size with kmc by using `--auto`
-    * **Note: if you have low quality long read sets (e.g. R9 FAST/HAC or sub Q15 reads), `--auto` is _not_ recommended. Users have reported that it can tend to overestimate the chromosome size as more erroneous 21-mers will be counted by kmc than expected. Please specify a chromosome size for this type of data.**
+* You can estimate the chromosome size with lrge by using `--auto`
+    * **Note: if you have low quality long read sets (e.g. R9 FAST/HAC or sub Q15 reads), use `--auto` with care. Users have reported that it can tend to overestimate the chromosome size with kmc - for lrge, some tests have shown similar (but not so bad) behaviour. This is not really solvable - it is simply a limitation of low quality data!**
 * You can set a minimum long-read depth with `--min_depth`. Hybracter will error out if your estimated long-reads coverage is lower than this.
 * If you are running hybracter on a Mac, please use `--mac` (or find a Linux machine). This will make sure Medaka v1.8.0 is installed, as newer versions don't work on Macs.
 * From v0.10.0, Hybracter will implement the `--bacteria` flag designed specifically for bacterial genomes. See Ryan Wick's [blogpost](https://rrwick.github.io/2024/10/17/medaka-v2.html) for some more explanation and benchmarking. If you do not want to use `--bactera`, please use `--medaka_override` to make sure hybracter uses your `--medakaModel`. This is likely most useful for R9 data.
diff --git a/hybracter/hybracter.VERSION b/hybracter/hybracter.VERSION
index 71172b43..142464bf 100644
--- a/hybracter/hybracter.VERSION
+++ b/hybracter/hybracter.VERSION
@@ -1,1 +1,1 @@
-0.10.1
\ No newline at end of file
+0.11.0
\ No newline at end of file
diff --git a/hybracter/util.py b/hybracter/util.py
index 01e6e8fc..ae32a601 100644
--- a/hybracter/util.py
+++ b/hybracter/util.py
@@ -216,6 +216,7 @@ def run_snakemake(
 
 all_medaka_models = [
     
+    'r1041_e82_400bps_bacterial_methylation', #https://github.com/gbouras13/hybracter/issues/108
     # default 1.12.1
     'r1041_e82_400bps_sup_v5.0.0',
     # r1041 e82 (kit14) consensus
diff --git a/hybracter/workflow/envs/lrge.yaml b/hybracter/workflow/envs/lrge.yaml
new file mode 100644
index 00000000..126f5297
--- /dev/null
+++ b/hybracter/workflow/envs/lrge.yaml
@@ -0,0 +1,8 @@
+name: kmc
+channels:
+    - conda-forge
+    - bioconda
+dependencies: 
+    - lrge <1
+    - gzip # for zcat
+    
diff --git a/hybracter/workflow/hybrid.smk b/hybracter/workflow/hybrid.smk
index 0315446d..593ba564 100644
--- a/hybracter/workflow/hybrid.smk
+++ b/hybracter/workflow/hybrid.smk
@@ -72,23 +72,27 @@ MAC = config.args.mac
 MEDAKA_OVERRIDE = config.args.medaka_override
 EXTRA_PARAMS_FLYE = config.args.extra_params_flye
 # flag to add extra arguments to flye
-ADD_TO_FLYE =  False
+ADD_TO_FLYE = False
 
 # Only if user specifies - otherwise None
 if EXTRA_PARAMS_FLYE:
-    ADD_TO_FLYE =  True
-    print(f"As you have used --extra_params_flye the extra parameters {EXTRA_PARAMS_FLYE} will be used with Flye.")
+    ADD_TO_FLYE = True
+    print(
+        f"As you have used --extra_params_flye the extra parameters {EXTRA_PARAMS_FLYE} will be used with Flye."
+    )
 
-# By default, hybracter (linux) will use --bacteria from v0.10.0 onwards 
+# By default, hybracter (linux) will use --bacteria from v0.10.0 onwards
 # To take advantage of improvements with medaka v2 https://rrwick.github.io/2024/10/17/medaka-v2.html
-# not true if 1) --mac or 2) --medaka_override is specified 
-BACTERIA = True 
+# not true if 1) --mac or 2) --medaka_override is specified
+BACTERIA = True
 if MAC:
     BACTERIA = False
 else:
     if MEDAKA_OVERRIDE:
         BACTERIA = False
-        print(f"As you have selected --medaka_override, {MEDAKA_MODEL} will be used with Medaka, not --bacteria ")
+        print(
+            f"As you have selected --medaka_override, {MEDAKA_MODEL} will be used with Medaka, not --bacteria "
+        )
 
 # MAC medaka
 
@@ -112,7 +116,9 @@ if MAC:
 
 # for hybracter hybrid
 if config.args.single is False:
-    dictReads = parseSamples(INPUT, False, SUBSAMPLE_DEPTH, DATADIR, MIN_DEPTH, AUTO)  # long flag false
+    dictReads = parseSamples(
+        INPUT, False, SUBSAMPLE_DEPTH, DATADIR, MIN_DEPTH, AUTO
+    )  # long flag false
     SAMPLES = list(dictReads.keys())
 # for hybracter hybrid-single
 else:
@@ -163,10 +169,10 @@ include: os.path.join("rules", "completeness", "aggregate.smk")
 
 # for short read polishing --careful
 include: os.path.join("rules", "processing", "coverage.smk")
-
-# kmc - needs to be included due to the checkpointing
+# lrge - needs to be included due to the checkpointing
 include: os.path.join("rules", "processing", "estimate_chromosome.smk")
 
+
 ### medaka vs no medaka
 # default - medaka will be run
 if config.args.no_medaka is False:
diff --git a/hybracter/workflow/long.smk b/hybracter/workflow/long.smk
index 8f1478e0..e3b68a49 100644
--- a/hybracter/workflow/long.smk
+++ b/hybracter/workflow/long.smk
@@ -70,28 +70,26 @@ MAC = config.args.mac
 MEDAKA_OVERRIDE = config.args.medaka_override
 EXTRA_PARAMS_FLYE = config.args.extra_params_flye
 # flag to add extra arguments to flye
-ADD_TO_FLYE =  False
+ADD_TO_FLYE = False
 
 # Only if user specifies - otherwise None
 if EXTRA_PARAMS_FLYE:
-    ADD_TO_FLYE =  True
+    ADD_TO_FLYE = True
     print(f"The extra parameters {EXTRA_PARAMS_FLYE} will be used with Flye ")
 
 
-# By default, hybracter (linux) will use --bacteria from v0.10.0 onwards 
+# By default, hybracter (linux) will use --bacteria from v0.10.0 onwards
 # To take advantage of improvements with medaka v2 https://rrwick.github.io/2024/10/17/medaka-v2.html
-# not true if 1) --mac or 2) --medaka_override is specified 
-BACTERIA = True 
+# not true if 1) --mac or 2) --medaka_override is specified
+BACTERIA = True
 if MAC:
     BACTERIA = False
 else:
     if MEDAKA_OVERRIDE:
         BACTERIA = False
-        print(f"As you have selected --medaka_override, {MEDAKA_MODEL} will be used with Medaka, not --bacteria ")
-
-
-
-
+        print(
+            f"As you have selected --medaka_override, {MEDAKA_MODEL} will be used with Medaka, not --bacteria "
+        )
 
 
 # MAC medaka
@@ -115,7 +113,9 @@ if MAC:
 
 # for hybracter hybrid
 if config.args.single is False:
-    dictReads = parseSamples(INPUT, True, SUBSAMPLE_DEPTH, DATADIR, MIN_DEPTH, AUTO)  # long flag true
+    dictReads = parseSamples(
+        INPUT, True, SUBSAMPLE_DEPTH, DATADIR, MIN_DEPTH, AUTO
+    )  # long flag true
     SAMPLES = list(dictReads.keys())
 # for hybracter hybrid-single
 else:
@@ -132,9 +132,11 @@ else:
 # Import rules and functions
 ##############################
 
-# kmc - needs to be included due to the
+
+# lrge - needs to be included due to the
 include: os.path.join("rules", "processing", "estimate_chromosome.smk")
 
+
 # qc and host
 # depends on whehter --contaminants has been specified and --skip_qc flag activiated
 if config.args.contaminants != "none":  # where --contaminants specified
diff --git a/hybracter/workflow/rules/assembly/assemble.smk b/hybracter/workflow/rules/assembly/assemble.smk
index 59d386bc..e7e9293d 100644
--- a/hybracter/workflow/rules/assembly/assemble.smk
+++ b/hybracter/workflow/rules/assembly/assemble.smk
@@ -5,7 +5,7 @@ rule assemble:
     """
     input:
         fastq=os.path.join(dir.out.qc, "{sample}_filt_trim.fastq.gz"),
-        lr_coverage=os.path.join(dir.out.coverage, "{sample}_lr.txt"), # make sure coverage is run before assembly in case below min_depth
+        lr_coverage=os.path.join(dir.out.coverage, "{sample}_lr.txt"),  # make sure coverage is run before assembly in case below min_depth
     output:
         fasta=os.path.join(dir.out.assemblies, "{sample}", "assembly.fasta"),
         info=os.path.join(dir.out.assemblies, "{sample}", "assembly_info.txt"),
@@ -20,8 +20,8 @@ rule assemble:
     params:
         model=FLYE_MODEL,
         dir=os.path.join(dir.out.assemblies, "{sample}"),
-        add_to_flye = ADD_TO_FLYE,
-        extra_params_flye = EXTRA_PARAMS_FLYE
+        add_to_flye=ADD_TO_FLYE,
+        extra_params_flye=EXTRA_PARAMS_FLYE,
     threads: config.resources.big.cpu
     benchmark:
         os.path.join(dir.out.bench, "assemble", "{sample}.txt")
diff --git a/hybracter/workflow/rules/assembly/plassembler.smk b/hybracter/workflow/rules/assembly/plassembler.smk
index 328bd96e..725bfd47 100644
--- a/hybracter/workflow/rules/assembly/plassembler.smk
+++ b/hybracter/workflow/rules/assembly/plassembler.smk
@@ -9,7 +9,9 @@ rule plassembler_hybrid:
         l=os.path.join(dir.out.qc, "{sample}_filt_trim.fastq.gz"),
         r1=os.path.join(dir.out.fastp, "{sample}_1.fastq.gz"),
         r2=os.path.join(dir.out.fastp, "{sample}_2.fastq.gz"),
-        kmc=os.path.join(dir.out.kmc,"{sample}", "{sample}_kmcLOG.txt")
+        lrge=os.path.join(
+            dir.out.chrom_size, "{sample}_lrge_estimated_chromosome_size.txt"
+        ),
     output:
         fasta=os.path.join(
             dir.out.plassembler, "{sample}", "plassembler_plasmids.fasta"
@@ -18,7 +20,16 @@ rule plassembler_hybrid:
         version=os.path.join(dir.out.versions, "{sample}", "plassembler.version"),
     params:
         db=dir.plassemblerdb,
-        chromlen = lambda wildcards: str(getMinChromLength(kmc_log_path=os.path.join(dir.out.kmc, f"{wildcards.sample}", f"{wildcards.sample}_kmcLOG.txt"), sample=wildcards.sample,auto=AUTO)),
+        chromlen=lambda wildcards: str(
+            getMinChromLength(
+                lrge_path=os.path.join(
+                    dir.out.chrom_size,
+                    f"{wildcards.sample}_lrge_estimated_chromosome_size.txt",
+                ),
+                sample=wildcards.sample,
+                auto=AUTO,
+            )
+        ),
         outdir=os.path.join(dir.out.plassembler, "{sample}"),
         flye_dir=os.path.join(dir.out.assemblies, "{sample}"),
         depth_filter=DEPTH_FILTER,
diff --git a/hybracter/workflow/rules/assembly/plassembler_long.smk b/hybracter/workflow/rules/assembly/plassembler_long.smk
index 27df7a10..4983c9c7 100644
--- a/hybracter/workflow/rules/assembly/plassembler_long.smk
+++ b/hybracter/workflow/rules/assembly/plassembler_long.smk
@@ -3,8 +3,10 @@ rule plassembler_long:
     runs plassembler for long
     """
     input:
-        kmc=os.path.join(dir.out.kmc,"{sample}", "{sample}_kmcLOG.txt"),
-        l=os.path.join(dir.out.qc, "{sample}_filt_trim.fastq.gz")
+        lrge=os.path.join(
+            dir.out.chrom_size, "{sample}_lrge_estimated_chromosome_size.txt"
+        ),
+        l=os.path.join(dir.out.qc, "{sample}_filt_trim.fastq.gz"),
     output:
         fasta=os.path.join(
             dir.out.plassembler, "{sample}", "plassembler_plasmids.fasta"
@@ -13,7 +15,16 @@ rule plassembler_long:
         version=os.path.join(dir.out.versions, "{sample}", "plassembler.version"),
     params:
         db=dir.plassemblerdb,
-        chromlen = lambda wildcards: str(getMinChromLength(kmc_log_path=os.path.join(dir.out.kmc, f"{wildcards.sample}", f"{wildcards.sample}_kmcLOG.txt"), sample=wildcards.sample,auto=AUTO)),
+        chromlen=lambda wildcards: str(
+            getMinChromLength(
+                lrge_path=os.path.join(
+                    dir.out.chrom_size,
+                    f"{wildcards.sample}_lrge_estimated_chromosome_size.txt",
+                ),
+                sample=wildcards.sample,
+                auto=AUTO,
+            )
+        ),
         outdir=os.path.join(dir.out.plassembler, "{sample}"),
         flye_dir=os.path.join(dir.out.assemblies, "{sample}"),
         depth_filter=DEPTH_FILTER,
diff --git a/hybracter/workflow/rules/finalise/select_best_assembly_long.smk b/hybracter/workflow/rules/finalise/select_best_assembly_long.smk
index 7e202303..70aa73d3 100644
--- a/hybracter/workflow/rules/finalise/select_best_assembly_long.smk
+++ b/hybracter/workflow/rules/finalise/select_best_assembly_long.smk
@@ -59,7 +59,10 @@ rule aggregate_finalise_complete:
         chrom_pre_polish_fasta=os.path.join(
             dir.out.dnaapler, "{sample}_pre_chrom", "{sample}_reoriented.fasta"
         ),
-        medaka_rd_1_fasta=os.path.join(dir.out.dnaapler, "{sample}", "{sample}_reoriented.fasta"), # medaka round 1
+        medaka_rd_1_fasta=os.path.join(
+            dir.out.dnaapler, "{sample}", "{sample}_reoriented.fasta"
+        ),
+        # medaka round 1
         medaka_rd_2_fasta=os.path.join(
             dir.out.intermediate_assemblies, "{sample}", "{sample}_medaka_rd_2.fasta"
         ),
diff --git a/hybracter/workflow/rules/polishing/long_read_polish.smk b/hybracter/workflow/rules/polishing/long_read_polish.smk
index 0be3c7fb..32705fe7 100644
--- a/hybracter/workflow/rules/polishing/long_read_polish.smk
+++ b/hybracter/workflow/rules/polishing/long_read_polish.smk
@@ -56,20 +56,31 @@ rule medaka_round_1:
 
 rule medaka_round_1_extract_intermediate_assembly:
     """
-    extracts the chromosome intermediate assembly
+    extracts the chromosome intermediate assembly 
     """
     input:
         fasta=os.path.join(dir.out.medaka_rd_1, "{sample}", "consensus.fasta"),
         completeness_check=os.path.join(dir.out.completeness, "{sample}.txt"),
         info=os.path.join(dir.out.assemblies, "{sample}", "assembly_info.txt"),
-        kmc=os.path.join(dir.out.kmc,"{sample}", "{sample}_kmcLOG.txt")
+        lrge=os.path.join(
+            dir.out.chrom_size, "{sample}_lrge_estimated_chromosome_size.txt"
+        ),
     output:
         fasta=os.path.join(
             dir.out.intermediate_assemblies, "{sample}", "{sample}_medaka_rd_1.fasta"
         ),
         ignore_list=os.path.join(dir.out.medaka_rd_1, "{sample}_ignore_list.txt"),
     params:
-        min_chrom_length=lambda wildcards: str(getMinChromLength(kmc_log_path=os.path.join(dir.out.kmc, f"{wildcards.sample}", f"{wildcards.sample}_kmcLOG.txt"), sample=wildcards.sample,auto=AUTO)),
+        min_chrom_length=lambda wildcards: str(
+            getMinChromLength(
+                lrge_path=os.path.join(
+                    dir.out.chrom_size,
+                    f"{wildcards.sample}_lrge_estimated_chromosome_size.txt",
+                ),
+                sample=wildcards.sample,
+                auto=AUTO,
+            )
+        ),
         polypolish_flag=False,
     conda:
         os.path.join(dir.env, "scripts.yaml")
@@ -192,6 +203,7 @@ rule medaka_round_2:
         fi
         """
 
+
 rule medaka_round_2_extract_intermediate_assembly:
     """
     extracts the chromosome intermediate assembly
@@ -208,7 +220,16 @@ rule medaka_round_2_extract_intermediate_assembly:
         ),
         ignore_list=os.path.join(dir.out.medaka_rd_2, "{sample}_ignore_list.txt"),
     params:
-        min_chrom_length=lambda wildcards: str(getMinChromLength(kmc_log_path=os.path.join(dir.out.kmc, f"{wildcards.sample}", f"{wildcards.sample}_kmcLOG.txt"), sample=wildcards.sample,auto=AUTO)),
+        min_chrom_length=lambda wildcards: str(
+            getMinChromLength(
+                lrge_path=os.path.join(
+                    dir.out.chrom_size,
+                    f"{wildcards.sample}_lrge_estimated_chromosome_size.txt",
+                ),
+                sample=wildcards.sample,
+                auto=AUTO,
+            )
+        ),
         polypolish_flag=False,
     conda:
         os.path.join(dir.env, "scripts.yaml")
diff --git a/hybracter/workflow/rules/polishing/long_read_polish_incomplete.smk b/hybracter/workflow/rules/polishing/long_read_polish_incomplete.smk
index f52d9789..42a63bce 100644
--- a/hybracter/workflow/rules/polishing/long_read_polish_incomplete.smk
+++ b/hybracter/workflow/rules/polishing/long_read_polish_incomplete.smk
@@ -52,4 +52,3 @@ rule medaka_incomplete:
         fi
         cp {output.fasta} {output.copy_fasta}
         """
-
diff --git a/hybracter/workflow/rules/polishing/short_read_polish.smk b/hybracter/workflow/rules/polishing/short_read_polish.smk
index 726abe01..b32178d4 100644
--- a/hybracter/workflow/rules/polishing/short_read_polish.smk
+++ b/hybracter/workflow/rules/polishing/short_read_polish.smk
@@ -88,14 +88,25 @@ rule polypolish_extract_intermediate_assembly:
         fasta=os.path.join(dir.out.polypolish, "{sample}.fasta"),
         completeness_check=os.path.join(dir.out.completeness, "{sample}.txt"),
         info=os.path.join(dir.out.assemblies, "{sample}", "assembly_info.txt"),
-        kmc=os.path.join(dir.out.kmc,"{sample}", "{sample}_kmcLOG.txt")
+        lrge=os.path.join(
+            dir.out.chrom_size, "{sample}_lrge_estimated_chromosome_size.txt"
+        ),
     output:
         fasta=os.path.join(
             dir.out.intermediate_assemblies, "{sample}", "{sample}_polypolish.fasta"
         ),
         ignore_list=os.path.join(dir.out.polypolish, "{sample}_ignore_list.txt"),
     params:
-        min_chrom_length=lambda wildcards: str(getMinChromLength(kmc_log_path=os.path.join(dir.out.kmc, f"{wildcards.sample}", f"{wildcards.sample}_kmcLOG.txt"), sample=wildcards.sample,auto=AUTO)),
+        min_chrom_length=lambda wildcards: str(
+            getMinChromLength(
+                lrge_path=os.path.join(
+                    dir.out.chrom_size,
+                    f"{wildcards.sample}_lrge_estimated_chromosome_size.txt",
+                ),
+                sample=wildcards.sample,
+                auto=AUTO,
+            )
+        ),
         polypolish_flag=True,
     conda:
         os.path.join(dir.env, "scripts.yaml")
diff --git a/hybracter/workflow/rules/polishing/short_read_polish_no_medaka.smk b/hybracter/workflow/rules/polishing/short_read_polish_no_medaka.smk
index 74486570..77307a98 100644
--- a/hybracter/workflow/rules/polishing/short_read_polish_no_medaka.smk
+++ b/hybracter/workflow/rules/polishing/short_read_polish_no_medaka.smk
@@ -108,14 +108,25 @@ rule polypolish_extract_intermediate_assembly:
         fasta=os.path.join(dir.out.polypolish, "{sample}.fasta"),
         completeness_check=os.path.join(dir.out.completeness, "{sample}.txt"),
         info=os.path.join(dir.out.assemblies, "{sample}", "assembly_info.txt"),
-        kmc=os.path.join(dir.out.kmc,"{sample}", "{sample}_kmcLOG.txt")
+        lrge=os.path.join(
+            dir.out.chrom_size, "{sample}_lrge_estimated_chromosome_size.txt"
+        ),
     output:
         fasta=os.path.join(
             dir.out.intermediate_assemblies, "{sample}", "{sample}_polypolish.fasta"
         ),
         ignore_list=os.path.join(dir.out.polypolish, "{sample}_ignore_list.txt"),
     params:
-        min_chrom_length=lambda wildcards: str(getMinChromLength(kmc_log_path=os.path.join(dir.out.kmc, f"{wildcards.sample}", f"{wildcards.sample}_kmcLOG.txt"), sample=wildcards.sample,auto=AUTO)),
+        min_chrom_length=lambda wildcards: str(
+            getMinChromLength(
+                lrge_path=os.path.join(
+                    dir.out.chrom_size,
+                    f"{wildcards.sample}_lrge_estimated_chromosome_size.txt",
+                ),
+                sample=wildcards.sample,
+                auto=AUTO,
+            )
+        ),
         polypolish_flag=True,
     conda:
         os.path.join(dir.env, "scripts.yaml")
diff --git a/hybracter/workflow/rules/polishing/short_read_pypolca.smk b/hybracter/workflow/rules/polishing/short_read_pypolca.smk
index 8b700103..92b7d816 100644
--- a/hybracter/workflow/rules/polishing/short_read_pypolca.smk
+++ b/hybracter/workflow/rules/polishing/short_read_pypolca.smk
@@ -47,14 +47,25 @@ rule pypolca_extract_intermediate_assembly:
         fasta=os.path.join(dir.out.pypolca, "{sample}", "{sample}_corrected.fasta"),
         completeness_check=os.path.join(dir.out.completeness, "{sample}.txt"),
         info=os.path.join(dir.out.assemblies, "{sample}", "assembly_info.txt"),
-        kmc=os.path.join(dir.out.kmc,"{sample}", "{sample}_kmcLOG.txt")
+        lrge=os.path.join(
+            dir.out.chrom_size, "{sample}_lrge_estimated_chromosome_size.txt"
+        ),
     output:
         fasta=os.path.join(
             dir.out.intermediate_assemblies, "{sample}", "{sample}_pypolca.fasta"
         ),
         ignore_list=os.path.join(dir.out.pypolca, "{sample}_ignore_list.txt"),
     params:
-        min_chrom_length=lambda wildcards: str(getMinChromLength(kmc_log_path=os.path.join(dir.out.kmc, f"{wildcards.sample}", f"{wildcards.sample}_kmcLOG.txt"), sample=wildcards.sample,auto=AUTO)),
+        min_chrom_length=lambda wildcards: str(
+            getMinChromLength(
+                lrge_path=os.path.join(
+                    dir.out.chrom_size,
+                    f"{wildcards.sample}_lrge_estimated_chromosome_size.txt",
+                ),
+                sample=wildcards.sample,
+                auto=AUTO,
+            )
+        ),
         polypolish_flag=True,
     conda:
         os.path.join(dir.env, "scripts.yaml")
diff --git a/hybracter/workflow/rules/polishing/short_read_pypolca_no_medaka.smk b/hybracter/workflow/rules/polishing/short_read_pypolca_no_medaka.smk
index 44dd8c5f..d2e00451 100644
--- a/hybracter/workflow/rules/polishing/short_read_pypolca_no_medaka.smk
+++ b/hybracter/workflow/rules/polishing/short_read_pypolca_no_medaka.smk
@@ -47,14 +47,25 @@ rule pypolca_extract_intermediate_assembly:
         fasta=os.path.join(dir.out.pypolca, "{sample}", "{sample}_corrected.fasta"),
         completeness_check=os.path.join(dir.out.completeness, "{sample}.txt"),
         info=os.path.join(dir.out.assemblies, "{sample}", "assembly_info.txt"),
-        kmc=os.path.join(dir.out.kmc,"{sample}", "{sample}_kmcLOG.txt")
+        lrge=os.path.join(
+            dir.out.chrom_size, "{sample}_lrge_estimated_chromosome_size.txt"
+        ),
     output:
         fasta=os.path.join(
             dir.out.intermediate_assemblies, "{sample}", "{sample}_pypolca.fasta"
         ),
         ignore_list=os.path.join(dir.out.pypolca, "{sample}_ignore_list.txt"),
     params:
-        min_chrom_length=lambda wildcards: str(getMinChromLength(kmc_log_path=os.path.join(dir.out.kmc, f"{wildcards.sample}", f"{wildcards.sample}_kmcLOG.txt"), sample=wildcards.sample,auto=AUTO)),
+        min_chrom_length=lambda wildcards: str(
+            getMinChromLength(
+                lrge_path=os.path.join(
+                    dir.out.chrom_size,
+                    f"{wildcards.sample}_lrge_estimated_chromosome_size.txt",
+                ),
+                sample=wildcards.sample,
+                auto=AUTO,
+            )
+        ),
         polypolish_flag=True,
     conda:
         os.path.join(dir.env, "scripts.yaml")
diff --git a/hybracter/workflow/rules/preflight/directories.smk b/hybracter/workflow/rules/preflight/directories.smk
index d7ef0241..428f16f6 100644
--- a/hybracter/workflow/rules/preflight/directories.smk
+++ b/hybracter/workflow/rules/preflight/directories.smk
@@ -40,7 +40,7 @@ dir.out.processing = os.path.join(dir.out.base, "processing")
 dir.out.complete = os.path.join(dir.out.processing, "complete")
 dir.out.incomplete = os.path.join(dir.out.processing, "incomplete")
 dir.out.qc = os.path.join(dir.out.processing, "qc")
-dir.out.kmc = os.path.join(dir.out.processing, "kmc")
+# dir.out.kmc = os.path.join(dir.out.processing, "kmc")
 # auto only - write chrom size to file
 dir.out.chrom_size = os.path.join(dir.out.processing, "chrom_size")
 
diff --git a/hybracter/workflow/rules/preflight/functions.smk b/hybracter/workflow/rules/preflight/functions.smk
index f800b056..63c9a87c 100644
--- a/hybracter/workflow/rules/preflight/functions.smk
+++ b/hybracter/workflow/rules/preflight/functions.smk
@@ -8,42 +8,35 @@ import sys
 import os
 import re
 
-def getMinChromLength(kmc_log_path, sample, auto):
+
+def getMinChromLength(lrge_path, sample, auto):
     if auto:
-        with open(kmc_log_path, "r") as file:
-            for line in file:
-                if "No. of unique counted k-mers" in line:
-                    # keep 80% of kmers as lower bound for chromosome
-                    return int(float(re.search(r"No. of unique counted k-mers\s*:\s*([\d\.eE+-]+)", line).group(1)) * 0.8)
+        with open(lrge_path, "r") as file:
+            genome_size = file.readline().strip()
+            return int(float(genome_size) * 0.8)
     else:
         return dictReads[sample]["MinChromLength"]
 
-# get min_depth 
-def getMinBases(kmc_log_path, sample, auto, min_depth):
+
+# get min_depth
+def getMinBases(lrge_path, sample, auto, min_depth):
     if auto:
-        with open(kmc_log_path, "r") as file:
-            for line in file:
-                if "No. of unique counted k-mers" in line:
-                    # keep 80% of kmers as lower bound for chromosome
-                    chrom_size = int(float(re.search(r"No. of unique counted k-mers\s*:\s*([\d\.eE+-]+)", line).group(1)) * 0.8)
-                    return int(min_depth*chrom_size)
+        with open(lrge_path, "r") as file:
+            genome_size = file.readline().strip()
+            return int(min_depth * float(genome_size) * 0.8)
     else:
         return dictReads[sample]["MinBases"]
 
-def getTargetBases(kmc_log_path, sample, auto, target_depth):
+
+def getTargetBases(lrge_path, sample, auto, target_depth):
     if auto:
-        with open(kmc_log_path, "r") as file:
-            for line in file:
-                if "No. of unique counted k-mers" in line:
-                    # keep 80% of kmers as lower bound for chromosome
-                    chrom_size = int(float(re.search(r"No. of unique counted k-mers\s*:\s*([\d\.eE+-]+)", line).group(1)) * 0.8)
-                    return int(target_depth*chrom_size)
+        with open(lrge_path, "r") as file:
+            genome_size = file.readline().strip()
+            return int(target_depth * float(genome_size) * 0.8)
     else:
         return dictReads[sample]["TargetBases"]
 
 
-
-
 # define functions
 # get long reads
 def get_input_lr_fastqs(wildcards):
@@ -130,6 +123,7 @@ def check_db(database_dir):
 ## helper function to set dnaapler threads to 1 if rule is retried
 def get_cpu_resources_with_fallback(wildcards, attempt):
     if attempt == 1:
-        return config['resources']['med']['cpu']
+        return config["resources"]["med"]["cpu"]
     else:
         return 1
+
diff --git a/hybracter/workflow/rules/preflight/samples.smk b/hybracter/workflow/rules/preflight/samples.smk
index 9ffaf0c0..50cbc2f5 100644
--- a/hybracter/workflow/rules/preflight/samples.smk
+++ b/hybracter/workflow/rules/preflight/samples.smk
@@ -151,7 +151,7 @@ def samplesFromCsvShort(csvFile, subsample_depth, datadir, min_depth, auto):
                         # separate dirs
                         else:
                             r1_fastq = os.path.join(datadirshort, l[2])
-                            r2_fastq = os.path.join(datadirshort, l[3])                        
+                            r2_fastq = os.path.join(datadirshort, l[3])
 
                     if (
                         os.path.isfile(long_fastq)
@@ -202,7 +202,7 @@ def samplesFromCsvShort(csvFile, subsample_depth, datadir, min_depth, auto):
                         # separate dirs
                         else:
                             r1_fastq = os.path.join(datadirshort, l[3])
-                            r2_fastq = os.path.join(datadirshort, l[4])                        
+                            r2_fastq = os.path.join(datadirshort, l[4])
                     if (
                         os.path.isfile(long_fastq)
                         and l[2].isnumeric()
@@ -242,9 +242,13 @@ def samplesFromCsvShort(csvFile, subsample_depth, datadir, min_depth, auto):
 
 def parseSamples(csvfile, long_flag, subsample_depth, datadir, min_depth, auto):
     if os.path.isfile(csvfile) and long_flag is True:
-        sampleDict = samplesFromCsvLong(csvfile, subsample_depth, datadir, min_depth, auto)
+        sampleDict = samplesFromCsvLong(
+            csvfile, subsample_depth, datadir, min_depth, auto
+        )
     elif os.path.isfile(csvfile) and long_flag is False:
-        sampleDict = samplesFromCsvShort(csvfile, subsample_depth, datadir, min_depth, auto)
+        sampleDict = samplesFromCsvShort(
+            csvfile, subsample_depth, datadir, min_depth, auto
+        )
     else:
         sys.stderr.write(
             "\n"
diff --git a/hybracter/workflow/rules/preflight/targets_hybrid.smk b/hybracter/workflow/rules/preflight/targets_hybrid.smk
index 14dcbd99..ffeb19ca 100644
--- a/hybracter/workflow/rules/preflight/targets_hybrid.smk
+++ b/hybracter/workflow/rules/preflight/targets_hybrid.smk
@@ -23,7 +23,7 @@ hybrid
 TargetFilesHybrid = [
     os.path.join(dir.out.flags, "aggr_long_qc.flag"),
     os.path.join(dir.out.flags, "aggr_short_qc.flag"),
-    os.path.join(dir.out.flags, "aggr_kmc.flag"),
+    os.path.join(dir.out.flags, "aggr_lrge.flag"),
     os.path.join(dir.out.flags, "aggr_seqkit_short.flag"),
     os.path.join(dir.out.flags, "aggr_seqkit_long.flag"),
     os.path.join(dir.out.flags, "aggr_assemble.flag"),
diff --git a/hybracter/workflow/rules/preflight/targets_long.smk b/hybracter/workflow/rules/preflight/targets_long.smk
index 9f6835c1..8d9bf52d 100644
--- a/hybracter/workflow/rules/preflight/targets_long.smk
+++ b/hybracter/workflow/rules/preflight/targets_long.smk
@@ -9,7 +9,7 @@ long
 TargetFilesLong = [
     os.path.join(dir.out.flags, "aggr_long_qc.flag"),
     os.path.join(dir.out.flags, "aggr_seqkit_long.flag"),
-    os.path.join(dir.out.flags, "aggr_kmc.flag"),
+    os.path.join(dir.out.flags, "aggr_lrge.flag"),
     os.path.join(dir.out.flags, "aggr_assemble.flag"),
     os.path.join(dir.out.flags, "aggr_long_read_polish.flag"),
     os.path.join(dir.out.flags, "aggr_plassembler.flag"),
diff --git a/hybracter/workflow/rules/processing/coverage.smk b/hybracter/workflow/rules/processing/coverage.smk
index b24042ab..35001ef1 100644
--- a/hybracter/workflow/rules/processing/coverage.smk
+++ b/hybracter/workflow/rules/processing/coverage.smk
@@ -71,12 +71,33 @@ rule estimate_lr_coverage:
     """
     input:
         long_bases=os.path.join(dir.out.seqkit, "{sample}_long.txt"),
-        kmc=os.path.join(dir.out.kmc,"{sample}", "{sample}_kmcLOG.txt")
+        lrge=os.path.join(
+            dir.out.chrom_size, "{sample}_lrge_estimated_chromosome_size.txt"
+        ),
     output:
         lr_coverage=os.path.join(dir.out.coverage, "{sample}_lr.txt"),
     params:
-        min_chrom_length=lambda wildcards: str(getMinChromLength(kmc_log_path=os.path.join(dir.out.kmc, f"{wildcards.sample}", f"{wildcards.sample}_kmcLOG.txt"), sample=wildcards.sample,auto=AUTO)),
-        min_bases=lambda wildcards: str(getMinBases(kmc_log_path=os.path.join(dir.out.kmc,f"{wildcards.sample}", f"{wildcards.sample}_kmcLOG.txt"),sample=wildcards.sample, auto=AUTO, min_depth=MIN_DEPTH)),
+        min_chrom_length=lambda wildcards: str(
+            getMinChromLength(
+                lrge_path=os.path.join(
+                    dir.out.chrom_size,
+                    f"{wildcards.sample}_lrge_estimated_chromosome_size.txt",
+                ),
+                sample=wildcards.sample,
+                auto=AUTO,
+            )
+        ),
+        min_bases=lambda wildcards: str(
+            getMinBases(
+                lrge_path=os.path.join(
+                    dir.out.chrom_size,
+                    f"{wildcards.sample}_lrge_estimated_chromosome_size.txt",
+                ),
+                sample=wildcards.sample,
+                auto=AUTO,
+                min_depth=MIN_DEPTH,
+            )
+        ),
     conda:
         os.path.join(dir.env, "scripts.yaml")
     resources:
@@ -86,7 +107,6 @@ rule estimate_lr_coverage:
     threads: config.resources.sml.cpu
     script:
         os.path.join(dir.scripts, "lr_coverage.py")
-        
 
 
 rule aggr_seqkit_long:
@@ -95,7 +115,7 @@ rule aggr_seqkit_long:
     """
     input:
         expand(os.path.join(dir.out.seqkit, "{sample}_long.txt"), sample=SAMPLES),
-        expand(os.path.join(dir.out.coverage, "{sample}_lr.txt"), sample=SAMPLES)
+        expand(os.path.join(dir.out.coverage, "{sample}_lr.txt"), sample=SAMPLES),
     output:
         flag=os.path.join(dir.out.flags, "aggr_seqkit_long.flag"),
     resources:
@@ -108,6 +128,7 @@ rule aggr_seqkit_long:
         touch {output.flag}
         """
 
+
 rule estimate_sr_coverage:
     """
     quickly estimates short read coverage for pypolca and polypolish careful
@@ -115,11 +136,22 @@ rule estimate_sr_coverage:
     input:
         r1=os.path.join(dir.out.seqkit, "{sample}_r1.txt"),
         r2=os.path.join(dir.out.seqkit, "{sample}_r2.txt"),
-        kmc=os.path.join(dir.out.kmc,"{sample}", "{sample}_kmcLOG.txt")
+        lrge=os.path.join(
+            dir.out.chrom_size, "{sample}_lrge_estimated_chromosome_size.txt"
+        ),
     output:
         sr_coverage=os.path.join(dir.out.coverage, "{sample}_sr.txt"),
     params:
-        chromlen=lambda wildcards: str(getMinChromLength(kmc_log_path=os.path.join(dir.out.kmc, f"{wildcards.sample}", f"{wildcards.sample}_kmcLOG.txt"), sample=wildcards.sample,auto=AUTO)),
+        chromlen=lambda wildcards: str(
+            getMinChromLength(
+                lrge_path=os.path.join(
+                    dir.out.chrom_size,
+                    f"{wildcards.sample}_lrge_estimated_chromosome_size.txt",
+                ),
+                sample=wildcards.sample,
+                auto=AUTO,
+            )
+        ),
     conda:
         os.path.join(dir.env, "scripts.yaml")
     resources:
@@ -129,4 +161,3 @@ rule estimate_sr_coverage:
     threads: config.resources.sml.cpu
     script:
         os.path.join(dir.scripts, "sr_coverage.py")
-
diff --git a/hybracter/workflow/rules/processing/estimate_chromosome.smk b/hybracter/workflow/rules/processing/estimate_chromosome.smk
index b97cfbb6..ff6612c4 100644
--- a/hybracter/workflow/rules/processing/estimate_chromosome.smk
+++ b/hybracter/workflow/rules/processing/estimate_chromosome.smk
@@ -1,71 +1,60 @@
 """
-@richardstoeckl with a nice implementation
-https://github.com/gbouras13/hybracter/issues/90
+Michael Hall's new tool lrge is awesome
+Thanks to Michael Hall for some code to determine the best way to run it too
 """
-rule sanitiseInputReads:
-    input:
-        fastq=get_input_lr_fastqs
-    output:
-        fastq=temp(os.path.join(dir.out.qc, "{sample}_sanitised.fastq.gz"))
-    conda:
-        os.path.join(dir.env, "seqkit.yaml")
-    threads:
-        1
-    shell:
-        """
-        seqkit replace -p "\t" -r '_' {input.fastq} -o {output.fastq}
-        """
 
-rule kmc:
-    """
-    need params.prefix so kmc writes into the output dir
-    """
-    input:
-        fastq = rules.sanitiseInputReads.output.fastq,
-    output:
-        kmcLOG = os.path.join(dir.out.kmc,"{sample}", "{sample}_kmcLOG.txt"),
-        dir = directory(os.path.join(dir.out.kmc,"{sample}")),
-    conda:
-        os.path.join(dir.env, "kmc.yaml")
-    threads:
-        config.resources.med.cpu
-    resources:
-        mem_mb=config.resources.med.mem,
-        mem=str(config.resources.med.mem) + "MB",
-        time=config.resources.med.time,
-    params:
-        prefix=os.path.join(dir.out.kmc,"{sample}","{sample}")
-    shell:
-        "kmc -k21 -ci10 -t{threads} -v -fq {input.fastq} {params.prefix} {output.dir} > {output.kmcLOG} 2>&1"
 
-rule write_chrom_size:
-    """
-    need params.prefix so kmc writes into the output dir
-    """
+rule lrge:
     input:
-        kmcLOG = os.path.join(dir.out.kmc,"{sample}", "{sample}_kmcLOG.txt")
+        fastq=get_input_lr_fastqs,
     output:
-        chrom_size = os.path.join(dir.out.chrom_size,"{sample}", "{sample}_kmc_estimated_chrom_size.txt"),
+        lrge=os.path.join(
+            dir.out.chrom_size, "{sample}_lrge_estimated_chromosome_size.txt"
+        ),
     conda:
-        os.path.join(dir.env, "scripts.yaml")
-    threads:
-        config.resources.sml.cpu
+        os.path.join(dir.env, "lrge.yaml")
+    threads: config.resources.med.cpu
     resources:
         mem_mb=config.resources.sml.mem,
         mem=str(config.resources.sml.mem) + "MB",
         time=config.resources.sml.time,
-    script:
-        os.path.join(dir.scripts, "write_chrom_size.py")
+    benchmark:
+        os.path.join(dir.out.bench, "lrge", "{sample}.txt")
+    log:
+        os.path.join(dir.out.stderr, "lrge", "{sample}.log"),
+    shell:
+        """
+        if [[ {input.fastq} =~ \.gz$ ]]; then
+        INPUT_CMD="zcat {input.fastq}"
+        else
+        INPUT_CMD="cat {input.fastq}"
+        fi
+
+        # Now run the awk command on the decompressed file
+        if $INPUT_CMD | awk '{{if (NR % 4 == 1) count++}} END {{exit count > 10000 ? 0 : 1}}'; then
+            # There are more than 10,000 reads, run lrge with defaults
+            lrge -t {threads} -s 42 {input.fastq} -o {output.lrge}
+        else
+            # There are less than 10,000 reads, use the all-vs-all strategy with all available reads
+            lrge -t {threads} -s 42 -n 10000 {input.fastq} -o {output.lrge}
+        fi
+
+        """
+
 
-rule aggr_kmc:
+rule aggr_lrge:
     """
     aggregates over all samples
     """
     input:
-        expand(os.path.join(dir.out.chrom_size,"{sample}", "{sample}_kmc_estimated_chrom_size.txt"), sample=SAMPLES),
-        expand(os.path.join(dir.out.kmc,"{sample}", "{sample}_kmcLOG.txt"), sample=SAMPLES)
+        expand(
+            os.path.join(
+                dir.out.chrom_size, "{sample}_lrge_estimated_chromosome_size.txt"
+            ),
+            sample=SAMPLES,
+        ),
     output:
-        flag=os.path.join(dir.out.flags, "aggr_kmc.flag"),
+        flag=os.path.join(dir.out.flags, "aggr_lrge.flag"),
     resources:
         mem_mb=config.resources.sml.mem,
         mem=str(config.resources.sml.mem) + "MB",
@@ -76,3 +65,81 @@ rule aggr_kmc:
         touch {output.flag}
         """
 
+
+# 
+# @richardstoeckl with a nice implementation
+# https://github.com/gbouras13/hybracter/issues/90
+# 
+# rule sanitiseInputReads:
+#     input:
+#         fastq=get_input_lr_fastqs
+#     output:
+#         fastq=temp(os.path.join(dir.out.qc, "{sample}_sanitised.fastq.gz"))
+#     conda:
+#         os.path.join(dir.env, "seqkit.yaml")
+#     threads:
+#         1
+#     shell:
+#         """
+#         seqkit replace -p "\t" -r '_' {input.fastq} -o {output.fastq}
+#         """
+
+# rule kmc:
+#     """
+#     need params.prefix so kmc writes into the output dir
+#     """
+#     input:
+#         fastq = rules.sanitiseInputReads.output.fastq,
+#     output:
+#         kmcLOG = os.path.join(dir.out.kmc,"{sample}", "{sample}_kmcLOG.txt"),
+#         dir = directory(os.path.join(dir.out.kmc,"{sample}")),
+#     conda:
+#         os.path.join(dir.env, "kmc.yaml")
+#     threads:
+#         config.resources.med.cpu
+#     resources:
+#         mem_mb=config.resources.med.mem,
+#         mem=str(config.resources.med.mem) + "MB",
+#         time=config.resources.med.time,
+#     params:
+#         prefix=os.path.join(dir.out.kmc,"{sample}","{sample}")
+#     shell:
+#         "kmc -k21 -ci10 -t{threads} -v -fq {input.fastq} {params.prefix} {output.dir} > {output.kmcLOG} 2>&1"
+
+# rule write_chrom_size:
+#     """
+#     need params.prefix so kmc writes into the output dir
+#     """
+#     input:
+#         kmcLOG = os.path.join(dir.out.kmc,"{sample}", "{sample}_kmcLOG.txt")
+#     output:
+#         chrom_size = os.path.join(dir.out.chrom_size,"{sample}", "{sample}_kmc_estimated_chrom_size.txt"),
+#     conda:
+#         os.path.join(dir.env, "scripts.yaml")
+#     threads:
+#         config.resources.sml.cpu
+#     resources:
+#         mem_mb=config.resources.sml.mem,
+#         mem=str(config.resources.sml.mem) + "MB",
+#         time=config.resources.sml.time,
+#     script:
+#         os.path.join(dir.scripts, "write_chrom_size.py")
+
+# rule aggr_kmc:
+#     """
+#     aggregates over all samples
+#     """
+#     input:
+#         expand(os.path.join(dir.out.chrom_size,"{sample}", "{sample}_kmc_estimated_chrom_size.txt"), sample=SAMPLES),
+#         expand(os.path.join(dir.out.kmc,"{sample}", "{sample}_kmcLOG.txt"), sample=SAMPLES)
+#     output:
+#         flag=os.path.join(dir.out.flags, "aggr_kmc.flag"),
+#     resources:
+#         mem_mb=config.resources.sml.mem,
+#         mem=str(config.resources.sml.mem) + "MB",
+#         time=config.resources.sml.time,
+#     threads: config.resources.sml.cpu
+#     shell:
+#         """
+#         touch {output.flag}
+#         """
diff --git a/hybracter/workflow/rules/processing/extract_fastas.smk b/hybracter/workflow/rules/processing/extract_fastas.smk
index e5d224ad..0467a56d 100644
--- a/hybracter/workflow/rules/processing/extract_fastas.smk
+++ b/hybracter/workflow/rules/processing/extract_fastas.smk
@@ -6,11 +6,22 @@ checkpoint check_completeness:
     input:
         fasta=os.path.join(dir.out.assemblies, "{sample}", "assembly.fasta"),
         info=os.path.join(dir.out.assemblies, "{sample}", "assembly_info.txt"),
-        kmc=os.path.join(dir.out.kmc,"{sample}", "{sample}_kmcLOG.txt"),
+        lrge=os.path.join(
+            dir.out.chrom_size, "{sample}_lrge_estimated_chromosome_size.txt"
+        ),
     output:
         completeness_check=os.path.join(dir.out.completeness, "{sample}.txt"),
     params:
-        min_chrom_length=lambda wildcards: str(getMinChromLength(kmc_log_path=os.path.join(dir.out.kmc, f"{wildcards.sample}", f"{wildcards.sample}_kmcLOG.txt"), sample=wildcards.sample,auto=AUTO)),
+        min_chrom_length=lambda wildcards: str(
+            getMinChromLength(
+                lrge_path=os.path.join(
+                    dir.out.chrom_size,
+                    f"{wildcards.sample}_lrge_estimated_chromosome_size.txt",
+                ),
+                sample=wildcards.sample,
+                auto=AUTO,
+            )
+        ),
     conda:
         os.path.join(dir.env, "scripts.yaml")
     resources:
@@ -31,12 +42,23 @@ rule extract_chromosome_complete:
         fasta=os.path.join(dir.out.assemblies, "{sample}", "assembly.fasta"),
         info=os.path.join(dir.out.assemblies, "{sample}", "assembly_info.txt"),
         completeness_check=os.path.join(dir.out.completeness, "{sample}.txt"),
-        kmc=os.path.join(dir.out.kmc,"{sample}", "{sample}_kmcLOG.txt")
+        lrge=os.path.join(
+            dir.out.chrom_size, "{sample}_lrge_estimated_chromosome_size.txt"
+        ),
     output:
         fasta=os.path.join(dir.out.chrom_pre_polish, "{sample}_chromosome.fasta"),
         ignore_list=os.path.join(dir.out.chrom_pre_polish, "{sample}_ignore_list.txt"),
     params:
-        min_chrom_length=lambda wildcards: str(getMinChromLength(kmc_log_path=os.path.join(dir.out.kmc, f"{wildcards.sample}", f"{wildcards.sample}_kmcLOG.txt"), sample=wildcards.sample,auto=AUTO)),
+        min_chrom_length=lambda wildcards: str(
+            getMinChromLength(
+                lrge_path=os.path.join(
+                    dir.out.chrom_size,
+                    f"{wildcards.sample}_lrge_estimated_chromosome_size.txt",
+                ),
+                sample=wildcards.sample,
+                auto=AUTO,
+            )
+        ),
         polypolish_flag=False,
     conda:
         os.path.join(dir.env, "scripts.yaml")
@@ -61,7 +83,16 @@ rule copy_flye_intermediate_chrom_assembly:
             dir.out.intermediate_assemblies, "{sample}", "{sample}_flye.fasta"
         ),
     params:
-        min_chrom_length=lambda wildcards: str(getMinChromLength(kmc_log_path=os.path.join(dir.out.kmc, f"{wildcards.sample}", f"{wildcards.sample}_kmcLOG.txt"), sample=wildcards.sample,auto=AUTO)),
+        min_chrom_length=lambda wildcards: str(
+            getMinChromLength(
+                lrge_path=os.path.join(
+                    dir.out.chrom_size,
+                    f"{wildcards.sample}_lrge_estimated_chromosome_size.txt",
+                ),
+                sample=wildcards.sample,
+                auto=AUTO,
+            )
+        ),
     conda:
         os.path.join(dir.env, "scripts.yaml")
     resources:
@@ -106,11 +137,22 @@ rule extract_incomplete:
     input:
         fasta=os.path.join(dir.out.assemblies, "{sample}", "assembly.fasta"),
         completeness_check=os.path.join(dir.out.completeness, "{sample}.txt"),
-        kmc=os.path.join(dir.out.kmc,"{sample}", "{sample}_kmcLOG.txt")
+        lrge=os.path.join(
+            dir.out.chrom_size, "{sample}_lrge_estimated_chromosome_size.txt"
+        ),
     output:
         fasta=os.path.join(dir.out.incomp_pre_polish, "{sample}.fasta"),
     params:
-        min_chrom_length=lambda wildcards: str(getMinChromLength(kmc_log_path=os.path.join(dir.out.kmc, f"{wildcards.sample}", f"{wildcards.sample}_kmcLOG.txt"), sample=wildcards.sample,auto=AUTO)),
+        min_chrom_length=lambda wildcards: str(
+            getMinChromLength(
+                lrge_path=os.path.join(
+                    dir.out.chrom_size,
+                    f"{wildcards.sample}_lrge_estimated_chromosome_size.txt",
+                ),
+                sample=wildcards.sample,
+                auto=AUTO,
+            )
+        ),
     conda:
         os.path.join(dir.env, "scripts.yaml")
     resources:
diff --git a/hybracter/workflow/rules/processing/qc.smk b/hybracter/workflow/rules/processing/qc.smk
index d91c94d3..7d7e7b16 100644
--- a/hybracter/workflow/rules/processing/qc.smk
+++ b/hybracter/workflow/rules/processing/qc.smk
@@ -5,7 +5,9 @@ rule filtlong:
     """
     input:
         fastq=get_input_lr_fastqs,
-        kmc=os.path.join(dir.out.kmc,"{sample}", "{sample}_kmcLOG.txt")
+        lrge=os.path.join(
+            dir.out.chrom_size, "{sample}_lrge_estimated_chromosome_size.txt"
+        ),
     output:
         fastq=temp(os.path.join(dir.out.qc, "{sample}_filt.fastq.gz")),
         version=os.path.join(dir.out.versions, "{sample}", "filtlong.version"),
@@ -19,7 +21,17 @@ rule filtlong:
     params:
         qual=config.args.min_quality,
         length=config.args.min_length,
-        target_bases=lambda wildcards: str(getTargetBases(kmc_log_path=os.path.join(dir.out.kmc,f"{wildcards.sample}", f"{wildcards.sample}_kmcLOG.txt"),sample=wildcards.sample, auto=AUTO, target_depth=SUBSAMPLE_DEPTH)),
+        target_bases=lambda wildcards: str(
+            getTargetBases(
+                lrge_path=os.path.join(
+                    dir.out.chrom_size,
+                    f"{wildcards.sample}_lrge_estimated_chromosome_size.txt",
+                ),
+                sample=wildcards.sample,
+                auto=AUTO,
+                target_depth=SUBSAMPLE_DEPTH,
+            )
+        ),
     benchmark:
         os.path.join(dir.out.bench, "filtlong", "{sample}.txt")
     log:
diff --git a/hybracter/workflow/rules/processing/remove_contaminants_qc.smk b/hybracter/workflow/rules/processing/remove_contaminants_qc.smk
index dfee529f..98dac508 100644
--- a/hybracter/workflow/rules/processing/remove_contaminants_qc.smk
+++ b/hybracter/workflow/rules/processing/remove_contaminants_qc.smk
@@ -98,7 +98,9 @@ rule filtlong:
         fastq=os.path.join(
             dir.out.contaminant_removal, "{sample}", "{sample}.host_rm.fastq.gz"
         ),
-        kmc=os.path.join(dir.out.kmc,"{sample}", "{sample}_kmcLOG.txt")
+        lrge=os.path.join(
+            dir.out.chrom_size, "{sample}_lrge_estimated_chromosome_size.txt"
+        ),
     output:
         fastq=temp(os.path.join(dir.out.qc, "{sample}_filt.fastq.gz")),
         version=os.path.join(dir.out.versions, "{sample}", "filtlong.version"),
@@ -112,7 +114,17 @@ rule filtlong:
     params:
         qual=config.args.min_quality,
         length=config.args.min_length,
-        target_bases=lambda wildcards: str(getTargetBases(kmc_log_path=os.path.join(dir.out.kmc,f"{wildcards.sample}", f"{wildcards.sample}_kmcLOG.txt"),sample=wildcards.sample, auto=AUTO, target_depth=SUBSAMPLE_DEPTH)),
+        target_bases=lambda wildcards: str(
+            getTargetBases(
+                lrge_path=os.path.join(
+                    dir.out.chrom_size,
+                    f"{wildcards.sample}_lrge_estimated_chromosome_size.txt",
+                ),
+                sample=wildcards.sample,
+                auto=AUTO,
+                target_depth=SUBSAMPLE_DEPTH,
+            )
+        ),
     benchmark:
         os.path.join(dir.out.bench, "filtlong", "{sample}.txt")
     log:


Test patch:
diff --git a/hybracter/workflow/test_hybrid.smk b/hybracter/workflow/test_hybrid.smk
index 7025bc0c..64d53879 100644
--- a/hybracter/workflow/test_hybrid.smk
+++ b/hybracter/workflow/test_hybrid.smk
@@ -69,24 +69,26 @@ MAC = config.args.mac
 MEDAKA_OVERRIDE = config.args.medaka_override
 EXTRA_PARAMS_FLYE = config.args.extra_params_flye
 # flag to add extra arguments to flye
-ADD_TO_FLYE =  False
+ADD_TO_FLYE = False
 
 # Only if user specifies - otherwise None
 if EXTRA_PARAMS_FLYE:
-    ADD_TO_FLYE =  True
+    ADD_TO_FLYE = True
     print(f"The extra parameters {EXTRA_PARAMS_FLYE} will be used with Flye ")
 
 
-# By default, hybracter (linux) will use --bacteria from v0.10.0 onwards 
+# By default, hybracter (linux) will use --bacteria from v0.10.0 onwards
 # To take advantage of improvements with medaka v2 https://rrwick.github.io/2024/10/17/medaka-v2.html
-# not true if 1) --mac or 2) --medaka_override is specified 
-BACTERIA = True 
+# not true if 1) --mac or 2) --medaka_override is specified
+BACTERIA = True
 if MAC:
     BACTERIA = False
 else:
     if MEDAKA_OVERRIDE:
         BACTERIA = False
-        print(f"As you have selected --medaka_override, {MEDAKA_MODEL} will be used with Medaka, not --bacteria ")
+        print(
+            f"As you have selected --medaka_override, {MEDAKA_MODEL} will be used with Medaka, not --bacteria "
+        )
 
 # MAC medaka
 
@@ -134,9 +136,11 @@ SAMPLES = ["Sample1", "Sample2"]
 # Import rules and functions
 ##############################
 
-# kmc - needs to be included due to the chckpointing
+
+# lrge - needs to be included due to the chckpointing
 include: os.path.join("rules", "processing", "estimate_chromosome.smk")
 
+
 # qc and host
 # depends on whehter --contaminants has been specified and --skip_qc flag activiated
 if config.args.contaminants != "none":  # where --contaminants specified
diff --git a/hybracter/workflow/test_long.smk b/hybracter/workflow/test_long.smk
index eba95b70..c8bcd5c5 100644
--- a/hybracter/workflow/test_long.smk
+++ b/hybracter/workflow/test_long.smk
@@ -69,23 +69,25 @@ MAC = config.args.mac
 MEDAKA_OVERRIDE = config.args.medaka_override
 EXTRA_PARAMS_FLYE = config.args.extra_params_flye
 # flag to add extra arguments to flye
-ADD_TO_FLYE =  False
+ADD_TO_FLYE = False
 
 # Only if user specifies - otherwise None
 if EXTRA_PARAMS_FLYE:
-    ADD_TO_FLYE =  True
+    ADD_TO_FLYE = True
     print(f"The extra parameters {EXTRA_PARAMS_FLYE} will be used with Flye ")
 
-# By default, hybracter (linux) will use --bacteria from v0.10.0 onwards 
+# By default, hybracter (linux) will use --bacteria from v0.10.0 onwards
 # To take advantage of improvements with medaka v2 https://rrwick.github.io/2024/10/17/medaka-v2.html
-# not true if 1) --mac or 2) --medaka_override is specified 
-BACTERIA = True 
+# not true if 1) --mac or 2) --medaka_override is specified
+BACTERIA = True
 if MAC:
     BACTERIA = False
 else:
     if MEDAKA_OVERRIDE:
         BACTERIA = False
-        print(f"As you have selected --medaka_override, {MEDAKA_MODEL} will be used with Medaka, not --bacteria ")
+        print(
+            f"As you have selected --medaka_override, {MEDAKA_MODEL} will be used with Medaka, not --bacteria "
+        )
 
 # MAC medaka
 
@@ -134,9 +136,11 @@ SAMPLES = ["Sample1", "Sample2"]
 # Import rules and functions
 ##############################
 
-# kmc - needs to be included due to the chckpointing
+
+# lrge - needs to be included due to the chckpointing
 include: os.path.join("rules", "processing", "estimate_chromosome.smk")
 
+
 # qc and host
 # depends on whehter --contaminants has been specified and --skip_qc flag activiated
 if config.args.contaminants != "none":  # where --contaminants specified
diff --git a/tests/test_hybracter.py b/tests/test_hybracter.py
index c95ac9c5..fd294fdd 100644
--- a/tests/test_hybracter.py
+++ b/tests/test_hybracter.py
@@ -159,11 +159,13 @@ def test_hybracter_t_long_last(run_mac):
     remove_directory(outdir)
 
 def test_hybracter_t_long_depth_filter(run_mac):
-    """hybracter test-long with depth_filter"""
+    """hybracter test-long with depth_filter - also methylation model for linux"""
     outdir: Path = "test_hybracter_output"
-    cmd = f"hybracter test-long --threads {threads} --output {outdir}--skip_qc --depth_filter 2"
+    cmd = f"hybracter test-long --threads {threads} --output {outdir} --skip_qc  --depth_filter 2"
     if run_mac:
         cmd += " --mac"
+    else:
+        cmd += " --medakaModel r1041_e82_400bps_bacterial_methylation"
     exec_command(cmd)
     remove_directory(outdir)