Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
blast_service_job_markup.h
Go to the documentation of this file.
1 /*
2  * blast_service_job_markup.h
3  *
4  * Created on: 17 Jan 2017
5  * Author: billy
6  *
7  * @file
8  */
9 
10 #ifndef SERVER_SRC_SERVICES_BLAST_INCLUDE_BLAST_SERVICE_JOB_MARKUP_H_
11 #define SERVER_SRC_SERVICES_BLAST_INCLUDE_BLAST_SERVICE_JOB_MARKUP_H_
12 
13 #include "blast_service.h"
14 #include "blast_service_api.h"
15 #include "typedefs.h"
16 #include "linked_list.h"
17 
18 #include "jansson.h"
19 
24 typedef enum Strand
25 {
29 } Strand;
30 
31 
32 #ifdef __cplusplus
33 extern "C"
34 {
35 #endif
36 
37 
38 BLAST_SERVICE_LOCAL bool GetAndAddHitLocation (json_t *marked_up_result_p, const json_t *hsps_p, const char *hsp_from_key_s, const char *hsp_to_key_s, const char *strand_key_s, const char *child_key_s);
39 
40 
41 BLAST_SERVICE_LOCAL bool AddHitLocation (json_t *parent_p, const char *child_key_s, const int32 from, const int32 to, const Strand strand);
42 
43 BLAST_SERVICE_LOCAL LinkedList *GetScaffoldsFromHit (const json_t *hit_p, const DatabaseInfo *db_p);
44 
45 BLAST_SERVICE_LOCAL bool MarkUpHit (const json_t *hit_p, json_t *mark_up_p, const DatabaseInfo *db_p);
46 
48 
49 
50 
51 BLAST_SERVICE_LOCAL bool AddSequence (json_t *root_p, const char *key_s, const char *query_sequence_s);
52 
53 BLAST_SERVICE_LOCAL bool AddFaldoTerminus (json_t *parent_json_p, const char *child_key_s, const int32 position, const Strand strand);
54 
55 BLAST_SERVICE_LOCAL bool AddIntScoreValue (json_t *parent_p, const char *key_s, int score_value);
56 
57 BLAST_SERVICE_LOCAL bool AddDoubleScoreValue (json_t *parent_p, const char *key_s, double64 score_value);
58 
59 
60 BLAST_SERVICE_LOCAL bool GetAndAddDoubleScoreValue (json_t *marked_up_result_p, const json_t *hsps_p, const char *hsp_key_s, const char *marked_up_key_s);
61 
62 BLAST_SERVICE_LOCAL bool GetAndAddIntScoreValue (json_t *marked_up_result_p, const json_t *hsps_p, const char *hsp_key_s, const char *marked_up_key_s);
63 
64 BLAST_SERVICE_LOCAL bool GetAndAddSequenceValue (json_t *marked_up_result_p, const json_t *hsps_p, const char *hsp_key_s, const char *sequence_key_s);
65 
66 BLAST_SERVICE_LOCAL bool GetAndAddDatabaseDetails (json_t *marked_up_result_p, const DatabaseInfo *database_p);
67 
68 BLAST_SERVICE_LOCAL bool GetAndAddQueryMetadata (const json_t *blast_search_p, json_t *mark_up_p);
69 
70 
71 BLAST_SERVICE_LOCAL bool AddHitDetails (json_t *marked_up_result_p, const json_t *blast_hit_p, const DatabaseInfo *db_p);
72 
73 
74 BLAST_SERVICE_LOCAL bool AddSubsequenceMarkup (json_t *parent_p, const char *key_s, const char *subsequence_start_s, const uint32 length);
75 
76 BLAST_SERVICE_LOCAL bool GetAndAddNucleotidePolymorphisms (json_t *marked_up_hsp_p, const char *reference_sequence_s, const char *hit_sequence_s, const char *midline_s, uint32 hit_index, const int32 inc_value);
77 
78 BLAST_SERVICE_LOCAL bool AddPolymorphism (json_t *marked_up_hsp_p, const char *hit_gap_start_p, const char *reference_gap_start_p, const uint32 start_of_region, const uint32 end_of_region);
79 
80 
81 BLAST_SERVICE_LOCAL const char *GetDatabaseNameFromMarkedUpJob (const json_t *marked_up_report_p);
82 
83 
94 BLAST_SERVICE_LOCAL bool AddHsp (json_t *marked_up_hit_p, const json_t *hsp_p);
95 
96 
104 BLAST_SERVICE_LOCAL bool GetAndAddDatabaseMappedParameter (LinkedService *linked_service_p, const json_t *report_p, ParameterSet *output_params_p, const char **database_ss);
105 
106 
107 BLAST_SERVICE_LOCAL bool GetAndAddScaffoldsParameter (LinkedService *linked_service_p, json_t *hit_p, ParameterSet *output_params_p);
108 
109 
110 BLAST_SERVICE_LOCAL bool GetAndAddSequencesParameter (LinkedService *linked_service_p, json_t *hit_p, ParameterSet *output_params_p);
111 
112 
122 BLAST_SERVICE_LOCAL const json_t *GetScaffoldsForDatabaseHit (const json_t *hit_p);
123 
124 
134 
135 
136 
137 BLAST_SERVICE_LOCAL json_t *ConvertBlastResultToGrassrootsMarkUp (const json_t *blast_job_output_p, BlastServiceData *data_p);
138 
139 
140 
141 BLAST_SERVICE_LOCAL json_t *GetMarkupReports (json_t *markup_p);
142 
143 
144 BLAST_SERVICE_LOCAL json_t *GetHitsFromMarkedUpReport (json_t *report_p);
145 
146 
147 BLAST_SERVICE_LOCAL bool GetAndAddScaffoldsFromHit (const json_t *hit_p, json_t *mark_up_p, const DatabaseInfo *db_p);
148 
149 
150 BLAST_SERVICE_LOCAL bool GetAndAddSequenceMappedParameter (LinkedService *linked_service_p, const json_t *hit_p, ParameterSet *output_params_p, json_t *request_p);
151 
152 #ifdef __cplusplus
153 }
154 #endif
155 
156 #endif /* SERVER_SRC_SERVICES_BLAST_INCLUDE_BLAST_SERVICE_JOB_MARKUP_H_ */
ST_NONE
ST_NONE.
Definition: blast_service_job_markup.h:26
BlastServiceJob
This datatype stores the ServiceJob and its associated BlastTool.
Definition: blast_service_job.h:66
AddPolymorphism
bool AddPolymorphism(json_t *marked_up_hsp_p, const char *hit_gap_start_p, const char *reference_gap_start_p, const uint32 start_of_region, const uint32 end_of_region)
BlastServiceJob::GetAndAddDatabaseMappedParameter
bool GetAndAddDatabaseMappedParameter(LinkedService *linked_service_p, const json_t *report_p, ParameterSet *output_params_p, const char **database_ss)
After the blast job has ran, get the database that it ran against from a hit from within SINGLE_JSON_...
ST_FORWARD
ST_FORWARD.
Definition: blast_service_job_markup.h:27
GetAndAddDoubleScoreValue
bool GetAndAddDoubleScoreValue(json_t *marked_up_result_p, const json_t *hsps_p, const char *hsp_key_s, const char *marked_up_key_s)
AddFaldoTerminus
bool AddFaldoTerminus(json_t *parent_json_p, const char *child_key_s, const int32 position, const Strand strand)
GetAndAddHitLocation
bool GetAndAddHitLocation(json_t *marked_up_result_p, const json_t *hsps_p, const char *hsp_from_key_s, const char *hsp_to_key_s, const char *strand_key_s, const char *child_key_s)
BlastServiceData
The configuration data for the Blast Service.
Definition: blast_service.h:143
GetAndAddIntScoreValue
bool GetAndAddIntScoreValue(json_t *marked_up_result_p, const json_t *hsps_p, const char *hsp_key_s, const char *marked_up_key_s)
AddIntScoreValue
bool AddIntScoreValue(json_t *parent_p, const char *key_s, int score_value)
ConvertBlastResultToGrassrootsMarkUp
json_t * ConvertBlastResultToGrassrootsMarkUp(const json_t *blast_job_output_p, BlastServiceData *data_p)
GetAndAddScaffoldsFromHit
bool GetAndAddScaffoldsFromHit(const json_t *hit_p, json_t *mark_up_p, const DatabaseInfo *db_p)
AddHitDetails
bool AddHitDetails(json_t *marked_up_result_p, const json_t *blast_hit_p, const DatabaseInfo *db_p)
ST_REVERSE
ST_REVERSE.
Definition: blast_service_job_markup.h:28
GetAndAddSequencesParameter
bool GetAndAddSequencesParameter(LinkedService *linked_service_p, json_t *hit_p, ParameterSet *output_params_p)
blast_service_api.h
MarkUpHit
bool MarkUpHit(const json_t *hit_p, json_t *mark_up_p, const DatabaseInfo *db_p)
GetInitialisedProcessedRequest
json_t * GetInitialisedProcessedRequest(void)
GetAndAddSequenceValue
bool GetAndAddSequenceValue(json_t *marked_up_result_p, const json_t *hsps_p, const char *hsp_key_s, const char *sequence_key_s)
GetMarkupReports
json_t * GetMarkupReports(json_t *markup_p)
GetAndAddScaffoldsParameter
bool GetAndAddScaffoldsParameter(LinkedService *linked_service_p, json_t *hit_p, ParameterSet *output_params_p)
typedefs.h
AddHitLocation
bool AddHitLocation(json_t *parent_p, const char *child_key_s, const int32 from, const int32 to, const Strand strand)
BlastServiceJob::GetScaffoldsForDatabaseHit
const json_t * GetScaffoldsForDatabaseHit(const json_t *hit_p)
After the blast job has ran, get the scaffolds that it ran against from a hit from within SINGLE_JSON...
BLAST_SERVICE_LOCAL
#define BLAST_SERVICE_LOCAL
Definition: blast_service_api.h:48
LinkedList
A doubly-linked list that can be traversed in either direction.
Definition: linked_list.h:56
GetHitsFromMarkedUpReport
json_t * GetHitsFromMarkedUpReport(json_t *report_p)
LinkedService
This datatype stores the data needed to get the required information from the output of one Service t...
Definition: linked_service.h:50
BlastServiceJob::AddHsp
bool AddHsp(json_t *marked_up_hit_p, const json_t *hsp_p)
Add the marked-up data for a High-scoring Segment Pair (HSP) to a marked-up hit.
AddSequence
bool AddSequence(json_t *root_p, const char *key_s, const char *query_sequence_s)
BlastServiceJob::MarkUpBlastResult
json_t * MarkUpBlastResult(BlastServiceJob *job_p)
Get the Grassroots marked-up data from a BlastServiceJob.
GetDatabaseNameFromMarkedUpJob
const char * GetDatabaseNameFromMarkedUpJob(const json_t *marked_up_report_p)
GetAndAddDatabaseDetails
bool GetAndAddDatabaseDetails(json_t *marked_up_result_p, const DatabaseInfo *database_p)
DatabaseInfo
A datatype describing the details of each database available to search against.
Definition: blast_service.h:83
GetAndAddSequenceMappedParameter
bool GetAndAddSequenceMappedParameter(LinkedService *linked_service_p, const json_t *hit_p, ParameterSet *output_params_p, json_t *request_p)
GetAndAddNucleotidePolymorphisms
bool GetAndAddNucleotidePolymorphisms(json_t *marked_up_hsp_p, const char *reference_sequence_s, const char *hit_sequence_s, const char *midline_s, uint32 hit_index, const int32 inc_value)
GetAndAddQueryMetadata
bool GetAndAddQueryMetadata(const json_t *blast_search_p, json_t *mark_up_p)
blast_service.h
linked_list.h
A doubly-linked list.
AddSubsequenceMarkup
bool AddSubsequenceMarkup(json_t *parent_p, const char *key_s, const char *subsequence_start_s, const uint32 length)
GetScaffoldsFromHit
LinkedList * GetScaffoldsFromHit(const json_t *hit_p, const DatabaseInfo *db_p)
AddDoubleScoreValue
bool AddDoubleScoreValue(json_t *parent_p, const char *key_s, double64 score_value)
ParameterSet
A set of Parameters along with an optional name and description.
Definition: parameter_set.h:46
Strand
Strand
Which strand is being used to for positioning purposes.
Definition: blast_service_job_markup.h:24