NESCent / popgenInfo

Vignettes for Population Genetics in R
http://popgen.nescent.org
MIT License
21 stars 50 forks source link

Detecting signals of selection #52

Open zkamvar opened 9 years ago

zkamvar commented 9 years ago

Please refer to the issue number when submitting pull requests.

mmlopezu commented 9 years ago

I think microsatellite markers are not suitable for outlier loci detection.

On Tue, May 12, 2015 at 1:08 PM, Zhian N. Kamvar notifications@github.com wrote:

  • Outlier detection
  • SNP/environment
  • Linkage disequilibrium methods
  • Neutrality tests

By marker type:

  • SNP
  • Sequence
  • Microsatellite

Please refer to the issue number when submitting pull requests.

— Reply to this email directly or view it on GitHub https://github.com/NESCent/popgenInfo/issues/52.

Margarita M. López-Uribe Postdoctoral Researcher Department of Entomology North Carolina State University https://sites.google.com/a/cornell.edu/mm-lopez-uribe/ https://sites.google.com/a/cornell.edu/margarita-m-lopez-uribe/

zkamvar commented 9 years ago

Perhaps not, but aren't they still suitable for Linkage disequilibrium methods?

mmlopezu commented 9 years ago

yeap

On Tue, May 12, 2015 at 1:26 PM, Zhian N. Kamvar notifications@github.com wrote:

Perhaps not, but aren't they still suitable for Linkage disequilibrium methods?

— Reply to this email directly or view it on GitHub https://github.com/NESCent/popgenInfo/issues/52#issuecomment-101357891.

Margarita M. López-Uribe Postdoctoral Researcher Department of Entomology North Carolina State University https://sites.google.com/a/cornell.edu/mm-lopez-uribe/ https://sites.google.com/a/cornell.edu/margarita-m-lopez-uribe/

smanel commented 9 years ago

They are suitable for methods working on allele frequency (correlative method looking for association allele frequency/environment): the SNP/environment has to be replaced by : correlations allele frequency/environment.

smanel commented 8 years ago

I 'am developing the vignette SNP and signal of selection: I use packages in development and I have problem to create the pdf file from R Markdown : Knit HTML stopped because of the following error message:

"Quitting from lines 41-52 (SignalSelectionSNP.Rmd) Error in contrib.url(repos, "source") : trying to use CRAN without setting a mirror Calls: ... withVisible -> eval -> eval -> install.packages -> contrib.url Execution halted"

I feel that is is due to interactivity with R.

Any idea?

zkamvar commented 8 years ago

"Quitting from lines 41-52 (SignalSelectionSNP.Rmd) Error in contrib.url(repos, "source") : trying to use CRAN without setting a mirror Calls: ... withVisible -> eval -> eval -> install.packages -> contrib.url Execution halted"

It looks like you are using the function install.packages(). I think you should avoid using it. This does bring up a good point on adding new packages to the docker, though. What do you think, @hlapp?

hlapp commented 8 years ago

Yes, we should not install packages in any of the vignettes. Instead, they should be included in the Docker container with which we are rendering the site, and which therefore also serves as a reference for everyone else with regard to the environment under which all of the stuff described in the vignettes works.

smanel commented 8 years ago

As you can see, I use at the moment the following command to call the packages qvalues and outflank in my vignette:

install.packages("devtools") library("devtools") source("https://bioconductor.org/biocLite.R") biocLite("qvalue") install_github("whitlock/OutFLANK") library(OutFLANK)

What I need to do and which commands I need to use instaed?

zkamvar commented 8 years ago

I would recommend wrapping the installation part in a chunk that's not evaluated (eval = FALSE) since these packages are already present in the docker container.

Here's how I would set it up:

    ```{r, eval = FALSE}
    install.packages("devtools")
    library("devtools")
    source("https://bioconductor.org/biocLite.R")
    biocLite("qvalue")
    install_github("whitlock/OutFLANK")
```{r load_package}
library("OutFLANK")
```
smanel commented 8 years ago

It works...and I start to understand how it works....

zkamvar commented 8 years ago

:)

Sent from my iPhone

On Jan 8, 2016, at 23:56, Stéphanie Manel notifications@github.com wrote:

It works...and I start to understand how it works....

— Reply to this email directly or view it on GitHub.

hlapp commented 8 years ago

I would recommend wrapping the installation part in a chunk that's not evaluated (eval = FALSE) since these packages are already present in the docker container.

I would recommend if at all possible to keep package installation out of the vignettes completely. How to install packages is covered well elsewhere and we can point to that, so as to what packages someone needs to run the code in a vignette can just be stated in code, or should be evident from the library() commands. Installing packages changes someone's system, and running a vignette should never do that.

As for yourself, is it not possible to simply install those packages and then run the vignette assuming they are there and library() is all you need?

zkamvar commented 8 years ago

I would recommend if at all possible to keep package installation out of the vignettes completely. How to install packages is covered well elsewhere and we can point to that, so as to what packages someone needs to run the code in a vignette can just be stated in code, or should be evident from the library() commands.

To that point, the package in question only exists on GitHub, so the installation is not as simple as install.packages(). I think that wrapping it in eval = FALSE and giving a small explanation for why the code chunk is there is the best option (as suggested in my previous comment)