| 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 | 
                      
                        |  | 68 | Prepare sample VCFs for one batch; e.g. CAR_Batch1_106Samples | 
            
                  
                          |  | 70 | {{{ | 
                          |  | 71 | cd /Volumes/CardioKitVCFs/OriginalVCFs/CAR_Batch1_106Samples | 
                          |  | 72 | }}} | 
                          |  | 73 |  | 
                          |  | 74 | Fix missing '>' at the end of contig meta-data lines. | 
                          |  | 75 |  | 
                          |  | 76 | {{{ | 
                          |  | 77 | perl -pi -e 's/(contig=<ID=[^>\n]+)$/$1>/' CAR_*/*.vcf | 
                          |  | 78 | }}} | 
                          |  | 79 |  | 
                          |  | 80 | Sort, filter on 'PASS', bgzip and index with tabix (vcftools will not work on uncompressed, unindexed VCF files.) | 
                          |  | 81 |  | 
                          |  | 82 | {{{ | 
                          |  | 83 | for item in $(ls CAR_*/*.vcf); \ | 
                          |  | 84 | do echo "Processing $item..."; \ | 
                          |  | 85 | vcf-sort $item | vcf-annotate -H > $item\.sorted\.filtered; \ | 
                          |  | 86 | bgzip $item\.sorted\.filtered; \ | 
                          |  | 87 | tabix -p vcf $item\.sorted\.filtered\.gz; \ | 
                          |  | 88 | done | 
                          |  | 89 | }}} |