Skip to content

Commit 47eb82a

Browse files
authored
Merge pull request #75 from gbouras13/dev
Dev
2 parents 32ca27d + 2fd8531 commit 47eb82a

7 files changed

Lines changed: 46 additions & 7 deletions

File tree

HISTORY.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
# History
22

3+
1.8.1 (2025-09-27)
4+
------------------
5+
6+
* Fixes minor issues with `--skip_qc` (#73) and `--no_chromosome` (#74)
7+
8+
1.8.0 (2025-06-12)
9+
------------------
10+
11+
* Fixes issues with `--skip_qc` when using non gzipped FASTQ reads (#60)
12+
* Fixes issue with fastp versions #64
13+
* Add skip_mash to run Plassembler without the database mash search #61
14+
15+
1.8.0 (2025-06-23)
16+
------------------
17+
18+
* Relaxes Python version dependency to >=3.8,<3.14 from >=3.8,<3.10
19+
* Minor change to log file error behaviour #69
20+
* Thanks @rrwick for both changes
21+
22+
* Bug fix with `--force` for `plassembler download`, which will only remove the output directory if `--force` is specified (#49).
23+
324
1.6.2 (2024-03-08)
425
------------------
526

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "plassembler"
3-
version = "1.8.0" # change VERSION too
3+
version = "1.8.1" # change VERSION too
44
description = "Quickly and accurately assemble plasmids in hybrid sequenced bacterial isolates"
55
authors = ["George Bouras <george.bouras@adelaide.edu.au>"]
66
license = "MIT"

src/plassembler/__init__.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ def begin_plassembler(outdir, force):
7272
# get start time
7373
start_time = time.time()
7474

75+
# ensure sys exit if error
76+
logger.add(lambda _: sys.exit(1), level="ERROR")
77+
7578
# instantiate the outdir
7679
# remove outdir on force
7780
if force is True:
@@ -94,8 +97,6 @@ def begin_plassembler(outdir, force):
9497
log_file = os.path.join(outdir, f"plassembler_{start_time}.log")
9598
# adds log file
9699
logger.add(log_file)
97-
# ensure sys exit if error
98-
logger.add(lambda _: sys.exit(1), level="ERROR")
99100

100101
logger.info(f"You are using Plassembler version {get_version()}")
101102
logger.info("Repository homepage is https://github.com/gbouras13/plassembler")
@@ -1276,6 +1277,11 @@ def long_options(func):
12761277
help="Use --nano-raw for Flye. \nDesigned for Guppy fast configuration reads. \nBy default, Flye will assume SUP or HAC reads and use --nano-hq.",
12771278
is_flag=True,
12781279
),
1280+
click.option(
1281+
"--keep_fastqs",
1282+
help="Whether you want to keep FASTQ files containing putative plasmid reads \nand long reads that map to multiple contigs (plasmid and chromosome).",
1283+
is_flag=True,
1284+
),
12791285
click.option(
12801286
"--keep_chromosome",
12811287
help="If you want to keep the chromosome assembly.",
@@ -1341,6 +1347,7 @@ def long(
13411347
pacbio_model,
13421348
skip_qc,
13431349
raw_flag,
1350+
keep_fastqs,
13441351
keep_chromosome,
13451352
flye_directory,
13461353
flye_assembly,
@@ -1371,6 +1378,7 @@ def long(
13711378
logger.info(f"--force is {force}")
13721379
logger.info(f"--skip_qc is {skip_qc}")
13731380
logger.info(f"--raw_flag is {raw_flag}")
1381+
logger.info(f"--keep_fastqs is {keep_fastqs}")
13741382
logger.info(f"--pacbio_model is {pacbio_model}")
13751383
logger.info(f"--keep_chromosome is {keep_chromosome}")
13761384
logger.info(f"--flye_directory is {flye_directory}")
@@ -1518,7 +1526,7 @@ def long(
15181526
outdir,
15191527
prefix,
15201528
False, # unicycler success
1521-
False, # keep fastqs
1529+
False, # keep fastqs will be false here as no chromosome
15221530
False, # assembled mode
15231531
True, # long only
15241532
False, # raven false
@@ -1730,7 +1738,7 @@ def long(
17301738
outdir,
17311739
prefix,
17321740
unicycler_success, # unicycler success
1733-
False, # keep fastqs
1741+
keep_fastqs, # keep fastqs
17341742
False, # assembled mode
17351743
True, # long only
17361744
False, # no raven

src/plassembler/utils/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.8.0
1+
1.8.1

src/plassembler/utils/cleanup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ def move_and_copy_files(
8181
:param out_dir: Output Directory
8282
:param prefix: prefix
8383
:param unicycler_success_flag: whether or not unicycler worked
84+
:param keep_fastqs: whether to keep FASTQs
8485
:param assembled_mode: whether or not unicycler worked
8586
:param long_only: whether or not unicycler worked
8687
:param use_raven: whether or not unicycler worked

src/plassembler/utils/no_assembly.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ def create_fake_flye_chromosome_info(assembly_info_file: Path) -> None:
3939
}
4040

4141
flye_info_df = pd.DataFrame(data)
42-
flye_info_df.to_csv(assembly_info_file, index=False)
42+
flye_info_df.to_csv(assembly_info_file, sep="\t", index=False)

tests/test_end_to_end.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,15 @@ def test_plassembler_long(self):
287287
exec_command(cmd)
288288
remove_directory(outdir)
289289

290+
def test_plassembler_long_keep_fastqs(self):
291+
"""test plassembler long"""
292+
longreads: Path = f"{end_to_end}/input_fastq.gz"
293+
chromosome = 50000
294+
outdir: Path = f"{end_to_end}/test_out_keep_fastqs"
295+
cmd = f"plassembler long -l {longreads} -c {chromosome} -d {plassembler_db_dir} -o {outdir} -t 8 -f --keep_fastqs"
296+
exec_command(cmd)
297+
remove_directory(outdir)
298+
290299
def test_plassembler_long_skipmash(self):
291300
"""test plassembler long --skip_mash - no need for -d"""
292301
longreads: Path = f"{end_to_end}/input_fastq.gz"

0 commit comments

Comments
 (0)