vsearch
vsearch copied to clipboard
New option to output sequence length
This is low priority, as it can be easily done with a few shell commands.
An option to output sequence length (in nucleotides) would be useful. It could be name --lengthout
, on the same model than --sizeout
, --eeout
. It could be inserted in fasta/fastq headers as such: ;length=243[;]
.
And an option --xlength
to remove the length annotation if present.
Added the --lengthout
and --xlength
options in commit 0d34660.
It took just 7 years...
No problem, I am here for the long run. Thanks a lot for that new feature!
tests added https://github.com/frederic-mahe/vsearch-tests/commit/8b6f8ce07a15e342085da117e8db923f00a6fd49
Without looking at the code, and given the fact that --xlength
and --lengthout
can be used at the same time, I am right to assume that --xlength
acts on the input and --lengthout
on the output?
Yes, --xlength
will remove any "length=123" attributes from the input, while --lengthout
will add it to the output. This applies to both FASTA and FASTQ files.
I haven't added any documentation yet. Will do.
I've updated the manpage to indicate that --xlength
acts on input and can be combined with --lengthout
(see https://github.com/torognes/vsearch/commit/53b94e527b684072877a153f6475f23c0db973ba)
Finally closing that issue old issue :-)
issue fully tested in our test suite (see https://github.com/frederic-mahe/vsearch-tests/commit/8b6f8ce07a15e342085da117e8db923f00a6fd49)