Skip to content

Commit 6f44505

Browse files
committed
update docs with more precise "BED format" wording
1 parent a426f2b commit 6f44505

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ You will need only two pieces of data to get started:
4949
- Others have done a great job of describing Variant Call Format. For those with a basic understanding of genetic nomenclature, we recommend the GATK [resource](https://gatk.broadinstitute.org/hc/en-us/articles/360035531692-VCF-Variant-Call-Format).
5050
- For those who need a refresher on genomics and genomic data, we recommend starting with the [fact sheets](https://www.genome.gov/about-genomics/fact-sheets) curated by the National Human Genome Research Institute (NHGRI).
5151

52-
If you wish to apply a PGS to a cohort, we recommend that genotypes for the whole cohort be aggregated in one VCF file, either through a regenotyping process, or through VCF merging with an external tool designed for manipulating VCF files. VCF files can be very large, causing memory-related complications in the R environment. To reduce memory usage and improve speed of PGS application, we recommend pre-filtering the input VCF for only the coordinates that compose the PGS you wish to apply. This action can be performed using a coordinate BED file and tools such as bcftools or bedtools. To facilitate this process, ApplyPolygenicScore provides a function that outputs a BED file containing coordinates for any number of PGS weight files provided as input.
52+
If you wish to apply a PGS to a cohort, we recommend that genotypes for the whole cohort be aggregated in one VCF file, either through a regenotyping process, or through VCF merging with an external tool designed for manipulating VCF files. VCF files can be very large, causing memory-related complications in the R environment. To reduce memory usage and improve speed of PGS application, we recommend pre-filtering the input VCF for only the coordinates that compose the PGS you wish to apply. This action can be performed using a genomic coordinate file in BED format and tools such as bcftools or bedtools. To facilitate this process, ApplyPolygenicScore provides a function that outputs a BED-formatted file containing genomic coordinates for any number of PGS weight files provided as input.
5353

5454
#### PGS weight file
5555
- The PGS weight file describes a PGS by providing a list of component SNPs, their genomic coordinates, and their respective weights.
@@ -70,9 +70,9 @@ If you wish to apply a PGS to a cohort, we recommend that genotypes for the whol
7070
### Recommended Workflow
7171

7272

73-
1. Convert PGS weight files to BED coordinate files.
73+
1. Convert PGS weight files to BED-formatted coordinate files.
7474

75-
We recommend starting by filtering your input VCF for just the variants in your PGS weight files. Several software tools are available to do this, and most all require a coordinate BED file. A description of BED format can be found [here](https://bedtools.readthedocs.io/en/latest/content/general-usage.html).
75+
We recommend starting by filtering your input VCF for just the variants in your PGS weight files. Several software tools are available to do this, and most all require a coordinate file in BED format. A description of BED format can be found [here](https://bedtools.readthedocs.io/en/latest/content/general-usage.html).
7676

7777
The function `import.pgs.weight.file` can be used to import your PGS weight files into R.
7878
The functions `convert.pgs.to.bed` and `combine.pgs.bed` can be used to make the conversion, and merge several BED dataframes into one, respectively.

vignettes/UserGuide.Rmd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,14 @@ phenotype.data <- data.frame(
116116
head(phenotype.data)
117117
```
118118

119-
## Creating a BED coordinate file
119+
## Creating a BED-formatted coordinate file
120120

121121
VCF files can be very large. Sometimes they are too large to be imported into R. In these cases, it is useful to first filter the VCF file to just the variants
122122
that are included in the PGS you wish to calculate and reduce file size. This is best done using command line tools designed for VCF file manipulation. For filtering, they typically
123123
require a BED file containing the coordinates of the variants you wish to keep. To simplify this process, ApplyPolygenicScore provides functions for converting PGS weight files
124-
to BED coordinate files.
124+
to BED-formatted coordinate files.
125125

126-
### Conversion of PGS weight files to BED coordinate format
126+
### Conversion of PGS weight files to a coordinate file in BED format
127127

128128
BED format requires the following first three columns: chromosome name, start position, and end position.
129129
PGS weight files only contain the chromosome name and end position of each variant, so must be reformatted
@@ -133,7 +133,7 @@ with an additional column for the start position, and with the correct column or
133133
Additionally, most tools do not accept BED files with column names. If you wish to maintain a header, you may need to add
134134
a comment character to the first line of the file: `# chr start end`
135135

136-
Use the `convert.pgs.to.bed` function to convert a PGS weight file to a BED coordinate data frame.
136+
Use the `convert.pgs.to.bed` function to convert a PGS weight file to a BED-formatted coordinate data frame.
137137

138138
```{r convert-pgs-to-bed}
139139
@@ -156,7 +156,7 @@ format the X and Y chromosomes as 'X' and 'Y' respectively, and `numeric.sex.chr
156156

157157
The `slop` option imitates `bedtools` nomenclature for adding base pairs to the start and end of a set of coordinates. `slop = 10` adds 10 base pairs to the start and end of each variant coordinate.
158158

159-
Here is an example of BED coordinates for a variant on chromosome 1 at the 20th base pair.
159+
Here is an example of genomic coordinates in BED file format for a variant on chromosome 1 at the 20th base pair.
160160

161161
No slop:
162162

@@ -173,7 +173,7 @@ With slop of 10 base pairs:
173173
### Merging coordinates from multiple polygenic scores
174174

175175
What if you want to apply multiple polygenic scores to the same VCF file?
176-
Instead of filtering the VCF file multiple times, you can use the `combine.pgs.bed` function to merge multiple BED data frames
176+
Instead of filtering the VCF file multiple times, you can use the `combine.pgs.bed` function to merge multiple BED-formatted data frames
177177
into a single set of coordinates, and filter your VCF just once for the union of all variants in multiple PGSs.
178178

179179
```{r merge-pgs-bed}

0 commit comments

Comments
 (0)