This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Is there a tool to draw local ancestry plots per chromosome?

Dear biostars:

I'm doing local ancestry estimations for GWAS data using the LAMP-LD software, I just got the results, which are ranges of ancestry across each chromosome per individual. This is small example of the output for a given chromosome:

00:1935    01:1981    02:50531    00:50937

1: Native American ancestry(red)

0: European ancestry (blue)

2: African ancestry (orange)

00 means that both haplotypes comes from European ancestry, 01 half European and half Native American, 02 half European and half African. The numbers after the semicolon are the number of variants on each haplotype.

I was looking in the web but I haven't found any tool (online or script like in R) that can take that input format and draw a plot like this:

plot

I'll appreciate if you can give some advice

Thanks in advance!

ideogram ancestry lamp-ld

Hello,

I was wondering if you were able to successfully find what you were looking for.

Michael

Hello Michael,

I have the same question as above and have not found any R plots or graphing software for LAMP-LD results. Do you have any recommendations?

Thank you.

Hello, Did you ever find a R script or another visualization tool which would enable you to graph your LAMP-LD output? I have the same output format which I would like to graph. Thank you.

2 answers

Hi, although the topic is old, it might help people coming here to answer this very question.

First use convertLAMPLDout.pl script that comes with LAMPLD to unwind haplotypes perl convertLAMPLDout.pl test_data/lampld.out test_data/lampld.out.long

Then use this script (see lait in http://www.pitt.edu/~wec47/lait.html) to get a more standard file from the above output

perl standardizeOutput.pl lamp-ld 3 lampld.out.long lampld.std_ancestry.txt

Plot in R like this (for ancestries as lines, you can change to rectangles, see https://bernatgel.github.io/karyoploter_tutorial/)*

library(karyoploteR) 

lamp <- read.table("lampld.std_ancestry.txt",  header=F)

lamp.m <- colMeans(lamp[, 2:ncol(lamp)])

tmp <- data.frame(X=lamp.m, ind=rep(1:3))
lamp.df <- unstack(tmp, X~ind)


# Plot
kp <- plotKaryotype(chromosomes="chr11", plot.type=2)

#data.panel=1
kpDataBackground(kp)

#Default axis ====> uncomment for both sides axis 
# kpAxis(kp) 

#Axis on the right side of the data.panel
kpAxis(kp, side = 2) 

snp <- read.table("chr.pos", header = F)

kpPoints(kp, chr="chr11", x=snp$V1, y=lamp.df$X1, pch=".", cex=0.75)
kpPoints(kp, chr="chr11", x=snp$V1, y=lamp.df$X2, pch=".", cex=0.75,col="blue")
kpPoints(kp, chr="chr11", x=snp$V1, y=lamp.df$X3, pch=".", cex=0.75, col="red")

  [1]: http://www.pitt.edu/~wec47/Files/LAIT/standardizeOutput.pl

*Where chr.pos is the posfile you've used as input on your LAMPLD run.

Good luck

Hi

Does anyone perhaps have a copy of standardizeOutput.pl or of the other LAIT utils?

The GitHub repo only has lait.pl.

The author Daniel Hui has not been able to provide me with the tools.

The site http://www.pitt.edu/~wec47/lait.html no longer exists.

Thanks and best regards!

Fourie

MOSAIC does this - as long as your data is phased.

enter image description here

Log in to answer this question.