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
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.