VCFv4.0 specific functions
Usage : $vcf->parse_header_line(q[##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">]) $vcf->parse_header_line(q[reference=1000GenomesPilot-NCBI36]) Args : Returns :
About : A tool for merging VCFv4.0 records. The subroutine unifies the REFs and creates a mapping from the original haplotypes to the haplotypes based on the new REF. Consider the following example: REF ALT G GA GT G GT GA GT GAA GTC G G <DEL> my $map={G=>{GA=>1},GT=>{G=>1,GA=>1,GAA=>1},GTC=>{G=>1},G=>{'<DEL>'=>1}}; my $new_ref=$vcf->fill_ref_alt_mapping($map); The call returns GTC and $map is now G GA -> GTC GATC GT G -> GTC GC GT GA -> GTC GAC GT GAA -> GTC GAAC GTC G -> GTC G G <DEL> -> GTC <DEL> Args : Returns : New REF string and fills the hash with appropriate ALT or undef on error.
About : Makes REF and ALT alleles more compact if possible (e.g. TA,TAA -> T,TA) Usage : my $line = $vcf->next_data_array(); ($ref,@alts) = $vcf->normalize_alleles($$line[3],$$line[4]);
To install VCF, copy and paste the appropriate command in to your terminal.
cpanm
cpanm VCF
CPAN shell
perl -MCPAN -e shell install VCF
For more information on module installation, please visit the detailed CPAN module installation guide.