// Kernel pour calculer la lecture de profondeur corrigee par la mappabilitee
// Kernel to compute depth corrected by mappability
__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) {
__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) {
__global__ void ratio_par_window_kernel(float *depth_results, float mean_chr, int seq_length, int window_size, int step_size, float *ratio_par_window_results) {
// Kernel pour calculer le ratio normalise par window
// Kernel to compute normalized ratio per window
__global__ void ratio_par_window_norm_kernel(float *normalize_depth_results, float mean_chr_norm, int seq_length, int window_size, int step_size, float *ratio_par_window_norm_results) {
// Verification si la valeur est inf ou NaN, et remplacer par 0 si c est le cas
// Check if the value is infinite or NaN, and replace it with 0 if so
if (isinf(value) || isnan(value)) {
value = 0.0f;
}
// Calcul du Z-score
// Compute the Z-score
float z_score = (value - mean_ratio) / std_ratio;
z_score_results[idx] = z_score;
}
}
// Kernel pour calculer le ratio divise par le ratio moyen
// Kernel to compute the ratio divided by the mean ratio
__global__ void ratio_par_mean_ratio_kernel(float *ratio_norm, float mean_ratio, int seq_length, int window_size, int step_size, float *ratio_par_mean_ratio_results) {
Compute the mean, standard deviation, and median of non-zero ratio results per window.
This function filters out zero and -1 values from the ratio results per window and computes the mean, standard deviation, and median of the remaining values. Values greater than or equal to 5 are capped at 5.
This function filters out zero and -1 values from the ratio results per window and computes the mean,
standard deviation, and median of the remaining values. Values greater than or equal to 5 are capped at 5.
Parameters
----------
ratio_par_window_results : list or numpy.ndarray
A list or array of ratio values per window.
chr : str
The chromosome identifier for which the statistics are calculated.
Returns
-------
tuple
A tuple containing the mean, standard deviation, and median of the filtered ratio values.
A tuple containing the mean, standard deviation, and median of the filtered ratio values:
(mean_ratio, std_ratio, med_ratio).
"""
logging.info(f"Entering compute_mean_std_med for {chr}")
start_time=time.time()
...
...
@@ -980,6 +868,8 @@ def cn_level(x, chr):
----------
x : float
The input value used to determine the copy number level.
chr : str
The chromosome identifier for which the copy number level is calculated.
Generate a VCF file containing structural variant calls based on segmented regions and signal data.
This function creates a VCF (Variant Call Format) file containing structural variant calls derived from segmented regions and signal data. The structural variant type (DEL for deletion or DUP for duplication) is determined based on copy number levels and signal values. The resulting VCF file includes information about the chromosome, position, type of structural variant, copy number, and other relevant information.
This function creates a VCF (Variant Call Format) file containing structural variant calls derived from
segmented regions and signal data. The structural variant type (DEL for deletion or DUP for duplication)
is determined based on copy number levels and signal values. The resulting VCF file includes information
about the chromosome, position, type of structural variant, copy number, and other relevant information.