-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.Rhistory
158 lines (158 loc) · 5.99 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
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
install.packages("rmarkdown")
install.packages("rmarkdown")
install.packages("rmarkdown")
install.packages("gdsfmt")
library(gdsfmt)
source("https://bioconductor.org/biocLite.R")
biocLite("SNPRelate")
file.choose()
unlink('Phylogeny_cache', recursive = TRUE)
sessionInfo()
info=sessionInfo()
info
info$loadedOnly
info$running
info$locale
sessionInfo()
info$LAPACK
info$basePkgs
info$loadedOnly
list=info$loadedOnly$[0]
list=info$loadedOnly$compiler
list
list=c(info$loadedOnly)
list
(.packages())
warnings()
df <- psmelt(FamilyLevel)
library(httr)
read.csv(text=GET("https://github.com/BenbowLab/BenbowLab.github.io/blob/master/ItalyStreamMicrobiomeMetadata.csv",header=T)
)
read.csv(text=GET("https://raw.githubusercontent.com/BenbowLab/BenbowLab.github.io/master/ItalyStreamMicrobiomeMetadata.csv",header=T))
install.packages("RCurl")
library(Rcurl)
library(RCurl)
read.csv(text=getURL("https://raw.githubusercontent.com/BenbowLab/BenbowLab.github.io/master/ItalyStreamMicrobiomeMetadata.csv",header=T))
metadata<-read.csv(text=getURL("https://raw.githubusercontent.com/BenbowLab/BenbowLab.github.io/master/ItalyStreamMicrobiomeMetadata.csv",header=T))
head(metadata)
View(metadata)
x<-getURL("https://raw.githubusercontent.com/BenbowLab/BenbowLab.github.io/master/ItalyStreamMicrobiomeMetadata.csv")
metadata<-read.csv(text= x,header=T)
head(metadata)
x<-getURL("https://raw.githubusercontent.com/BenbowLab/BenbowLab.github.io/ItalyInvert2018WTax.biom")
library(vegan)
library(ggplot2)
library(phyloseq)
library(RCurl)
library(httr)
x<-getURL("https://raw.githubusercontent.com/BenbowLab/BenbowLab.github.io/ItalyInvert2018WTax.biom")
x<-getURL("https://raw.githubusercontent.com/BenbowLab/BenbowLab.github.io/ItalyInvert2018WTax.biom")
biom<-import_biom(x,parseFunction= parse_taxonomy_greengenes)
biom<-download.file(url = "https://github.com/BenbowLab/BenbowLab.github.io/blob/master/ItalyInvert2018WTax.biom"
, destfile = "ItalyWorkshopBiom.biom")
#tax_table(biom) <- tax_table(biom)[,-c(5:10,14)]#remove dummy ranks
biom<-import_biom("ItalyWorkshopBiom.biom")
install.packages("repmis")
library(repmis)
source_data("https://github.com/BenbowLab/BenbowLab.github.io/blob/master/ItalyInvert2018WTax.biom?raw=True")
biom<-import_biom(source_data("https://github.com/BenbowLab/BenbowLab.github.io/blob/master/ItalyInvert2018WTax.biom?raw=True"))
x<-getURL("https://raw.githubusercontent.com/BenbowLab/BenbowLab.github.io/master/ItalyInvert11.29.18Tree.nwk")
tree=read_tree(x)
browseURL("http://www.r-project.org")
install.packages(c("vegan","ggplot2","RCurl","plyr","dplyr"))
source('http://bioconductor.org/biocLite.R')
biocLite('phyloseq')
source("https://bioconductor.org/biocLite.R")
biocLite("SNPRelate")
biocManager("SNPRelate")
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("SNPRelate")
library(gdsfmt)
library(SNPRelate)
library(ggplot2)
library(gdsfmt)
library(SNPRelate)
library(ggplot2)
install.packages("rlang")
install.packages("rlang")
install.packages("rlang")
install.packages("rlang")
install.packages("rlang")
library(gdsfmt)
library(SNPRelate)
vcf.fn <- "C:\\Users\\Joe Receveur\\Documents\\Virtual Box\\Benin\\10kbExampleData.vcf"
snpgdsVCF2GDS(vcf.fn,"data.gds",method ="biallelic.only")
genofile<-snpgdsOpen("data.gds")
set.seed(100)
ibs.hc<-snpgdsHCluster(snpgdsDiss(genofile,num.thread=2, autosome.only=FALSE))
rv <- snpgdsCutTree(ibs.hc)
plot(rv$dendrogram,main="Within 10 kb of ACE-1")
dissMatrix = snpgdsDiss(genofile , sample.id=NULL, autosome.only=TRUE,remove.monosnp=TRUE, maf=NaN, missing.rate=NaN, num.thread=2, verbose=TRUE)
snpHCluster = snpgdsHCluster(dissMatrix, sample.id=NULL, need.mat=TRUE, hang=0.01)
cutTree = snpgdsCutTree(snpHCluster, z.threshold=15, outlier.n=5, n.perm = 5000, samp.group=NULL,
col.outlier="red", col.list=NULL, pch.outlier=4, pch.list=NULL,label.H=FALSE, label.Z=TRUE,
verbose=TRUE)
cutTree
snpgdsClose(genofile)
snpgdsDrawTree(cutTree, main = "Phylogenetic Tree",edgePar=list(col=rgb(0.5,0.5,0.5,0.75),t.col="black"),
y.label.kinship=T,leaflab="perpendicular")
snpgdsDrawTree(cutTree, main = "Phylogenetic Tree",edgePar=list(col=rgb(0.5,0.5,0.5,0.75),t.col="black"),
y.label.kinship=T,leaflab="perpendicular",yaxis.kinship=F)
vcf<-wget("https://github.com/BenbowLab/BenbowLab.github.io/master/10kbExampleData.vcf")
vcf<-getURL("https://github.com/BenbowLab/BenbowLab.github.io/master/10kbExampleData.vcf")
install.packages("Rcurl")
install.packages("RCurl")
vcf
library(RCurl)
vcf<-getURL("https://github.com/BenbowLab/BenbowLab.github.io/master/10kbExampleData.vcf")
vcf
vcf<-getURL("https://raw.githubusercontent.com/BenbowLab/BenbowLab.github.io/master/10kbExampleData.vcf")
dissMatrix = snpgdsDiss(genofile , sample.id=NULL, autosome.only=TRUE,remove.monosnp=TRUE, maf=NaN, missing.rate=NaN, num.thread=2, verbose=TRUE)
sessionInfo()
detachAllPackages <- function() {
basic.packages.blank <- c(
"stats",
"graphics",
"grDevices",
"utils",
"datasets",
"methods",
"base"
)
basic.packages <- paste("package:", basic.packages.blank, sep = "")
package.list <- search()[ifelse(unlist(gregexpr("package:", search())) == 1, TRUE, FALSE)]
package.list <- setdiff(package.list, basic.packages)
if (length(package.list) > 0) {
for (package in package.list) {
detach(package, character.only = TRUE)
}
}
}
detachAllPackages()
sessioninfo()
sessionInfo()
detachAllPackages()
sessionInfo()
detach("package:rlang", unload=TRUE)
detach("rlang")
detach("package:rlang")
detach("package:rlang",unload=T)
remove.packages("rlang", lib="~/R/win-library/4.0")
install.packages("rlang")
install.packages("rlang")
library(gdsfmt)
library(SNPRelate)
library(ggplot2)
library(RCurl)
snpgdsClose(genofile)
library(gdsfmt)
library(SNPRelate)
library(ggplot2)
library(RCurl)
vcf.fn<-getURL("https://raw.githubusercontent.com/BenbowLab/BenbowLab.github.io/master/10kbExampleData.vcf")
vcf.fn
snpgdsVCF2GDS(vcf.fn,"data.gds",method ="biallelic.only")
vcf.fn<-getURLContent("https://raw.githubusercontent.com/BenbowLab/BenbowLab.github.io/master/10kbExampleData.vcf")
vcf.fn
snpgdsVCF2GDS(vcf.fn,"data.gds",method ="biallelic.only")