Mercurial > repos > ecology > ecoregion_clara_cluster
comparison cluster_ceamarc.R @ 1:edb8d19735a6 draft
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/Ecoregionalization_workflow commit 459ba1277acd7d8d4a02f90dbd7ff444bf8eac92
author | ecology |
---|---|
date | Wed, 24 Jan 2024 15:53:07 +0000 |
parents | 32849c52aa54 |
children | 74e966baa5fd |
comparison
equal
deleted
inserted
replaced
0:32849c52aa54 | 1:edb8d19735a6 |
---|---|
20 metric <- args[5] | 20 metric <- args[5] |
21 sample <- as.numeric(args[6]) | 21 sample <- as.numeric(args[6]) |
22 } | 22 } |
23 | 23 |
24 #load data | 24 #load data |
25 env.data <- read.table(enviro, header=TRUE, sep=" ",dec = ".", na.strings = "-9999.00") | 25 env.data <- read.table(enviro, header=TRUE, sep="\t",dec = ".", na.strings = "-9999") |
26 data.bio <- read.table(data.bio, header=TRUE, sep="\t") | 26 data.bio <- read.table(data.bio, header=TRUE, sep="\t") |
27 test3 <- read.table(data, header = TRUE, sep="\t") | 27 test3 <- read.table(data, header = TRUE, sep="\t") |
28 | 28 |
29 ###################################################################################################### | 29 ###################################################################################################### |
30 #Make clustering | 30 #Make clustering |
41 | 41 |
42 clus <- cbind(data.bio[1:nrow(test3), 1:2],test5$clustering) | 42 clus <- cbind(data.bio[1:nrow(test3), 1:2],test5$clustering) |
43 names(clus) <- c("lat", "long", "cluster") | 43 names(clus) <- c("lat", "long", "cluster") |
44 clus <- cbind(clus,test3,env.data[,3:19]) | 44 clus <- cbind(clus,test3,env.data[,3:19]) |
45 | 45 |
46 write.table(clus[1:3], file = "points_clus.txt",quote = FALSE, row.names = FALSE) | 46 write.table(clus[1:3], file = "points_clus.tsv", quote = FALSE, sep="\t", row.names = FALSE) |
47 write.table(clus, file = "clus.txt",quote = FALSE, row.names = FALSE) | 47 write.table(clus, file = "clus.tsv", quote = FALSE, sep="\t", row.names = FALSE) |
48 | 48 |
49 | 49 |
50 | 50 |
51 | 51 |
52 | 52 |