Skip to content

Instantly share code, notes, and snippets.

View danwiththeplan's full-sized avatar

Dan Jones danwiththeplan

View GitHub Profile
@danwiththeplan
danwiththeplan / vcf2gff.sh
Created October 31, 2012 19:55
Converts VCF (variant call format) files to .gff3 files suitable for annotating DNA. Not extensively tested.
#!/bin/bash
# script to convert .vcf file to .gff3 format
#set variables that do not vary across detected polymorphisms: name of the program used, and name of the reference sequence
software_type=$(cat $1| grep "##source="|cut -b 10-)
reference_sequence=$(cat $1| grep "##reference"|cut -b 13-)
#remove comment lines in .vcf file and pipe to a while loop