How to use liftover

First step, installation:

download from UCSC genome browser

chmod + x 

Second, very important: to download the "Chain File". 

What is "chain file"?  --- to transfer the gene data from one build to another . for example, from hg19 to hg18

Third, do like this:

liftOver oldfile chain_file new_file unmapped_file

for example:

liftOver SAEC_DNase.bed hg19ToHg18.over.chain SAEC_DNase_hg18.bed SAEC_DNase_hg18_Unmapped.bed

or you can do the batch work by shell script:

#!/bin/bash
for file in *.bed; do
    newfile=${file/%.bed/_hg18.bed}
    unmapp_file=${file/%.bed/_Unmapped.bed}
    liftOver $file hg19ToHg18.over.chain Hg18_Files/$newfile Hg18_Files/$unmapp_file
done

 

posted on 2013-07-04 08:20  Forever_YCC  阅读(...)  评论(...编辑  收藏

导航

统计