Skip to content

Instantly share code, notes, and snippets.

@cmdcolin
Last active February 19, 2016 17:24
Show Gist options
  • Save cmdcolin/2e0eb785d8fdca4aa9ac to your computer and use it in GitHub Desktop.
Save cmdcolin/2e0eb785d8fdca4aa9ac to your computer and use it in GitHub Desktop.
Modify the names on a VCF file in a streaming fashion, in this case, prepend the string "chr" to them
#!/bin/sh
bgzip -dc $1 | sed -e 's/^\([^#].*\)/chr\1/' | bgzip -c > `basename $1 .vcf.gz`.mod.vcf.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment