- Concatenates reads and contigs by block copy rather than round-tripping every record through BioPython.
concatenate_single_fastqparsed both inputs into a list ofSeqRecords and wrote them out again, which costs roughly 5-10x the file size in RAM; on 250 MiB of short reads that was 27s and 1.8 GB of peak RSS, and is now 0.7s and 46 MB. Only the non-chromosomal short reads pass through here, so the saving is a transient GB or two rather than the whole run - but it landed immediately before Unicycler, which needs the memory itself.Plass.get_depth_longno longer builds its own list of records either. Thanks @sanjaynagi-eit (#90) - A wrong-format input is now caught by checking the first byte against the format's record marker (
@or>) instead of by parsing every record, keeping that check at O(1) instead of O(file). One consequence: a truncated uncompressed FASTQ is no longer rejected, where full parsing used to raise. Truncated.gzinput still fails, because the decompressor raises before the copy finishes - Concatenation now writes to a
.tmpsibling and renames it into place. A wrong-format second input, a truncated gzip or a full disk can no longer leave a half-written FASTQ where the run expects a complete one, and a failed re-run leaves any previous output intact - An empty
chromosome.fastareachingAssembly.combine_input_fastasis now a fatal error with a message explaining it.list(SeqIO.parse(...))[0]used to raiseIndexErrorthere; streaming the records has no equivalent, and without an explicit check every depth and copy number would have been computed against acombined.fastacontaining no chromosome
- Fixes the 75bp head and tail cropping of long reads, which had been silently ignored since
chopperv0.11.0. From v0.11.0,chopperonly applies--headcrop/--tailcropwhen--trim-approach fixed-cropis also specified, soplassemblernow passes this - Bumps the minimum
chopperversion to v0.11.0 - As a result, filtered long reads are 150bp shorter as originally intended, and reads falling below
--min_lengthafter cropping are now removed. Expect small changes to long read depths and plasmid copy number estimates compared to v1.8.3 - Makes
chopperfailures fatal. Previously only the last process in the read filtering pipeline was checked, so achopperthat exited non-zero (for example, an oldchopperrejecting--trim-approach) left a valid but emptychopper_long_reads.fastq.gzand the assembly continued with zero reads.plassemblernow checks every stage, reportschopper's own error message rather than only the path to the logfile, rejects empty filtered output, and exits. The per-stage process handling this builds on came from @sanjaynagi-eit (#88), which also uncovered thattests/test_data/end_to_end/input_half.fastq.gzhad always ended mid-record, sochopperhad been failing on it unnoticed plassemblernow warns if the installedchopperis older than v0.11.0, as version pins only bind when an environment is first created- Compresses filtered long reads with
bgzip -@rather thangzip, which is roughly 10x faster on a multi-core machine and produces slightly smaller output. BGZF is a valid gzip stream, so nothing downstream changes, andgzipis still used wherebgzipis unavailable. Note thatbgzipreaches plassembler only viasamtools' dependency onhtslib, which does not currently resolve on Apple Silicon - M-series users get thegzipfallback and no speedup. Thanks @sanjaynagi-eit (#88)
- Migrates the build and development tooling from Poetry to Pixi
- Switches the build backend to hatchling and linting/formatting to ruff
- Single-sources the package version via
importlib.metadata
- Fixes minor issues with
--skip_qc(#73) and--no_chromosome(#74)
- Fixes issues with
--skip_qcwhen using non gzipped FASTQ reads (#60) - Fixes issue with fastp versions #64
- Add skip_mash to run Plassembler without the database mash search #61
-
Relaxes Python version dependency to >=3.8,<3.14 from >=3.8,<3.10
-
Minor change to log file error behaviour #69
-
Thanks @rrwick for both changes
-
Bug fix with
--forceforplassembler download, which will only remove the output directory if--forceis specified (#49).
- Bug fix with
--forceforplassembler download, which will only remove the output directory if--forceis specified (#49).
- Bug fixes and added tests for
--depth_filterwhich would crash in some scenarios.
- Adds
--depth_filter. This will filter out all contigs that have long- (and short-read forplassembler run) read copy numbers that are less than the specified depth filter. Defaults to 0.25x. - Adds
--unicycler_optionsand--spades_optionswhich allows passing extra Unicycler options (#46)
- Fixes #44, where
--use_ravenwas not working (Flye would be used instead). Thanks @wanyuac.
- If you upgrade to v1.5.0, you will need to update the database using
plassembler download - Plassembler v1.5.0 incorporates a new database thanks to the recent PLSDB release 2023_11_03_v2. Thanks @biobrad for the heads up.
- Fixes bug with
plassembler run, which would exit ungracefully if the isolate had more than 1 chromosome, but no plasmids were recovered by Unicycler (e.g. ATCC 17802).
- Adds
--no_chromosomeoption toplassembler longandplassembler runafter a request to allow for the assembly of read sets that have only plasmids. - Using this will skip Flye and create a dummy 3MB chromosome full of A's.
- Fixes another bug here issue.
plassembler longshould yield improved results. It achieves this by treating long reads as both short reads (in the sense of creating a de Brujin graph based assembly) and long reads (for scaffolding) in Unicycler.- While I'd still recommend short reads if you can get them, I am now confident that if your isolate has small plasmids in the long read set,
plassembler longshould find them. - For more information, see the documentation.
- The ability to specify a
--flye_assemblyand--flye_infoif you already have a Flye assembly for your long reads instead of--flye_directoryhas been added. Thanks to @incoherentian's issue - The ability to specify a
--no_copy_numberswithplassembler assembledif you just want to run some plasmids against the PLSDB has been added. Thanks to @gaworj's issue.
plassembler v1.2.0 implements the following features:
plassembler longofficially released and implemented using Canu and dnaapler to reassemble unmapped reads in place of Unicycler forplassembler run. While we'd still recommend getting short reads if you really want to recover plasmids, as long as your long reads are short enough (i.e. not size selected),plassembler longshould hopefully recover most small plasmids.- For more information, see the documentation.
- Faster mapping thanks to @fanvanf's issue.
- The ability to specify a
--flye_directoryif you already have a Flye assembly for your long reads, which will tellplassemblerto skip the long read assembly step.
- Refactored codebase and release on pypi
- Adds unit tests and CI
- Replace
argparsewithclick - Adds option to skip chopper and fastq to
plassembler runusing--skip_qc - Breaking CLI changes to be compatible with click
plassembler.pychanged toplassembler run- Adds Raven long read assembly option to
plassembler runusing--use_raven install_database.pychanged toplassembler download- Assembled mode now
plassembler assembled - Untested/experimental long read only mode using
plassembler long - Removes rasusa,
-sand--no_subsample. If users want faster runtimes, we recommend--use_ravenor conduct subsampling prior.
- Large overhaul.
- Adds
--pacbio_modelfor pacbio data - Replaces nanofilt with chopper
- Adds
-afor assembled mode - Adds subsampling with rasusa, and
-sto change subsampling depth, and--no_subsampleto turn off subsampling - Adds
--keep_fastqs - Adds
--keep_chromosome - Refactors mapping code
- Adds custom function to identify multimapped reads
- Changes output formats - consolidates all output into
summary.tsv.
- Adds checks for dependencies.
- Adds samtools to bioconda recipe (thanks Jan/gaworj).
- Adds long-only kmer_mode for very high quality Nanopore reads (R10.4 and above) - experimental until I get more data especially with small plasmids. Does exactly the same (Flye -> Unicycler). Seems to work pretty well.
- Adds install_database.py, the Plassembler database and functionality for mapping plasmid contigs to PLDSB.
- Update the API to -1 and -2 for short reads, matching Unicycler.
- Adds mash as dependency.
- Adds plassembler_top_hits_mash_plsdb.tsv output.
- Adds plasmid_copy_number_short and plasmid_copy_number_long to fasta header for each plasmid.
- Checks dependencies upon initialisation, with message to install Unicycler manually if required.
- Fix bugs in bioconda release - unicycler.py and flye.py conflicts
- Code refactored.
- Tests added.
- Bioconda release.
- Adds module find plasmids where Flye assembles only 1 complete chromosome.
- First release