Skip to content
Advertisement

Lifting over GWAS summary statististic file from build 38 to build 37

I am using the UCSC lift over tool and the associated chain to lift over the results of my GWAS summary statistic file (a tab separated file) from build 38 to build 37. The GWAS summary stat file looks like:

JavaScript

Follwing is the UCSC tool with the associated chain I am using:

I want to create a file in bed format from GWAS summary stat fle that is the required input by the tool, where I would like the first three columns to be tab separated and rest of the columns to be merged in a single column and separated by a non tab separator such as “.” so as to preserve them while running the lift over. The first three columns of the input bed file would be:

JavaScript

The above three are the required columns for the tool.

My questions are:

  1. How can I use a non tab separator say “:” to merge rest of the columns of the GWAS summary stat file in one column?
  2. After running the liftover, how can I unpack the columns separated by 😕

Advertisement

Answer

I am not sure if this answers your questions but please take a look.

You can use awk to merge multiple columns by :

JavaScript

and then say you want to replace : by tab in $1 then you can do

JavaScript

Is this of any help?

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement