Include Page | ||||
---|---|---|---|---|
|
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:
- All “% ; , = &” in REF, ALT, FILTER, INFO, FORMAT, SAMPLE are uri escaped during mapping.
- The ID tag is always added unless the ID in VCF is ".".
- If FORMAT, SAMPLE columns are present in VCF, the FORMAT, SAMPLE tags are added.
- The $sample consists of all samples separated by “,”.
Author
Zhenyuan Lu
Cold Spring Harbor Laboratory
luj@cshl.edu