6 Exome and WGD

6.1 Data

## Scanning file to determine attributes.
## File attributes:
##   meta lines: 165
##   header_line: 166
##   variant count: 141
##   column count: 15
## 
Meta line 165 read in.
## All meta lines processed.
## gt matrix initialized.
## Character matrix gt created.
##   Character matrix gt rows: 141
##   Character matrix gt cols: 15
##   skip: 0
##   nrows: 141
##   row_num: 0
## 
Processed variant: 141
## All variants processed
## Parsed with column specification:
## cols(
##   .default = col_character(),
##   Start = col_double(),
##   End = col_double()
## )
## See spec(...) for full column specifications.
## Scanning file to determine attributes.
## File attributes:
##   meta lines: 165
##   header_line: 166
##   variant count: 96
##   column count: 15
## 
Meta line 165 read in.
## All meta lines processed.
## gt matrix initialized.
## Character matrix gt created.
##   Character matrix gt rows: 96
##   Character matrix gt cols: 15
##   skip: 0
##   nrows: 96
##   row_num: 0
## 
Processed variant: 96
## All variants processed
## Parsed with column specification:
## cols(
##   .default = col_character(),
##   Start = col_double(),
##   End = col_double()
## )
## See spec(...) for full column specifications.
## Scanning file to determine attributes.
## File attributes:
##   meta lines: 165
##   header_line: 166
##   variant count: 1057
##   column count: 15
## 
Meta line 165 read in.
## All meta lines processed.
## gt matrix initialized.
## Character matrix gt created.
##   Character matrix gt rows: 1057
##   Character matrix gt cols: 15
##   skip: 0
##   nrows: 1057
##   row_num: 0
## 
Processed variant 1000
Processed variant: 1057
## All variants processed
## Parsed with column specification:
## cols(
##   .default = col_character(),
##   Start = col_double(),
##   End = col_double()
## )
## See spec(...) for full column specifications.
## Scanning file to determine attributes.
## File attributes:
##   meta lines: 165
##   header_line: 166
##   variant count: 97
##   column count: 15
## 
Meta line 165 read in.
## All meta lines processed.
## gt matrix initialized.
## Character matrix gt created.
##   Character matrix gt rows: 97
##   Character matrix gt cols: 15
##   skip: 0
##   nrows: 97
##   row_num: 0
## 
Processed variant: 97
## All variants processed
## Parsed with column specification:
## cols(
##   .default = col_character(),
##   Start = col_double(),
##   End = col_double()
## )
## See spec(...) for full column specifications.
## Scanning file to determine attributes.
## File attributes:
##   meta lines: 166
##   header_line: 167
##   variant count: 300
##   column count: 16
## 
Meta line 166 read in.
## All meta lines processed.
## gt matrix initialized.
## Character matrix gt created.
##   Character matrix gt rows: 300
##   Character matrix gt cols: 16
##   skip: 0
##   nrows: 300
##   row_num: 0
## 
Processed variant: 300
## All variants processed
## Parsed with column specification:
## cols(
##   .default = col_character(),
##   Start = col_double(),
##   End = col_double()
## )
## See spec(...) for full column specifications.
## Scanning file to determine attributes.
## File attributes:
##   meta lines: 166
##   header_line: 167
##   variant count: 291
##   column count: 16
## 
Meta line 166 read in.
## All meta lines processed.
## gt matrix initialized.
## Character matrix gt created.
##   Character matrix gt rows: 291
##   Character matrix gt cols: 16
##   skip: 0
##   nrows: 291
##   row_num: 0
## 
Processed variant: 291
## All variants processed
## Parsed with column specification:
## cols(
##   .default = col_character(),
##   Start = col_double(),
##   End = col_double()
## )
## See spec(...) for full column specifications.
## Scanning file to determine attributes.
## File attributes:
##   meta lines: 164
##   header_line: 165
##   variant count: 406
##   column count: 14
## 
Meta line 164 read in.
## All meta lines processed.
## gt matrix initialized.
## Character matrix gt created.
##   Character matrix gt rows: 406
##   Character matrix gt cols: 14
##   skip: 0
##   nrows: 406
##   row_num: 0
## 
Processed variant: 406
## All variants processed
## Parsed with column specification:
## cols(
##   .default = col_character(),
##   Start = col_double(),
##   End = col_double()
## )
## See spec(...) for full column specifications.
## Scanning file to determine attributes.
## File attributes:
##   meta lines: 165
##   header_line: 166
##   variant count: 6592
##   column count: 15
## 
Meta line 165 read in.
## All meta lines processed.
## gt matrix initialized.
## Character matrix gt created.
##   Character matrix gt rows: 6592
##   Character matrix gt cols: 15
##   skip: 0
##   nrows: 6592
##   row_num: 0
## 
Processed variant 1000
Processed variant 2000
Processed variant 3000
Processed variant 4000
Processed variant 5000
Processed variant 6000
Processed variant: 6592
## All variants processed
## Parsed with column specification:
## cols(
##   .default = col_character(),
##   Start = col_double(),
##   End = col_double()
## )
## See spec(...) for full column specifications.

6.2 Filtering

TN1_mutations <- vcf_filtering(
  mutect = TN1_mutect,
  annovar = TN1_annovar,
  min_AD = 1,
  bulk_normal = "TN28N",
  bulk_tumor = "TN28S1A"
) %>% 
  left_join(TN1_annovar)

TN2_mutations <- vcf_filtering(
  mutect = TN2_mutect,
  annovar = TN2_annovar,
  min_AD = 1,
  bulk_normal = "TN20N",
  bulk_tumor = "TN20S1A"
) %>% 
  left_join(TN2_annovar)

TN3_mutations <- vcf_filtering(
  mutect = TN3_mutect,
  annovar = TN3_annovar,
  min_AD = 1,
  bulk_normal = "TN17N",
  bulk_tumor = "TN17A"
) %>% 
  left_join(TN3_annovar)

TN4_mutations <- vcf_filtering(
  mutect = TN4_mutect,
  annovar = TN4_annovar,
  min_AD = 1,
  bulk_normal = "TN26N",
  bulk_tumor = "TN26S2A"
) %>% 
  left_join(TN4_annovar)

TN5_mutations <- vcf_filtering(
  mutect = TN5_mutect,
  annovar = TN5_annovar,
  min_AD = 1,
  bulk_normal = "TN21N",
  bulk_tumor = "TN21S1A"
) %>% 
  left_join(TN5_annovar)

TN6_mutations <- vcf_filtering(
  mutect = TN6_mutect,
  annovar = TN6_annovar,
  min_AD = 1,
  bulk_normal = "BRCADN",
  bulk_tumor = "BRCADT"
) %>% 
  left_join(TN6_annovar)

TN7_mutations <- vcf_filtering(
  mutect = TN7_mutect,
  annovar = TN7_annovar,
  min_AD = 1,
  bulk_normal = "BRCACN",
  bulk_tumor = "BRCACT"
) %>% 
  left_join(TN7_annovar)

TN8_mutations <- vcf_filtering(
  mutect = TN8_mutect,
  annovar = TN8_annovar,
  min_AD = 1,
  bulk_normal = "TN27N",
  bulk_tumor = "TN27A"
) %>% 
  left_join(TN8_annovar)

# Unique data frame for mutations, excluding matched normal from the vcf
TN_muts <- bind_rows(
  TN1_mutations %>% filter(sample != "TN28N") %>% mutate(patient = "TN1"),
  TN2_mutations %>% filter(sample != "TN20N") %>% mutate(patient = "TN2"),
  TN3_mutations %>% filter(sample != "TN17N") %>% mutate(patient = "TN3"),
  TN4_mutations %>% filter(sample != "TN26N") %>% mutate(patient = "TN4"),
  TN5_mutations %>% filter(sample != "TN21N") %>% mutate(patient = "TN5"),
  TN6_mutations %>% filter(sample != "BRCADN") %>% mutate(patient = "TN6"),
  TN7_mutations %>% filter(sample != "BRCACN") %>% mutate(patient = "TN7"),
  TN8_mutations %>% filter(sample != "TN27N") %>% mutate(patient = "TN8") 
)

6.4 Mutation burden

## Joining, by = c("CHROM", "POS", "patient")
## Scale for 'y' is already present. Adding another scale for 'y', which will replace the existing scale.