-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
align: pass the class AlignerUtils from Java to C (prototype) #8
- Loading branch information
Showing
14 changed files
with
333 additions
and
110 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
20 changes: 18 additions & 2 deletions
20
hpg-bigdata-core/native/jni/org_opencb_hpg_bigdata_core_NativeAligner.h
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
58 changes: 58 additions & 0 deletions
58
hpg-bigdata-core/native/third-party/hpg-aligner/hpg-aligner.h
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,58 @@ | ||
//-------------------------------------------------------------------------------- | ||
// | ||
//-------------------------------------------------------------------------------- | ||
|
||
typedef struct aligner_params { | ||
int num_seeds; | ||
float min_sw_score; | ||
|
||
char *seq_filename1; | ||
char *seq_filename2; | ||
char *out_dirname; | ||
char *index_dirname; | ||
|
||
} aligner_params_t; | ||
|
||
inline void aligner_params_display(aligner_params_t *params) { | ||
if (params) { | ||
printf("num. seeds: %i\n", params->num_seeds); | ||
printf("min. SW score: %0.2f\n", params->min_sw_score); | ||
|
||
printf("\n"); | ||
printf("seq. filename #1: %s\n", params->seq_filename1); | ||
printf("seq. filename #2: %s\n", params->seq_filename2); | ||
printf("\n"); | ||
printf("out dir. name : %s\n", params->out_dirname); | ||
printf("index dir. name: %s\n", params->index_dirname); | ||
|
||
} | ||
} | ||
|
||
inline aligner_params_t *aligner_params_new() { | ||
aligner_params_t *res = (aligner_params_t *) calloc(1, sizeof(aligner_params_t)); | ||
return res; | ||
} | ||
|
||
inline void aligner_params_free(aligner_params_t *params) { | ||
if (params) { | ||
printf("freeing aligner params:\n"); | ||
aligner_params_display(params); | ||
|
||
if (params->seq_filename1) free(params->seq_filename1); | ||
if (params->seq_filename2) free(params->seq_filename2); | ||
if (params->out_dirname) free(params->out_dirname); | ||
if (params->index_dirname) free(params->index_dirname); | ||
|
||
free(params); | ||
} | ||
} | ||
|
||
//-------------------------------------------------------------------------------- | ||
|
||
void *load_index(const char *index_path); | ||
void free_index(void *index); | ||
|
||
char *map(const char *fastq, void *index); | ||
|
||
//-------------------------------------------------------------------------------- | ||
//-------------------------------------------------------------------------------- |
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
Oops, something went wrong.