Closed taylorreiter closed 4 years ago
@taylorreiter Very impressive! I probably couldn't understand the code from someone else and replicate that fast. I'm looking forward to learning some R thanks to your translations. Even with interactive figures!
Do you think using conda to install the R packages is a good idea or do R-people install their software rather with install.package
?
If you know how to add some color to the Tree (e.g. geom_strip), It would be great to add the phylum level. I tried to this in python and id didn't look so good.
Are you working on a Mac or Linux?
for aesthetics, we could probably change the
kable(head(Counts))
--> kable(topleft(Counts,c=10))
Sorry for the delayed response, busy week!
I use install.packages()
in my daily workflow to manage my R environment on my local computer because it's fast and I don't have to think about it. Whenever I settle on an incantation of a script for a workflow, I write a conda env for it to keep track of the versions. For tutorials, I usually do conda environments as well to 1) make sure that everyone is using an equivalent computing environment and 2) allow learners to re-create the exact same environment for their own workflows/research. I'm fine with implementing either here though, it's straightforward both ways!
I'm working on a Mac, but have access to a linux (our compute cluster). I routinely transfer my scripts between mac and linux and I've found them to be interoperable. This should be the case for everything in this pull request, but I haven't tested it.
kable(head(Counts)) --> kable(topleft(Counts,c=10))
ok! I'll make that change.
If you know how to add some color to the Tree (e.g. geom_strip), It would be great to add the phylum level. I tried to this in python and id didn't look so good.
This is pretty easy too, I'll add that in!
I plan on tackling the last bits toward the end of next week, I'll incorporate these changes then as well.
Ok! I made the changes requested above, and completed the differential abundance analysis. I think it's ready for review.
@SilasK I use open -na RStudio
on a mac from inside the conda environment, and that launches RStudio inside of the environment. Is there a parallel command that will work in linux?
If not, it looks like others have set rstudio_which_r
in /etc/rstudio/rserver.conf
, but that's for an RStudio server.
Some other SO posts:
conda install -c r rstudio
rstudio
@taylorreiter I try to test your Rmarkdown files. I installed the conda env. Unfortunately, once I run a code cell I got a lot of
Error: no more error handlers available (recursive errors?); invoking 'abort' restart
Error: option error has NULL value
errors, and the session freezes.
Maybe I don't have the right version of a package. Are you also using R v4?
I also try to set up binder, which I find a super tool for such tutorials. see 1c8da57 But the R build doesn't work yet.
Yes, binder works also on Rstudio!
Notes for me:
@taylorreiter It's a pleasure to see so good R code. I highlighted some points, mainly aesthetics. I tried to address them myself but didn't succeded for all. Could you have a look at them?
An yes, sorry for the clutter of all the log files.
The link to the online Rstudio is here https://mybinder.org/v2/gh/metagenome-atlas/Tutorial/aldex?urlpath=rstudio
I think I addressed your comments, let me know if I missed anything or if you see anything further!
@luizirber Nice to "meet" you. I think I set up successfully the binder extension. It would be great if you could guide me on how to set up the automatic generation of HTML files. This also tests if all the code works, doesn't it?
No, the HTML are not displayed somewhere.
@luizirber Nice to "meet" you.
:wave:
I think I set up successfully the binder extension. It would be great if you could guide me on how to set up the automatic generation of HTML files. This also tests if all the code works, doesn't it?
I think we can start by asking @taylorreiter how is she building this locally. Are you using bookdown, or knitr directly?
No, the HTML are not displayed somewhere.
We can use GitHub Pages to display it in https://metagenome-atlas.github.io/Tutorial, we need to push the resulting HTML into the gh-pages
branch. Last time I set it up I used this, but I think it is easier nowadays (no need to create new tokens for GitHub Actions).
I'm using knitr directly!
@luizirber I think I will not publish the html online. I'd like only run the Rmarkdown from the command line after the binder setup. I will have the HTML in the Binder session. This also serves as CI.
The command to run Rmd files from the command line is something like Rscript -e “rmarkdown::render(‘./my_report.Rmd’)”
isn't it ?
Analyis_genome_abundances
Draw_Tree
Differential_abundance
r-condaenv.yml
Notes: