Skip to content

Commit 3caa762

Browse files
erikbergstromerikbergstrom
erikbergstrom
authored and
erikbergstrom
committed
Fixed README typos, fixed install function issues
1 parent 274fda4 commit 3caa762

File tree

5 files changed

+45
-16
lines changed

5 files changed

+45
-16
lines changed

.DS_Store

0 Bytes
Binary file not shown.

.Rhistory

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
library(SigProfilerMatrixGeneratorR)
2+
install_github("AlexandrovLab/SigProfilerMatrixGeneratorR")
3+
library("devtools")
4+
install_github("AlexandrovLab/SigProfilerMatrixGeneratorR")
5+
install_github("AlexandrovLab/SigProfilerMatrixGeneratorR")

R/.Rapp.history

Whitespace-only changes.

R/SigProfilerMatrixGeneratorR.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ SigProfilerMatrixGeneratorR <- function(project, genome, matrix_path, exome=F, b
2222

2323
#' @export install
2424
install <- function(genome, custom=F, rsync=F, bash=T, ftp=T){
25+
os <- reticulate::import("os")
26+
sys <- reticulate::import("sys")
2527
genInstall <- reticulate::import("SigProfilerMatrixGenerator.install")
2628
genInstall$install(genome, custom, rsync, bash, ftp)
2729
sys$stdout$flush()

README.md

Lines changed: 38 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,16 @@ An R wrapper for running the SigProfilerMatrixGenerator (https://osf.io/s93d5/wi
77

88
**PREREQUISITES**
99

10-
devtools
10+
devtools (R)
1111
```
12-
install.packages("devtools")
12+
>> install.packages("devtools")
1313
```
14+
reticulate* (R)
15+
```
16+
>> install.packages("reticulate")
17+
```
18+
19+
*Reticulate has a known bug of preventing python print statements from flushing to standard out. As a result, some of the typical progress messages are delayed.
1420

1521
**QUICK START GUIDE**
1622

@@ -19,37 +25,53 @@ This section will guide you through the minimum steps required to create mutatio
1925
```
2026
pip install SigProfilerMatrixGenerator
2127
```
28+
2. Open an R session and ensure that your R interpreter recognizes the path to your python3 installation:
29+
```
30+
$ R
31+
>> library("reticulate")
32+
>> use_python("path_to_your_python3")
33+
>> py_config()
34+
python: /anaconda3/bin/python3
35+
libpython: /anaconda3/lib/libpython3.6m.dylib
36+
pythonhome: /anaconda3:/anaconda3
37+
version: 3.6.5 |Anaconda, Inc.| (default, Apr 26 2018, 08:42:37) [GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)]
38+
numpy: /anaconda3/lib/python3.6/site-packages/numpy
39+
numpy_version: 1.16.1
40+
```
41+
If you do not see your python3 path listed, restart your R session and rerun the above commands in order.
42+
2243
2. Install SigProfilerMatrixGeneratorR using devtools:
2344
```
24-
install_github("AlexandrovLab/SigProfilerMatrixGeneratorR")
45+
>>library("devtools")
46+
>>install_github("AlexandrovLab/SigProfilerMatrixGeneratorR")
2547
```
26-
3. Load the package in an R session and install your desired reference genome as follows (available reference genomes are: GRCh37, GRCh38, mm9, and mm10):
48+
3. Load the package in the same R session and install your desired reference genome as follows (available reference genomes are: GRCh37, GRCh38, mm9, and mm10):
2749
```
28-
$ R
2950
>> library("SigProfilerMatrixGeneratorR")
30-
>> install('GRCh37', rsync=False, bash=True)
51+
>> install('GRCh37', rsync=FALSE, bash=TRUE)
3152
```
32-
This will install the human 37 assembly as a reference genome.
53+
54+
This will install the human 37 assembly as a reference genome.
3355

3456
4. Place your vcf files in your desired output folder. It is recommended that you name this folder based on your project's name
35-
5. From within an R session, you can now generate the matrices as follows:
57+
58+
5. From within the same R session, you can now generate the matrices as follows:
3659
```
37-
$ R
3860
>> library("SigProfilerMatrixGeneratorR")
39-
>> matrices <- SigProfilerMatrixGeneratorR("BRCA", "GRCh37", "/Users/ebergstr/Desktop/BRCA/", plot=T, exome=False, bed_file=None, chrom_based=False, tsb_stat=False, seqInfo=False, cushion=100)
61+
>> matrices <- SigProfilerMatrixGeneratorR("BRCA", "GRCh37", "/Users/ebergstr/Desktop/BRCA/", plot=T, exome=F, bed_file=NULL, chrom_based=F, tsb_stat=False, seqInfo=False, cushion=100)
4062
```
4163
The layout of the required parameters are as follows:
4264

4365
SigProfilerMatrixGeneratorFunc(project, reference_genome, path_to_input_files)
4466
4567
where project, reference_genome, and path_to_input_files must be strings (surrounded by quotation marks, ex: "test"). Optional parameters include:
4668

47-
exome=False: [boolean] Downsamples mutational matrices to the exome regions of the genome
48-
bed_file=None [string path to bed_file] Downsamples mutational matrices to custom regions of the genome. Requires the full path to the BED file.
49-
chrom_based=False [boolean] Outputs chromosome-based matrices
50-
plot=False [boolean] Integrates with SigProfilerPlotting to output all available visualizations for each matrix.
51-
tsb_stat=False [boolean] Outputs the results of a transcriptional strand bias test for the respective matrices.
52-
seqInfo=False [boolean] Ouputs original mutations into a text file that contains the SigProfilerMatrixGenerator classificaiton for each mutation.
69+
exome=FALSe: [boolean] Downsamples mutational matrices to the exome regions of the genome
70+
bed_file=NULL [string path to bed_file] Downsamples mutational matrices to custom regions of the genome. Requires the full path to the BED file.
71+
chrom_based=FALSE [boolean] Outputs chromosome-based matrices
72+
plot=FALSE [boolean] Integrates with SigProfilerPlotting to output all available visualizations for each matrix.
73+
tsb_stat=FALSE [boolean] Outputs the results of a transcriptional strand bias test for the respective matrices.
74+
seqInfo=FALSE [boolean] Ouputs original mutations into a text file that contains the SigProfilerMatrixGenerator classificaiton for each mutation.
5375
cushion=100 [integer] Adds an Xbp cushion to the exome/bed_file ranges for downsampling the mutations.
5476

5577

0 commit comments

Comments
 (0)