📜  bash 将 chr 添加到 vcf 的开头 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:51:38.558000             🧑  作者: Mango

代码示例1
# Example usage:
awk '{if($0 !~ /^#/) print "chr"$0; else print $0}' input.vcf
# This converts a vcf file with numeric genome coordinates to one with 
# chr in front of the chromosome number. 

# Note, this command does the opposite operation, if needed:
awk '{gsub(/^chr/,""); print}' input.vcf