-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.Rhistory
102 lines (102 loc) · 3.39 KB
/
.Rhistory
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
install.packages("mcl")
install.packages("mclust")
install.packages("earth")
library("mclust", lib.loc="C:/Users/karen/Anaconda3/envs/rstudio/lib/R/library")
library("earth", lib.loc="C:/Users/karen/Anaconda3/envs/rstudio/lib/R/library")
devtools::build()
roxygen2::rd_roclet()
devtools::document()
setwd('..')
create('CustomSelection')
devtools::create('CustomSelection')
library(CustomSelection)
library(CustomSelection)
library(CustomSelection)
library(CustomSelection)
library(CustomSelection)
library(CustomSelection)
library(CustomSelection)
library(CustomSelection)
library(CustomSelection)
library(CustomSelection)
dir <- "C:/Users/karen/Desktop/"
files <- list.files(path = dir, pattern = 'GSM')
list <- list()
for (i in files){
list[[i]] <- read.csv(i)
}
for (i in files){
list[[i]] <- read.csv(paste0(dir, i))
}
lsi
list
head(list[[1]])
for (i in files){
list[[i]] <- read.csv(paste0(dir, i), row.names = 1, header = T)
}
for (i in files){
list[[i]] <- read.csv(paste0(dir, i), row.names = 1, header = T)
}
head(list[[1]])
head(unlist(list))
names(list[[i]])
list <- list()
for (i in files){
list[[i]] <- read.csv(paste0(dir, i), row.names = 1, header = T)
a <- names(list[[i]])
names(list)[length(list)] <- a
}
sample_counts <- do.call(cbind, list)
head(sample_counts)
library(devtools)
devtools::use_data
dir.create('data')
save(sample_counts, file = 'sample_counts.RData')
save(sample_counts, file = 'data/sample_counts.RData')
setRepositories()
install.packages("org.At.tair.db")
install.packages("biomaRt")
library("biomaRt", lib.loc="C:/Users/karen/Anaconda3/envs/rstudio/lib/R/library")
listMarts(host="plants.ensembl.org")
useMart(listMarts(host="plants.ensembl.org")[1], host = "plants.ensembl.org")
listMarts(host="plants.ensembl.org")[1]
listMarts(host="plants.ensembl.org")[1][1]
listMarts(host="plants.ensembl.org")[[1]][1]
useMart(listMarts(host="plants.ensembl.org")[[1][1], host = "plants.ensembl.org")
useMart(listMarts(host="plants.ensembl.org")[[1]][1], host = "plants.ensembl.org")
useMart('plants_mart')
useMart('plants_mart', host = "plants.ensembl.org")
listDatasets(useMart('plants_mart', host = "plants.ensembl.org"))
useMart('plants_mart', host = "plants.ensembl.org", dataset = "athaliana_eg_gene")
ath <- useMart('plants_mart', host = "plants.ensembl.org", dataset = "athaliana_eg_gene")
ath@dataset
ath@filters
ath@attributes
ath@attributes$name
ath@attributes$attributes5
ath@attributes$attributes
ath@attributes$name[1]
ath@attributes$name[2]
ath@attributes$name[3]
ath@attributes$name[4]
ath@attributes$name[5]
ath@attributes$name[6]
ath@attributes$name[6]
ath@attributes$name[7]
ath@attributes$name[8]
grep('TAIR', ath@attributes$name)
grep('name', ath@attributes$name)
grep('name', ath@attributes$name, value = T)
grep('id', ath@attributes$name, value = T)
ath@attributes$name[8]
ath@filters$name
getBM(attributes = c('ensembl_gene_id', 'start_position', 'end_position'), mart = ath)
gene_start_end = getBM(attributes = c('ensembl_gene_id', 'start_position', 'end_position'), mart = ath)
featureLength <- gene_start_end$end_position - gene_start_end$start_position
names(featureLength) <- gene_start_end$ensembl_gene_id
save(featureLength, file = 'data/ath_featureLength.RData')
library(CustomSelection)
library(CustomSelection)
library(CustomSelection)
source('~/CustomSelection/R/ath_featureLength.R')
library(CustomSelection)