Changes between Version 4 and Version 5 of VCFAggregateScriptManual


Ignore:
Timestamp:
2014-09-17T13:42:16+02:00 (10 years ago)
Author:
jvelde
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • VCFAggregateScriptManual

    v4 v5  
    1010E.g. use
    1111
     12{{{
    1213export PATH=/Volumes/Users/Software/vcftools_0.1.10/bin/:/Volumes/Users/Software/tabix-0.2.6/:${PATH}
     14}}}
    1315
    1416Or a more permanent option (.bashrc file or so)
     
    2830== 1. Merge sample VCFs into one batch VCF ==
    2931
     32{{{
    3033vcf-merge CAR_*/*.vcf.sorted.filtered.gz | bgzip -c > merged.vcf.gz
     34}}}
    3135
    3236== 2. Create a summary VCF per batch ==
    3337
     38{{{
    3439vcf-fill-gtc.pl -vcfi merged.vcf.gz -vcfo stripped.vcf -ss -fv PASS -si -ll INFO > stripped.vcf.log
     40}}}
    3541
    3642''The option -ss  is crucial here: it removed all sample details.''
     
    6066A: The are some built-in options to help with this. For example:
    6167
    62  Prepare sample VCFs for one batch; e.g. CAR_Batch1_106Samples
    63  cd /Volumes/CardioKitVCFs/OriginalVCFs/CAR_Batch1_106Samples
    64  Fix missing '>' at the end of contig meta-data lines.
    65   perl -pi -e 's/(contig=<ID=[^>\n]+)$/$1>/' CAR_*/*.vcf
    66  Sort, filter on 'PASS', bgzip and index with tabix (vcftools will not work on uncompressed, unindexed VCF files.)
    67   for item in $(ls CAR_*/*.vcf); \
    68   do echo "Processing $item..."; \
    69   vcf-sort $item | vcf-annotate -H > $item\.sorted\.filtered; \
    70   bgzip $item\.sorted\.filtered; \
    71   tabix -p vcf $item\.sorted\.filtered\.gz; \
    72   done
     68Prepare sample VCFs for one batch; e.g. CAR_Batch1_106Samples
    7369
     70{{{
     71cd /Volumes/CardioKitVCFs/OriginalVCFs/CAR_Batch1_106Samples
     72}}}
     73
     74Fix missing '>' at the end of contig meta-data lines.
     75
     76{{{
     77perl -pi -e 's/(contig=<ID=[^>\n]+)$/$1>/' CAR_*/*.vcf
     78}}}
     79
     80Sort, filter on 'PASS', bgzip and index with tabix (vcftools will not work on uncompressed, unindexed VCF files.)
     81
     82{{{
     83for item in $(ls CAR_*/*.vcf); \
     84do echo "Processing $item..."; \
     85vcf-sort $item | vcf-annotate -H > $item\.sorted\.filtered; \
     86bgzip $item\.sorted\.filtered; \
     87tabix -p vcf $item\.sorted\.filtered\.gz; \
     88done
     89}}}