diff --git a/articles/MGnifyR.html b/articles/MGnifyR.html index faf51076..1a258dc1 100644 --- a/articles/MGnifyR.html +++ b/articles/MGnifyR.html @@ -102,9 +102,8 @@

Introduction

Installation

-

MGnifyR is currently hosted on GitHub, and can be -installed using via devtools. MGnifyR should -be built using the following snippet.

+

MGnifyR is hosted on Bioconductor, and can be installed +using via BiocManager.

 BiocManager::install(MGnifyR)
@@ -230,7 +229,9 @@

Functions for fetching the data

Search data

-

Below, we fetch information on samples of drinking water.

+

doQuery() function can be utilized to search results +such as samples and studies from MGnify database. Below, we fetch +information drinking water samples.

 # Fetch studies
 samples <- doQuery(
@@ -238,6 +239,8 @@ 

Search data= "samples", biome_name = "root:Environmental:Aquatic:Freshwater:Drinking water", max.hits = 10)

+

The result is a table containing accession IDs and description – in +this case – on samples.

 head(samples)
 #>                  biosample   accession sample-desc
@@ -347,6 +350,8 @@ 

Find relevent analyses
 analyses_accessions <- searchAnalysis(mg, "samples", samples$accession)
+

By running the searchAnalysis() function, we get +analysis IDs of samples that we fed as an input.

 head(analyses_accessions)
 #> [1] "MGYA00652201" "MGYA00652185" "MGYA00643487" "MGYA00643486" "MGYA00643485"
@@ -356,9 +361,12 @@ 

Find relevent analysesFetch metadata

We can now check the metadata to get hint of what kind of data we -have.

+have. We use getMetadata() function to fetch data based on +analysis IDs.

 analyses_metadata <- getMetadata(mg, analyses_accessions)
+

Metadata includes for example information on how analysis was +conducted and what kind of samples were analyzed.

 head(analyses_metadata)
 #>              analysis_analysis-status analysis_pipeline-version
@@ -684,7 +692,7 @@ 

Fetch microbiome dataTreeSE object is uniquely positioned to support SummarizedExperiment-based microbiome data manipulation and visualization. Moreover, it enables access to miaverse -tools. For example, we can estimate diversity of samples.

+tools. For example, we can estimate diversity of samples…

 mae[[1]] <- estimateDiversity(mae[[1]], index = "shannon")
 
@@ -694,6 +702,7 @@ 

Fetch microbiome data plotColData(mae[[1]], "shannon", x = "sample_environment..biome.")

+

… and plot abundances of most abundant phyla.

 # Agglomerate data
 altExps(mae[[1]]) <- splitByRanks(mae[[1]])
@@ -705,8 +714,8 @@ 

Fetch microbiome datatop_taxa <- getTopFeatures(altExp(mae[[1]], "Phylum"), 10) plotAbundance(altExp(mae[[1]], "Phylum")[top_taxa, ], rank = "Phylum")

-

We can perform principal component analysis to microbial profiling -data by utilizing miaverse tools.

+

We can also perform other analyses such as principal component +analysis to microbial profiling data by utilizing miaverse tools.

 # Apply relative transformation
 mae[[1]] <- transformAssay(mae[[1]], method = "relabundance")
@@ -729,8 +738,10 @@ 

Fetch sequence filessearchFile(), we can search files from the database.

-# Find list of available downloads, and filter for 
-dl_urls <- searchFile(mg, analyses_accessions, type = "analyses")
+dl_urls <- searchFile(mg, analyses_accessions, type = "analyses")

+

The returned table contains search results related to analyses that +we fed as an input. The table contains information on file and also URL +address from where the file can be loaded.

 target_urls <- dl_urls[
     dl_urls$attributes.description.label == "Predicted alpha tmRNA", ]
@@ -817,6 +828,7 @@ 

Fetch sequence files# Just select a single file from the target_urls list for demonstration. file_url <- target_urls$download_url[[1]] cached_location <- getFile(mg, file_url)

+

The function returns a path where the file is stored.

 # Where are the files?
 cached_location
diff --git a/pkgdown.yml b/pkgdown.yml
index 1ad39694..1827a07d 100644
--- a/pkgdown.yml
+++ b/pkgdown.yml
@@ -4,5 +4,5 @@ pkgdown_sha: ~
 articles:
   MGnifyR: MGnifyR.html
   MGnifyR_long: MGnifyR_long.html
-last_built: 2024-02-05T08:45Z
+last_built: 2024-02-05T13:31Z
 
diff --git a/reference/.MGnifyR_cache/analyses/MGYA00377505_format_json/.RDS b/reference/.MGnifyR_cache/analyses/MGYA00377505_format_json/.RDS
index 87af23ed..b7733dae 100644
Binary files a/reference/.MGnifyR_cache/analyses/MGYA00377505_format_json/.RDS and b/reference/.MGnifyR_cache/analyses/MGYA00377505_format_json/.RDS differ
diff --git a/reference/.MGnifyR_cache/samples/ERS2967391_format_json/.RDS b/reference/.MGnifyR_cache/samples/ERS2967391_format_json/.RDS
index c9c07bb1..7e52904f 100644
Binary files a/reference/.MGnifyR_cache/samples/ERS2967391_format_json/.RDS and b/reference/.MGnifyR_cache/samples/ERS2967391_format_json/.RDS differ