Skip to content

Commit e108d0f

Browse files
author
James Hawley
committed
v5.1 Updates
1 parent acfdf9f commit e108d0f

9 files changed

Lines changed: 300 additions & 30896 deletions

File tree

Lines changed: 1 addition & 30254 deletions
Large diffs are not rendered by default.

LICENSE

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GNU GENERAL PUBLIC LICENSE
22
Version 3, 29 June 2007
33

4-
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
4+
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
55
Everyone is permitted to copy and distribute verbatim copies
66
of this license document, but changing it is not allowed.
77

@@ -631,8 +631,8 @@ to attach them to the start of each source file to most effectively
631631
state the exclusion of warranty; and each file should have at least
632632
the "copyright" line and a pointer to where the full notice is found.
633633

634-
{one line to give the program's name and a brief idea of what it does.}
635-
Copyright (C) {year} {name of author}
634+
<one line to give the program's name and a brief idea of what it does.>
635+
Copyright (C) <year> <name of author>
636636

637637
This program is free software: you can redistribute it and/or modify
638638
it under the terms of the GNU General Public License as published by
@@ -645,14 +645,14 @@ the "copyright" line and a pointer to where the full notice is found.
645645
GNU General Public License for more details.
646646

647647
You should have received a copy of the GNU General Public License
648-
along with this program. If not, see <http://www.gnu.org/licenses/>.
648+
along with this program. If not, see <https://www.gnu.org/licenses/>.
649649

650650
Also add information on how to contact you by electronic and paper mail.
651651

652652
If the program does terminal interaction, make it output a short
653653
notice like this when it starts in an interactive mode:
654654

655-
{project} Copyright (C) {year} {fullname}
655+
<program> Copyright (C) <year> <name of author>
656656
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657657
This is free software, and you are welcome to redistribute it
658658
under certain conditions; type `show c' for details.
@@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
664664
You should also get your employer (if you work as a programmer) or school,
665665
if any, to sign a "copyright disclaimer" for the program, if necessary.
666666
For more information on this, and how to apply and follow the GNU GPL, see
667-
<http://www.gnu.org/licenses/>.
667+
<https://www.gnu.org/licenses/>.
668668

669669
The GNU General Public License does not permit incorporating your program
670670
into proprietary programs. If your program is a subroutine library, you
671671
may consider it more useful to permit linking proprietary applications with
672672
the library. If this is what you want to do, use the GNU Lesser General
673673
Public License instead of this License. But first, please read
674-
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
674+
<https://www.gnu.org/licenses/why-not-lgpl.html>.

README.docx

102 KB
Binary file not shown.

README.md

Lines changed: 39 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SMURF
22
**S**ignificantly **Mu**tated **R**egion **F**inder
33

4-
SMURF identifies significantly mutated genomic regions in a set of samples
4+
SMURF identifies significantly mutated genomic regions in a set of samples.
55

66
Developed by Paul Guilhamon
77

@@ -11,6 +11,19 @@ Clone this repo via `git clone`.
1111

1212
The SNP147 annotation files from the [UCSC Table Browser](https://genome.ucsc.edu/cgi-bin/hgTables) are very large, so they are not included in this repository.
1313

14+
## Requirements
15+
16+
SMuRF is implemented in Bash and R; it runs on any platform with Bash (≥4.1.2), R (≥3.3.0) and BEDTools (≥2.23.0).
17+
It requires the following R packages:
18+
19+
* GenomicRanges
20+
* gtools
21+
* gplots
22+
* ggplot2
23+
* data.table
24+
* psych
25+
* dplyr
26+
1427
# Usage
1528

1629
```shell
@@ -24,44 +37,46 @@ qsub smurf.sh \
2437
-m [global|peak]
2538
```
2639

27-
## Parameters
40+
## Arguments
2841

2942
| Parameter | Description |
3043
|-----------|-------------|
3144
| `-o` | Output directory (absolute path) |
3245
| `-f [vcf\|bam]` | Format chosen for input variants. **vcf**: individual VCF formatted files for each sample must be placed under a single directory. The full path to that directory is what should be supplied to the `-v` argument described below. **NOTE**: when using this option the sample names used for output files will be automatically generated from the names of the VCF files themselves: if the filename contains an underscore, then the sample name will be everything that comes before the underscore; otherwise the `.vcf` at the end of the filename will be clipped off and the rest will be used as as sample name. Do make sure your sample names do not become identical once the portion of the filename after the underscore is removed. **bed**: a single BED file containing all variants to be analysed. The format must be the following: `chr start stop name`. The full path to that bed file is what should be supplied to the `-v` argument described below. |
3346
| `-v` | The input variants themselves; depending on the format chosen above, either the path to a directory containing individual VCF files OR the path to a single BED file. |
34-
| `-g [hg19\|hg38]` | Genome build. This will determine the build of annotation files used by SMURF. Obviously, the input variants and input genomic regions should both be of the chosen build. |
3547
| `-s [n\|c\|a\|o]` | SNP filter to apply to the input variants. **n**: no SNP filter, only blacklisted regions will be removed. **c**: blacklist + Common snps from dbSNP147 will be removed; *recommended option for most uses*. **a**: blacklist + all snps from dbSNP147 will be removed. Additionally, only when using the VCF files as input, the option `o` will be valid here, and will provide snp filtering as done by the previous version of SMURF: removal of any variant annotated to an rs ID within the VCF file. |
48+
| `-p` | Promoter annotation file; those derived from Gencodev19 (human genome build hg19) and Gencodev24 (human genome build hg38) are provided in the SMuRF directory. These can be replaced with any annotation of your choice, but the output figures by SMuRF will automatically colour-code regions by either the gene name linked to a promoter region or the mention "DistalRE" for distal regulatory element, as this tool was originally designed to look for mutation-enriched non-coding regions. |
3649
| `-r` | Genomic regions of interest that will be checked for significant enrichment of mutations. Must be supplied in the BED format specified by `-f`. The 4th column is required, but can be any string. Having the name there could make downstream analyses easier but isn't required by SMURF. |
37-
| `-m [global\|peak]` | Method used to calculate the background mutation rate (BMR) in the binomial test. **global**: BMR is total number of mutations (across all samples) in regions divided by total bp in regions. **peak**: BMR is calculated based on which samples have mutations in that region. The individual sample BMR is calculated as for global, and the average of the BMRs for the samples represented in the peak is taken as the peak BMR. |
50+
| `-m [allsamples\|regionsamples]` | Method used to calculate the background mutation rate (BMR) in the binomial test. **allsamples**: BMR is total number of mutations (across all samples) in regions divided by total bp in regions. **regionsamples**: BMR is calculated based on which samples have mutations in that region. The individual sample BMR is calculated as for global, and the average of the BMRs for the samples represented in the region is taken as the region BMR. |
3851

3952
## Input
4053

41-
* Variants file(s): These should contain variants of interest. SMURF has options for applying SNP and blacklist filtering but will not perform arbitrary quality filters. They should be in either VCF format as multiple files (1 per sample) under the same directory OR in BED format, with all mutations for all samples within the same file, and exactly 4 columns: chr/start/stop/name. **NOTE**: if using the BED format, keep one row per mutation per sample, ie: if a mutation is recurrent and found in multiple samples these should be placed on separate rows. Also note that the start and stop positions are the same; these correspond to the POS column of a VCF-formatted file (BED and VCF follow different numbering conventions). See format example below:
54+
* Variants file(s): These should contain variants of interest. SMuRF has options for applying SNP filtering but will not perform arbitrary quality filters. They should be in either VCF format as multiple files (1 per sample) under the same directory OR in BED format, with all mutations for all samples within the same file, and exactly 4 columns: chr/start/stop/name.
55+
**NOTE**: if using the BED format, keep one row per mutation per sample, ie: if a mutation is recurrent and found in multiple samples these should be placed on separate rows. Also note that the start and stop positions are NOT the same; the start column corresponds to the POS column of a VCF-formatted file minus 1; (BED and VCF follow different numbering conventions; see https://www.biostars.org/p/84686/ for more information).
56+
See format example below:
4257

43-
| chr | start | end | name |
44-
|-----|-------|-----|------|
45-
| chr10 | 101776719 | 101776719 | Sample1 |
46-
| chr10 | 101877882 | 101877882 | Sample2 |
47-
| ... | ... | ... | ... |
58+
| chr | start | end | name |
59+
|-----|-------|-----|------|
60+
| chr10 | 101776719 | 101776719 | Sample1 |
61+
| chr10 | 101877882 | 101877882 | Sample2 |
62+
| ... | ... | ... | ... |
4863

49-
* Genomic Regions: a BED file of genomic regions of interest. The format is `chr start stop name`. **Note**: the `name` column is required but can be any string; it is recommended to use it for the names of biological samples from which each genomic region was identified for easy traceback in downstream analyses, although this is not required for SMURF. These genomic regions and the variants specified above do not need to come from matched samples. Unlike the set of input variants above, it is important that the genomic regions be mutually exclusive. If in your cohort regions from two different samples overlap, they should be merged as one and the sample name column can have all the contributing sample names in a comma-separated list. See format example below:
64+
* Genomic Regions: a BED file of genomic regions of interest. The format is chr/start/stop/name ; Note: the 'name' column is required but can be any string; it is recommended to use it for the names of biological samples from which each genomic region was identified for easy trace-back in downstream analyses, although this is not required for SMuRF. These genomic regions and the variants specified above do not need to come from matched samples. Unlike the set of input variants above, it is important that the genomic regions be mutually exclusive. If in your cohort regions from two different samples overlap, they should be merged as one and the sample name column can have all the contributing sample names in a comma-separated list.
65+
See format example below:
5066

5167
| chr | start | end | name |
5268
|-----|-------|-----|------|
5369
| chr1 | 10027 | 10612 | Sample1 |
5470
| chr1 | 237701 | 237901 | Sample3,Sample5,Sample22 |
5571
| ... | ... | ... | ... |
5672

57-
* Annotation files: ENCODE blacklist, Gencode promoter annotation, and dbSNP sets (All and Common) for both hg19 and hg38 are provided within the annotation directory. The user on the cluster does not need to provide any of these.
58-
* [Blacklist](https://sites.google.com/site/anshulkundaje/projects/blacklists) generated by Anshul Kundaje. They represent "artefact regions that tend to show artificially high signal (excessive unstructured anomalous reads mapping)".
73+
* Annotation files: GENCODE promoter annotation, and dbSNP sets for both hg19 and hg38 are provided within the SMuRF directory.
5974
* Promoter annotation: The Gencode set of TSS coordinates for each genome build (hg19: v19, hg38: v24) was downloaded from the UCSC table browser. Promoters were annotated from -2.5kb to +0.5kb around the TSS.
60-
* SNPs: dbSNP sets v147 were downloaded from the UCSC table browser for each genome build. Two versions of the databases are available, "All" to filter out all known SNPs and "Common" to remove only those that have a minor allele frequency of >= 1%. This latter set might be of use if one wants to avoid removing potentially interesting somatic mutations that also appear as very rare polymorphisms in the population.
75+
* SNPs: dbSNP sets v147 were downloaded from the UCSC table browser for each genome build. The "Common" version of the database is made available with the tool; this can be used to remove only those that have a minor allele frequency of >= 1%, of use if one wants to avoid removing potentially interesting somatic mutations that also appear as very rare polymorphisms in the population. The larger file containing all SNPs (including those found at frequency < 1% ) can be downloaded from the dbSNP website.
6176

6277
## Output
6378

64-
SMURF outputs a number of files, some for display and evaluation purposes, others as end results, and a final set for input into downstream tools, such as [C3D](https://github.com/LupienLabOrganization/C3D) or [GO](http://www.geneontology.org) annotation.
79+
SMuRF outputs a number of files, some for display and evaluation purposes, others as end results, and a final set for input into downstream tools, such as [C3D](https://github.com/LupienLabOrganization/C3D) or [GO](http://www.geneontology.org) annotation.
6580

6681
### Results Files
6782

@@ -78,15 +93,17 @@ SMURF outputs a number of files, some for display and evaluation purposes, other
7893

7994
| File | Description |
8095
|------|-------------|
81-
| `QQplot_Freq3.pdf` | self-explanatory |
82-
| `barplot_mut_inRegions_Counts_and_Perc.pdf` | summary plots of the number of variants per sample and how many overlap with the provided genomic intervals |
83-
| `Mutated_Regions_Freq3_qval0.05.pdf` | scatter plot of significantly mutated regions |
84-
| `Mutated_Regions_Freq3_qval0.05_Promoters_VS_DistalREs.pdf` | same as above with added promoter/DistalRE annotation |
96+
| `QQplot_Freq3.pdf` | Self-explanatory |
97+
| `barplot_mut_inRegions_Counts_and_Perc.pdf` | Summary plots of the number of variants per sample and how many overlap with the provided genomic intervals |
98+
| `Mutation_Rate_Plot_Freq3_qval0.05.pdf` | Scatter plot of significantly mutated regions:-log10(q-value) vs region mutation rate |
99+
| `Mutation_Rate_Plot_Freq3_qval0.05_Promoters_VS_DistalREs.pdf` | Same as above with added promoter/DistalRE annotation |
100+
| `Sample_Frequency_Plot_Freq3_qval0.05.pdf` and `Sample_Frequency_Plot_Freq3_qval0.05_Promoters_VS_DistalREs.pdf` | Same as the two above, but with the number of unique samples mutated in the region as the x-axis as opposed tot he mutation rate |
101+
| `Sample_Frequency_Plot_Freq3_qval0.05_DistalREs.pdf` and `Sample_Frequency_Plot_Freq3_qval0.05_Promoters.pdf` | Same as `Sample_Frequency_Plot_Freq3_qval0.05_Promoters_VS_DistalREs.pdf` but separating out those regions annotated to promoters and DistalREs |
85102

86103
### Files for use in dowstream analyses
87104

88105
| File | Description |
89106
|------|-------------|
90-
| `Mutated_Regions_sigmut0.05_DistalRE_forc3d.bed` | significantly mutated regions annotated to enhancers, to use as input for C3D to identify downstream target promoters |
91-
| `Mutated_Regions_sigmut0.05_DistalReAndProm.bed` | all significantly mutated regions; for use in GO applications for example, or TF motif enrichment |
92-
| `Mutated_Regions_allmut_DistalREAndProm.bed` | all mutated regions |
107+
| `Mutated_Regions_sigmut0.05_DistalRE_forc3d.bed` | Significantly mutated regions annotated to enhancers, to use as input for C3D to identify downstream target promoters |
108+
| `Mutated_Regions_sigmut0.05_DistalReAndProm.bed` | All significantly mutated regions; for use in GO applications for example, or TF motif enrichment |
109+
| `Mutated_Regions_allmut_DistalREAndProm.bed` | All mutated regions |

0 commit comments

Comments
 (0)