SubseqHash2 employs a seeding approach that utilizes minimized subsequences as seeds.
Comparing to SubseqHash, SubseqHash2 not only produces high-quality seeds for input genome sequences but also significantly improves running time by algorithmic innovation and applying SIMD instructions.
This repository includes the source code for four distinct experiments, each housed in its respective folder:
folder hash_collision contains code for computing the probability of hash collision of different methods.
Folder alignment has code for comparing different methods in pairwise sequence alignment. Folder read_mapping has code for comparing different methods in mapping reads to reference genome.
Folder overlap_detection provides code for comparing SubseqHash with other methods on the seeding step of overlap detection.
The repository can be installed with following command. The detailed instruction of each experiment can be found in the corresponding folder.
git clone https://github.com/Shao-Group/subseqhash2.git
cd src
make product
To use SubseqHash2 for seed generation, please refer to the example in ./src/sample.cpp. You can run the following commands:
-
../src/gentable.out k d ./table_saving_pathgenerates a random table for SubseqHash2, wherekis the length of subsequence,dis a parameter, and./table_saving_pathis the path of the file saving the tables. A sample file is at./table/6_5with k = 6 and d = 5. -
Run
../src/sample.out n k d t table_file data.fastato get the sequence alignment results using SubseqHash2.n,kanddare the parameters,tis the number of repeating times,table_fileis the path to the previously generated table file (with matching parameters). The data file must be in FASTA format. An example is../src/sample.out 10 6 5 6 ./table/6_5 ./sample.fa. The output gives the starting position, hash value, and the actual subsequence for each generated seed.