jenniferzhou33 commited on
Commit
aefe3f5
·
verified ·
1 Parent(s): bac881f

fix deconstructsigs error

Browse files
codes/deconstructSigs_trinucs_data.R CHANGED
@@ -7,6 +7,15 @@
7
  #BiocManager::install("GenomeInfoDb")
8
  #BiocManager::install("deconstructSigs")
9
 
 
 
 
 
 
 
 
 
 
10
  library(deconstructSigs)
11
 
12
  # Set the data source variable
 
7
  #BiocManager::install("GenomeInfoDb")
8
  #BiocManager::install("deconstructSigs")
9
 
10
+ # Install required Bioconductor packages if not already installed
11
+ if (!requireNamespace("BiocManager", quietly = TRUE))
12
+ install.packages("BiocManager")
13
+
14
+ # Check and install `deconstructSigs` if not already installed
15
+ if (!requireNamespace("deconstructSigs", quietly = TRUE))
16
+ BiocManager::install("deconstructSigs")
17
+
18
+ # Load the package
19
  library(deconstructSigs)
20
 
21
  # Set the data source variable