Changes

From Genome Analysis Wiki
Jump to navigationJump to search
Line 1: Line 1:  
== Introduction ==
 
== Introduction ==
 +
Main Workshop wiki page: [[SeqShop: December 2014]]
 +
 
See the [[Media:LASER-tutorial.pdf|tutorial slides]] for an introduction of the LASER analysis workflow, input/output file formats, and usage of the LASER software.
 
See the [[Media:LASER-tutorial.pdf|tutorial slides]] for an introduction of the LASER analysis workflow, input/output file formats, and usage of the LASER software.
    
The main purpose of this page is to provide step-by-step command lines for using LASER to estimate ancestry of 6 targeted sequenced samples (2 HapMap trios) in a principal component space generated using genome-wide SNP data from the Human Genome Diversity Project (HGDP). The HGDP reference panel contains genotype data across 632,958 autosomal loci for 938 individuals from 53 populations worldwide.
 
The main purpose of this page is to provide step-by-step command lines for using LASER to estimate ancestry of 6 targeted sequenced samples (2 HapMap trios) in a principal component space generated using genome-wide SNP data from the Human Genome Diversity Project (HGDP). The HGDP reference panel contains genotype data across 632,958 autosomal loci for 938 individuals from 53 populations worldwide.
   −
For more details about the options and usage of LASER, please read the [http://www.sph.umich.edu/csg/chaolong/LASER/LASER_Manual.pdf manual].
+
For more details about the options and usage of LASER, please read the [http://csg.sph.umich.edu//chaolong/LASER/LASER_Manual.pdf manual].
    
== LASER workflow ==
 
== LASER workflow ==
 
[[File:LASER-workflow.png|thumb|center|alt=LASER workflow|400px|LASER workflow]]
 
[[File:LASER-workflow.png|thumb|center|alt=LASER workflow|400px|LASER workflow]]
    +
 +
== HGDP reference panel ==
 +
[[File:HGDP Popualtions.png|thumb|center|alt=HGDP populations |400px|HGDP populations]]
    
== Setup in person at the SeqShop Workshop ==
 
== Setup in person at the SeqShop Workshop ==
Line 17: Line 22:        +
<div class="mw-collapsible mw-collapsed" style="width:600px">
 +
''If you are not already logged in, please expand this section.''
 +
<div class="mw-collapsible-content">
 
{{SeqShopLogin}}
 
{{SeqShopLogin}}
 +
</div>
 +
</div>
    
=== Setup your run environment===
 
=== Setup your run environment===
Line 24: Line 34:  
This will setup some environment variables to point you to
 
This will setup some environment variables to point you to
 
* Tutorial input files
 
* Tutorial input files
  source /home/chaolong/LASER-Tutorial/setup.txt
+
  source /net/seqshop-server/home/chaolong/LASER-Tutorial/setup.txt
 
* You won't see any output after running <code>source</code>
 
* You won't see any output after running <code>source</code>
 
** It silently sets up your environment
 
** It silently sets up your environment
Line 31: Line 41:  
What is in the setup.txt file:
 
What is in the setup.txt file:
 
<div class="mw-collapsible-content">
 
<div class="mw-collapsible-content">
  export GC=/home/mktrost/seqshop/gotcloud
+
  export GC=/net/seqshop-server/home/mktrost/seqshop/gotcloud
  export REF=/home/mktrost/seqshop/gotcloud/gotcloud.ref
+
  export REF=/net/seqshop-server/home/mktrost/seqshop/gotcloud/gotcloud.ref
  export HGDP=/home/chaolong/LASER-Tutorial/HGDP
+
  export HGDP=/net/seqshop-server/home/chaolong/LASER-Tutorial/HGDP
  export BAM=/home/chaolong/LASER-Tutorial/BAM
+
  export BAM=/net/seqshop-server/home/chaolong/LASER-Tutorial/BAM
  export LASER=/home/chaolong/LASER-Tutorial/LASER-2.01
+
  export LASER=/net/seqshop-server/home/chaolong/LASER-Tutorial/LASER-2.01
 
</div>
 
</div>
 
</div>
 
</div>
Line 61: Line 71:  
<li>Using bash (replace the paths below with the appropriate paths):</li>
 
<li>Using bash (replace the paths below with the appropriate paths):</li>
 
<div class="mw-collapsible-content">
 
<div class="mw-collapsible-content">
:<pre>export REF=$SS/ancestry/ref&#10;export HGDP=$SS/ancestry/HGDP&#10;export BAM=$SS/ancestry/bams</pre>
+
:<pre>export LASER=$OUT/ancestry/LASER-2.01&#10;export REF=$SS/ancestry/ref&#10;export HGDP=$SS/ancestry/HGDP&#10;export BAM=$SS/ancestry/BAM</pre>
 
</div>
 
</div>
 
</div>
 
</div>
Line 67: Line 77:  
<li>Using tcsh (replace the paths below with the appropriate paths):</li>
 
<li>Using tcsh (replace the paths below with the appropriate paths):</li>
 
<div class="mw-collapsible-content">
 
<div class="mw-collapsible-content">
:<pre>setenv REF $SS/ancestry/ref&#10;setenv HGDP $SS/ancestry/HGDP&#10;setenv BAM $SS/ancestry/bams</pre>
+
:<pre>setenv LASER $OUT/ancestry/LASER-2.01&#10;setenv REF $SS/ancestry/ref&#10;setenv HGDP $SS/ancestry/HGDP&#10;setenv BAM $SS/ancestry/BAM</pre>
 
</div>
 
</div>
 
</div>
 
</div>
Line 78: Line 88:  
Create a working directory:
 
Create a working directory:
   −
  mkdir $OUT/ancestry
+
  mkdir -p $OUT/ancestry
 
  cd $OUT/ancestry
 
  cd $OUT/ancestry
    
Download and decompress software package:
 
Download and decompress software package:
   −
  wget http://www.sph.umich.edu/csg/chaolong/LASER/LASER-2.01.tar.gz
+
  wget http://csg.sph.umich.edu//chaolong/LASER/LASER-2.01.tar.gz
 
  tar xzvf LASER-2.01.tar.gz
 
  tar xzvf LASER-2.01.tar.gz
      
== Preparing input files for LASER ==
 
== Preparing input files for LASER ==
Line 99: Line 108:  
This step uses samtools to generate pileup files from bam files.  
 
This step uses samtools to generate pileup files from bam files.  
   −
<div class="mw-collapsible mw-collapsed" style="width:500px">
+
<div class="mw-collapsible" style="width:500px">
 
In person at workshop notes:
 
In person at workshop notes:
 
<div class="mw-collapsible-content">
 
<div class="mw-collapsible-content">
Line 107: Line 116:  
</div>
 
</div>
   −
<div class="mw-collapsible" style="width:500px">
+
<div class="mw-collapsible mw-collapsed" style="width:500px">
 
Outside of the workshop notes:
 
Outside of the workshop notes:
 
<div class="mw-collapsible-content">
 
<div class="mw-collapsible-content">
Line 152: Line 161:  
LASER can perform principal components analysis (PCA) on genotype data of the reference panel to generate a reference ancestry space.
 
LASER can perform principal components analysis (PCA) on genotype data of the reference panel to generate a reference ancestry space.
   −
  # ./LASER-2.01/laser -g $HGDP/HGDP_938.geno -pca 1 -k 30 -o HGDP_938
+
  # $LASER/laser -g $HGDP/HGDP_938.geno -pca 1 -k 30 -o HGDP_938
    
The above command takes ~20 minutes to finish.  
 
The above command takes ~20 minutes to finish.  
Line 164: Line 173:  
Submit two jobs to place sequenced samples into the reference ancestry space:
 
Submit two jobs to place sequenced samples into the reference ancestry space:
   −
  ./LASER-2.01/laser -g $HGDP/HGDP_938.geno -c $HGDP/HGDP_938.RefPC.coord -s hapmap_trios.seq -K 20 -k 4 -x 1 -y 3 -o hapmap_trios.1-3 &
+
  $LASER/laser -g $HGDP/HGDP_938.geno -c $HGDP/HGDP_938.RefPC.coord -s hapmap_trios.seq -K 20 -k 4 -x 1 -y 3 -o hapmap_trios.1-3 &
  ./LASER-2.01/laser -g $HGDP/HGDP_938.geno -c $HGDP/HGDP_938.RefPC.coord -s hapmap_trios.seq -K 20 -k 4 -x 4 -y 6 -o hapmap_trios.4-6 &
+
  $LASER/laser -g $HGDP/HGDP_938.geno -c $HGDP/HGDP_938.RefPC.coord -s hapmap_trios.seq -K 20 -k 4 -x 4 -y 6 -o hapmap_trios.4-6 &
    
The first job will process samples 1 to 3 and the second job will processed samples 4 to 6.  
 
The first job will process samples 1 to 3 and the second job will processed samples 4 to 6.  
Line 196: Line 205:  
Example R codes are available in ./LASER-2.01/plot/. Let's copy the folder to current working directory:
 
Example R codes are available in ./LASER-2.01/plot/. Let's copy the folder to current working directory:
   −
  cp -r ./LASER-2.01/plot/ ./
+
  cp -r $LASER/plot/ ./
    
Go to the plot folder and run the script to plot results:
 
Go to the plot folder and run the script to plot results:
Line 209: Line 218:  
We expect to see the following figure, in which 3 CEU samples cluster with HGDP Europeans and 3 YRI samples cluster with HGDP Africans:  
 
We expect to see the following figure, in which 3 CEU samples cluster with HGDP Europeans and 3 YRI samples cluster with HGDP Africans:  
 
[[File:Results_on_HGDP.png|thumb|center|alt=LASER results|400px|LASER results]]
 
[[File:Results_on_HGDP.png|thumb|center|alt=LASER results|400px|LASER results]]
 +
 +
 +
 +
== Return to Workshop Wiki Page ==
 +
Return to main workshop wiki page: [[SeqShop: December 2014]]
96

edits

Navigation menu