-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsink.R
64 lines (62 loc) · 1.9 KB
/
sink.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
options(digits = 4)
sink(
file = paste(dir_1,"REPORT SUMMARY.txt",sep = ""),
append = F,
split = FALSE,
type = "output"
)
print(DATE)
cat(
"\n============================================== Service Report Summary ==============================================\n\n"
)
cat(paste("Protein groups number (with 1% decoy):", nrow(protein)), "\n")
cat(paste("Peptides number (with 1% decoy):", nrow(peptide), "\n"))
cat(paste(
"Protein groups number (quantifiable, without decoy):",
nrow(pro_quant_df)
),
"\n")
if (quant.type %in% c("iBAQ", "LFQ")) {
cat(
paste(
"Max NON-missing value allowed for each reserved protein group (imputation):",
missing.ratio,
"\n"
)
)
}
cat("\n========== Classified protein groups number(compare group) ==========\n")
cat(paste("\n========== Fold change cutoff:", 2 ^ lr_co))
if (all(sample.list$replicates >= 3))
cat(paste("\n========== p-value cutoff:", pv_co))
cat(paste("\n========== Unique peptide cutoff:", unique_co))
if (fca)
cat(paste("\n========== spectra count cutoff:", spc_co))
if (is.null(up.vs.dn))
up.vs.dn <- sample.list$contrast$names
for (s in up.vs.dn) {
if (fca) {
cat(paste("\n\n\n\n\n\n", s, "\n"))
cat(
"\n========================================================================================================================\n\n"
)
s1 <- sig$class[[s]]
for (ss in names(s1)) {
cat(paste("\n\n\n\n\n\n", ss, "\n"))
cat(
"\n ================================================================================================================ \n\n"
)
print(nrow(s1[[ss]]))
print(summary(s1[[ss]]))
}
} else{
cat(paste("\n\n\n\n\n\n", s, "\n"))
s1 <- sig[[s]]
cat(
"\n========================================================================================================================\n\n"
)
print(nrow(s1))
print(summary(s1))
}
}
sink()