Description Usage Arguments Details Value Author(s) Examples
View source: R/Postprocessing.R
Plots the manhattan plot for a given environmental variable. The plot is interactive and a map of the distribution of the marker can be retrieved as well as nearby genes listed in Ensembl.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
preparedOutput |
char The prepared output list from prepare_output function |
varEnv |
char The name of the environmental variable one wish to study (as in the header of |
envFile |
char The file containing the input environmental variable of sambada. |
species |
char The abbreviated latin name of the species without capitals nor punctuation (e.g. btaurus, chircus,...). Can be set to null if species not present in ensembl database. !!! Warning !!! This function only works for species for which a SNP dataset is available in ensembl. You can check the list using the following R command: snp_dataset = biomaRt::useMart('ENSEMBL_MART_SNP'); biomaRt::listDatasets(snp_dataset) |
pass |
integer Number of BP around a SNP in which to look for an annotation in Ensembl. Set to null if species is null |
x |
char The name of the column corresponding to the x-coordinate in the envFile. Can be set to null if unknown, in this case the maps will not be available |
y |
char The name of the column corresponding to the y-coordinate in the env file. Can be set to null if x is null. |
valueName |
char Name of the p- or q-value one wish to plot the manhattan on. This can be either pvalueG, pvalueW, qvalueG, qvalueW for G- or Waldscore respectively. |
chromo |
char/integer Name or vector of name of the chromosome to investigate. If all is chosen (default), all numerical chromosome will be mapped. If your sambada output is large (typically if you are working with more than 50K genomic file), you should probably map a subset of your dataset (e.g. |
gdsFile |
char The GDS file created in the preprocessing of sambada. If null, will try with envFile(without -env.csv or -env-export.csv) and .gds |
IDCol |
char The name of the column in |
popStrCol |
char The name or vector of name of column(s) in |
ensemblHost |
char The ensembl url as defined in biomaRt::useMart. Useful to access archived version of ensembl dataset. |
This function opens a local web-page first showing a manhattan plot. By clicking on a marker, a list of information is shown (chromosome and exact position, ensembl gene within the determined window, variant consequence on the protein and if the SNP is correlated with other variables). A map also shows the geographical distribution of the marker (presence/absence), the environmental variable and if present the population variable. On the right of the plot, the variable to be plotted can be checked in the list by clicking on it. Also two boxplots shows the distribution of the environmental variables for individuals with and without the marker. The scale of the y-axis is the unit of the environmental variable.
None
Solange Duruz
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ## Not run:
# Example with data from the package
# First copy needed files into the temporary directory
file.copy(system.file("extdata", "uganda-subset-mol-Out-2.csv", package = "R.SamBada"),
file.path(tempdir(),'uganda-subset-mol-Out-2.csv'), overwrite=TRUE)
file.copy(system.file("extdata", "uganda-subset-mol-storey.csv", package = "R.SamBada"),
file.path(tempdir(),'uganda-subset-mol-storey.csv'), overwrite=TRUE)
file.copy(system.file("extdata", "uganda-subset-env-export.csv", package = "R.SamBada"),
file.path(tempdir(),'uganda-subset-env-export.csv'), overwrite=TRUE)
if(Sys.info()['sysname']=='Windows'){
file.copy(system.file("extdata", "uganda-subset-mol_windows.gds", package = "R.SamBada"),
file.path(tempdir(),'uganda-subset-mol.gds'), overwrite=TRUE) #If you run Windows
} else {
file.copy(system.file("extdata", "uganda-subset-mol_unix.gds", package = "R.SamBada"),
file.path(tempdir(),'uganda-subset-mol.gds'), overwrite=TRUE)
}
# Run prepareOutput
prep=prepareOutput(file.path(tempdir(),'uganda-subset-mol'),2,popStr=TRUE,
interactiveChecks=FALSE)
###################
# Run plotResultInteractive
###################
plotResultInteractive(prep,'bio1','uganda-subset-env-export.csv',species='btaurus',
pass=25000,x='longitude',y='latitude', gdsFile='uganda-subset-mol.gds',
IDCol='short_name',popStrCol='pop1')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.