Repository navigation
Expand file tree
/
Copy path.Rhistory
More file actions
176 lines (176 loc) · 4.79 KB
/
Copy path.Rhistory
File metadata and controls
176 lines (176 loc) · 4.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
reticulate::repl_python()
library(tidyverse)
library(DT)
library(readxl)
library(plotly)
# Base path for input files
base_path <- "../docs/jbrowse/function/"
# Load required packages
library(readr)
library(DT)
# Read the CSV file
nr_data <- read_csv("http://gannet.fish.washington.edu/seashell/snaps/nr.csv") # If running in RStudio, adjust path if needed
# Create interactive datatable
datatable(
nr_data,
extensions = 'Buttons',
options = list(
dom = 'Bfrtip',
buttons = c('copy', 'csv', 'excel', 'pdf', 'print'),
pageLength = 10
),
filter = "top",
rownames = FALSE
)
library(tidyverse)
library(DT)
library(readxl)
library(plotly)
library(readr)
# Load required packages
library(readr)
library(DT)
# Read the CSV file
nr_data <- read_csv("http://gannet.fish.washington.edu/seashell/snaps/pathway_table.csv") # If running in RStudio, adjust path if needed
# Create interactive datatable
datatable(
nr_data,
extensions = 'Buttons',
options = list(
dom = 'Bfrtip',
buttons = c('copy', 'csv', 'excel', 'pdf', 'print'),
pageLength = 10
),
filter = "top",
rownames = FALSE
)
library(tidyverse)
library(DT)
library(readxl)
library(plotly)
library(readr)
library(dplyr)
# Read your Pathway CSV
df <- read_csv("http://gannet.fish.washington.edu/seashell/snaps/pathway_table.csv")
# Create a new column with clickable PNG links
df <- df %>%
mutate(Link = paste0("<a href='jbrowse/function/pathway/", PathwayID, ".png' target='_blank'>", PathwayID, "</a>"))
# Read your Pathway CSV
df <- read_csv("http://gannet.fish.washington.edu/seashell/snaps/pathway_table.csv")
# Create a new column with clickable PNG links
df <- df %>%
mutate(Link = paste0("<a href='jbrowse/function/pathway/", PathwayID, ".png' target='_blank'>", PathwayId, "</a>"))
# Read your Pathway CSV
df <- read_csv("http://gannet.fish.washington.edu/seashell/snaps/pathway_table.csv")
# Create a clickable link column using correct column name
df <- df %>%
mutate(Link = paste0(
"<a href='jbrowse/function/pathway/", PathwayId, ".png' target='_blank'>", PathwayId, "</a>"
))
# Display interactive table with HTML link
datatable(
df,
escape = FALSE,
extensions = 'Buttons',
options = list(
dom = 'Bfrtip',
buttons = c('copy', 'csv', 'excel', 'pdf', 'print'),
pageLength = 10
)
)
# Read your Pathway CSV
# Read the CSV
df <- read_csv("http://gannet.fish.washington.edu/seashell/snaps/pathway_table.csv")
# Create clickable link column
df <- df %>%
mutate(Link = paste0(
"<a href='jbrowse/function/pathway/", PathwayId, ".png' target='_blank'>", PathwayId, "</a>"
))
# Move Link column to position 3
df <- df %>%
select(1:2, Link, everything())
# Display interactive table
datatable(
df,
escape = FALSE,
extensions = 'Buttons',
options = list(
dom = 'Bfrtip',
buttons = c('copy', 'csv', 'excel', 'pdf', 'print'),
pageLength = 10
)
)
# Read the GFF3 file (skip comment lines starting with "#")
gff <- read_tsv(
"https://gannet.fish.washington.edu/seashell/bu-github/OCEAN/docs/jbrowse/data/v1/GN.gene.gff3",
comment = "#",
col_names = c("seqid", "source", "type", "start", "end", "score", "strand", "phase", "attributes")
)
# Read the GFF3 file (skip comment lines starting with "#")
gff <- read_tsv(
"../docs/jbrowse/data/v1/GN.gene.gff3",
comment = "#",
col_names = c("seqid", "source", "type", "start", "end", "score", "strand", "phase", "attributes")
)
# Read the GFF3 file (skip comment lines starting with "#")
gff <- read_tsv(
"../docs/jbrowse/data/v1/GN.gene.gff3",
comment = "#",
col_names = c("seqid", "source", "type", "start", "end", "score", "strand", "phase", "attributes")
)
datatable(
gff,
extensions = 'Buttons',
options = list(
dom = 'Bfrtip',
buttons = c('copy', 'csv', 'excel', 'pdf', 'print'),
pageLength = 10
),
filter = "top"
)
# Read the GFF3 file (skip comment lines starting with "#")
gff <- read_tsv(
"http://gannet.fish.washington.edu/seashell/snaps/gene.gff3",
comment = "#",
col_names = c("seqid", "source", "type", "start", "end", "score", "strand", "phase", "attributes")
)
datatable(
gff,
extensions = 'Buttons',
options = list(
dom = 'Bfrtip',
buttons = c('copy', 'csv', 'excel', 'pdf', 'print'),
pageLength = 10
),
filter = "top"
)
# Read the CSV file
nr_data <- read_csv("http://gannet.fish.washington.edu/seashell/snaps/nr.csv")
# Subset the relevant columns
nr_subset <- nr_data[, c("query_name", "nr.hit_name", "description", "E value")]
# Create interactive datatable
datatable(
nr_subset,
extensions = 'Buttons',
options = list(
dom = 'Bfrtip',
buttons = c('copy', 'csv', 'excel', 'pdf', 'print'),
pageLength = 4
),
filter = "top",
rownames = FALSE
)
# Read the tab-delimited file from the URL
uniprot_data <- read_tsv("http://gannet.fish.washington.edu/seashell/snaps/uniprot.txt")
# Display as an interactive datatable
datatable(
uniprot_data,
extensions = 'Buttons',
options = list(
dom = 'Bfrtip',
buttons = c('copy', 'csv', 'excel', 'pdf', 'print'),
pageLength = 10
),
filter = "top",
rownames = FALSE
)