Question: Is there a tool to draw local ancestry plots per chromosome?
gravatar for bibb77
3.6 years ago by
bibb7780 wrote:

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:

 I'll appreciate if you can give some advice

Thanks in advance!

lamp-ld ideogram ancestry • 1.5k views
ADD COMMENTlink modified 5 weeks ago by soulsacross60 • written 3.6 years ago by bibb7780

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.

ADD REPLYlink written 17 months ago by genomics Newbie20
gravatar for soulsacross
5 weeks ago by
soulsacross60 wrote:

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

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

Then use this script (see lait in to get a more standard file from the above output

perl 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*


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)


#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")


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

Good luck

ADD COMMENTlink modified 4 weeks ago • written 5 weeks ago by soulsacross60
gravatar for michael.wathen
2.7 years ago by
michael.wathen0 wrote:


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


ADD COMMENTlink written 2.7 years ago by michael.wathen0

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.

ADD REPLYlink written 17 months ago by genomics Newbie20
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 798 users visited in the last hour