Difference between revisions of "SeqShop: Ancestry On Your Own Genome, June 2014"
Line 48: | Line 48: | ||
Generate the plot: | Generate the plot: | ||
Rscript plotHGDP.r $HGDP/HGDP_938.RefPC.coord $OUT/ancestry/Sample_37224.laser.1.SeqPC.coord | Rscript plotHGDP.r $HGDP/HGDP_938.RefPC.coord $OUT/ancestry/Sample_37224.laser.1.SeqPC.coord | ||
+ | |||
+ | Take a look: | ||
+ | evince Results_on_HGDP.pdf & | ||
+ | |||
+ | |||
+ | ==Interested in looking just at European populations?== | ||
+ | === Step 1: bam --> pileup === | ||
+ | You can skip this, you already did it. | ||
+ | |||
+ | === Step 2: pileup --> seq === | ||
+ | |||
+ | python $LASER/pileup2seq/pileup2seq.py \ | ||
+ | -m $HGDP/HGDP.633K.euro.site \ | ||
+ | -o $OUT/ancestry/$SAMPLE.Euro.laser \ | ||
+ | $OUT/ancestry/Sample_37224.recal.pileup | ||
+ | |||
+ | This step takes just a few seconds. | ||
+ | |||
+ | === Estimate ancestry === | ||
+ | This step will take a few seconds. | ||
+ | |||
+ | $LASER/laser -g $HGDP/HGDP.633K.euro.geno -c $HGDP/HGDP.633K.euro.RefPC.coord -s $OUT/ancestry/$SAMPLE.Euro.laser.seq -K 20 -k 4 -M 0.8 -o $OUT/ancestry/$SAMPLE.Euro.laser.1 & | ||
+ | |||
+ | View the results: | ||
+ | less -S $OUT/ancestry/${SAMPLE}.Euro.laser.1.SeqPC.coord | ||
+ | |||
+ | == Visualizing Ancestry == | ||
+ | Copy the R code to plot your ancestry | ||
+ | cp -r $LASER/plot/ $OUT/ancestry/. | ||
+ | |||
+ | Change to that new directory: | ||
+ | cd $OUT/ancestry/plot | ||
+ | |||
+ | Move your other plot so you don't over-write it | ||
+ | mv Results_on_HGDP.pdf Results_on_HGDP_All.pdf | ||
+ | |||
+ | |||
+ | Generate the plot: | ||
+ | Rscript plotHGDP.r $HGDP/HGDP.633K.euro.RefPC.coord $OUT/ancestry/${SAMPLE}.Euro.laser.1.SeqPC.coord | ||
Take a look: | Take a look: | ||
evince Results_on_HGDP.pdf & | evince Results_on_HGDP.pdf & |
Revision as of 11:52, 20 June 2014
Login to the seqshop-server Linux Machine
This section will appear redundantly in each session. If you are already logged in or know how to log in to the server, please skip this section
- Login to the windows machine
- The username/password for the Windows machine should be written on the right-hand monitor
- Start xming so you can open external windows on our Linux machine
- Start->Enter "Xming" in the search and select "Xming" from the program list
- Nothing will happen, but Xming was started.
- Open putty
- Start->Enter "putty" in the search and select "PuTTY" from the program list
- Configure PuTTY in the PuTTY Configuration window
- Host Name:
seqshop-server.sph.umich.edu
- Setup to allow you to open external windows:
- In the left pannel: Connection->SSH->X11
- Add a check mark in the box next to
Enable X11 forwarding
- Click
Open
- If it prompts about a key, click
OK
- Enter your provided username & password as provided
You should now be logged into a terminal on the seqshop-server and be able to access the test files.
- If you need another terminal, repeat from step 3.
Login to the seqshop Machine
So you can each run multiple jobs at once, we will have you run on 4 different machines within our seqshop setup.
- You can only access these machines after logging onto seqshop-server
3 users logon to:
ssh -X seqshop1
3 users logon to:
ssh -X seqshop2
2 users logon to:
ssh -X seqshop3
2 users logon to:
ssh -X seqshop4
Setup
Set these values. If you used a different path for any of these, please update here. Also, be sure to specify your sample name instead of Sample_XXXXX
source /home/mktrost/seqshop/setup.2x.txt export SAMPLE=Sample_XXXXX
OUT needs to point to where your alignment output went, so if your output is not ~/personal/output, please set OUT appropriately:
export OUT=~/personal/YOUR_OUTPUT_DIR
Verify that this does not give an error:
ls $OUT/bams/${SAMPLE}.recal.bam
Run
Step 1: bam --> pileup
$GC/bin/samtools mpileup -q 30 -Q 20 -f $REF/hs37d5.fa -l $HGDP/HGDP_938.bed $OUT/bams/${SAMPLE}.recal.bam > $OUT/ancestry/${SAMPLE}.recal.pileup
This step takes 5-6 minutes.
Step 2: pileup --> seq
python $LASER/pileup2seq/pileup2seq.py \ -m $HGDP/HGDP_938.site \ -o $OUT/ancestry/$SAMPLE.laser \ $OUT/ancestry/Sample_37224.recal.pileup
This step takes just a few seconds.
Estimate ancestry
This step will take about 5-6 minutes.
$LASER/laser -g $HGDP/HGDP_938.geno -c $HGDP/HGDP_938.RefPC.coord -s $OUT/ancestry/$SAMPLE.laser.seq -K 20 -k 4 -M 0.8 -o $OUT/ancestry/$SAMPLE.laser.2 &
View the results:
less -S $OUT/ancestry/Sample_37224.laser.1.SeqPC.coord
Visualizing Ancestry
Copy the R code to plot your ancestry
cp -r $LASER/plot/ $OUT/ancestry/.
Change to that new directory:
cd $OUT/ancestry/plot
Generate the plot:
Rscript plotHGDP.r $HGDP/HGDP_938.RefPC.coord $OUT/ancestry/Sample_37224.laser.1.SeqPC.coord
Take a look:
evince Results_on_HGDP.pdf &
Interested in looking just at European populations?
Step 1: bam --> pileup
You can skip this, you already did it.
Step 2: pileup --> seq
python $LASER/pileup2seq/pileup2seq.py \ -m $HGDP/HGDP.633K.euro.site \ -o $OUT/ancestry/$SAMPLE.Euro.laser \ $OUT/ancestry/Sample_37224.recal.pileup
This step takes just a few seconds.
Estimate ancestry
This step will take a few seconds.
$LASER/laser -g $HGDP/HGDP.633K.euro.geno -c $HGDP/HGDP.633K.euro.RefPC.coord -s $OUT/ancestry/$SAMPLE.Euro.laser.seq -K 20 -k 4 -M 0.8 -o $OUT/ancestry/$SAMPLE.Euro.laser.1 &
View the results:
less -S $OUT/ancestry/${SAMPLE}.Euro.laser.1.SeqPC.coord
Visualizing Ancestry
Copy the R code to plot your ancestry
cp -r $LASER/plot/ $OUT/ancestry/.
Change to that new directory:
cd $OUT/ancestry/plot
Move your other plot so you don't over-write it
mv Results_on_HGDP.pdf Results_on_HGDP_All.pdf
Generate the plot:
Rscript plotHGDP.r $HGDP/HGDP.633K.euro.RefPC.coord $OUT/ancestry/${SAMPLE}.Euro.laser.1.SeqPC.coord
Take a look:
evince Results_on_HGDP.pdf &