Changes

From Genome Analysis Wiki
Jump to navigationJump to search
Line 174: Line 174:  
</source>
 
</source>
   −
A modified script, using [[ChunkChromosome]] would look like this:
+
A modified script, using [[ChunkChromosome]] would look like this (chr:pos GWAS SNP IDs):
    
<source lang="bash">
 
<source lang="bash">
Line 206: Line 206:     
       minimac --refHaps $haps --refSnps $snps  --vcfReference  \
 
       minimac --refHaps $haps --refSnps $snps  --vcfReference  \
 +
              --haps ${chunk:r}.gz --snps ${chunk}.snps  --autoClip autoChunk-chr$chr.dat  \
 +
              --prefix ${chunk:r}.imputed >& ${chunk:r}-minimac.log &
 +
 +
  end
 +
 +
end
 +
wait
 +
 +
</source>
 +
 +
 +
Using [[ChunkChromosome]] would look like this (rs GWAS SNP IDs):
 +
 +
<source lang="bash">
 +
#!/bin/tcsh
 +
 +
@ length = 2500
 +
@ overlap = 500
 +
 +
# Estimate haplotypes for all individuals, in 2500 marker chunks, with 500 marker overhang
 +
foreach chr (`seq 1 22`)
 +
 +
  ChunkChromosome -d chr$chr.dat -n $length -o $overlap
 +
 +
  foreach chunk (chunk*-chr$chr.dat)
 +
 +
      mach -d $chunk -p chr$chr.ped --prefix ${chunk:r} \
 +
          --rounds 20 --states 200 --phase --sample 5 >& ${chunk:r}-mach.log &
 +
 +
  end
 +
 +
end
 +
wait
 +
 +
# Impute into phased haplotypes
 +
foreach chr (`seq 1 22`)
 +
 +
  foreach chunk (chunk*-chr$chr.dat)
 +
 +
      set haps = /data/1000g/hap/all/20101123.chr$chr.hap.gz
 +
      set snps = /data/1000g/snps/chr$chr.snps
 +
 +
      minimac --refHaps $haps --refSnps $snps  --vcfReference  --rs --snpAliases dbsnp134-merges.txt.gz \
 
               --haps ${chunk:r}.gz --snps ${chunk}.snps  --autoClip autoChunk-chr$chr.dat  \
 
               --haps ${chunk:r}.gz --snps ${chunk}.snps  --autoClip autoChunk-chr$chr.dat  \
 
               --prefix ${chunk:r}.imputed >& ${chunk:r}-minimac.log &
 
               --prefix ${chunk:r}.imputed >& ${chunk:r}-minimac.log &
550

edits

Navigation menu