Skip to content

Commit 1705260

Browse files
committed
modify for DA junctions
1 parent 227765c commit 1705260

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

scripts/filter_and_BH.R

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,20 @@ if (debug){
2020
read_file=paste("compare_junctions/hist/", "junction_pvalues", tag, ".tsv", sep="")
2121
regtools_data = unique(data.table::fread(file=read_file, sep = '\t', header = TRUE, stringsAsFactors = FALSE))
2222
regtools_data_filtered = regtools_data[(regtools_data$total_score_variant > 5 &
23-
regtools_data$pvalue >= 0 &
24-
(regtools_data$anchor == "D" |
25-
regtools_data$anchor == "A" |
26-
regtools_data$anchor == "NDA"))]
23+
regtools_data$p_value_mean >= 0 &
24+
(regtools_data$anchor == "DA"))]
2725

28-
p = regtools_data_filtered$pvalue
26+
p = regtools_data_filtered$p_value_mean
2927
adjusted_p = p.adjust(p, method = "BH")
3028
regtools_data_filtered$adjusted_p = adjusted_p
3129
regtools_data_filtered_sorted = regtools_data_filtered[order(adjusted_p)]
3230

33-
write_file = paste("compare_junctions/hist/", "junction_pvalues_filtered_BH", tag, ".tsv", sep="")
31+
write_file = paste("compare_junctions/hist/", "junction_pvalues_filtered_BH_DA_junctions", tag, ".tsv", sep="")
3432
write.table(regtools_data_filtered_sorted, file=write_file, quote=FALSE, sep='\t', row.names = FALSE)
3533

3634
threshold = 0.05
3735
is_significant = regtools_data_filtered_sorted$adjusted_p < threshold
3836
regtools_data_significant_filtered_sorted = regtools_data_filtered_sorted[is_significant]
3937

40-
write_file = paste("compare_junctions/hist/", "junction_pvalues_significant_",threshold,"_filtered_BH", tag, ".tsv", sep="")
38+
write_file = paste("compare_junctions/hist/", "junction_pvalues_significant_",threshold,"_filtered_BH_DA_junctions", tag, ".tsv", sep="")
4139
write.table(regtools_data_significant_filtered_sorted, file=write_file, quote=FALSE, sep='\t', row.names = FALSE)

0 commit comments

Comments
 (0)