Skip to content

Instantly share code, notes, and snippets.

@vidboda
Created April 8, 2019 11:06
Show Gist options
  • Save vidboda/13ccb064792642b0fb12d49b641ceef2 to your computer and use it in GitHub Desktop.
Save vidboda/13ccb064792642b0fb12d49b641ceef2 to your computer and use it in GitHub Desktop.
add chr to a vcf file
zcat file1.vcf.gz | awk -F"\t" '{if ($0 !~ /^#/) {print "chr"$0} else{print $0}}' | bgzip -c >file1chr.vcf.gz
@raonyguimaraes
Copy link

Thanks!

@GabyBG
Copy link

GabyBG commented Jan 20, 2021

MVP!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment