报错Error: Sorted input specified, but the file file.bedgraph has the following out of order record解决方案

跑命令时python mountainClimberTU.py -b file.bedgraph -j SRRT.bed -s 0 -g hg38.chrom.sizes -o SRR950078_tu.bed 时出现报错:

Error: Sorted input specified, but the file file.bedgraph has the following out of order record
chr10 12146 12163 1

把所有的基因组sort一下就可以解决了,方案如下:

sort -k1,1 hg38.chrom.sizes > sorted_hg38.chrom.sizes
sort -k1,1 -k2,2n file.bedgraph > sort_file.bedgraph
sort -k1,1 -k2,2n SRRT.bed > sort_SRRT.bed
python mountainClimberTU.py -b sort_file.bedgraph -j sort_SRRT.bed -s 0 -g sorted_hg38.chrom.sizes -o SRR950078_tu.bed
posted @ 2021-07-06 17:26  橙子牛奶糖  阅读(1754)  评论(1)    收藏  举报