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
It appears that requests to output a subset of reads (using either the
--only-alignedor the--only-unalignedflags) are ignored byfasterq-dump(version 3.0.0) when fasta output has been specified with the--fastaflag:For example, when extracting reads from
ERR1138826, the number of reads written does not change when the--only-unalignedflag is used in conjunction with--fasta:The same unexpected behavior is encountered when combining
--fastaand--only-aligned. However, the expected output is obtained when--fasta-unsortedis used instead of--fasta, i.e.: