liftOver - 基因组坐标在不同基因组注释版本间转换

ChIP-Seq数据挖掘系列-4: liftOver - 基因组坐标在不同基因组注释版本间转换

https://www.jianshu.com/p/75758684b9cf

source activate rna
(rna) [zhangyong@cluster liftover]$ liftOver
liftOver - Move annotations from one assembly to another
usage:
liftOver oldFile map.chain newFile unMapped
oldFile and newFile are in bed format by default, but can be in GFF and
maybe eventually others with the appropriate flags below.
The map.chain file has the old genome as the target and the new genome
as the query.

(rna) [zhangyong@cluster liftover]$ liftOver ce.bed mm10ToMm9.over.chain.gz mm9.bed ummap
Reading liftover chains
Mapping coordinates
(rna) [zhangyong@cluster liftover]$

liftOver转换坐标并保留bed文件所有信息
https://cloud.tencent.com/developer/article/1645421

运行如下代码:

liftOver human.bed ~/liftover/hg19ToHg38.over.chain.gz human_hg38.bed unmap
这里会报错:
Reading liftover chains
Mapping coordinates
invalid signed integer: “+”

第四列及后边存在制表符和空格等都会报错,但是我们需要后边的信息怎么办呢?

这里我们可以用":"或者其他字符将制表符和空格替换掉,然后运行liftOver:

sed -i ‘s/\t/:/g’ human.bed
sed -i ‘s/ /#/g’ human.bed
liftOver human.bed ~/liftover/hg19ToHg38.over.chain.gz human_hg38.bed unmap
替换之后文件如下:

这样就可以运行liftOver了,最后得到转换过的坐标文件之后,将:和#再替换回来即可。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值