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

Support 2bit files #12

Open
bovee opened this issue Aug 21, 2018 · 1 comment
Open

Support 2bit files #12

bovee opened this issue Aug 21, 2018 · 1 comment

Comments

@bovee
Copy link
Contributor

bovee commented Aug 21, 2018

This should be relatively easy (except for autodetection). Basically, copy the FASTA parsing code and add an additional step to parse the "sequence" from a bitstring (that contains a mask too) into a Vec of nucleotides and add a impl<'a> From<TwoBit<'a>> for SeqRecord<'a>. Note we can't use our existing bitkmer code because 2bit decodes 0 to 3 as GACT instead of ACGT as we do.

Format details: http://jcomeau.freeshell.org/www/genome/2bitformat.html (this seems to be a format someone just made up and doesn't match the output of faToTwoBit at all)

Format details: http://genome.ucsc.edu/FAQ/FAQformat.html#format7

@bovee
Copy link
Contributor Author

bovee commented Aug 27, 2019

Autodetection can probably rely upon the first line(s) matching something like >...:\d+-\d+\r?\nP? We probably don't want this as an actual regex though. There's an actual magic header sequence in the details from UCSC.

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