Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

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
Source by www.biostars.org #
 
PREVIOUS NEXT
Tagged: #bash #add #chr #beginning #vcf
ADD COMMENT
Topic
Name
7+3 =