You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ You will need only two pieces of data to get started:
49
49
- 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).
50
50
- 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).
51
51
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.
53
53
54
54
#### PGS weight file
55
55
- 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
70
70
### Recommended Workflow
71
71
72
72
73
-
1. Convert PGS weight files to BED coordinate files.
73
+
1. Convert PGS weight files to BED-formatted coordinate files.
74
74
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).
76
76
77
77
The function `import.pgs.weight.file` can be used to import your PGS weight files into R.
78
78
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.
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
122
122
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
123
123
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.
125
125
126
-
### Conversion of PGS weight files to BED coordinate format
126
+
### Conversion of PGS weight files to a coordinate file in BED format
127
127
128
128
BED format requires the following first three columns: chromosome name, start position, and end position.
129
129
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
133
133
Additionally, most tools do not accept BED files with column names. If you wish to maintain a header, you may need to add
134
134
a comment character to the first line of the file: `# chr start end`
135
135
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.
137
137
138
138
```{r convert-pgs-to-bed}
139
139
@@ -156,7 +156,7 @@ format the X and Y chromosomes as 'X' and 'Y' respectively, and `numeric.sex.chr
156
156
157
157
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.
158
158
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.
160
160
161
161
No slop:
162
162
@@ -173,7 +173,7 @@ With slop of 10 base pairs:
173
173
### Merging coordinates from multiple polygenic scores
174
174
175
175
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
177
177
into a single set of coordinates, and filter your VCF just once for the union of all variants in multiple PGSs.
0 commit comments