Skip to content

plassembler long passes wrong commands to canu for pacbio-hifi #84

Description

@Kincekara

Describe the bug
When plassembler long is run with --pacbio_model pacbio-hifi flag, the program runs canu with -pacbio flag instead of -pacbio-hifi

pacbio_model is set to --pacbio-hifi in here (possibly for the flye):

elif pacbio_model == "pacbio-hifi":
message = (
"You have selected pacbio-hifi designed for PacBio HiFi reads (<1% error)."
)
logger.info(message)
pacbio_model = "--pacbio-hifi"

So it falls into the else condition here:

if pacbio_model != "nothing":
if pacbio_model == "pacbio-hifi":
canu_nano_or_pacbio = "pacbio-hifi"
corrected_error_rate = 0.005
else:
canu_nano_or_pacbio = "pacbio"
corrected_error_rate = 0.045
else:
canu_nano_or_pacbio = "nanopore"

Although a simple change of if condition to if pacbio_model == "--pacbio-hifi": fixes the logic, it creates another problem below, because hifi reads are considered as corrected.

-- ERROR:
-- ERROR:  Cannot correct already corrected or already trimmed reads.
-- ERROR:   - If the reads are raw (uncorrected), or to run
-- ERROR:     correction again, remove '-corrected'.
-- ERROR:   - Otherwise, remove the '-correct' option.
-- ERROR:

To Reproduce
I used PacBio's public data here:
https://downloads.pacbcloud.com/public/dataset/2021-11-Microbial-96plex/demultiplexed-reads/m64004_210929_143746.bc2001.bam

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions