Skip to content

fasterq-dump "--only-aligned" and "--only-unaligned" ignored when combined with "--fasta" #793

@jgans

Description

@jgans

It appears that requests to output a subset of reads (using either the --only-aligned or the --only-unaligned flags) are ignored by fasterq-dump (version 3.0.0) when fasta output has been specified with the --fasta flag:

For example, when extracting reads from ERR1138826, the number of reads written does not change when the --only-unaligned flag is used in conjunction with --fasta:

$ fasterq-dump ERR1138826 --fasta --only-unaligned
spots read      : 4,227,697
reads read      : 8,455,394
reads written   : 8,455,394 <-- Output includes aligned and unaligned (unexpected behavior!)

$ fasterq-dump ERR1138826 --fasta
spots read      : 4,227,697
reads read      : 8,455,394
reads written   : 8,455,394

The same unexpected behavior is encountered when combining --fasta and --only-aligned. However, the expected output is obtained when --fasta-unsorted is used instead of --fasta, i.e.:

$ fasterq-dump ERR1138826 --fasta-unsorted --only-unaligned
spots read      : 4,227,697
reads read      : 1,662,845
reads written   : 1,662,845 <-- Output only includes unaligned reads (as expected)

$ fasterq-dump ERR1138826 --fasta-unsorted
spots read      : 4,227,697
reads read      : 8,455,394
reads written   : 8,455,394

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions