@@ -109,12 +111,68 @@ __global__ void calcul_map_kernel(float *map_data, int seq_length, int window_si
...
@@ -109,12 +111,68 @@ __global__ void calcul_map_kernel(float *map_data, int seq_length, int window_si
}
}
}
}
// Kernel pour calculer la lecture de profondeur corrigee par la mappabilitee
__global__ void calcul_depth_correction_kernel(float *depth_results, float *map_results, int seq_length, int window_size, int step_size, float *depth_correction_results) {
int idx = threadIdx.x + blockIdx.x * blockDim.x;
if (idx < seq_length - window_size + 1) {
float avg_depth = depth_results[idx];
float avg_map = map_results[idx];
// Verification si avg_map est egal a 0 pour eviter la division par 0
__global__ void normalize_depth_kernel(float *depth_correction, float *gc_results, float m, float *gc_to_median, int seq_length, int window_size, int step_size, float *depth_normalize) {
int idx = threadIdx.x + blockIdx.x * blockDim.x;
if (idx < seq_length - window_size + 1) {
float mGC = gc_to_median[(int)gc_results[idx]];
// Verification si mGC est egal a 0 pour eviter la division par 0
__global__ void ratio_par_window_kernel(float *depth_normalize_val, float mean_chr, int seq_length, int window_size, int step_size, float *ratio_par_window_results) {
int idx = threadIdx.x + blockIdx.x * blockDim.x;
if (idx < seq_length - window_size + 1) {
float ratio = depth_normalize_val[idx] / mean_chr;
ratio_par_window_results[idx] = ratio;
}
}
// Kernel pour calculer le z_score par window
__global__ void z_score_kernel(float *depth_normalize_val, float mean_chr, float std_chr, int seq_length, int window_size, int step_size, float *z_score_results) {
# for i, (avg_depth, avg_gc, avg_map, depth_correction, depth_normalize_val) in enumerate(zip(depth_results, gc_results, map_results, depth_correction_results, normalize_depth_results)):