Skip to content

Commit

Permalink
Finished MOFA chapter
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviaAB committed Jan 24, 2024
1 parent dbca1d4 commit d653713
Show file tree
Hide file tree
Showing 29 changed files with 1,373 additions and 293 deletions.
2 changes: 1 addition & 1 deletion _targets.R
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ list(
),
training_options = list(seed = 43)
),
only_common_samples = TRUE
only_common_samples = FALSE
)
),

Expand Down
4 changes: 2 additions & 2 deletions _targets/meta/meta
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ mo_set_complete|stem|d79178dd6687be97|d76a85ef218e0cef|952f06b34b51e191|17398688
mo_set_de|stem|2b7e2ace37c0bed5|50f81c565a9dc6aa|1d4929f8d72b5561|1698094396||t19739.0034448046s|fa7930e7b638c680|37442539|rds|local|vector|||0.167|rnaseq dataset 1594 feature IDs missing from df dataframe.|
mo_set_transformed|stem|28334a82bdfebaa7|1a49152e06c5222d|6f732476e2857317|385723480||t19739.9580970037s|5c19986154657d81|57773059|rds|local|vector|||0.252||
mo_set_with_names|stem|e64ebcd89ddb70bd|b88cddcfa5d2a267|6eebd2f68cb73320|-1640374052||t19738.0568285842s|593ace30823e21f2|36753195|rds|local|vector|||0.114||
mofa_input|stem|55da511de7664cd8|a8548080dfc5818e|b1ff01b4e620143d|1284502458||t19746.154401993s|e22ca446e6bece21|837460|rds|local|vector|||0.324|Dataset snps is to be modelled with a poisson likelihood, but is not integer. Transforming to integer.|
mofa_trained|stem|b38f267e60c1989a|ec971dccb1086e60|91cc7bf157eacf61|1854191013||t19746.1563374787s|29bcdeb5af24197c|966299|rds|local|vector|||166.175|No output filename provided. Using tmpRtmpHWxlYdmofa_20240124164221.hdf5 to store the trained model.. Factors 1 are strongly correlated with the total number of expressed features for at least one of your omics. Such factors appear when there are differences in the total levels between your samples, sometimes because of poor normalisation in the preprocessing steps.|
mofa_input|stem|4d8e1c14434288d1|3d5db0316055019b|b1ff01b4e620143d|1284502458||t19746.8899165855s|4110beb5e0ca03cd|877459|rds|local|vector|||0.201|Dataset snps is to be modelled with a poisson likelihood, but is not integer. Transforming to integer.|
mofa_trained|stem|f523901c69cc8163|ec971dccb1086e60|dec5748f700e63fc|1854191013||t19746.8912693121s|b341cd3de1b49e2f|1004645|rds|local|vector|||116.597|No output filename provided. Using tmpRtmpaM7XWKmofa_20240125102128.hdf5 to store the trained model.. Factors 1 are strongly correlated with the total number of expressed features for at least one of your omics. Such factors appear when there are differences in the total levels between your samples, sometimes because of poor normalisation in the preprocessing steps.|
omicspls_input|stem|488cc165105ef587|5103f8e1eb31dfb4|3fe933389d7e1821|1468063698||t19746.0144579806s|8dac9e868840a7ff|957717|rds|local|vector|||0.009||
pca_mats_list|pattern|c831051151e4add2|72b302a65c0920ed||1078442447||||12164806|rds|local|list||pca_mats_list_302d7473*pca_mats_list_84d36937*pca_mats_list_64d37e6c|0.09||
pca_mats_list_302d7473|branch|e839c68784be56c5|72b302a65c0920ed|0f98021e133aac1d|-46563577||t19739.9581108254s|1b793e6da03f6fbf|1616638|rds|local|list|pca_mats_list||0.072||
Expand Down
11 changes: 8 additions & 3 deletions docs/data_import.html
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,11 @@ <h1 class="quarto-secondary-nav-title"><span class="chapter-number">3</span>&nbs
<div class="sidebar-item-container">
<a href="./so2pls.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">9</span>&nbsp; <span class="chapter-title">Integration with sO2PLS</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./mofa.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">10</span>&nbsp; <span class="chapter-title">Integration with MOFA</span></a>
</div>
</li>
</ul>
</li>
Expand All @@ -241,7 +246,7 @@ <h1 class="quarto-secondary-nav-title"><span class="chapter-number">3</span>&nbs
<ul id="quarto-sidebar-section-3" class="collapse list-unstyled sidebar-section depth1 show">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./diablo.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">10</span>&nbsp; <span class="chapter-title">Integration with DIABLO</span></a>
<a href="./diablo.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">11</span>&nbsp; <span class="chapter-title">Integration with DIABLO</span></a>
</div>
</li>
</ul>
Expand All @@ -256,7 +261,7 @@ <h1 class="quarto-secondary-nav-title"><span class="chapter-number">3</span>&nbs
<ul id="quarto-sidebar-section-4" class="collapse list-unstyled sidebar-section depth1 show">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./interpretation.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">11</span>&nbsp; <span class="chapter-title">Interpreting the integration results</span></a>
<a href="./interpretation.html" class="sidebar-item-text sidebar-link"><span class="chapter-number">12</span>&nbsp; <span class="chapter-title">Interpreting the integration results</span></a>
</div>
</li>
</ul>
Expand Down Expand Up @@ -379,7 +384,7 @@ <h1 class="title"><span id="sec-importing-data" class="quarto-section-identifier
<p>The created target, called <code>dataset_file_geno</code>, takes as value the path to the file:</p>
<div class="cell">
<div class="sourceCode" id="cb3"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu"><a href="https://docs.ropensci.org/targets/reference/tar_read.html">tar_read</a></span><span class="op">(</span><span class="va">dataset_file_geno</span><span class="op">)</span></span>
<span><span class="co">#&gt; [1] "/powerplant/workspace/hrpoab/RENV_CACHE/v5/R-4.2/x86_64-pc-linux-gnu/moiraine/0.0.0.9000/ea944811306c200792f0808f5fa53cec/moiraine/extdata/genomics_dataset.csv"</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span><span class="co">#&gt; [1] "/powerplant/workspace/hrpoab/RENV_CACHE/v5/R-4.2/x86_64-pc-linux-gnu/moiraine/0.0.0.9000/c5fcba1231fe0ad084ba7ffc17cfc3e0/moiraine/extdata/genomics_dataset.csv"</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<p>The next step is to import this dataset in R. We use the <code><a href="https://rdrr.io/pkg/moiraine/man/import_dataset_csv.html">import_dataset_csv()</a></code> function for that, rather than the <code><a href="https://readr.tidyverse.org/reference/read_delim.html">readr::read_csv()</a></code> or similar functions, as it ensures that the data is imported with the correct format for further use with the <code>moiraine</code> package. When importing a dataset, we need to specify the path to the file, as well as the name of the column in the csv file that contains the row names (through the <code>col_id</code> argument). In addition, we need to specify whether the features are represented in rows in the csv file, or in columns. This is done through the argument <code>features_as_rows</code>. For example, we can load the genomics dataset through:</p>
<div class="cell">
Expand Down
Loading

0 comments on commit d653713

Please sign in to comment.