Browse code

win2rep8

na396 authored on 21/11/2022 21:51:14
Showing 2 changed files

... ...
@@ -1,7 +1,7 @@
1 1
 Package: SGCP
2 2
 Type: Package
3 3
 Title: SGCP: A semi-supervised pipeline for gene clustering using self-training approach in gene co-expression networks
4
-Version: 0.99.2
4
+Version: 0.99.3
5 5
 Authors@R: c(person("Niloofar", "AghaieAbiane", email = "niloofar.abiane@gmail.com" ,role = c("aut", "cre")),
6 6
 			 person("Ioannis", "Koutis", email = " ikoutis@njit.edu",role = c("aut")))
7 7
 Description: SGC is a semi-supervised pipeline for gene clustering in gene co-expression networks.
... ...
@@ -395,7 +395,7 @@ We highly recommend users to perform `SGCP` on the three potential metod
395 395
 
396 396
 `SGCP` allows user to visualize the result. `SGCP_ezPLOT` takes `sgcp` result from 
397 397
 `ezSGCP` function along with `expData` and `geneID`. It returns two files; excel 
398
-and pdf depending on the initial call. It also let users keep the plotting object 
398
+and pdf depending on the initial call. User also can keep the plotting object 
399 399
 by setting keep = TRUE. Here, we set `silhouette_in` to TRUE to see the silhouette index plot. We need to have `magic` package installed.
400 400
 
401 401
 ```{r, message=FALSE, warning=FALSE}
... ...
@@ -404,8 +404,7 @@ library(magick)
404 404
 
405 405
 ```{r, message=FALSE, warning=FALSE}
406 406
 message("PCA of expression data without label")
407
-sgcp_plts <- SGCP_ezPLOT(sgcp = sgcp, expreData = expData, 
408
-                        silhouette_index = TRUE, keep = TRUE)
407
+SGCP_ezPLOT(sgcp = sgcp, expreData = expData, silhouette_index = TRUE, keep = FALSE)
409 408
 ```
410 409
 Note that in order to store files in xlsx format, excel must be installed on your system. 
411 410
 
... ...
@@ -448,13 +447,13 @@ resAdja[0:10, 0:5]
448 447
 ```
449 448
 
450 449
 
451
-`resAdja` is the adjacency matrix of the gene co-expression network. We can visualize the heatmap of the adjacency matrix using$~$` SGCP_plot_heatMap` function as follow.
450
+`resAdja` is the adjacency matrix of the gene co-expression network. We can visualize the heatmap of the adjacency matrix using$~$` SGCP_plot_heatMap` function as follow.To see the heatmap, uncomment the following line of codes.
452 451
 
453 452
 ```{r, message=TRUE, warning=FALSE}
454
-message("Plotting adjacency heatmap")
455
-pl <- SGCP_plot_heatMap(m = resAdja, tit = "Adjacency Heatmap", 
456
-                    xname = "genes", yname = "genes")
457
-print(pl)
453
+#message("Plotting adjacency heatmap")
454
+#pl <- SGCP_plot_heatMap(m = resAdja, tit = "Adjacency Heatmap", 
455
+#                    xname = "genes", yname = "genes")
456
+#print(pl)
458 457
 ```
459 458
 
460 459
 
... ...
@@ -561,25 +560,25 @@ If you run the code, you will see the following will be printout for you.
561 560
 
562 561
 We saw that three methods ("relativeGap", "secondOrderGap", "additiveGap") resulted in three distinct potential number of clusters. `SGCP` picked "secondOrderGap" after gene ontology validation which is 2. `cv` field is "cvGO", which indicates that k is found based on gene ontology validation. In `original` field, you can have the n_egvec first columns ( eigenvectors) and eigenvalues of the transformation matrix. This might be useful for further investigation.
563 562
 
564
-Now we can see the plot of PCA on the expression and transformed data with and without the labels as follow.
563
+Now we can see the plot of PCA on the expression and transformed data with and without the labels using `SGCP_plot_pca`. For practice, uncomment the following and see the resulting PCAs.
565 564
 
566 565
 ```{r, message=TRUE, warning=FALSE}
567 566
 message("Plotting PCA of expression data with label")
568 567
 
569
-pl <- SGCP_plot_pca(m = expData, clusLabs = NULL, tit = "PCA plot without label", ps = .5)
570
-print(pl)
568
+# pl <- SGCP_plot_pca(m = expData, clusLabs = NULL, tit = "PCA plot without label", ps = .5)
569
+# print(pl)
571 570
 ```
572 571
 
573 572
 ```{r, message=TRUE, warning=FALSE}
574 573
 message("Plptting PCA of transformed data without label")
575
-pl <- SGCP_plot_pca(m = resClus$Y, clusLabs = NULL, tit = "PCA plot without label", ps = .5)
576
-print(pl)
574
+# pl <- SGCP_plot_pca(m = resClus$Y, clusLabs = NULL, tit = "PCA plot without label", ps = .5)
575
+# print(pl)
577 576
 ```
578 577
 
579 578
 ```{r, message=TRUE, warning=FALSE}
580 579
 message("Plotting PCA of transformed data with label")
581
-pl <- SGCP_plot_pca(m = resClus$Y, clusLabs = resClus$clusterLabels, tit = "PCA plot with label", ps = .5)
582
-print(pl)
580
+# pl <- SGCP_plot_pca(m = resClus$Y, clusLabs = resClus$clusterLabels, tit = "PCA plot with label", ps = .5)
581
+# print(pl)
583 582
 ```
584 583
 
585 584
 
... ...
@@ -750,24 +749,24 @@ print(table(resSemiSupervised$FinalLabeling$FinalLabel))
750 749
 ```
751 750
 In this step, k-nearest neighbor model is selected. It hyper-parameter is selected based on cross validation on accuracy metric. Table above shows the gene semi label and final labeling.
752 751
 
753
-Now lets see the PCA plot with the final labeling.
752
+Now you can see the PCA plot with the final labeling using `SGCP_plot_pca` function. For practice uncomment the following to see the resulting PCAs.
754 753
 
755 754
 ```{r, message=TRUE, warning=FALSE}
756
-message("Plotting PCA of transformed data with label")
757
-pl <- SGCP_plot_pca(m = expData, 
758
-                clusLabs = resSemiSupervised$FinalLabeling$FinalLabel, 
759
-                tit = "PCA plot with label", ps = .5)
755
+# message("Plotting PCA of transformed data with label")
756
+# pl <- SGCP_plot_pca(m = expData, 
757
+#                clusLabs = resSemiSupervised$FinalLabeling$FinalLabel, 
758
+#                tit = "PCA plot with label", ps = .5)
760 759
 print(pl)
761 760
 ```
762 761
 
763 762
 
764 763
 
765 764
 ```{r, message=TRUE, warning=FALSE}
766
-message("Plotting PCA of transformed data with label")
767
-pl <- SGCP_plot_pca(m = resClus$Y, 
768
-                clusLabs = resSemiSupervised$FinalLabeling$FinalLabel, 
769
-                tit = "PCA plot with label", ps = .5)
770
-print(pl)
765
+# message("Plotting PCA of transformed data with label")
766
+# pl <- SGCP_plot_pca(m = resClus$Y, 
767
+#                clusLabs = resSemiSupervised$FinalLabeling$FinalLabel, 
768
+#                tit = "PCA plot with label", ps = .5)
769
+#print(pl)
771 770
 ```
772 771
 
773 772