@@ -201,7 +201,8 @@ checkDef <- function(newDef){
201
201
colorNames <- defNames[grep('color', defNames)]
202
202
if (i %in% colorNames){
203
203
colTest <- try(col2rgb(newDef[[i]]), silent=TRUE)
204
- if (class(colTest) == 'try-error')
204
+ # if (class(colTest) == 'try-error')
205
+ if (inherits(colTest, 'try-error'))
205
206
newDef[[i]] <- defSet[[i]]
206
207
}
207
208
}
@@ -1339,25 +1340,25 @@ popupGui <- function(dev){
1339
1340
#colBack <- '#2E86C1' # A contrasting background color
1340
1341
1341
1342
# Letter positions and colors
1342
- letters <- c('P ', 'A ', 'N ', 'D ', 'A ', 'S ')
1343
- colors <- c(colMain, colMain, colMain, colMain, colMain, colMain)
1344
- cex_values <- c(7, 7, 7, 7, 7, 7)
1345
- offset_values <- c(0.5, 0.5, 0.5, 0.5, 0.5, 0.5)
1343
+ letters <- c('D ', 'I ', 'G ', 'E ', 'S ', 'T', 'R ')
1344
+ colors <- c(colMain, colMain, colMain, colMain, colMain, colMain,colBack )
1345
+ cex_values <- c(7, 7, 7, 7, 7, 7, 6.5 )
1346
+ offset_values <- c(0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5 )
1346
1347
1347
1348
# Loop to create and position letters
1348
1349
for (i in 1:length(letters)) {
1349
1350
text(-0.65 + (i-1)*0.25, 0.2, letters[i], col=colors[i], cex=cex_values[i], pos=3, offset=offset_values[i])
1350
1351
}
1351
1352
1352
- # # Add a decorative 'R' in a different color
1353
- # text(0.70, 0.2, 'R', col='#E74C3C', cex=5.5, pos=3, offset=0.4)
1353
+ # Add a decorative 'R' in a different color
1354
+ text(0.70, 0.2, 'R', col='#E74C3C', cex=5.5, pos=3, offset=0.4)
1354
1355
1355
- # # Other text elements (modify as needed)
1356
- # text(0, 0.08, 'Digestomics Analyzer', col=colMain, cex=2.5, font=1)
1357
- # text(0, -0.15, paste('version 1.0.0', pkgVar$version), col=colMain, font=3)
1358
- # text(0, -0.25, 'gp() - Generate New Proteome', col=colMain)
1359
- # text(0, -0.35, 'pm() - Process Mascot files', col=colMain)
1360
- # text(0, -0.45, 'fo() - Open *.dcf files', col=colMain)
1356
+ # Other text elements (modify as needed)
1357
+ text(0, 0.08, 'Digestomics Analyzer', col=colMain, cex=2.5, font=1)
1358
+ text(0, -0.15, paste('version 1.0.0', pkgVar$version), col=colMain, font=3)
1359
+ text(0, -0.25, 'gp() - Generate New Proteome', col=colMain)
1360
+ text(0, -0.35, 'pm() - Process Mascot files', col=colMain)
1361
+ text(0, -0.45, 'fo() - Open *.dcf files', col=colMain)
1361
1362
1362
1363
# Force the graphics device to refresh
1363
1364
dev.flush()
@@ -1366,60 +1367,59 @@ popupGui <- function(dev){
1366
1367
##################################################################################
1367
1368
# New splashScreen to display when loading DigestR
1368
1369
1370
+ # splashScreen1 <- function(){
1371
+ # library(png)
1372
+ # # Load the image and get its dimensions
1373
+ # img_path <- system.file("extdata", "DigestRpicture.png", package = "digestR")
1374
+ # img <- readPNG(img_path)
1375
+ # plot(0, 0, type = 'n', xlab = '', ylab = '', axes = FALSE, xlim = c(-1.5, 1.5), ylim = c(-1.5, 1.5))
1376
+ # # Display the image properly (full window)
1377
+ # # rasterImage(img, -1.5, -1.5, 1.5, 1.5)
1378
+
1379
+ # xlim <- c(-1.5, 1.5) # Adjust the x-axis limits as needed
1380
+ # ylim <- c(-1.5, 1.5) # Adjust the y-axis limits as needed
1381
+
1382
+ # # Create plot with no margins and appropriate limits
1383
+ # par(mar=c(0,0,0,0), bg='#0d0d0d')
1384
+ # plot(0, 0, type='n', xlab='', ylab='', axes=FALSE, xlim=xlim, ylim=ylim)
1385
+
1386
+ # # Display the image, stretched to fit the plot region
1387
+ # rasterImage(img, xlim[1], ylim[1], xlim[2], ylim[2])
1388
+
1389
+ # # Letter positions and modern color scheme for "PANDAS"
1390
+ # letters <- c('P', 'A', 'N', 'D', 'A', 'S')
1391
+ # x_positions <- c(-0.9, -0.6, -0.3, 0.0, 0.3, 0.6) # Custom X positions for each letter
1392
+ # y_positions <- c(0.62, 0.62, 0.62, 0.62, 0.62, 0.62) # Same Y position for all
1393
+ # colors <- rep('#4da6ff', 6) # Light blue for all letters
1394
+ # cex_values <- rep(5, 6) # Font size for letters
1395
+
1396
+ # # Add shadow effect to the letters for depth
1397
+ # shadow_col <- '#00000050' # Semi-transparent black shadow
1398
+ # for (i in 1:length(letters)) {
1399
+ # text(x_positions[i] + 0.02, y_positions[i] - 0.02, letters[i], col=shadow_col, cex=cex_values[i], pos=3)
1400
+ # text(x_positions[i], y_positions[i], letters[i], col=colors[i], cex=cex_values[i], pos=3)
1401
+ # }
1369
1402
1370
- splashScreen1 <- function(){
1371
- library(png)
1372
- # Load the image and get its dimensions
1373
- img_path <- system.file("extdata", "DigestRpicture.png", package = "digestR")
1374
- img <- readPNG(img_path)
1375
- plot(0, 0, type = 'n', xlab = '', ylab = '', axes = FALSE, xlim = c(-1.5, 1.5), ylim = c(-1.5, 1.5))
1376
- # Display the image properly (full window)
1377
- # rasterImage(img, -1.5, -1.5, 1.5, 1.5)
1378
-
1379
- xlim <- c(-1.5, 1.5) # Adjust the x-axis limits as needed
1380
- ylim <- c(-1.5, 1.5) # Adjust the y-axis limits as needed
1381
-
1382
- # Create plot with no margins and appropriate limits
1383
- par(mar=c(0,0,0,0), bg='#0d0d0d')
1384
- plot(0, 0, type='n', xlab='', ylab='', axes=FALSE, xlim=xlim, ylim=ylim)
1385
-
1386
- # Display the image, stretched to fit the plot region
1387
- rasterImage(img, xlim[1], ylim[1], xlim[2], ylim[2])
1388
-
1389
- # Letter positions and modern color scheme for "PANDAS"
1390
- letters <- c('P', 'A', 'N', 'D', 'A', 'S')
1391
- x_positions <- c(-0.9, -0.6, -0.3, 0.0, 0.3, 0.6) # Custom X positions for each letter
1392
- y_positions <- c(0.62, 0.62, 0.62, 0.62, 0.62, 0.62) # Same Y position for all
1393
- colors <- rep('#4da6ff', 6) # Light blue for all letters
1394
- cex_values <- rep(5, 6) # Font size for letters
1395
-
1396
- # Add shadow effect to the letters for depth
1397
- shadow_col <- '#00000050' # Semi-transparent black shadow
1398
- for (i in 1:length(letters)) {
1399
- text(x_positions[i] + 0.02, y_positions[i] - 0.02, letters[i], col=shadow_col, cex=cex_values[i], pos=3)
1400
- text(x_positions[i], y_positions[i], letters[i], col=colors[i], cex=cex_values[i], pos=3)
1401
- }
1402
-
1403
- # Add black shadow for the title "Peptide Analyzer of Naturally Digested Amino acid Sequences"
1404
- text(0, -0.4, 'Peptide Analyzer of', col='black', cex=1.80, font=2.3) # Black shadow
1405
- text(0, -0.4, 'Peptide Analyzer of', col='#4da6ff', cex=1.8, font=2) # Main text
1403
+ # # Add black shadow for the title "Peptide Analyzer of Naturally Digested Amino acid Sequences"
1404
+ # text(0, -0.4, 'Peptide Analyzer of', col='black', cex=1.80, font=2.3) # Black shadow
1405
+ # text(0, -0.4, 'Peptide Analyzer of', col='#4da6ff', cex=1.8, font=2) # Main text
1406
1406
1407
- # Shadow for "Naturally Digested Amino acid Sequences"
1408
- text(0, -0.53, 'Naturally Digested Amino acid Sequences', col='black', cex=1.80, font=2.3) # Black shadow
1409
- text(0, -0.53, 'Naturally Digested Amino acid Sequences', col='#4da6ff', cex=1.8, font=2) # Main text
1407
+ # # Shadow for "Naturally Digested Amino acid Sequences"
1408
+ # text(0, -0.53, 'Naturally Digested Amino acid Sequences', col='black', cex=1.80, font=2.3) # Black shadow
1409
+ # text(0, -0.53, 'Naturally Digested Amino acid Sequences', col='#4da6ff', cex=1.8, font=2) # Main text
1410
1410
1411
- # Version and command text, shifted further downwards
1412
- version <- '1.0.0'
1413
- text(0, -0.75, paste('version', version), col = '#00b3b3', font = 2) # Dynamic color # Dynamic color
1411
+ # # Version and command text, shifted further downwards
1412
+ # version <- '1.0.0'
1413
+ # text(0, -0.75, paste('version', version), col = '#00b3b3', font = 2) # Dynamic color # Dynamic color
1414
1414
1415
- # Clean, minimal function list with better spacing and shifted downwards
1416
- text(0, -0.86, 'gp() - Generate New Proteome', col='#00b3b3', cex=1.1, font = 2) # Light blue
1417
- text(0, -0.94, 'pm() - Process Mascot files', col='#00b3b3', cex=1.1, font = 2) # Light blue
1418
- text(0, -1.02, 'fo() - Open *.dcf files', col='#00b3b3', cex=1.1, font = 2) # Light blue
1415
+ # # Clean, minimal function list with better spacing and shifted downwards
1416
+ # text(0, -0.86, 'gp() - Generate New Proteome', col='#00b3b3', cex=1.1, font = 2) # Light blue
1417
+ # text(0, -0.94, 'pm() - Process Mascot files', col='#00b3b3', cex=1.1, font = 2) # Light blue
1418
+ # text(0, -1.02, 'fo() - Open *.dcf files', col='#00b3b3', cex=1.1, font = 2) # Light blue
1419
1419
1420
- # Force the graphics device to refresh
1421
- dev.flush()
1422
- }
1420
+ # # Force the graphics device to refresh
1421
+ # dev.flush()
1422
+ # }
1423
1423
1424
1424
##################################################################################
1425
1425
0 commit comments