Question: Convert association data from gwas catalog to vcf format
0
gravatar for hsiaoyi0504
16 months ago by
hsiaoyi050450
Taiwan
hsiaoyi050450 wrote:

Hi there, I have a tsv file from GWAS-Catalog like this one in tsv format: ftp://ftp.ebi.ac.uk/pub/databases/gwas/releases/2018/11/05/gwas-catalog-associations_ontology-annotated.tsv

However, for many annotation tools, they require input data as vcf format. Therefore, I would like to convert those SNPs into vcf format. Is there any tools I can use to directly do that ?

snp gwas-catalog gwas vcf • 604 views
ADD COMMENTlink modified 16 months ago by Pierre Lindenbaum127k • written 16 months ago by hsiaoyi050450
1
gravatar for Pierre Lindenbaum
16 months ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum127k wrote:

use awk to generate a header and create the VCF field. Here is a basic script.

 wget -q -O - "ftp://ftp.ebi.ac.uk/pub/databases/gwas/releases/2018/11/05/gwas-catalog-associations_ontology-annotated.tsv" | awk -F '     ' 'BEGIN{printf("##fileformat=VCFv4.2\n#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\n");}/^DATE ADDED/{next}{printf("%s\t%s\t%s\tN\t.\t.\t.\t.\n",$12,$13,$37);}'

##fileformat=VCFv4.2
#CHROM  POS ID  REF ALT QUAL    FILTER  INFO
6   32251212    GCST001156  N   .   .   .   .
6   32441753    GCST001156  N   .   .   .   .
6   33075103    GCST001156  N   .   .   .   .
6   32623148    GCST001156  N   .   .   .   .
6   31039078    GCST001181  N   .   .   .   .
6   31125810    GCST001181  N   .   .   .   .
6   31168676    GCST001181  N   .   .   .   .
6   31440051    GCST001181  N   .   .   .   .
ADD COMMENTlink written 16 months ago by Pierre Lindenbaum127k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1919 users visited in the last hour