Mercurial > repos > iuc > ampvis2_frequency
comparison test-data/generate.R @ 1:0feab98f9577 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ampvis2 commit 40ca64669b0f8c875835fcf41ce91e6adb391283"
author | iuc |
---|---|
date | Thu, 07 Apr 2022 13:59:35 +0000 |
parents | f77f7c426d6f |
children |
comparison
equal
deleted
inserted
replaced
0:f77f7c426d6f | 1:0feab98f9577 |
---|---|
6 ape::write.tree(aalborgwwtps$tree, "AalborgWWTPs.nwk") | 6 ape::write.tree(aalborgwwtps$tree, "AalborgWWTPs.nwk") |
7 amp_export_fasta(aalborgwwtps, "AalborgWWTPs.fa", tax = F) | 7 amp_export_fasta(aalborgwwtps, "AalborgWWTPs.fa", tax = F) |
8 amp_export_otutable(aalborgwwtps, "AalborgWWTPs.otu") | 8 amp_export_otutable(aalborgwwtps, "AalborgWWTPs.otu") |
9 write.table(aalborgwwtps$tax, file = "AalborgWWTPs.tax", quote = F, sep = "\t", row.names = F) | 9 write.table(aalborgwwtps$tax, file = "AalborgWWTPs.tax", quote = F, sep = "\t", row.names = F) |
10 write.table(aalborgwwtps$metadata, file = "AalborgWWTPs.tsv", quote = F, sep = "\t") | 10 write.table(aalborgwwtps$metadata, file = "AalborgWWTPs.tsv", quote = F, sep = "\t") |
11 | |
12 # construct data for merge_ampvis2 | |
13 t <- amp_load(otutable = "AalborgWWTPs.otu.csv", metadata = "AalborgWWTPs.tsv", taxonomy = "AalborgWWTPs.tax.tsv", fasta = "AalborgWWTPs.fa", tree = "AalborgWWTPs.nwk") | |
14 d_2010 <- amp_subset_samples(t, Period %in% "2010") | |
15 # 60 samples and 109 OTUs have been filtered | |
16 # Before: 67 samples and 200 OTUs | |
17 # After: 7 samples and 91 OTUs | |
18 d_2011 <- amp_subset_samples(t, Period %in% "2011") | |
19 # 61 samples and 94 OTUs have been filtered | |
20 # Before: 67 samples and 200 OTUs | |
21 # After: 6 samples and 106 OTUs | |
22 | |
23 saveRDS(d_2010, "AalborgWWTPs.2010.rds") | |
24 saveRDS(d_2011, "AalborgWWTPs.2011.rds") | |
25 | |
26 # => merging should give 13 samples |