Changes

From Genome Analysis Wiki
Jump to navigationJump to search
439 bytes added ,  07:55, 5 August 2011
Line 15: Line 15:  
<source lang="bash">
 
<source lang="bash">
 
awk '{ if ($1 == "M") print $2; }' < chr1.dat > chr1.snps
 
awk '{ if ($1 == "M") print $2; }' < chr1.dat > chr1.snps
mach1 -d chr1.dat -p chr1.ped --rounds 20 --states 200 --phase --interim 5 --sample 5 --prefix chr1.haps
+
mach1 -d chr1.dat -p chr1.ped --rounds 20 --states 200 --phase --prefix chr1.haps
minimac --refHaps 1000genomes.chr1.haps.gz  --refSnps 1000genomes.chr1.snps --haps chr1.haps --snps chr1.snps  --rounds 5 --states 200 --prefix imputation-results
+
minimac --refHaps 1000genomes.chr1.haps.gz  --refSnps 1000genomes.chr1.snps --haps chr1.haps.gz --snps chr1.snps  --rounds 5 --states 200 --prefix imputation-results
 
</source>
 
</source>
    
These commands would haplotype (with MaCH) and then impute (with Minimac) an entire chromosome. While the process works, it can be rather time consuming for large chromosomes and large numbers of individuals. ChunkChromosome allows the process to be streamlined by running different portions of each chromosome in parallel.
 
These commands would haplotype (with MaCH) and then impute (with Minimac) an entire chromosome. While the process works, it can be rather time consuming for large chromosomes and large numbers of individuals. ChunkChromosome allows the process to be streamlined by running different portions of each chromosome in parallel.
 +
 +
<source lang="bash">
 +
ChunkChromosome -d chr1.dat
 +
 +
# Phase each chunk in parallel
 +
foreach chunk (chunk*-chr1.dat)
 +
  mach1 -d $chunk -p chr1.ped --rounds 20 --states 200 --phase --prefix ${chunk:r}.haps &
 +
end
 +
 +
# Impute each chunk in parallel
 +
foreach chunk (chunk*-chr1.dat)
 +
  minimac --refHaps 1000genomes.chr1.haps.gz  --refSnps 1000genomes.chr1.snps --haps ${chunk:r}.haps.gz --snps ${chunk:r}.snps  --rounds 5 --states 200 --prefix ${chunk:r}-results
 +
end
    
== Download ==
 
== Download ==

Navigation menu