Skip to content

Commit 435eeb6

Browse files
docs: Weekly AI README upgrade — FAQ / Common Pitfalls (#79)
1 parent 1648dab commit 435eeb6

1 file changed

Lines changed: 70 additions & 3 deletions

File tree

README.md

Lines changed: 70 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,77 @@ You can install the development version of this package through Github:
2121
devtools::install_github("Vitek-Lab/MSstatsBioNet", build_vignettes = TRUE)
2222
```
2323

24+
## Usage Examples
25+
26+
Here are some examples to help you get started with MSstatsBioNet:
27+
28+
### Annotate Protein Information
29+
30+
Use the `annotateProteinInfoFromIndra` function to annotate a data frame with protein information from Indra.
31+
32+
```r
33+
library(MSstatsBioNet)
34+
35+
# Example data frame
36+
df <- data.frame(Protein = c("CLH1_HUMAN"))
37+
38+
# Annotate protein information
39+
annotated_df <- annotateProteinInfoFromIndra(df, "Uniprot_Mnemonic")
40+
print(head(annotated_df))
41+
```
42+
43+
### Visualize Networks with Cytoscape
44+
45+
Create an interactive network diagram using `cytoscapeNetwork`.
46+
47+
```r
48+
# Define nodes and edges
49+
nodes <- data.frame(
50+
id = c("TP53", "MDM2", "CDKN1A"),
51+
logFC = c(1.5, -0.8, 2.1),
52+
stringsAsFactors = FALSE
53+
)
54+
edges <- data.frame(
55+
source = c("TP53", "MDM2"),
56+
target = c("MDM2", "TP53"),
57+
interaction = c("Activation", "Inhibition"),
58+
stringsAsFactors = FALSE
59+
)
60+
61+
# Render the network
62+
cytoscapeNetwork(nodes, edges)
63+
```
64+
65+
### Export Network to HTML
66+
67+
Export your network visualization to an HTML file using `exportNetworkToHTML`.
68+
69+
```r
70+
# Export the network to an HTML file
71+
exportNetworkToHTML(nodes, edges, filename = "network.html")
72+
```
73+
74+
### Retrieve Subnetwork from INDRA
75+
76+
Use `getSubnetworkFromIndra` to retrieve a subnetwork of protein interactions from the INDRA database.
77+
78+
```r
79+
# Load example input data
80+
input <- data.table::fread(system.file(
81+
"extdata/groupComparisonModel.csv",
82+
package = "MSstatsBioNet"
83+
))
84+
85+
# Get subnetwork
86+
subnetwork <- getSubnetworkFromIndra(input)
87+
print(head(subnetwork$nodes))
88+
print(head(subnetwork$edges))
89+
```
90+
2491
## License
25-
This package is distributed under the [Artistic-2.0](https://opensource.org/licenses/Artistic-2.0) license. However, its dependencies may have different licenses.
92+
This package is distributed under the [Artistic-2.0](https://opensource.org/licenses/Artistic-2.0) license. However, its dependencies may have different licenses.
2693

27-
Notably, INDRA is distributed under the [BSD 2-Clause](https://opensource.org/license/bsd-2-clause) license. Furthermore, INDRA's knowledge sources may have different licenses for commercial applications. Please refer to the [INDRA README](https://github.com/sorgerlab/indra?tab=readme-ov-file#indra-modules) for more information on its knowledge sources and their associated licenses.
94+
Notably, INDRA is distributed under the [BSD 2-Clause](https://opensource.org/license/bsd-2-clause) license. Furthermore, INDRA's knowledge sources may have different licenses for commercial applications. Please refer to the [INDRA README](https://github.com/sorgerlab/indra?tab=readme-ov-file#indra-modules) for more information on its knowledge sources and their associated licenses.
2895

2996
## Databases Supported
3097

@@ -36,4 +103,4 @@ Notably, INDRA is distributed under the [BSD 2-Clause](https://opensource.org/li
36103

37104
## Visualization Options Supported
38105

39-
- Cytoscape Desktop
106+
- Cytoscape Desktop

0 commit comments

Comments
 (0)