UCSC liftOver

432 views
Skip to first unread message

Melhuish Beaupre, Lindsay M., Ph.D.

unread,
Dec 16, 2022, 3:30:16 PM12/16/22
to gen...@soe.ucsc.edu

Good Morning,

 

I was wondering if it is possible to use liftOver with GWAS summary statistics? I notice the “tutorial” says it requires data in .bed format but I don’t have the luxury of having the genotype data for this data -only summary statistics.

 

Any advice would be greatly appreciated.

 

All the best,

Lindsay

Luis Nassar

unread,
Dec 23, 2022, 8:22:48 PM12/23/22
to Melhuish Beaupre, Lindsay M., Ph.D., gen...@soe.ucsc.edu

Hello, Lindsay.

Thank you for your interest in the Genome Browser.

LiftOver requires BED format as you say, which typically means reshuffling some columns around to be able to lift other file types.

For example, looking at this case (https://stackoverflow.com/questions/68098650/lifting-over-gwas-summary-statististic-file-from-build-38-to-build-37), assuming your file looks similar:

1 chr1_17626_G_A 17626 A G 0.016 -0.0332 0.0237 0.161

You would need to rearrange the file so that the first 3 fields are the chrom, start, and end (http://www.genome.ucsc.edu/FAQ/FAQformat.html#format1). The rest of the data can be placed afterward and it will be carried over after the lift.

Since BED file has 0-based coordinates (http://genome.ucsc.edu/blog/the-ucsc-genome-browser-coordinate-counting-systems/), the equivalent of position 17626 in your file is 17625-17626 in BED. So in this case you could convert that file to BED by:

awk '{print "chr"$1, ($3-1), $3, $2, $4, $5, $6, $7, $8, $9}' oldFile.txt > newFile.bed

Doing so converts the data from:

1 chr1_17626_G_A 17626 A G 0.016 -0.0332 0.0237 0.161

to:
chr1 17625 17626 chr1_17626_G_A A G 0.016 -0.0332 0.0237 0.161

Which is now in BED format and can be used with liftOver. You could then convert your file back in a similar fashion. You may also find some helpful information on our mailing list archives, e.g.

https://groups.google.com/a/soe.ucsc.edu/g/genome/c/BuzZXtlYX2M/m/QFKL1bMsAQAJ
https://groups.google.com/a/soe.ucsc.edu/g/genome/c/X2OUyBcHuak/m/UtwfCZ4iAgAJ

Let us know If you have any further questions, or would like us to elaborate on any part of this answer. If you share with us an excerpt of your file we may also be able to give you a more specific answer.

Lastly, another useful tool to consider for lifting single-point coordinates is CrossMap (https://pythonhosted.org/CrossMap/), which sometimes performs better when lifting 1bp regions. That being said, we cannot offer any direction or support for CrossMap as it is not developed by the Genome Browser.

I hope this is helpful. Please include gen...@soe.ucsc.edu in any replies to ensure visibility by the team. All messages sent to that address are archived on our public forum. If your question includes sensitive information, you may send it instead to genom...@soe.ucsc.edu.

Lou Nassar
UCSC Genomics Institute


--

---
You received this message because you are subscribed to the Google Groups "UCSC Genome Browser Public Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to genome+un...@soe.ucsc.edu.
To view this discussion on the web visit https://groups.google.com/a/soe.ucsc.edu/d/msgid/genome/ff6a6b%24j7b2du%40ironport10.mayo.edu.
Reply all
Reply to author
Forward
0 new messages