Answers for "bash add chr to beginning of vcf"

1

bash add chr to beginning of vcf

# 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
Posted by: Guest on October-10-2020

Code answers related to "bash add chr to beginning of vcf"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language