1 /* $Id: kmer-search.h 222758 2020-06-01 00:22:58Z twu $ */
2 #ifndef KMER_SEARCH_INCLUDED
3 #define KMER_SEARCH_INCLUDED
4 
5 #include "mode.h"
6 #include "list.h"
7 #include "indexdb.h"
8 #include "iit-read-univ.h"
9 #include "transcriptome.h"
10 #include "compress.h"
11 #include "genome.h"
12 
13 #include "univdiag.h"
14 #include "stage1hr.h"
15 #include "stage3hr.h"
16 #include "listpool.h"
17 #include "hitlistpool.h"
18 
19 typedef struct Path_T *Path_T;
20 
21 
22 extern List_T
23 Kmer_remap_transcriptome (char *remap_sequence, int remap_seqlength,
24 			  Chrnum_T chrnum, Chrpos_T lowbound, Chrpos_T highbound,
25 			  Univ_IIT_T transcript_iit,
26 			  Genome_T transcriptomebits, Transcriptome_T transcriptome);
27 
28 extern void
29 Kmer_search_transcriptome_single (int *found_score_overall, int *found_score_within_trims,
30 				  List_T *sense_hits_gplus, List_T *sense_hits_gminus,
31 				  List_T *antisense_hits_gplus, List_T *antisense_hits_gminus,
32 
33 				  char *queryuc_ptr, int querylength,
34 				  Trcoord_T **tplus_stream_array, int *tplus_streamsize_array, int *tplus_diagterm_array,
35 				  Trcoord_T **tminus_stream_array, int *tminus_streamsize_array, int *tminus_diagterm_array,
36 				  Compress_T query_compress_fwd, Compress_T query_compress_rev,
37 				  Univ_IIT_T transcript_iit, Transcriptome_T transcriptome, Genome_T transcriptomebits,
38 				  int nmismatches_allowed,
39 				  Listpool_T listpool, Hitlistpool_T hitlistpool, int level);
40 
41 /* Does not take paired_end_p as a parameter.  ? Generates both sense and antisense */
42 extern void
43 Kmer_search_genome_ends_exact (bool *abort_exact_p, int *found_score_overall, int *found_score_within_trims,
44 			       List_T *sense_hits_gplus, List_T *sense_hits_gminus,
45 			       List_T *antisense_hits_gplus, List_T *antisense_hits_gminus,
46 			       Stage1_T stage1, int querylength, int *mismatch_positions_alloc,
47 			       Compress_T query_compress_fwd, Compress_T query_compress_rev,
48 			       int genestrand, int nmismatches_allowed,
49 			       Listpool_T listpool, Hitlistpool_T hitlistpool, int level);
50 
51 /* Takes sizelimit because merging can be expensive */
52 extern void
53 Kmer_search_genome_ends_approx (int *found_score_overall, int *found_score_within_trims,
54 				List_T *sense_hits_gplus, List_T *sense_hits_gminus,
55 				List_T *antisense_hits_gplus, List_T *antisense_hits_gminus,
56 				Stage1_T stage1, int *mismatch_positions_alloc,
57 				Compress_T query_compress_fwd, Compress_T query_compress_rev,
58 				int querylength, int genestrand, int nmismatches_allowed,
59 				int max_deletionlen, Chrpos_T overall_max_distance, int sizelimit,
60 				Listpool_T listpool, Hitlistpool_T hitlistpool, int level);
61 
62 extern void
63 Kmer_search_setup (Mode_T mode_in, int index1part_tr_in,
64 		   int index1part_in, int index1interval_in, int local1part_in,
65 		   Trcoord_T transcriptomelength_in, int min_intronlength_in,
66 		   Univ_IIT_T chromosome_iit_in, Univcoord_T genomelength_in,
67 		   int circular_typeint_in, bool *circularp_in,
68 		   Genome_T genomebits_in, Genome_T genomebits_alt_in,
69 		   Indexdb_T indexdb_in, Indexdb_T indexdb2_in, Indexdb_T indexdb_tr_in,
70 		   bool splicingp_in, Univcoord_T *splicesites_in, Splicetype_T *splicetypes_in,
71 		   Chrpos_T *splicedists_in, int nsplicesites_in);
72 #endif
73