Mercurial > repos > iuc > ampvis2_subset_samples
annotate test-data/generate.R @ 0:03b77eb5ed68 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ampvis2 commit 7c0ecbffdb5e993f5af7e3b52c424c2761fb91d3"
author | iuc |
---|---|
date | Mon, 04 Apr 2022 10:25:42 +0000 |
parents | |
children | 14b38ec15fe9 |
rev | line source |
---|---|
0
03b77eb5ed68
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ampvis2 commit 7c0ecbffdb5e993f5af7e3b52c424c2761fb91d3"
iuc
parents:
diff
changeset
|
1 library(ampvis2) |
03b77eb5ed68
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ampvis2 commit 7c0ecbffdb5e993f5af7e3b52c424c2761fb91d3"
iuc
parents:
diff
changeset
|
2 |
03b77eb5ed68
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ampvis2 commit 7c0ecbffdb5e993f5af7e3b52c424c2761fb91d3"
iuc
parents:
diff
changeset
|
3 # subset taxa using 200 random OTUs |
03b77eb5ed68
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ampvis2 commit 7c0ecbffdb5e993f5af7e3b52c424c2761fb91d3"
iuc
parents:
diff
changeset
|
4 aalborgwwtps <- amp_subset_taxa(AalborgWWTPs, tax_vector = sample(AalborgWWTPs$tax$OTU, 200)) |
03b77eb5ed68
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ampvis2 commit 7c0ecbffdb5e993f5af7e3b52c424c2761fb91d3"
iuc
parents:
diff
changeset
|
5 |
03b77eb5ed68
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ampvis2 commit 7c0ecbffdb5e993f5af7e3b52c424c2761fb91d3"
iuc
parents:
diff
changeset
|
6 ape::write.tree(aalborgwwtps$tree, "AalborgWWTPs.nwk") |
03b77eb5ed68
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ampvis2 commit 7c0ecbffdb5e993f5af7e3b52c424c2761fb91d3"
iuc
parents:
diff
changeset
|
7 amp_export_fasta(aalborgwwtps, "AalborgWWTPs.fa", tax = F) |
03b77eb5ed68
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ampvis2 commit 7c0ecbffdb5e993f5af7e3b52c424c2761fb91d3"
iuc
parents:
diff
changeset
|
8 amp_export_otutable(aalborgwwtps, "AalborgWWTPs.otu") |
03b77eb5ed68
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ampvis2 commit 7c0ecbffdb5e993f5af7e3b52c424c2761fb91d3"
iuc
parents:
diff
changeset
|
9 write.table(aalborgwwtps$tax, file = "AalborgWWTPs.tax", quote = F, sep = "\t", row.names = F) |
03b77eb5ed68
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ampvis2 commit 7c0ecbffdb5e993f5af7e3b52c424c2761fb91d3"
iuc
parents:
diff
changeset
|
10 write.table(aalborgwwtps$metadata, file = "AalborgWWTPs.tsv", quote = F, sep = "\t") |