Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Include Page
docs:_DE_archived_apps_blurb
docs:_DE_archived_apps_blurb

Name and Description

vcf_to_gff.pl - converts a VCF file into a GFF3 file

Basic Use

vcf_to_gff.pl -i INFILE [-o OUTFILE] [-s SOURCE] [-t TYPE]

Options

[-i INFILE] = VCF input file, default is STDIN.
[-o OUTFILE] = GFF3 output file, default is STDOUT.
[-s SOURCE] = source column in GFF3, default is vcf or source meta field.
[-t TYPE] = type column in GFF3, default is sequence_feature.

Mapping from VCF to GFF3

All the meta-information lines in VCF are printed directly as meta-info in GFF3.

...

Target GFF3 column

...

Source VCF column

...

Value (Value in Source VCF column COL as $col)

...

seqid

...

CHROM

...

$chrom

...

source

 

...

Default is "vcf". User can provide source through -source option.

...

type

 

...

Default is "sequence_feature". User can provide type through -type option.

...

start

...

POS

...

$pos

...

end

...

POS, REF

...

$pos+length($ref)-1

...

score

...

QUAL

...

$qual

...

strand

...

 

...

"."

...

phase

...

 

...

"."

...

annotations

...

ID, REF, ALT, FILTER, INFO,
FORMAT, SAMPLE

...

[ID=$id;]REF=$ref;ALT=$alt;FILTER=$filter;INFO=$info[;FORMAT=$format][;SAMPLE=$sample]
.

Note:

  1. All “% ; , = &” in REF, ALT, FILTER, INFO, FORMAT, SAMPLE are uri escaped during mapping.
  2. The ID tag is always added unless the ID in VCF is ".".
  3. If FORMAT, SAMPLE columns are present in VCF, the FORMAT, SAMPLE tags are added.
  4. The $sample consists of all samples separated by “,”.
Author

Zhenyuan Lu
Cold Spring Harbor Laboratory
luj@cshl.edu