Skip to content

Commit e6ffb67

Browse files
authored
Aggregate PCs (#116)
* Aggregate PCs and include in batch results output * Add tests for Aggregation workflow
1 parent fd1b744 commit e6ffb67

24 files changed

+222
-35
lines changed

ImputationPipeline/AggregatePRSResults.wdl

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,32 @@ workflow AggregatePRSResults {
1515

1616
call AggregateResults {
1717
input:
18+
group_n = group_n,
1819
results = results,
1920
missing_sites_shifts = missing_sites_shifts,
20-
lab_batch = lab_batch
21+
lab_batch = lab_batch,
22+
target_pc_projections = target_pc_projections
2123
}
2224

2325
call PlotPCA {
2426
input:
27+
group_n = group_n,
2528
lab_batch = lab_batch,
2629
population_name = population_name,
27-
target_pc_projections = target_pc_projections,
30+
batch_pcs = AggregateResults.batch_pcs,
2831
population_pc_projections = population_pc_projections
2932
}
3033

3134
call BuildHTMLReport {
3235
input:
36+
group_n = group_n,
3337
lab_batch = lab_batch,
3438
batch_control_results = AggregateResults.batch_control_results,
3539
batch_missing_sites_shifts = AggregateResults.batch_missing_sites_shifts,
3640
expected_control_results = expected_control_results,
3741
batch_summarised_results = AggregateResults.batch_summarised_results,
3842
batch_pivoted_results = AggregateResults.batch_pivoted_results,
39-
target_pc_projections = target_pc_projections,
43+
batch_pcs = AggregateResults.batch_pcs,
4044
population_pc_projections = population_pc_projections,
4145
population_name = population_name,
4246
high_risk_thresholds = high_risk_thresholds
@@ -50,13 +54,15 @@ workflow AggregatePRSResults {
5054
File score_distribution = AggregateResults.batch_score_distribution
5155
File pc_plot = PlotPCA.pc_plot
5256
File report = BuildHTMLReport.report
57+
File batch_pcs = AggregateResults.batch_pcs
5358
}
5459
}
5560

5661
task AggregateResults {
5762
input {
5863
Array[File] results
5964
Array[File] missing_sites_shifts
65+
Array[File] target_pc_projections
6066
String lab_batch
6167
Int group_n
6268
}
@@ -72,6 +78,9 @@ task AggregateResults {
7278
library(ggplot2)
7379
7480
results <- c("~{sep='","' results}") %>% map(read_csv, col_types=cols(is_control_sample='l', .default='c')) %>% reduce(bind_rows)
81+
target_pcs <- c("~{sep='","' target_pc_projections}") %>% map(read_tsv) %>% reduce(bind_rows) %>% select(-FID) %>% rename(sample_id = IID)
82+
83+
results <- inner_join(results, target_pcs)
7584
7685
lab_batch <- results %>% pull(lab_batch) %>% unique()
7786
@@ -94,7 +103,7 @@ task AggregateResults {
94103
95104
write_tsv(results %>% filter(is_control_sample), "~{output_prefix}_control_results.tsv")
96105
97-
results_pivoted <- results %>% filter(!is_control_sample) %>% pivot_longer(!c(sample_id, lab_batch, is_control_sample), names_to=c("condition",".value"), names_pattern="([^_]+)_(.+)")
106+
results_pivoted <- results %>% select(-starts_with("PC")) %>% filter(!is_control_sample) %>% pivot_longer(!c(sample_id, lab_batch, is_control_sample), names_to=c("condition",".value"), names_pattern="(.+)(?<!not)(?<!reason)_(.+)$")
98107
results_pivoted <- results_pivoted %T>% {options(warn=-1)} %>% mutate(adjusted = as.numeric(adjusted),
99108
raw = as.numeric(raw),
100109
percentile = as.numeric(percentile)) %T>% {options(warn=0)}
@@ -121,6 +130,7 @@ task AggregateResults {
121130
122131
missing_sites_shifts <- c("~{sep='","' missing_sites_shifts}") %>% map(read_tsv) %>% reduce(bind_rows)
123132
write_tsv(missing_sites_shifts, "~{output_prefix}_missing_sites_shifts.tsv")
133+
write_tsv(target_pcs, "~{output_prefix}_pcs.tsv")
124134
125135
EOF
126136
>>>
@@ -138,12 +148,13 @@ task AggregateResults {
138148
File batch_pivoted_results = "~{output_prefix}_pivoted_results.tsv"
139149
File batch_score_distribution = "~{output_prefix}_score_distribution.png"
140150
File batch_missing_sites_shifts = "~{output_prefix}_missing_sites_shifts.tsv"
151+
File batch_pcs = "~{output_prefix}_pcs.tsv"
141152
}
142153
}
143154
144155
task PlotPCA {
145156
input {
146-
Array[File] target_pc_projections
157+
File batch_pcs
147158
File population_pc_projections
148159
String lab_batch
149160
Int group_n
@@ -158,7 +169,7 @@ task PlotPCA {
158169
library(purrr)
159170
library(ggplot2)
160171
161-
target_pcs <- c("~{sep='","' target_pc_projections}") %>% map(read_tsv) %>% reduce(bind_rows)
172+
target_pcs <- read_tsv("~{batch_pcs}")
162173
population_pcs <- read_tsv("~{population_pc_projections}")
163174
164175
ggplot(population_pcs, aes(x=PC1, y=PC2, color="~{population_name}")) +
@@ -191,7 +202,7 @@ task BuildHTMLReport {
191202
File batch_summarised_results
192203
File batch_pivoted_results
193204
File high_risk_thresholds
194-
Array[File] target_pc_projections
205+
File batch_pcs
195206
File population_pc_projections
196207
String population_name
197208
String lab_batch
@@ -295,23 +306,30 @@ task BuildHTMLReport {
295306
\`\`\`{r score distributions, echo=FALSE, message=FALSE, warning=FALSE, results="asis", fig.align='center'}
296307
normal_dist <- tibble(x=seq(-5,5,0.01)) %>% mutate(y=dnorm(x)) # needed because plotly doesn't work with geom_function
297308
conditions_with_more_than_4_samples <- batch_pivoted_results %>% group_by(condition) %>% filter(!is.na(adjusted)) %>% count() %>% filter(n>4) %>% pull(condition)
298-
p_dist <- ggplot(batch_pivoted_results %>% filter(condition %in% conditions_with_more_than_4_samples), aes(x=adjusted)) +
299-
stat_density(aes(color=condition, text=condition), geom="line", position = "identity") +
300-
xlim(-5,5) + theme_bw() + xlab("z-score") + geom_line(data=normal_dist, aes(x=x, y=y), color="black") +
301-
geom_point(data = batch_pivoted_results %>% filter(!(condition %in% conditions_with_more_than_4_samples)), aes(color=condition, x = adjusted, text=condition), y=0) +
302-
ylab("density")
309+
n_density <- batch_pivoted_results %>% filter(condition %in% conditions_with_more_than_4_samples) %>% nrow()
310+
n_point <- batch_pivoted_results %>% filter(!(condition %in% conditions_with_more_than_4_samples)) %>% nrow()
311+
p_dist <- ggplot()
312+
if (n_density > 0) {
313+
p_dist <- p_dist + stat_density(data = batch_pivoted_results %>% filter(condition %in% conditions_with_more_than_4_samples),
314+
aes(color=condition, text=condition, x = adjusted), geom="line", position = "identity")
315+
}
316+
if (n_point > 0) {
317+
p_dist <- p_dist + geom_point(data = batch_pivoted_results %>% filter(!(condition %in% conditions_with_more_than_4_samples)), aes(color=condition, x = adjusted, text=condition), y=0)
318+
}
319+
p_dist <- p_dist + xlim(-5,5) + theme_bw() + geom_line(data=normal_dist, aes(x=x, y=y), color="black") + xlab("z-score") + ylab("density")
320+
303321
ggplotly(p_dist, tooltip="text")
304322
\`\`\`
305323
306324
## PCA
307325
#### Hover for sample ID
308326
\`\`\`{r pca plot, echo=FALSE, message=FALSE, warning=FALSE, results="asis", fig.align='center'}
309-
target_pcs <- c("~{sep='","' target_pc_projections}") %>% map(read_tsv) %>% reduce(bind_rows)
327+
target_pcs <- read_tsv("~{batch_pcs}")
310328
population_pcs <- read_tsv("~{population_pc_projections}")
311329
312330
p <- ggplot(population_pcs, aes(x=PC1, y=PC2, color="~{population_name}")) +
313331
geom_point() +
314-
geom_point(data=target_pcs, aes(color="~{lab_batch}", text=paste0("Sample ID: ", IID))) +
332+
geom_point(data=target_pcs, aes(color="~{lab_batch}", text=paste0("Sample ID: ", sample_id))) +
315333
theme_bw()
316334
ggplotly(p, tooltip="text")
317335
\`\`\`

ImputationPipeline/ManualQCPRS/tests/ManualQCPRSTests.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -870,6 +870,7 @@ def assert_samples_failed_all_conditions(self, failed_samples_with_reasons):
870870
data["is_control_sample"] = False
871871
expected_results = pd.DataFrame(data).set_index("sample_id")
872872
expected_results["notes"] = expected_results.index.map(failed_samples_with_reasons)
873+
expected_results = expected_results.join(self.results[['PC1', 'PC2']])
873874
for i in range(1, 4):
874875
expected_results[f'condition_{i}_reason_not_resulted'] = \
875876
expected_results.index.map(failed_samples_with_reasons)
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
sample_id lab_batch is_control_sample condition_1_raw condition_1_adjusted condition_1_percentile condition_1_risk condition_1_reason_not_resulted condition_2_raw condition_2_adjusted condition_2_percentile condition_2_risk condition_2_reason_not_resulted condition_3_raw condition_3_adjusted condition_3_percentile condition_3_risk condition_3_reason_not_resulted
2-
sample_1 BATCH_12345 FALSE 37.2 0.78 0.78 NOT_HIGH NA 11.1 1.9 0.97 HIGH NA 4.3 0.93 0.82 NOT_HIGH NA
3-
sample_2 BATCH_12345 FALSE 39.4 0.29 0.62 NOT_HIGH NA 12.2 0.71 0.76 NOT_HIGH NA 4.4 1.58 0.94 NOT_HIGH NA
4-
sample_3 BATCH_12345 TRUE 34.1 2.1 0.98 HIGH NA 12.4 -1.13 0.13 NOT_HIGH NA 3.9 -0.61 0.27 NOT_HIGH NA
5-
sample_4 BATCH_12345 FALSE 36.3 -1.78 0.04 NOT_HIGH NA 13.1 1.72 0.96 HIGH NA NA NA NA NA
6-
sample_5 BATCH_12345 FALSE 38.5 0.43 0.66 NOT_HIGH NA 10.8 -0.09 0.46 NOT_HIGH NA NA NA NA NA
7-
sample_6 BATCH_12345 FALSE 36.2 -0.99 0.16 NOT_HIGH NA NA NA NA NA NA 2.4 -0.28 0.39 NOT_HIGH NA
1+
sample_id lab_batch is_control_sample condition_1_raw condition_1_adjusted condition_1_percentile condition_1_risk condition_1_reason_not_resulted condition_2_raw condition_2_adjusted condition_2_percentile condition_2_risk condition_2_reason_not_resulted condition_3_raw condition_3_adjusted condition_3_percentile condition_3_risk condition_3_reason_not_resulted PC1 PC2
2+
sample_1 BATCH_12345 FALSE 37.2 0.78 0.78 NOT_HIGH NA 11.1 1.9 0.97 HIGH NA 4.3 0.93 0.82 NOT_HIGH NA 1.2 0.7
3+
sample_2 BATCH_12345 FALSE 39.4 0.29 0.62 NOT_HIGH NA 12.2 0.71 0.76 NOT_HIGH NA 4.4 1.58 0.94 NOT_HIGH NA 1.4 0.6
4+
sample_3 BATCH_12345 TRUE 34.1 2.1 0.98 HIGH NA 12.4 -1.13 0.13 NOT_HIGH NA 3.9 -0.61 0.27 NOT_HIGH NA 1.5 1.9
5+
sample_4 BATCH_12345 FALSE 36.3 -1.78 0.04 NOT_HIGH NA 13.1 1.72 0.96 HIGH NA NA NA NA NA NA 1.3 1.4
6+
sample_5 BATCH_12345 FALSE 38.5 0.43 0.66 NOT_HIGH NA 10.8 -0.09 0.46 NOT_HIGH NA NA NA NA NA NA 0.8 -0.7
7+
sample_6 BATCH_12345 FALSE 36.2 -0.99 0.16 NOT_HIGH NA NA NA NA NA NA 2.4 -0.28 0.39 NOT_HIGH NA 1.2 -1.1
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
sample_id lab_batch is_control_sample condition_1_raw condition_1_adjusted condition_1_percentile condition_1_risk condition_1_reason_not_resulted condition_2_raw condition_2_adjusted condition_2_percentile condition_2_risk condition_2_reason_not_resulted condition_3_raw condition_3_adjusted condition_3_percentile condition_3_risk condition_3_reason_not_resulted
2-
sample_7 BATCH_12345 FALSE 37.2 0.78 0.78 NOT_HIGH NA 11.1 1.9 0.97 HIGH NA 4.3 0.93 0.82 NOT_HIGH NA
3-
sample_8 BATCH_12345 FALSE 39.4 0.29 0.62 NOT_HIGH NA 12.2 0.71 0.76 NOT_HIGH NA 4.4 1.58 0.94 NOT_HIGH NA
4-
sample_3 BATCH_12345 TRUE 34.1 2.1 0.98 HIGH NA 12.4 -1.13 0.13 NOT_HIGH NA 3.9 -0.61 0.27 NOT_HIGH NA
5-
sample_9 BATCH_12345 FALSE 36.3 -1.78 0.04 NOT_HIGH NA 13.1 1.72 0.96 HIGH NA NA NA NA NA
6-
sample_10 BATCH_12345 FALSE 38.5 0.43 0.66 NOT_HIGH NA 10.8 -0.09 0.46 NOT_HIGH NA NA NA NA NA
7-
sample_11 BATCH_12345 FALSE 36.2 -0.99 0.16 NOT_HIGH NA NA NA NA NA NA 2.4 -0.28 0.39 NOT_HIGH NA
1+
sample_id lab_batch is_control_sample condition_1_raw condition_1_adjusted condition_1_percentile condition_1_risk condition_1_reason_not_resulted condition_2_raw condition_2_adjusted condition_2_percentile condition_2_risk condition_2_reason_not_resulted condition_3_raw condition_3_adjusted condition_3_percentile condition_3_risk condition_3_reason_not_resulted PC1 PC2
2+
sample_7 BATCH_12345 FALSE 37.2 0.78 0.78 NOT_HIGH NA 11.1 1.9 0.97 HIGH NA 4.3 0.93 0.82 NOT_HIGH NA 1.3 1.1
3+
sample_8 BATCH_12345 FALSE 39.4 0.29 0.62 NOT_HIGH NA 12.2 0.71 0.76 NOT_HIGH NA 4.4 1.58 0.94 NOT_HIGH NA 0.9 1.4
4+
sample_3 BATCH_12345 TRUE 34.1 2.1 0.98 HIGH NA 12.4 -1.13 0.13 NOT_HIGH NA 3.9 -0.61 0.27 NOT_HIGH NA 1.4 0.2
5+
sample_9 BATCH_12345 FALSE 36.3 -1.78 0.04 NOT_HIGH NA 13.1 1.72 0.96 HIGH NA NA NA NA NA NA 1.1 0.9
6+
sample_10 BATCH_12345 FALSE 38.5 0.43 0.66 NOT_HIGH NA 10.8 -0.09 0.46 NOT_HIGH NA NA NA NA NA NA 0.7 0.1
7+
sample_11 BATCH_12345 FALSE 36.2 -0.99 0.16 NOT_HIGH NA NA NA NA NA NA 2.4 -0.28 0.39 NOT_HIGH NA 1.5 1.2
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
sample_id lab_batch is_control_sample condition_1_raw condition_1_adjusted condition_1_percentile condition_1_risk condition_1_reason_not_resulted condition_2_raw condition_2_adjusted condition_2_percentile condition_2_risk condition_2_reason_not_resulted condition_3_raw condition_3_adjusted condition_3_percentile condition_3_risk condition_3_reason_not_resulted
2-
sample_1 BATCH_123456 FALSE 37.2 0.78 0.78 NOT_HIGH NA 11.1 1.9 0.97 HIGH NA 4.3 0.93 0.82 NOT_HIGH NA
3-
sample_2 BATCH_123456 FALSE 39.4 0.29 0.62 NOT_HIGH NA 12.2 0.71 0.76 NOT_HIGH NA 4.4 1.58 0.94 NOT_HIGH NA
4-
sample_3 BATCH_123456 TRUE 34.1 2.1 0.98 HIGH NA 12.4 -1.13 0.13 NOT_HIGH NA 3.9 -0.61 0.27 NOT_HIGH NA
5-
sample_4 BATCH_123456 FALSE 36.3 -1.78 0.04 NOT_HIGH NA 13.1 1.72 0.96 HIGH NA NA NA NA NA
6-
sample_5 BATCH_123456 FALSE 38.5 0.43 0.66 NOT_HIGH NA 10.8 -0.09 0.46 NOT_HIGH NA NA NA NA NA
7-
sample_6 BATCH_123456 FALSE 36.2 -0.99 0.16 NOT_HIGH NA NA NA NA NA NA 2.4 -0.28 0.39 NOT_HIGH NA
1+
sample_id lab_batch is_control_sample condition_1_raw condition_1_adjusted condition_1_percentile condition_1_risk condition_1_reason_not_resulted condition_2_raw condition_2_adjusted condition_2_percentile condition_2_risk condition_2_reason_not_resulted condition_3_raw condition_3_adjusted condition_3_percentile condition_3_risk condition_3_reason_not_resulted PC1 PC2
2+
sample_1 BATCH_123456 FALSE 37.2 0.78 0.78 NOT_HIGH NA 11.1 1.9 0.97 HIGH NA 4.3 0.93 0.82 NOT_HIGH NA -1.1 1.3
3+
sample_2 BATCH_123456 FALSE 39.4 0.29 0.62 NOT_HIGH NA 12.2 0.71 0.76 NOT_HIGH NA 4.4 1.58 0.94 NOT_HIGH NA -0.9 1.25
4+
sample_3 BATCH_123456 TRUE 34.1 2.1 0.98 HIGH NA 12.4 -1.13 0.13 NOT_HIGH NA 3.9 -0.61 0.27 NOT_HIGH NA -1.4 0.7
5+
sample_4 BATCH_123456 FALSE 36.3 -1.78 0.04 NOT_HIGH NA 13.1 1.72 0.96 HIGH NA NA NA NA NA NA 1.1 1.2
6+
sample_5 BATCH_123456 FALSE 38.5 0.43 0.66 NOT_HIGH NA 10.8 -0.09 0.46 NOT_HIGH NA NA NA NA NA NA 0.8 -1.4
7+
sample_6 BATCH_123456 FALSE 36.2 -0.99 0.16 NOT_HIGH NA NA NA NA NA NA 2.4 -0.28 0.39 NOT_HIGH NA -1.2 1.3

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
SHELL=/bin/bash -o pipefail
2+
13
TEST_JSON= $(shell find test -name '*.json')
24

35
VALIDATE_WDL= $(shell find . -name '*.wdl' ! -path './test/*')
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
sample_id lab_batch is_control_sample condition_1_raw condition_1_adjusted condition_1_percentile condition_1_risk condition_1_reason_not_resulted condition_2_raw condition_2_adjusted condition_2_percentile condition_2_risk condition_2_reason_not_resulted condition_3_raw condition_3_adjusted condition_3_percentile condition_3_risk condition_3_reason_not_resulted condition_4_raw condition_4_adjusted condition_4_percentile condition_4_risk condition_4_reason_not_resulted PC1 PC2 PC3 PC4
2+
sample_1 test_batch FALSE 49.8 -0.5 0.308 NOT_HIGH NA -0.09 -1.8 0.036 NOT_HIGH NA -0.3 -0.7 0.24 NOT_HIGH NA NA NA NA NA NA 0.13 -0.15 -0.05 -0.02
3+
sample_2 test_batch TRUE 51.2 2.1 0.98 HIGH NA 1.97 0.9 0.82 NOT_HIGH NA -0.2 -0.3 0.38 NOT_HIGH NA 1.23 0.32 0.63 NOT_HIGH NA 0.12 -0.15 -0.05 -0.03
4+
sample_3 test_batch FALSE NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA 1.2 -0.03 0.48 NOT_HIGH NA 0.11 -0.15 -0.05 -0.03
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
sample_id lab_batch is_control_sample condition_1_raw condition_1_adjusted condition_1_percentile condition_1_risk condition_1_reason_not_resulted condition_2_raw condition_2_adjusted condition_2_percentile condition_2_risk condition_2_reason_not_resulted condition_3_raw condition_3_adjusted condition_3_percentile condition_3_risk condition_3_reason_not_resulted condition_4_raw condition_4_adjusted condition_4_percentile condition_4_risk condition_4_reason_not_resulted PC1 PC2 PC3 PC4
2+
sample_2 test_batch TRUE 51.2 2.1 0.98 HIGH NA 1.97 0.9 0.82 NOT_HIGH NA -0.2 -0.3 0.38 NOT_HIGH NA 1.23 0.32 0.63 NOT_HIGH NA 0.12 -0.15 -0.05 -0.03
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
sample_id PC1 PC2 PC3 PC4
2+
sample_1 0.13 -0.15 -0.05 -0.02
3+
sample_2 0.12 -0.15 -0.05 -0.03
4+
sample_3 0.11 -0.15 -0.05 -0.03
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
condition mean_adjusted mean_percentile num_samples num_scored num_high num_not_high num_not_resulted
2+
condition_1 -0.5 0.308 2 1 0 1 0
3+
condition_2 -1.8 0.036 2 1 0 1 0
4+
condition_3 -0.7 0.24 2 1 0 1 0
5+
condition_4 -0.03 0.48 2 1 0 1 0
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
sample_id condition n_missing_sites adjusted_score percentile potential_high_adjusted_score potential_high_percentile potential_low_adjusted_score potential_low_percentile
2+
sample_1 condition_1 0 -0.5 0.308 -0.5 0.308 -0.5 0.308
3+
sample_1 condition_2 0 -1.8 0.036 -1.8 0.036 -1.8 0.036
4+
sample_1 condition_3 0 -0.7 0.24 -0.7 0.24 -0.7 0.24
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FID IID PC1 PC2 PC3 PC4
2+
0 sample_1 0.13 -0.15 -0.05 -0.02
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
sample_id,lab_batch,is_control_sample,condition_1_raw,condition_1_adjusted,condition_1_percentile,condition_1_risk,condition_1_reason_not_resulted,condition_2_raw,condition_2_adjusted,condition_2_percentile,condition_2_risk,condition_2_reason_not_resulted,condition_3_raw,condition_3_adjusted,condition_3_percentile,condition_3_risk,condition_3_reason_not_resulted,condition_4_raw,condition_4_adjusted,condition_4_percentile,condition_4_risk,condition_4_reason_not_resulted
2+
sample_1,test_batch,false,49.8,-0.5,0.308,NOT_HIGH,NA,-0.09,-1.8,0.036,NOT_HIGH,NA,-0.3,-0.7,0.24,NOT_HIGH,NA,NA,NA,NA,NA,NA
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
sample_id condition n_missing_sites adjusted_score percentile potential_high_adjusted_score potential_high_percentile potential_low_adjusted_score potential_low_percentile
2+
sample_2 condition_1 0 2.1 0.98 2.1 0.98 2.1 0.98
3+
sample_2 condition_2 0 0.9 0.82 0.9 0.82 0.9 0.82
4+
sample_2 condition_3 0 -0.3 0.38 -0.3 0.38 -0.3 0.38
5+
sample_2 condition_4 0 0.32 0.63 0.32 0.63 0.32 0.63
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FID IID PC1 PC2 PC3 PC4
2+
0 sample_2 0.12 -0.15 -0.05 -0.03
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
sample_id,lab_batch,is_control_sample,condition_1_raw,condition_1_adjusted,condition_1_percentile,condition_1_risk,condition_1_reason_not_resulted,condition_2_raw,condition_2_adjusted,condition_2_percentile,condition_2_risk,condition_2_reason_not_resulted,condition_3_raw,condition_3_adjusted,condition_3_percentile,condition_3_risk,condition_3_reason_not_resulted,condition_4_raw,condition_4_adjusted,condition_4_percentile,condition_4_risk,condition_4_reason_not_resulted
2+
sample_2,test_batch,true,51.2,2.1,0.98,HIGH,NA,1.97,0.9,0.82,NOT_HIGH,NA,-0.2,-0.3,0.38,NOT_HIGH,NA,1.23,0.32,0.63,NOT_HIGH,NA
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
sample_id condition n_missing_sites adjusted_score percentile potential_high_adjusted_score potential_high_percentile potential_low_adjusted_score potential_low_percentile
2+
sample_4 condition_3 0 -0.03 0.48 -0.03 0.48 -0.03 0.48
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FID IID PC1 PC2 PC3 PC4
2+
0 sample_3 0.11 -0.15 -0.05 -0.03
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
sample_id,lab_batch,is_control_sample,condition_1_raw,condition_1_adjusted,condition_1_percentile,condition_1_risk,condition_1_reason_not_resulted,condition_2_raw,condition_2_adjusted,condition_2_percentile,condition_2_risk,condition_2_reason_not_resulted,condition_3_raw,condition_3_adjusted,condition_3_percentile,condition_3_risk,condition_3_reason_not_resulted,condition_4_raw,condition_4_adjusted,condition_4_percentile,condition_4_risk,condition_4_reason_not_resulted
2+
sample_3,test_batch,false,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,1.2,-0.03,0.48,NOT_HIGH,NA
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
condition_1_adjusted, condition_2_adjusted, condition_3_adjusted, condition_4_adjusted
2+
2.2, 0.87, -0.25, 0.3
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
PC1 PC2 PC3 PC4
2+
0.132828 -0.158744 -0.05737172 -0.03349135
3+
0.1305322 -0.1609648 -0.05699385 -0.03228922
4+
0.131498 -0.1578435 -0.0559588 -0.0330277
5+
0.1303931 -0.1595069 -0.05761969 -0.03046467
6+
0.1320887 -0.1578632 -0.05805177 -0.03590859
7+
0.1324791 -0.1561622 -0.05606031 -0.03278937
8+
0.1309225 -0.1581563 -0.05817697 -0.03207536
9+
0.1315213 -0.1590344 -0.05657792 -0.03416705
10+
0.1340385 -0.1596115 -0.05519977 -0.02799103
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
condition threshold
2+
condition_1 0.97
3+
condition_2 0.97
4+
condition_3 0.98
5+
condition_4 0.97

0 commit comments

Comments
 (0)