Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vignette illustrating the use of the package R.SamBada #215

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SolangeD
Copy link

@SolangeD SolangeD commented May 10, 2019

This vignette illustrates the use of the package R.SamBada to detect potential signature of selection using a correlative approach between gentoype and envrionmental conditions

potential signature of selection using a correlative approach between
gentoype and envrionmental conditions
@hlapp
Copy link
Member

hlapp commented May 10, 2019

@SolangeD many thanks for your submission! We're looking into the reason(s) for the build failure.

@hlapp
Copy link
Member

hlapp commented May 10, 2019

Build failure is outside of this vignette: #216. (For now, that is.)

@hlapp hlapp changed the title This vignette illustrate the use of the package R.SamBada to detect potential signature of selection using a correlative approach between gentoype and envrionmental conditions Vignette illustrating the use of the package R.SamBada May 10, 2019
@hlapp
Copy link
Member

hlapp commented May 11, 2019

Build succeeds now. Nice work @SolangeD!. Do you and/or @zkamvar have suggestions for who would be good reviewers?

@smanel
Copy link
Contributor

smanel commented May 12, 2019

Suggestion of reviewer: [email protected]

@hlapp
Copy link
Member

hlapp commented May 22, 2019

@BrennaF would you be available to review as per @smanel's suggestion?

Could anyone suggest a second reviewer?

@smanel
Copy link
Contributor

smanel commented May 27, 2019

I can try to do it.

@BrennaF
Copy link
Contributor

BrennaF commented May 27, 2019

Hi all - I can also review, but will need a little time (a week?) since we're busy getting ready for our field season.

@hlapp
Copy link
Member

hlapp commented May 27, 2019

@BrennaF and @smanel thank you so much! If you need more time I think that's totally fine.

@smanel
Copy link
Contributor

smanel commented May 29, 2019

Can you tell me where I can edit and test the vignette. I cannot edit it when I go on the above link.

@smanel
Copy link
Contributor

smanel commented May 29, 2019

And for mac? Perhaps better to say that : For unix, replace "windows" by "unix", and for mac by ???

#GDS file (format from SNPRelate package). The file is different for windows or unix user (created with prepareGeno)
if(Sys.info()['sysname']=='Windows'){
gdsFile=system.file("extdata", "uganda-subset-mol_windows.gds", package = "R.SamBada") #If you run Windows
}else{
gdsFile=system.file("extdata", "uganda-subset-mol_unix.gds", package = "R.SamBada") #If you run MacOS or Linux
}

@smanel
Copy link
Contributor

smanel commented May 29, 2019

Oups the information is already given. No change to add.

@smanel
Copy link
Contributor

smanel commented Jun 4, 2019

l41:I do not understand l41 "#Plink ped input file"
l129: an error in "environment"
l150: remove s to "examples"
l151: "We can delete correlated variables that are above a given correlation threshold" -->Correlated variables can be removed following the chosen threshold
l151:" Check if there is a population structure to include it as an "environmental variable" in your environmental file". Not sure to see whith which option

@smanel
Copy link
Contributor

smanel commented Jun 4, 2019

l142: an error message :

createEnv(locationFileName=locationFile, outputFile='uganda-subset-env.csv', x='longitude',y='latitude',locationProj=4326,separator=';', worldclim=TRUE, saveDownload=TRUE, rasterName=NULL,rasterProj=NULL, interactiveChecks=FALSE) #Also try with interactiveChecks=TRUE
[1] "loading location file"
[1] "Downloading variables from Worldclim database"
essai de l'URL 'https://biogeo.ucdavis.edu/data/climate/worldclim/1_4/tiles/cur/bio_27.zip'
Content type 'application/zip' length 70216984 bytes (67.0 MB)
==================================================
downloaded 67.0 MB

essai de l'URL 'https://biogeo.ucdavis.edu/data/climate/worldclim/1_4/tiles/cur/tmin_27.zip'
Content type 'application/zip' length 49442777 bytes (47.2 MB)

downloaded 47.2 MB

essai de l'URL 'https://biogeo.ucdavis.edu/data/climate/worldclim/1_4/tiles/cur/tmax_27.zip'
Content type 'application/zip' length 48859678 bytes (46.6 MB)

downloaded 46.6 MB

essai de l'URL 'https://biogeo.ucdavis.edu/data/climate/worldclim/1_4/tiles/cur/prec_27.zip'
Content type 'application/zip' length 18820116 bytes (17.9 MB)

downloaded 17.9 MB

Error in .local(.Object, ...) :

De plus : There were 50 or more warnings (use warnings() to see the first 50)
Error in .rasterObjectFromFile(x, band = band, objecttype = "RasterLayer", :
Cannot create a RasterLayer object from this file. (file does not exist)

@SolangeD
Copy link
Author

SolangeD commented Jun 5, 2019 via email

@smanel
Copy link
Contributor

smanel commented Jun 5, 2019

like a problem with gdal?

createEnv(locationFileName=locationFile, outputFile='uganda-subset-env.csv', x='longitude',y='latitude',locationProj=4326,separator=';', worldclim=TRUE, saveDownload=TRUE, rasterName=NULL,rasterProj=NULL, interactiveChecks=FALSE) #Also try with interactiveChecks=TRUE
[1] "loading location file"
[1] "Downloading variables from Worldclim database"
Error in .local(.Object, ...) :

De plus : There were 50 or more warnings (use warnings() to see the first 50)
Error in .rasterObjectFromFile(x, band = band, objecttype = "RasterLayer", :
Cannot create a RasterLayer object from this file. (file does not exist)

warnings()...
Erreur : unexpected symbol in "warnings()..."
warnings()
Messages d'avis :
1: In gdal_setInstallation() :
No GDAL installation found. Please install 'gdal' before continuing:
- www.gdal.org (no HDF4 support!)
- www.trac.osgeo.org/osgeo4w/ (with HDF4 support RECOMMENDED)
- www.fwtools.maptools.org (with HDF4 support)

2: In gdal_setInstallation() : If you think GDAL is installed, please run:
gdal_setInstallation(ignore.full_scan=FALSE)
3: In gdal_setInstallation() :
No GDAL installation found. Please install 'gdal' before continuing:
- www.gdal.org (no HDF4 support!)
- www.trac.osgeo.org/osgeo4w/ (with HDF4 support RECOMMENDED)
- www.fwtools.maptools.org (with HDF4 support)

4: In gdal_setInstallation() : If you think GDAL is installed, please run:
gdal_setInstallation(ignore.full_scan=FALSE)
5: In gdal_setInstallation() :
No GDAL installation found. Please install 'gdal' before continuing:
- www.gdal.org (no HDF4 support!)
- www.trac.osgeo.org/osgeo4w/ (with HDF4 support RECOMMENDED)
- www.fwtools.maptools.org (with HDF4 support)

6: In gdal_setInstallation() : If you think GDAL is installed, please run:
gdal_setInstallation(ignore.full_scan=FALSE)
7: In gdal_setInstallation() :
No GDAL installation found. Please install 'gdal' before continuing:
- www.gdal.org (no HDF4 support!)
- www.trac.osgeo.org/osgeo4w/ (with HDF4 support RECOMMENDED)
- www.fwtools.maptools.org (with HDF4 support)

8: In gdal_setInstallation() : If you think GDAL is installed, please run:
gdal_setInstallation(ignore.full_scan=FALSE)
9: In gdal_setInstallation() :
No GDAL installation found. Please install 'gdal' before continuing:
- www.gdal.org (no HDF4 support!)
- www.trac.osgeo.org/osgeo4w/ (with HDF4 support RECOMMENDED)
- www.fwtools.maptools.org (with HDF4 support)

10: In gdal_setInstallation() : If you think GDAL is installed, please run:
gdal_setInstallation(ignore.full_scan=FALSE)
11: In gdal_setInstallation() :
No GDAL installation found. Please install 'gdal' before continuing:
- www.gdal.org (no HDF4 support!)
- www.trac.osgeo.org/osgeo4w/ (with HDF4 support RECOMMENDED)
- www.fwtools.maptools.org (with HDF4 support)

12: In gdal_setInstallation() : If you think GDAL is installed, please run:
gdal_setInstallation(ignore.full_scan=FALSE)
13: In gdal_setInstallation() :
No GDAL installation found. Please install 'gdal' before continuing:
- www.gdal.org (no HDF4 support!)
- www.trac.osgeo.org/osgeo4w/ (with HDF4 support RECOMMENDED)
- www.fwtools.maptools.org (with HDF4 support)

14: In gdal_setInstallation() : If you think GDAL is installed, please run:
gdal_setInstallation(ignore.full_scan=FALSE)
15: In gdal_setInstallation() :
No GDAL installation found. Please install 'gdal' before continuing:
- www.gdal.org (no HDF4 support!)
- www.trac.osgeo.org/osgeo4w/ (with HDF4 support RECOMMENDED)
- www.fwtools.maptools.org (with HDF4 support)

16: In gdal_setInstallation() : If you think GDAL is installed, please run:
gdal_setInstallation(ignore.full_scan=FALSE)
17: In gdal_setInstallation() :
No GDAL installation found. Please install 'gdal' before continuing:
- www.gdal.org (no HDF4 support!)
- www.trac.osgeo.org/osgeo4w/ (with HDF4 support RECOMMENDED)
- www.fwtools.maptools.org (with HDF4 support)

18: In gdal_setInstallation() : If you think GDAL is installed, please run:
gdal_setInstallation(ignore.full_scan=FALSE)
19: In gdal_setInstallation() :
No GDAL installation found. Please install 'gdal' before continuing:
- www.gdal.org (no HDF4 support!)
- www.trac.osgeo.org/osgeo4w/ (with HDF4 support RECOMMENDED)
- www.fwtools.maptools.org (with HDF4 support)

20: In gdal_setInstallation() : If you think GDAL is installed, please run:
gdal_setInstallation(ignore.full_scan=FALSE)
21: In gdal_setInstallation() :
No GDAL installation found. Please install 'gdal' before continuing:
- www.gdal.org (no HDF4 support!)
- www.trac.osgeo.org/osgeo4w/ (with HDF4 support RECOMMENDED)
- www.fwtools.maptools.org (with HDF4 support)

22: In gdal_setInstallation() : If you think GDAL is installed, please run:
gdal_setInstallation(ignore.full_scan=FALSE)
23: In gdal_setInstallation() :
No GDAL installation found. Please install 'gdal' before continuing:
- www.gdal.org (no HDF4 support!)
- www.trac.osgeo.org/osgeo4w/ (with HDF4 support RECOMMENDED)
- www.fwtools.maptools.org (with HDF4 support)

24: In gdal_setInstallation() : If you think GDAL is installed, please run:
gdal_setInstallation(ignore.full_scan=FALSE)
25: In gdal_setInstallation() :
No GDAL installation found. Please install 'gdal' before continuing:
- www.gdal.org (no HDF4 support!)
- www.trac.osgeo.org/osgeo4w/ (with HDF4 support RECOMMENDED)
- www.fwtools.maptools.org (with HDF4 support)

26: In gdal_setInstallation() : If you think GDAL is installed, please run:
gdal_setInstallation(ignore.full_scan=FALSE)
27: In gdal_setInstallation() :
No GDAL installation found. Please install 'gdal' before continuing:
- www.gdal.org (no HDF4 support!)
- www.trac.osgeo.org/osgeo4w/ (with HDF4 support RECOMMENDED)
- www.fwtools.maptools.org (with HDF4 support)

28: In gdal_setInstallation() : If you think GDAL is installed, please run:
gdal_setInstallation(ignore.full_scan=FALSE)
29: In gdal_setInstallation() :
No GDAL installation found. Please install 'gdal' before continuing:
- www.gdal.org (no HDF4 support!)
- www.trac.osgeo.org/osgeo4w/ (with HDF4 support RECOMMENDED)
- www.fwtools.maptools.org (with HDF4 support)

30: In gdal_setInstallation() : If you think GDAL is installed, please run:
gdal_setInstallation(ignore.full_scan=FALSE)
31: In gdal_setInstallation() :
No GDAL installation found. Please install 'gdal' before continuing:
- www.gdal.org (no HDF4 support!)
- www.trac.osgeo.org/osgeo4w/ (with HDF4 support RECOMMENDED)
- www.fwtools.maptools.org (with HDF4 support)

32: In gdal_setInstallation() : If you think GDAL is installed, please run:
gdal_setInstallation(ignore.full_scan=FALSE)
33: In gdal_setInstallation() :
No GDAL installation found. Please install 'gdal' before continuing:
- www.gdal.org (no HDF4 support!)
- www.trac.osgeo.org/osgeo4w/ (with HDF4 support RECOMMENDED)
- www.fwtools.maptools.org (with HDF4 support)

34: In gdal_setInstallation() : If you think GDAL is installed, please run:
gdal_setInstallation(ignore.full_scan=FALSE)
35: In gdal_setInstallation() :
No GDAL installation found. Please install 'gdal' before continuing:
- www.gdal.org (no HDF4 support!)
- www.trac.osgeo.org/osgeo4w/ (with HDF4 support RECOMMENDED)
- www.fwtools.maptools.org (with HDF4 support)

36: In gdal_setInstallation() : If you think GDAL is installed, please run:
gdal_setInstallation(ignore.full_scan=FALSE)
37: In gdal_setInstallation() :
No GDAL installation found. Please install 'gdal' before continuing:
- www.gdal.org (no HDF4 support!)
- www.trac.osgeo.org/osgeo4w/ (with HDF4 support RECOMMENDED)
- www.fwtools.maptools.org (with HDF4 support)

38: In gdal_setInstallation() : If you think GDAL is installed, please run:
gdal_setInstallation(ignore.full_scan=FALSE)
39: In gdal_setInstallation() :
No GDAL installation found. Please install 'gdal' before continuing:
- www.gdal.org (no HDF4 support!)
- www.trac.osgeo.org/osgeo4w/ (with HDF4 support RECOMMENDED)
- www.fwtools.maptools.org (with HDF4 support)

40: In gdal_setInstallation() : If you think GDAL is installed, please run:
gdal_setInstallation(ignore.full_scan=FALSE)
41: In gdal_setInstallation() :
No GDAL installation found. Please install 'gdal' before continuing:
- www.gdal.org (no HDF4 support!)
- www.trac.osgeo.org/osgeo4w/ (with HDF4 support RECOMMENDED)
- www.fwtools.maptools.org (with HDF4 support)

42: In gdal_setInstallation() : If you think GDAL is installed, please run:
gdal_setInstallation(ignore.full_scan=FALSE)
43: In gdal_setInstallation() :
No GDAL installation found. Please install 'gdal' before continuing:
- www.gdal.org (no HDF4 support!)
- www.trac.osgeo.org/osgeo4w/ (with HDF4 support RECOMMENDED)
- www.fwtools.maptools.org (with HDF4 support)

44: In gdal_setInstallation() : If you think GDAL is installed, please run:
gdal_setInstallation(ignore.full_scan=FALSE)
45: In gdal_setInstallation() :
No GDAL installation found. Please install 'gdal' before continuing:
- www.gdal.org (no HDF4 support!)
- www.trac.osgeo.org/osgeo4w/ (with HDF4 support RECOMMENDED)
- www.fwtools.maptools.org (with HDF4 support)

46: In gdal_setInstallation() : If you think GDAL is installed, please run:
gdal_setInstallation(ignore.full_scan=FALSE)
47: In gdal_setInstallation() :
No GDAL installation found. Please install 'gdal' before continuing:
- www.gdal.org (no HDF4 support!)
- www.trac.osgeo.org/osgeo4w/ (with HDF4 support RECOMMENDED)
- www.fwtools.maptools.org (with HDF4 support)

48: In gdal_setInstallation() : If you think GDAL is installed, please run:
gdal_setInstallation(ignore.full_scan=FALSE)
49: In gdal_setInstallation() :
No GDAL installation found. Please install 'gdal' before continuing:
- www.gdal.org (no HDF4 support!)
- www.trac.osgeo.org/osgeo4w/ (with HDF4 support RECOMMENDED)
- www.fwtools.maptools.org (with HDF4 support)

50: In gdal_setInstallation() : If you think GDAL is installed, please run:
gdal_setInstallation(ignore.full_scan=FALSE)

@SolangeD
Copy link
Author

SolangeD commented Jun 5, 2019 via email

@smanel
Copy link
Contributor

smanel commented Jun 5, 2019

It does not work (installation of rgdal): I have the following error message

install.packages("rgdal",repos="http://www.stats.ox.ac.uk/pub/RWin")
Warning in install.packages :
package ‘rgdal’ is not available (for R version 3.5.1)
Warning in install.packages :
unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/bin/macosx/el-capitan/contrib/3.5:
impossible d'ouvrir l'URL 'http://www.stats.ox.ac.uk/pub/RWin/bin/macosx/el-capitan/contrib/3.5/PACKAGES'

library(rgdal)-->I assume that it install the R package already on my computer? With this package I still have the previous error messagae

@SolangeD
Copy link
Author

SolangeD commented Jun 6, 2019 via email

@smanel
Copy link
Contributor

smanel commented Jun 7, 2019

1-I finally move on windows 10 (Rstudio, R 3.6). It works. I just noted that the package biomaRt is necessary to use the function PlotResultInteractive. I suggest to add a note in that give that this package should be installed with bioconductor.
2-I do not spend more time in working on Mac (Os) : It remains two problems at the moment : the version of the C compilator (gcc 7) and installation of rgdal.
So at the moment R. sambada is not working on "my" mac. But I did not try the suggestion.

@BrennaF
Copy link
Contributor

BrennaF commented Jun 7, 2019

Hello all - my apologies for the delay. I've just started running the tutorial, and I keep getting hung up on the prepareGeno call:

prepareGeno(fileName=genoFile,outputFile='uganda-subset-mol.csv',saveGDS=TRUE,mafThresh=0.05, missingnessThresh=0.1,interactiveChecks=FALSE) #Also try with interactiveChecks=TRUE

Rstudio just hangs when I run this. I've been waiting for 10 minutes currently. I tried restarting R, but it is currently doing the same thing...I'm assuming it shouldn't take that long. I'm on a windows machine using R v. 3.5.3. No errors or other problems in the set up code prior to this point...

@BrennaF
Copy link
Contributor

BrennaF commented Oct 22, 2019

Hello - the prepareGeno is now working for me - not sure what the problem was originally.

A few comments/suggestions on the vignette:

  • Line 124: I did not have the "uganda-subset-id.csv" file in my current directory to upload in the setLocation() browser window. Can you please add it?

  • Line 142: createEnv() also failed for me with the same error that Stephanie got. I installed the rgdal package but I still had the same error (I'm using windows). It seems that gdal is a dependency for rgdal - can you provide instructions for installation?

  • Line 163: remove this comment or make it more descriptive, since prepareEnv() as parameterized here is doing more than storing PC scores. Also, how does prepareEnv() determine which of a set of highly correlated variables will be removed? Is it random? If so, you should be clear about that since users may prefer to prune variables based on ecological/biological relevance.

  • Line 206: What are these two plots that are produced? The description in prepareOutput() is minimal. Are these plots something users should be interpreting?

  • Line 211: typo - "interesting"

  • Line 245: "Error: Package "biomaRt" needed for this function to work. Please install it." Installed with bioconductor & then had to update rlang as well (and restart R and the tutorial) - might be best to include these in the dependencies at the start.

  • Line 245: Great shiny app! How do you get the map to plot using the varnev (mine would only plot using the "pops" scale)? Also a y-axis label on the boxplot would be helpful.

  • Line 272: I don't understand "presence/absence" for SNPs - how is it handling heterozygotes?

General comments:

  • It might be useful to let users know if there are informative/interesting SNPs in the data set or not. For example, which SNPs are you confident are neutral vs. under selection? Then users could see how testing parameters differ, so that they'll be better able to interpret results when they see them for their own data.

  • I also wasn't sure where test statistics from the GLM are reported...which SNPs are candidates based on what cutoff? The Manhattan plot is nice for visualization and inspection, but where are the qvalues and pvalues reported? Where is the FDR set? Are GIFs and p-value distributions provided anywhere to assess whether we're close to meeting the reported FDR?

The visualizations are fantastic! Looking forward to using this with my own data.
Brenna

@SolangeD
Copy link
Author

SolangeD commented Aug 11, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants