TITLE: VEPextended
AUTHORS: Israel Aguilar Ordoñez

[DESCRIPTION]
<div class = "text-blocks"><div class = "text-block">'VEPextended' is a tool, implemented in Nextflow, that annotates called variants using Variant Effect Predictor (VEP) and additional plugins that implement functionalities, that are not included in variation API.</div><div class = "text-block">All steps described are mk modules of code that will be done automatically through Nextflow pipeline. </div></div>

[STEPS]
?. [Pre-processing]
Filter VCFRemove the variants that did not have any copy of the alternative allele.Dependencies:
a) Filter and remove when there was not an alternative allele in the VCF file.vcf.gz, to only conserve found variants.b) Compress the filtered file using one thread for compression.c) Make and index output file using the filtered and compressed file.
?. [Pre-processing]
Extract chromosomesExtract variants per chromosome vcf file that have at least one variant.Dependencies:
a) Using the index of the compressed vcf file, list the chromosomes names.b) If there is at least one variant per chromosome, separate variants per chromosome.
?. [Pre-processing]
Split chromosomesSplit in chunks a vcf file, keeping its format.Dependencies:
a) Save the header of a vcf in a temporary file.b) Save the body of a vcf in a temporary file.c) Make chunks of the body of the vcf file.d) Add the header to each body chunk.
?. [Core-processing]
Untangle multiallelicSplit multiallelic sites.Dependencies:
a) Separate multiallelic sites and conserve vcf format.b) Do not print bcftools version.
?. [Core-processing]
Annotate rsIDAnnotate rsID to each variant in ID column of a VCF.Dependencies:
a) Make a Reference file with a define range.b) Compress input file.c) Annotate rsID in the compressed input file using a Reference.
?. [Core-processing]
Vep ExtendedAnnotate variants with Variant Effector Predictor tool (VEP). For more information about, seeVEPDependencies:
?. [Pos-processing]
Rejoin chromosomesConcatenate annotated chunks in a single vcf file.Dependencies:Final Output:##fileformat=VCFv4.2 #CHROM	POS	ID	REF	ALT	AC	AN	DP	AF_mx	nhomalt_mx	Allele	Consequence	IMPACT	SYMBOL	Gene	Feature_type	Feature	BIOTYPE	EXON	INTRON	HGVSc	HGVSp	cDNA_position	CDS_position	Protein_position	Amino_acids	Codons	Existing_variation	DISTANCE	STRAND	FLAGS	VARIANT_CLASS	SYMBOL_SOURCE	HGNC_ID	CANONICAL	TSL	APPRIS	CCDS	ENSP	SWISSPROT	TREMBL	UNIPARC	SOURCE	GENE_PHENO	SIFT	PolyPhen	DOMAINS	HGVS_OFFSET	HGVSg	AF	AFR_AF	AMR_AF	EAS_AF	EUR_AF	SAS_AF	AA_AF	EA_AF	gnomAD_AF	gnomAD_AFR_AF	gnomAD_AMR_AF	gnomAD_ASJ_AF	gnomAD_EAS_AF	gnomAD_FIN_AF	gnomAD_NFE_AF	gnomAD_OTH_AF	gnomAD_SAS_AF	MAX_AF	MAX_AF_POPS	CLIN_SIG	SOMATIC	PHENO	PUBMED	MOTIF_NAME	MOTIF_POS	HIGH_INF_POS	MOTIF_SCORE_CHANGE	GeneHancer_type_and_Genes	gnomADg	gnomADg_AC	gnomADg_AN	gnomADg_AF	gnomADg_DP	gnomADg_AC_nfe_seu	gnomADg_AN_nfe_seu	gnomADg_AF_nfe_seu	gnomADg_nhomalt_nfe_seu	gnomADg_AC_raw	gnomADg_AN_raw	gnomADg_AF_raw	gnomADg_nhomalt_raw	gnomADg_AC_afr	gnomADg_AN_afr	gnomADg_AF_afr	gnomADg_nhomalt_afr	gnomADg_AC_nfe_onf	gnomADg_AN_nfe_onf	gnomADg_AF_nfe_onf	gnomADg_nhomalt_nfe_onf	gnomADg_AC_amr	gnomADg_AN_amr	gnomADg_AF_amr	gnomADg_nhomalt_amr	gnomADg_AC_eas	gnomADg_AN_eas	gnomADg_AF_eas	gnomADg_nhomalt_eas	gnomADg_nhomalt	gnomADg_AC_nfe_nwe	gnomADg_AN_nfe_nwe	gnomADg_AF_nfe_nwe	gnomADg_nhomalt_nfe_nwe	gnomADg_AC_nfe_est	gnomADg_AN_nfe_est	gnomADg_AF_nfe_est	gnomADg_nhomalt_nfe_est	gnomADg_AC_nfe	gnomADg_AN_nfe	gnomADg_AF_nfe	gnomADg_nhomalt_nfe	gnomADg_AC_fin	gnomADg_AN_fin	gnomADg_AF_fin	gnomADg_nhomalt_fin	gnomADg_AC_asj	gnomADg_AN_asj	gnomADg_AF_asj	gnomADg_nhomalt_asj	gnomADg_AC_oth	gnomADg_AN_oth	gnomADg_AF_oth	gnomADg_nhomalt_oth	gnomADg_popmax	gnomADg_AC_popmax	gnomADg_AN_popmax	gnomADg_AF_popmax	gnomADg_nhomalt_popmax	gnomADg_cov	gwascatalog	gwascatalog_GWASC_trait	gwascatalog_GWASC_pvalue	gwascatalog_GWASC_study	clinvar	clinvar_CLNDN	clinvar_CLNSIG	clinvar_GENEINFO	clinvar_CLNDISDB	miRBase	pharmgkb_drug	pharmgkb_drug_PGKB_annid	pharmgkb_drug_PGKB_gene	pharmgkb_drug_PGKB_chem	pharmgkb_drug_PGKB_phencat chr22	16132524	.	G	C	27	156	1962	0.173	3	C	intergenic_variant	MODIFIER	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	SNV	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	chr22:g.16132524G>C	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	. chr22	27840687	.	G	T	69	156	2311	0.442	18	T
VCF file with only variants of each chromosome from the input.Example line(s):