-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from yhoogstrate/mount_2bit
v1.5.0: Allows mounting UCSC 2bit files onto the filesystem using FUSE
- Loading branch information
Showing
15 changed files
with
1,075 additions
and
284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
|
||
#include <vector> | ||
|
||
|
||
#include "utils.hpp" | ||
|
||
#ifndef UCSC2BIT_HPP | ||
#define UCSC2BIT_HPP | ||
|
||
|
||
|
||
|
||
class ucsc2bit_seq | ||
{ | ||
public: | ||
explicit ucsc2bit_seq(); | ||
|
||
std::string name;//may not exceed 255 chars in current datatype | ||
uint32_t data_position;// file offset to start reading sequence data | ||
uint32_t sequence_data_position;// file offset to start reading sequence data | ||
|
||
uint32_t n;// number nucleotides [ACTG + N] | ||
|
||
std::vector<uint32_t> n_starts;// start positions (nucleotide positions; 0-based) | ||
std::vector<uint32_t> n_ends;// end positions (nucleotide positions; 0-based) | ||
|
||
std::vector<uint32_t> m_starts;// start positions (nucleotide positions; 0-based) | ||
std::vector<uint32_t> m_ends;// end positions (nucleotide positions; 0-based) | ||
|
||
uint32_t fasta_filesize(uint32_t); | ||
uint32_t n_padding(uint32_t, uint32_t, uint32_t); | ||
|
||
uint32_t view_fasta_chunk(uint32_t, char*, size_t, off_t, std::ifstream*); | ||
}; | ||
|
||
|
||
|
||
class ucsc2bit | ||
{ | ||
public: | ||
|
||
explicit ucsc2bit(std::string); | ||
~ucsc2bit(); | ||
|
||
std::string name;// needed as basename for mounting | ||
std::string filename; | ||
|
||
void load(std::string); | ||
|
||
std::vector<ucsc2bit_seq*> data; | ||
|
||
|
||
uint32_t n(); | ||
size_t fasta_filesize(uint32_t); | ||
|
||
|
||
uint32_t view_fasta_chunk(uint32_t, char*, size_t, off_t); | ||
uint32_t view_faidx_chunk(uint32_t, char*, size_t, off_t); | ||
std::string get_faidx(uint32_t);//@todo get rid of this, make it full chunked | ||
}; | ||
|
||
|
||
|
||
#endif |
Oops, something went wrong.