diff --git a/PRO-seq/PRO-seq.snakefile b/PRO-seq/PRO-seq.snakefile index 7509054f2304dc22ad56199fe211dbb81c260e96..7e1882b08903bab45e586ffcf94ef46ced85047d 100644 --- a/PRO-seq/PRO-seq.snakefile +++ b/PRO-seq/PRO-seq.snakefile @@ -1194,7 +1194,7 @@ rule merge_bigwig_reps: warn(f"The bigwig files without {chrom} will be skipped.\n") to_use = [bw for bw in bws if chrom in bw.chroms()] if to_use: - means = np.nanmean(np.vstack([bw.values(chrom, 0, chrom_len, numpy=True) for bw in to_use]), axis=0) + means = np.nanmean(np.vstack([bw.values(chrom, 0, chrom_len) for bw in to_use]), axis=0) else: means = np.zeros(chrom_len) # bin size is 10 diff --git a/RNA_Seq_Cecere/RNA-seq.snakefile b/RNA_Seq_Cecere/RNA-seq.snakefile index 51607f95d10a96cabcb4dc81951e9ab0c4323663..348b940ffaa270ea6d0cf08ba4c87ce7eabd0474 100644 --- a/RNA_Seq_Cecere/RNA-seq.snakefile +++ b/RNA_Seq_Cecere/RNA-seq.snakefile @@ -1510,7 +1510,7 @@ rule merge_bigwig_reps: warn(f"The bigwig files without {chrom} will be skipped.\n") to_use = [bw for bw in bws if chrom in bw.chroms()] if to_use: - means = np.nanmean(np.vstack([bw.values(chrom, 0, chrom_len, numpy=True) for bw in to_use]), axis=0) + means = np.nanmean(np.vstack([bw.values(chrom, 0, chrom_len) for bw in to_use]), axis=0) else: means = np.zeros(chrom_len) # bin size is 10 diff --git a/Ribo-seq/Ribo-seq.snakefile b/Ribo-seq/Ribo-seq.snakefile index 2afb5d9a86b9cab7e176db1659031a4090261de1..b33d2ebbe0c352bc01703ecc090849fb25da0cdb 100644 --- a/Ribo-seq/Ribo-seq.snakefile +++ b/Ribo-seq/Ribo-seq.snakefile @@ -1868,7 +1868,7 @@ rule merge_bigwig_reps: warn(f"The bigwig files without {chrom} will be skipped.\n") to_use = [bw for bw in bws if chrom in bw.chroms()] if to_use: - means = np.nanmean(np.vstack([bw.values(chrom, 0, chrom_len, numpy=True) for bw in to_use]), axis=0) + means = np.nanmean(np.vstack([bw.values(chrom, 0, chrom_len) for bw in to_use]), axis=0) else: means = np.zeros(chrom_len) # bin size is 10 @@ -1905,8 +1905,8 @@ rule make_bigwig_ratios: bw_out.addHeader(list(chrom_sizes.items())) for (chrom, chrom_len) in bw_out.chroms().items(): assert cond_bw.chroms()[chrom] == chrom_len - #ratios = np.divide(cond_bw.values(chrom, 0, chrom_len, numpy=True), ref_bw.values(chrom, 0, chrom_len, numpy=True)) - ratios = np.log2(np.divide(cond_bw.values(chrom, 0, chrom_len, numpy=True), ref_bw.values(chrom, 0, chrom_len, numpy=True))) + #ratios = np.divide(cond_bw.values(chrom, 0, chrom_len), ref_bw.values(chrom, 0, chrom_len)) + ratios = np.log2(np.divide(cond_bw.values(chrom, 0, chrom_len), ref_bw.values(chrom, 0, chrom_len))) # bin size is 10 bw_out.addEntries(chrom, 0, values=np.nan_to_num(ratios[0::10]), span=10, step=10) bw_out.close() diff --git a/small_RNA-seq/small_RNA-seq.snakefile b/small_RNA-seq/small_RNA-seq.snakefile index 572550550c6cf04590d268fb204e59c0d465437a..bd71de78518db09e5aea7b390b0c0f7d4881f30c 100644 --- a/small_RNA-seq/small_RNA-seq.snakefile +++ b/small_RNA-seq/small_RNA-seq.snakefile @@ -2841,7 +2841,7 @@ rule merge_bigwig_reps: raise to_use = [bw for bw in bws if chrom in bw.chroms()] if to_use: - means = np.nanmean(np.vstack([bw.values(chrom, 0, chrom_len, numpy=True) for bw in to_use]), axis=0) + means = np.nanmean(np.vstack([bw.values(chrom, 0, chrom_len) for bw in to_use]), axis=0) else: means = np.zeros(chrom_len) # bin size is 10 @@ -2881,8 +2881,8 @@ rule make_bigwig_ratios: bw_out.addHeader(list(chrom_sizes.items())) for (chrom, chrom_len) in bw_out.chroms().items(): assert cond_bw.chroms()[chrom] == chrom_len - #ratios = np.divide(cond_bw.values(chrom, 0, chrom_len, numpy=True), ref_bw.values(chrom, 0, chrom_len, numpy=True)) - ratios = np.log2(np.divide(cond_bw.values(chrom, 0, chrom_len, numpy=True), ref_bw.values(chrom, 0, chrom_len, numpy=True))) + #ratios = np.divide(cond_bw.values(chrom, 0, chrom_len), ref_bw.values(chrom, 0, chrom_len)) + ratios = np.log2(np.divide(cond_bw.values(chrom, 0, chrom_len), ref_bw.values(chrom, 0, chrom_len))) # bin size is 10 bw_out.addEntries(chrom, 0, values=np.nan_to_num(ratios[0::10]), span=10, step=10) bw_out.close()