forked from molgenis/ngs-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NIPT_Diagnostics_v3.0_QC_Report.Rmd
81 lines (54 loc) · 1.87 KB
/
NIPT_Diagnostics_v3.0_QC_Report.Rmd
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
65
66
67
68
69
70
71
72
73
74
QC Report `r samplename`
=======================================================
`r format(Sys.Date(), format=("%d %B %Y"))`
##Prediction Statistics Regression Models
```{r echo=FALSE, results= 'asis'}
PS13 <- PredictionStatistics13
datafrPS13 <- data.frame(PS13)
#Transform to table
tab <- xtable(datafrPS13, align = "ccccc")
print(tab, type="html")
```
<br>
```{r echo=FALSE, results= 'asis'}
PS18 <- PredictionStatistics18
datafrPS18 <- data.frame(PS18)
#Transform to table
tab <- xtable(datafrPS18, align = "ccccc")
print(tab, type="html")
```
<br>
```{r echo=FALSE, results= 'asis'}
PS21 <- PredictionStatistics21
datafrPS21 <- data.frame(PS21)
#Transform to table
tab <- xtable(datafrPS21, align = "ccccc")
print(tab, type="html")
```
<br>
###Standard Z-score calculations using GC corrected data
```{r echo=FALSE, results='asis'}
library(xtable)
#Build list from variables
Variation_coefficient <- c(format(CV13, digits = 2), format(CV18, digits = 2), format(CV21, digits = 2) )
Normal_Distribution <- c(format(Normal13), format(Normal18), format(Normal21) )
Z_score <- c(format(Z_score13, digits = 3), format(Z_score18, digits = 3), format(Z_score21, digits = 3) )
datafrZscore <- data.frame(Variation_coefficient,Normal_Distribution,Z_score, row.names = c("Chr 13","Chr 18","Chr 21"))
#Transform to table
tab <- xtable(datafrZscore, align = "cccc")
print(tab, type="html")
```
<br>
All other chromosomes have a normal Z-score: `r toString(All_chromosomes_norm_Zscore[[1]])`
<br>
###Average Matchscore sample to control group
The average Matchscore of the sample compared with the current control group is `r format(AvMatchScore[[1]], digit=4)`
<br><br>
###Matchscore list
```{r echo=FALSE, results = 'asis'}
MatchScore <- format(MatchScorelist, digits = 3)
datafrMSc <- data.frame(MatchScore)
#Transform to table
tab <- xtable(datafrMSc, align = "cc")
print(tab, type="html")
```