plotAMids: Visualises genetic distances.

Description Usage Arguments Examples

Description

plotAMids is used to visualise the relationship amongst individuals and references.

Usage

1
2
3
4
plotAMids(AMids, phenoFile, columnPlot = "I", quantilePlot = TRUE,
  colorPlot = "BlBrewer", sepLinesPop = TRUE, plotIndNames = FALSE,
  legColor = TRUE, legRef = TRUE, legPheno = TRUE, legAxisPop = TRUE,
  legData = FALSE, bmar, lmar, tmar, rmar, cexref = 0.9, cexind = 0.8)

Arguments

AMids

Dataframe of genetic distances calculated by calculateAMids or calculateAMidsArith.

phenoFile

Optional file with phenotype, color and order information for individuals and populations. An example file, called CorPheno, is contained in the 'extdata' folder with the package.

columnPlot

Takes values 'I' or 'C'. 'I' is the default option. 'I' plots the normalised euclidean distances whereas 'C' plots the crude distances.

quantilePlot

Logical. Takes values TRUE or FALSE. TRUE is the default option. If columnPlot is 'C', TRUE will plot the quantiles, FALSE will plot the raw values.

colorPlot

Colors for the AMids. Possible choices are 'RedBl', 'RedBlGr' and 'BLBrewer'. The user can also provide a vector of colors.

sepLinesPop

Logical. Takes values TRUE or FALSE. The default is TRUE. If TRUE, a line demarcating populations is plotted.

plotIndNames

Logical. Takes values TRUE or FALSE. The default is FALSE. If TRUE, the individual ids are plotted on the left axis.

legColor

Logical. Takes values TRUE or FALSE. The default is TRUE. If TRUE, the legend for the colour gradient will be plotted in the top left.

legRef

Logical. Takes values TRUE or FALSE. The default is TRUE. If TRUE, text giving names of references will be plotted along the x axis.

legPheno

Logical. Takes values TRUE or 'no. The default is TRUE. If TRUE, will plot colour blocks relating to the population, dataset and regional origin of data if sample IDs have been given these in the Corpheno file, if not present, will plot them under 'Unspecified'.

legAxisPop

Logical. Takes values TRUE or FALSE. The default is TRUE. If TRUE text will be plotted giving name and number of populations for samples used on the right y axis of the plot.

legData

Logical. Takes values TRUE or FALSE. The default is FALSE. If TRUE, the reference to the dataset used to create the reference is appended to the reference population name on the bottom x axis.

bmar

Takes numeric value. Changes the size of the bottom outer margin of the plot. The default is empty. For more see ?par()

lmar

Takes numeric value. Changes the size of the left outer margin of the plot. The default is empty. For more see ?par()

tmar

Takes numeric value. Changes the size of the top outer margin of the plot. The default is empty. For more see ?par()

rmar

Takes numeric value. Changes the size of the right outer margin of the plot. The default is empty. For more see ?par()

cexref

Takes numeric value. Controls text size of reference names on y axis. Default is 0.9.

cexind

Takes numeric value. Controls text size of sample names on y axis. Default is 0.8. Individual sample IDs need plotIndNames = "yes" to display, this is set to FALSE by default.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
Refs <- system.file('data', package = 'AncestryMapper')
tpeds <- system.file('extdata', package = 'AncestryMapper')
Corpheno <- system.file('extdata', 'CorPheno', package = 'AncestryMapper')
All00Frq <- system.file ('data', 'MinMaxFreq.rda', package = 'AncestryMapper')

genetic.distance <- calculateAMidsArith(pathTotpeds = tpeds,
                                   NameOut = 'Example',
                                   pathToAriMedoids = Refs,
                                   pathAll00 = All00Frq)

plotAMids(AMids = genetic.distance, phenoFile = Corpheno, columnPlot = "I")

## End(Not run)

Example output

[1] "Abkhaz.Yunusbayev2011 Finished"
[1] "Adygei.HGDP Finished"
[1] "African.American.1000.Genomes Finished"
[1] "Altai.Rasmussen2010 Finished"
[1] "Armenian.Yunusbayev2011 Finished"
[1] "Ashkenazi.Behar2010 Finished"
[1] "Australian.Aborigine.Reich2011 Finished"
[1] "Balkar.Yunusbayev2011 Finished"
[1] "Balochi.HGDP Finished"
[1] "Bantu.HGDP Finished"
[1] "Barbadan.1000.Genomes Finished"
[1] "Basque.HGDP Finished"
[1] "Bedouin.HGDP Finished"
[1] "Bengali.1000.Genomes Finished"
[1] "Biaka-Py.HGDP Finished"
[1] "Bidayuh.Reich2011 Finished"
[1] "Brahui.HGDP Finished"
[1] "British.1000.Genomes Finished"
[1] "Bulgarian.Hellenthal2014 Finished"
[1] "Bulgarian.Yunusbayev2011 Finished"
[1] "Burmese.Chaubey2010 Finished"
[1] "Burusho.HGDP Finished"
[1] "Buryat.Rasmussen2010 Finished"
[1] "Chechen.Yunusbayev2011 Finished"
[1] "Chukchi.Rasmussen2010 Finished"
[1] "Chuvash.Behar2010 Finished"
[1] "Colombian.1000.Genomes Finished"
[1] "Cypriot.Behar2010 Finished"
[1] "Dai.1000.Genomes Finished"
[1] "Dravidian.Reich2011 Finished"
[1] "Druze.HGDP Finished"
[1] "Dyak.Reich2011 Finished"
[1] "East.Sicilian.Hellenthal2014 Finished"
[1] "Eastern.Greenlander.Rasmussen2010 Finished"
[1] "Egyptian.Behar2010 Finished"
[1] "Emirati.Hellenthal2014 Finished"
[1] "Esan.1000.Genomes Finished"
[1] "Estonian.Raghavan2013 Finished"
[1] "Ethiopian.Behar2010 Finished"
[1] "Ethiopian.Jew.Behar2010 Finished"
[1] "Euro.Utah.1000.Genomes Finished"
[1] "Evenki.Rasmussen2010 Finished"
[1] "Fijian.Reich2011 Finished"
[1] "Finnished Finish"
[1] "Finnish.1000.Genomes Finished"
[1] "French.HGDP Finished"
[1] "Gambian.1000.Genomes Finished"
[1] "Georgian.Behar2010 Finished"
[1] "Greek.Hellenthal2014 Finished"
[1] "Gujarati.1000.Genomes Finished"
[1] "Gujarati.HapMap Finished"
[1] "Han.HGDP Finished"
[1] "Han.Beijing.1000.Genomes Finished"
[1] "Han.Dallas.HapMap Finished"
[1] "Han.South.China.1000.Genomes Finished"
[1] "Hazara.HGDP Finished"
[1] "Hungarian.Behar2010 Finished"
[1] "Iranian.Behar2010 Finished"
[1] "Iraqi.Jewish.Behar2010 Finished"
[1] "Calculating Distance To Tipperary..."
[1] "Not Far Enough."
[1] "Irish.UCD Finished"
[1] "Japanese.1000.Genomes Finished"
[1] "Jehai.Reich2011 Finished"
[1] "Kalash.HGDP Finished"
[1] "Karitiana.HGDP Finished"
[1] "Kazakh.Raghavan2013 Finished"
[1] "Khaskassian.Fedorova2013 Finished"
[1] "Khmer.HGDP Finished"
[1] "Kinh.1000.Genomes Finished"
[1] "Kumyk.Yunusbayev2011 Finished"
[1] "Kyrgyz.Raghavan2013 Finished"
[1] "Lahu.HGDP Finished"
[1] "Lezgi.Behar2010 Finished"
[1] "Lithuanian.Behar2010 Finished"
[1] "Luhya.1000.Genomes Finished"
[1] "Maasai.HapMap Finished"
[1] "Makrani.HGDP Finished"
[1] "Mamanwa.Reich2011 Finished"
[1] "Mandenka.HGDP Finished"
[1] "Manobo.Reich2011 Finished"
[1] "Mari.Raghavan2013 Finished"
[1] "Maya.HGDP Finished"
[1] "Mbuti-Py.HGDP Finished"
[1] "Melanesian.HGDP Finished"
[1] "Mende.1000.Genomes Finished"
[1] "Mexican.1000.Genomes Finished"
[1] "Miaozu.HGDP Finished"
[1] "Mongolian.HGDP Finished"
[1] "Mordovin.Yunusbayev2011 Finished"
[1] "Moroccan.Behar2010 Finished"
[1] "Moroccan.Jewish.Behar2010 Finished"
[1] "Mozabite.HGDP Finished"
[1] "Na-Dene.Rasmussen2010 Finished"
[1] "Nganassan.Rasmussen2010 Finished"
[1] "Nogai.Yunusbayev2011 Finished"
[1] "North.Italian.HGDP Finished"
[1] "Norwegian.Hellenthal2014 Finished"
[1] "Orcadian.HGDP Finished"
[1] "Oroqen.HGDP Finished"
[1] "Ossetian.Yunusbayev2011 Finished"
[1] "Palestinian.HGDP Finished"
[1] "Papuan.HGDP Finished"
[1] "Pathan.HGDP Finished"
[1] "Peruvian.1000.Genomes Finished"
[1] "Pima.HGDP Finished"
[1] "PNG.Southern.Highlands.Reich2011 Finished"
[1] "Polish.Hellenthal2014 Finished"
[1] "Polynesian.Reich2011 Finished"
[1] "Puerto.Rican.1000.Genomes Finished"
[1] "Punjabi.1000.Genomes Finished"
[1] "Romanian.Behar2010 Finished"
[1] "Russian.HGDP Finished"
[1] "San.Khomani.Hellenthal2014 Finished"
[1] "Sandawe.Hellenthal2014 Finished"
[1] "Sardinian.HGDP Finished"
[1] "Saudi.Behar2010 Finished"
[1] "Selkup.Rasmussen2010 Finished"
[1] "Sephardic.Behar2010 Finished"
[1] "She.HGDP Finished"
[1] "Sindhi.HGDP Finished"
[1] "South.Italian.Hellenthal2014 Finished"
[1] "Spanish.1000.Genomes Finished"
[1] "Surui.HGDP Finished"
[1] "Syrian.Behar2010 Finished"
[1] "Tamil.1000.Genomes Finished"
[1] "Telugu.1000.Genomes Finished"
[1] "Temuan.Reich2011 Finished"
[1] "Tibetan.Wuren2014 Finished"
[1] "Tu.HGDP Finished"
[1] "Tujia.HGDP Finished"
[1] "Tunisian.Hellenthal2014 Finished"
[1] "Turkish.Behar2010 Finished"
[1] "Turkmen.Yunusbayev2011 Finished"
[1] "Tuscan.1000.Genomes Finished"
[1] "Tuvan.Rasmussen2010 Finished"
[1] "Ukrainian.Yunusbayev2011 Finished"
[1] "Uygur.HGDP Finished"
[1] "Uzbek.Behar2010 Finished"
[1] "West.Sicilian.Hellenthal2014 Finished"
[1] "Western.Greenlander.Rasmussen2010 Finished"
[1] "Yakut.HGDP Finished"
[1] "Yemeni.Behar2010 Finished"
[1] "Yemeni.Jewish.Behar2010 Finished"
[1] "Yizu.HGDP Finished"
[1] "Yoruba.1000.Genomes Finished"
[1] "tPED files used:"
[1] "/usr/lib/R/site-library/AncestryMapper/extdata/Demo.tped"
[1] "1000 common SNPs found between all submitted tPED files."
[1] "1000 common SNPs found between All00 reference and all submitted tPED files"
[1] "/usr/lib/R/site-library/AncestryMapper/extdata/Demo.tped"
[1] "***** Number of SNPs Used: 1000"
[1] "Wrote out AMid file to, /work/tmp/AMidExample_ref143_inds567_SNPs1000.amid"

AncestryMapper documentation built on May 2, 2019, 4:29 a.m.