Nothing
library(matR)
# #-----------------------------------------------------------------------------------------
# # NOT OK FOR CRAN
# #-----------------------------------------------------------------------------------------
#
## Use the Travis / GitHub integrations to suppress these tests in the CRAN test
## environment. This environment variable to "yes" in .travis.yml in CRAN:
##
## Set this variable manually if you want to run the tests
##
if (Sys.getenv("RunFOAASTests=yes") == "yes")
{
# #-----------------------------------------------------------------------------------------
# # biomRequest() and biom()
# #-----------------------------------------------------------------------------------------
tt <- tempfile()
ff <- demoSets() [1]
gg <- demoSets () [4]
xx <- readSet (ff) # 7 metagenomes; IDs only --- vector
yy <- readSet (gg) # 32 metagenomes; with metadata --- data.frame
k01 <- biomRequest (file=ff) # warning: request is defaulting to function
k02 <- biomRequest (file=gg, request="organism", source="RDP")
k03 <- biomRequest(xx) # warning: request is defaulting to function
k04 <- biomRequest(xx, request="organism")
k05 <- biomRequest(xx, block=3)
k06 <- biomRequest(xx, block=3, request="organism")
k07 <- biomRequest(xx, quiet=TRUE)
k08 <- biomRequest(xx, quiet=TRUE, request="organism")
k09 <- biomRequest(xx, quiet=TRUE, block=3)
k10 <- biomRequest(xx, quiet=TRUE, block=3, request="organism")
k11 <- biomRequest(xx, wait=FALSE) -> zz ; biom(zz, wait=TRUE)
k12 <- biomRequest(xx, wait=FALSE, request="organism") -> zz ; biom(zz, wait=TRUE)
k13 <- biomRequest(xx, wait=FALSE, block=3) -> zz ; biom(zz, wait=TRUE)
k14 <- biomRequest(xx, wait=FALSE, block=3, request="organism") -> zz ; biom(zz, wait=TRUE)
k15 <- biomRequest(xx, wait=FALSE, quiet=TRUE) -> zz ; biom(zz, wait=TRUE)
k16 <- biomRequest(xx, wait=FALSE, quiet=TRUE, request="organism") -> zz ; biom(zz, wait=TRUE)
k17 <- biomRequest(xx, wait=FALSE, quiet=TRUE, block=3) -> zz ; biom(zz, wait=TRUE)
k18 <- biomRequest(xx, wait=FALSE, quiet=TRUE, block=3, request="organism") -> zz ; biom(zz, wait=TRUE)
k19 <- biomRequest(xx, wait=FALSE) -> zz ; biom(zz, wait=FALSE)
k20 <- biomRequest(xx, wait=FALSE, request="organism") -> zz ; biom(zz, wait=FALSE)
k21 <- biomRequest(xx, wait=FALSE, block=3) -> zz ; biom(zz, wait=FALSE)
k22 <- biomRequest(xx, wait=FALSE, block=3, request="organism") -> zz ; biom(zz, wait=FALSE)
k23 <- biomRequest(xx, wait=FALSE, quiet=TRUE) -> zz ; biom(zz, wait=FALSE)
k24 <- biomRequest(xx, wait=FALSE, quiet=TRUE, request="organism") -> zz ; biom(zz, wait=FALSE)
k25 <- biomRequest(xx, wait=FALSE, quiet=TRUE, block=3) -> zz ; biom(zz, wait=FALSE)
k26 <- biomRequest(xx, wait=FALSE, quiet=TRUE, block=3, request="organism") -> zz ; biom(zz, wait=FALSE)
#k27 <- biomRequest(yy) # FAIL wrong data type requested
k28 <- biomRequest(yy, request="organism", source="Greengenes")
#k29 <- biomRequest(yy, block=10)
k30 <- biomRequest(yy, block=10, request="organism", source="Greengenes")
#k31 <- biomRequest(yy, quiet=TRUE)
k32 <- biomRequest(yy, quiet=TRUE, request="organism", source="Greengenes")
#k33 <- biomRequest(yy, quiet=TRUE, block=10)
k34 <- biomRequest(yy, quiet=TRUE, block=10, request="organism", source="Greengenes")
#k35 <- biomRequest(yy, wait=FALSE) -> zz ; biom(zz, wait=TRUE)
k36 <- biomRequest(yy, wait=FALSE, request="organism", source="Greengenes") -> zz ; biom(zz, wait=TRUE)
#k37 <- biomRequest(yy, wait=FALSE, block=10) -> zz ; biom(zz, wait=TRUE)
k38 <- biomRequest(yy, wait=FALSE, block=10, request="organism", source="Greengenes") -> zz ; biom(zz, wait=TRUE)
#k39 <- biomRequest(yy, wait=FALSE, quiet=TRUE) -> zz ; biom(zz, wait=TRUE)
k40 <- biomRequest(yy, wait=FALSE, quiet=TRUE, request="organism", source="Greengenes") -> zz ; biom(zz, wait=TRUE)
#k41 <- biomRequest(yy, wait=FALSE, quiet=TRUE, block=10) -> zz ; biom(zz, wait=TRUE)
k42 <- biomRequest(yy, wait=FALSE, quiet=TRUE, block=10, request="organism", source="Greengenes") -> zz ; biom(zz, wait=TRUE)
#k43 <- biomRequest(yy, wait=FALSE) -> zz ; biom(zz, wait=FALSE)
k44 <- biomRequest(yy, wait=FALSE, request="organism", source="Greengenes") -> zz ; biom(zz, wait=FALSE)
#k45 <- biomRequest(yy, wait=FALSE, block=10) -> zz ; biom(zz, wait=FALSE)
k46 <- biomRequest(yy, wait=FALSE, block=10, request="organism", source="Greengenes") -> zz ; biom(zz, wait=FALSE)
#k47 <- biomRequest(yy, wait=FALSE, quiet=TRUE) -> zz ; biom(zz, wait=FALSE)
k48 <- biomRequest(yy, wait=FALSE, quiet=TRUE, request="organism", source="Greengenes") -> zz ; biom(zz, wait=FALSE)
#k49 <- biomRequest(yy, wait=FALSE, quiet=TRUE, block=10) -> zz ; biom(zz, wait=FALSE)
k50 <- biomRequest(yy, wait=FALSE, quiet=TRUE, block=10, request="organism", source="Greengenes") -> zz ; biom(zz, wait=FALSE)
biomRequest (xx, quiet=TRUE)
biomRequest (xx, block=3)
biomRequest (xx, outfile=tt)
biomRequest (xx, block=3, outfile=tt)
unlink(tt)
biomRequest (xx, request="function")
biomRequest (xx, request="function", group_level="level1")
biomRequest (xx, request="function", group_level="level2")
biomRequest (xx, request="function", group_level="level3")
biomRequest (xx, request="function", group_level="function")
biomRequest (xx, request="function", group_level="level1", evalue=1)
biomRequest (xx, request="function", group_level="level1", evalue=1, length=20)
biomRequest (xx, request="function", group_level="level1", evalue=1, length=20, identity=85)
biomRequest (xx, request="function", group_level="level1", evalue=1, length=20, identity=85, filter_source="KEGG")
biomRequest (xx, request="organism")
biomRequest (xx, request="organism", group_level="domain")
biomRequest (xx, request="organism", group_level="phylum")
biomRequest (xx, request="organism", group_level="species")
biomRequest (xx, request="organism", group_level="strain")
biomRequest (xx, request="organism", group_level="domain", evalue=1)
biomRequest (xx, request="organism", group_level="domain", evalue=1, length=20)
biomRequest (xx, request="organism", group_level="domain", evalue=1, length=20, filter_source="Greengenes")
biomRequest (xx, request="organism", hit_type="all")
biomRequest (xx, request="organism", hit_type="single")
biomRequest (xx, request="organism", result_type="abundance")
biomRequest (xx, request="organism", result_type="identity")
ticket <- biomRequest (xx, wait=FALSE)
# ... here you can go for a coffee break, or do some other calculations; then later:
xx <- biom (ticket, wait=TRUE)
#-----------------------------------------------------------------------------------------
# metadata(detail=NULL) ...which means just lookup ids
#-----------------------------------------------------------------------------------------
metadata ("mgp21")
metadata ("mgp21 mgp24")
metadata ("mgp21 mgp24 mgp30") # example
metadata("mgm4440066.3")
metadata("mgm4440066.3 mgm4440062.3")
metadata("mgm4440066.3 mgm4440062.3 mgm4440055.3")
metadata("mgm4440066.3 mgm4441681.3")
metadata("mgm4440066.3 mgm4440062.3 mgm4441681.3")
metadata("mgm4440066.3 mgm4440062.3 mgm4440055.3 mgm4441681.3")
metadata("mgm4440066.3 mgm4441681.3 mgm4441682.3")
metadata("mgm4440066.3 mgm4440062.3 mgm4441681.3 mgm4441682.3")
metadata("mgm4440066.3 mgm4440062.3 mgm4440055.3 mgm4441681.3 mgm4441682.3")
metadata("mgm4440066.3 mgm4441681.3 mgm4441682.3 mgm4440463.3")
metadata("mgm4440066.3 mgm4440062.3 mgm4441681.3 mgm4441682.3 mgm4440463.3")
metadata("mgm4440066.3 mgm4440062.3 mgm4440055.3 mgm4441681.3 mgm4441682.3 mgm4440463.3")
metadata("mgm4440066.3 mgm4441681.3 mgm4440463.3 mgm4440464.3")
metadata("mgm4440066.3 mgm4440062.3 mgm4441681.3 mgm4440463.3 mgm4440464.3")
metadata("mgm4440066.3 mgm4440062.3 mgm4440055.3 mgm4441681.3 mgm4440463.3 mgm4440464.3") # example
#-----------------------------------------------------------------------------------------
# metadata(detail=TRUE) ...which just means verbosity="minimal"
#-----------------------------------------------------------------------------------------
metadata ("mgp21", detail=TRUE)
metadata ("mgp21 mgp24", detail=TRUE)
metadata ("mgp21 mgp24 mgp30", detail=TRUE) # example
metadata ("mgm4440463.3", detail=TRUE)
metadata ("mgm4440463.3 mgm4440464.3", detail=TRUE)
metadata ("mgm4440463.3 mgm4440464.3 mgm4441679.3", detail=TRUE)
metadata ("mgm4440066.3 mgm4440062.3 mgm4440055.3 mgm4441681.3 mgm4440463.3 mgm4440464.3", detail=TRUE) # example
#-----------------------------------------------------------------------------------------
# metadata(detail= c("minimal","verbose","full") for projects
# c("minimal","metadata","stats","full") for metagenomes
# ...relayed directly as "verbosity" to call.MGRAST()
#-----------------------------------------------------------------------------------------
metadata ("mgp21", detail="verbose")
metadata ("mgp21 mgp24", detail="verbose")
metadata ("mgp21 mgp24 mgp30", detail="verbose") # example; show names() of
metadata ("mgp21", detail="full")
metadata ("mgp21 mgp24", detail="full")
metadata ("mgp21 mgp24 mgp30", detail="full")
metadata ("mgm4440463.3", detail="metadata")
metadata ("mgm4440463.3 mgm4440464.3", detail="metadata")
metadata ("mgm4440463.3 mgm4440464.3 mgm4441679.3", detail="metadata")
metadata ("mgm4440066.3 mgm4440062.3 mgm4440055.3 mgm4441681.3 mgm4440463.3 mgm4440464.3", detail="metadata") # example; show names() of
metadata ("mgm4440463.3", detail="stats") # bad idea, don't show
metadata ("mgm4440463.3 mgm4440464.3", detail="stats") # bad idea, etc
metadata ("mgm4440463.3 mgm4440464.3 mgm4441679.3", detail="stats") # bad idea, etc
metadata ("mgm4440463.3", detail="full") # bad idea..
metadata ("mgm4440463.3 mgm4440464.3", detail="full") # bad idea..
metadata ("mgm4440463.3 mgm4440464.3 mgm4441679.3", detail="full") # bad idea..
#-----------------------------------------------------------------------------------------
# metadata(file=)
#-----------------------------------------------------------------------------------------
tt <- tempfile()
writeLines ("mgm4440463.3", tt)
metadata (map=TRUE, file=tt)
writeLines (c("mgm4440463.3", "mgm4440464.3"), tt)
metadata (map=TRUE, file=tt)
writeLines (c("mgm4440463.3", "mgm4440464.3", "mgm4441679.3"), tt)
metadata (map=TRUE, file=tt)
writeLines ("mgm4440463.3", tt)
metadata (map=FALSE, file=tt)
writeLines (c("mgm4440463.3", "mgm4440464.3"), tt)
metadata (map=FALSE, file=tt)
writeLines (c("mgm4440463.3", "mgm4440464.3", "mgm4441679.3"), tt)
metadata (map=FALSE, file=tt)
unlink(tt)
tt <- tempfile()
writeLines ("mgp21", tt); metadata (map=TRUE, file=tt)
writeLines (c ("mgp21", "mgp24"), tt) ; metadata (map=TRUE, file=tt)
writeLines (c ("mgp21", "mgp24", "mgp30"), tt) ; metadata (map=TRUE, file=tt)
writeLines ("mgp21", tt); metadata (map=FALSE, file=tt)
writeLines (c ("mgp21", "mgp24"), tt); metadata (map=FALSE, file=tt)
writeLines (c ("mgp21", "mgp24", "mgp30"), tt) ; metadata (map=FALSE, file=tt)
unlink(tt)
#-----------------------------------------------------------------------------------------
# dir.MGRAST()
#-----------------------------------------------------------------------------------------
dir.MGRAST()
dir.MGRAST (1, 50)
dir.MGRAST (1, 100)
dir.MGRAST (1, 200)
dir.MGRAST (1, 500)
dir.MGRAST (1, 1000)
dir.MGRAST (100, 150)
dir.MGRAST (100, 200)
dir.MGRAST (100, 300)
dir.MGRAST (100, 600)
dir.MGRAST (100, 1100)
dir.MGRAST (500, 550)
dir.MGRAST (500, 600)
dir.MGRAST (500, 700)
dir.MGRAST (500, 1000)
dir.MGRAST (100, len=50)
dir.MGRAST (100, len=100)
dir.MGRAST (100, len=200)
dir.MGRAST (100, len=500)
dir.MGRAST (100, len=1000)
dir.MGRAST (1, 50, order="id")
dir.MGRAST (1, 100, order="id")
dir.MGRAST (1, 200, order="id")
dir.MGRAST (1, 500, order="id")
dir.MGRAST (1, 1000, order="id")
dir.MGRAST (100, 150, order="id")
dir.MGRAST (100, 200, order="id")
dir.MGRAST (100, 300, order="id")
dir.MGRAST (100, 600, order="id")
dir.MGRAST (100, 1100, order="id")
dir.MGRAST (500, 550, order="id")
dir.MGRAST (500, 600, order="id")
dir.MGRAST (500, 700, order="id")
dir.MGRAST (500, 1000, order="id")
dir.MGRAST (100, len=50, order="id")
dir.MGRAST (100, len=100, order="id")
dir.MGRAST (100, len=200, order="id")
dir.MGRAST (100, len=500, order="id")
dir.MGRAST (100, len=1000, order="id")
dir.MGRAST (1, 50, verbosity="verbose")
dir.MGRAST (1, 100, verbosity="verbose")
dir.MGRAST (1, 200, verbosity="verbose")
dir.MGRAST (1, 500, verbosity="verbose")
dir.MGRAST (1, 1000, verbosity="verbose")
dir.MGRAST (100, 150, verbosity="verbose") # lot of columns named NA here. debug that sometime
dir.MGRAST (100, 200, verbosity="verbose")
dir.MGRAST (100, 300, verbosity="verbose")
dir.MGRAST (100, 600, verbosity="verbose")
dir.MGRAST (100, 1100, verbosity="verbose")
dir.MGRAST (500, 550, verbosity="verbose")
dir.MGRAST (500, 600, verbosity="verbose")
dir.MGRAST (500, 700, verbosity="verbose")
dir.MGRAST (500, 1000, verbosity="verbose")
dir.MGRAST (100, len=50, verbosity="verbose")
dir.MGRAST (100, len=100, verbosity="verbose")
dir.MGRAST (100, len=200, verbosity="verbose")
dir.MGRAST (100, len=500, verbosity="verbose")
dir.MGRAST (100, len=1000, verbosity="verbose")
dir.MGRAST (1, 50, verbosity="full")
dir.MGRAST (1, 100, verbosity="full")
dir.MGRAST (1, 200, verbosity="full")
# dir.MGRAST (1, 500, verbosity="full") # hangs
# dir.MGRAST (1, 1000, verbosity="full") # didn't try
dir.MGRAST (100, 150, verbosity="full")
dir.MGRAST (100, 200, verbosity="full")
dir.MGRAST (100, 300, verbosity="full")
# dir.MGRAST (100, 600, verbosity="full") # didn't try
# dir.MGRAST (100, 1100, verbosity="full") # didn't try
dir.MGRAST (500, 550, verbosity="full")
dir.MGRAST (500, 600, verbosity="full")
dir.MGRAST (500, 700, verbosity="full")
# dir.MGRAST (500, 1000, verbosity="full") # didn't try
dir.MGRAST (100, len=50, verbosity="full")
dir.MGRAST (100, len=100, verbosity="full")
dir.MGRAST (100, len=200, verbosity="full")
# dir.MGRAST (100, len=500, verbosity="full") # didn't try
# dir.MGRAST (100, len=1000, verbosity="full") # didn't try
dir.MGRAST (offset=0, limit=50)
dir.MGRAST (offset=0, limit=100)
dir.MGRAST (offset=0, limit=200)
dir.MGRAST (offset=0, limit=500)
dir.MGRAST (offset=0, limit=1000)
dir.MGRAST (offset=99, limit=50)
dir.MGRAST (offset=99, limit=100)
dir.MGRAST (offset=99, limit=200)
dir.MGRAST (offset=99, limit=500)
dir.MGRAST (offset=99, limit=1000)
dir.MGRAST (offset=499, limit=50)
dir.MGRAST (offset=499, limit=100)
dir.MGRAST (offset=499, limit=200)
dir.MGRAST (offset=499, limit=500)
#-----------------------------------------------------------------------------------------
# search.MGRAST()
#-----------------------------------------------------------------------------------------
#-----------------------------------------------------------------------------------------
# API resources
#-----------------------------------------------------------------------------------------
names(.MGRAST$API [[c('matrix','organism','parameters','options')]])
names(.MGRAST$API [[c('matrix','function','parameters','options')]])
}
# #
# # $ organism.parameters.options:List of 15
# # ..$ asynchronous : chr [1:2] "boolean" "if true return process id to query status resource for results, default is false"
# # ..$ source :List of 2
# # .. ..$ : chr "cv"
# # .. ..$ :List of 14
# # ..$ result_type :List of 2
# # .. ..$ : chr "cv"
# # .. ..$ :List of 4
# # ..$ filter : chr [1:2] "string" "filter the return results to only include abundances based on genes with this function"
# # ..$ group_level :List of 2
# # .. ..$ : chr "cv"
# # .. ..$ :List of 8
# # ..$ taxid : chr [1:2] "boolean" "if true, return annotation ID as NCBI tax id. Only for group_levels with a tax_id"
# # ..$ grep : chr [1:2] "string" "filter the return results to only include annotations that contain this text"
# # ..$ length : chr [1:2] "int" "value for minimum alignment length cutoff: default is 15"
# # ..$ evalue : chr [1:2] "int" "negative exponent value for maximum e-value cutoff: default is 5"
# # ..$ identity : chr [1:2] "int" "percent value for minimum % identity cutoff: default is 60"
# # ..$ filter_source:List of 2
# # .. ..$ : chr "cv"
# # .. ..$ :List of 4
# # ..$ hide_metadata: chr [1:2] "boolean" "if true do not return metagenome metadata in 'columns' object, default is false"
# # ..$ id : chr [1:2] "string" "one or more metagenome or project unique identifier"
# # ..$ filter_level :List of 2
# # .. ..$ : chr "cv"
# # .. ..$ :List of 4
# # ..$ hit_type :List of 2
# # .. ..$ : chr "cv"
# # .. ..$ :List of 3
# #
# # $ function.parameters.options:List of 13
# # ..$ asynchronous : chr [1:2] "boolean" "if true return process id to query status resource for results, default is false"
# # ..$ source :List of 2
# # .. ..$ : chr "cv"
# # .. ..$ :List of 4
# # ..$ result_type :List of 2
# # .. ..$ : chr "cv"
# # .. ..$ :List of 4
# # ..$ filter : chr [1:2] "string" "filter the return results to only include abundances based on genes with this organism"
# # ..$ group_level :List of 2
# # .. ..$ : chr "cv"
# # .. ..$ :List of 4
# # ..$ grep : chr [1:2] "string" "filter the return results to only include annotations that contain this text"
# # ..$ length : chr [1:2] "int" "value for minimum alignment length cutoff: default is 15"
# # ..$ evalue : chr [1:2] "int" "negative exponent value for maximum e-value cutoff: default is 5"
# # ..$ identity : chr [1:2] "int" "percent value for minimum % identity cutoff: default is 60"
# # ..$ filter_source:List of 2
# # .. ..$ : chr "cv"
# # .. ..$ :List of 14
# # ..$ hide_metadata: chr [1:2] "boolean" "if true do not return metagenome metadata in 'columns' object, default is false"
# # ..$ id : chr [1:2] "string" "one or more metagenome or project unique identifier"
# # ..$ filter_level :List of 2
# # .. ..$ : chr "cv"
# # .. ..$ :List of 8
# #
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.