awk 中 实现染色体编号的批量替换
chrom_map["23"] = "NC_056076.1"
chrom_map["24"] = "NC_056077.1"
chrom_map["25"] = "NC_056078.1"
chrom_map["26"] = "NC_056079.1"
chrom_map["X"] = "NC_056080.1"
chrom_map["Y"] = "NC_082741.1"
chrom_map["MT"] = "NC_001941.1"
}
# 对每一行进行处理
{
# 提取染色体编号和其余部分
chrom = $1
rest = $2 "\t" $3
# 如果染色体编号在映射关系中,则替换为对应的 RefSeq ID
if (chrom in chrom_map) {
chrom = chrom_map[chrom]