Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken read numbering when decompressing archive without headers #8

Open
KirillKryukov opened this issue Nov 12, 2019 · 0 comments
Open

Comments

@KirillKryukov
Copy link

KirillKryukov commented Nov 12, 2019

Leon has option "-seq-only" that allows ignoring read names during compression. When decompressing a Leon archive produced with this option, Leon automatically names the decompressed sequences using numbers starting from 0. These numbers go until 50,000, at which point the counter resets to 0. Additionally, an empty sequence is generated at the 50,000 reads boundary. Fragment of the decompressed output:

> 49998
ACACAACTATAATAGGGAAA
> 49999
TTGATTGTTTTGTTTTTGTG
> 50000
> 0
TTCGGATAGTGTGTTCATTA
> 1
TCTCTTTCTTTGGTGATTGA
> 2
CGTCGAGTTGTTTAATTAAA

The two main problems with this counting are:

  1. An empty sequence (with name " 50000") is generated during decompression, although the original file had no such sequence.

  2. Sequence names are not unique. When the data is sufficiently large, the decompressed file will have multiple sequences with each name.

To fix to this problem I suggest removing the artificial upper bound of 50,000 reads.

Also, considering the possibility of huge data, I recommend making sure that the counter can't overflow (e.g., by using arbitrary precision number).

In addition, I would suggest to avoid putting a space between ">" and name, and to start counting with 1 (instead of 0). This will make the output a bit more friendly to downstream tools and to interpretation. But these are less important and can be considered a preference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant