Monday, November 12, 2012

botseq_hong_variant_calling.mk

# Run freebayes on bam files
#
.DELETE_ON_ERROR:

ROOT_DIR?=/ndata/botlabseq/seqshare
include ${ROOT_DIR}/src/config.mk
include ${ROOT_DIR}/src/hong_analysis/botseq_hong_mapping.mk

REFERENCE_INDEX?=${ROOT_DIR}/reference_genomes/saccharomyces_cerevisiae_s288c_saccer3/saccharomyces_cerevisiae_s288c_saccer3.fasta

HONG_VCF_DIR=${ROOT_DIR}/hong_analysis/vcf

HONG_VCF_FILES=$(addprefix ${HONG_VCF_DIR}/, $(patsubst %.bam,%.vcf,$(notdir ${HONG_SORTEDBAM_FILES})))

HONG_VCF_GZ_FILES=$(addsuffix .gz, ${HONG_VCF_FILES})
HONG_VCF_INDEX_FILES=$(addsuffix .tbi, ${HONG_VCF_GZ_FILES})

.DEFAULT_GOAL:=hongvcall
hongvcall: ${HONG_VCF_INDEX_FILES}

${HONG_VCF_DIR}:
        mkdir ${HONG_VCF_DIR}

.SECONDARY: ${HONG_VCF_FILES}
${HONG_VCF_FILES}: ${HONG_VCF_DIR}/%.vcf: ${HONG_MAPPED_BAM_DIR}/%.bam | ${HONG_VCF_DIR}
        ${FREEBAYES} --fasta ${REFERENCE_INDEX} --pooled $< > $@

${HONG_VCF_GZ_FILES}: ${HONG_VCF_DIR}/%.gz: ${HONG_VCF_DIR}/% 
        ${BGZIP} $<

${HONG_VCF_INDEX_FILES}: ${HONG_VCF_DIR}/%.tbi: ${HONG_VCF_DIR}/% 
        ${TABIX} $<
hongvctest:
        @echo ${HONG_VCF_INDEX_FILES}

Friday, November 9, 2012

Parse genetic variants from NGS data, sequenced qin-lab natural isolates


These shell script were written by Lance at the Princeton genome center.


batch code are in src/
mkdir -p /Volumes/BotlabSeq/hong_analysis/mapped_bam 
bwa aln -t 2 /Volumes/BotlabSeq/reference_genomes/saccharomyces_cerevisiae_s288c_saccer3/saccharomyces_cerevisiae_s288c_saccer3.fasta /Volumes/BotlabSeq/fastq/3-001_M1-2_lib1_read-1.fastq.gz > /Volumes/BotlabSeq/hong_analysis/mapped_bam/3-001_M1-2_lib1_read-1_aln_sa.sai
... ... 


#!/bin/bash

DIRECTORY=$(cd `dirname $0` && pwd)

ROOT_DIR=$(cd "${DIRECTORY}/../../../" && pwd)
STRAINS_FILE=${ROOT_DIR}/Sequencing_Consortium_Strains-MASTER.txt
FASTQ_DIR=${ROOT_DIR}/fastq
ORIGINAL_BAM_DIR=${ROOT_DIR}/original_bam

function process_batch {
    HONG_FASTQ_FILES=""
    ORIGINAL_BAM_FILES=""
    for strain in "${strain_batch[@]}"; do
        HONG_FASTQ_FILES+=`find "${FASTQ_DIR}" -name "$strain*.fastq.gz" | xargs echo`
        HONG_FASTQ_FILES+=" "
        HONG_ORIGINAL_BAM_FILES+=`find "${ORIGINAL_BAM_DIR}" -name "$strain*.bam" | xargs echo`
        HONG_ORIGINAL_BAM_FILES+=" "
    done
    export HONG_FASTQ_FILES
    echo $HONG_FASTQ_FILES
    export HONG_ORIGINAL_BAM_FILES
    echo $HONG_ORIGINAL_BAM_FILES
    echo "make -n -f ${DIRECTORY}/botseq_hong_mapping.mk -j 5"
    echo ""
}

strain_list=()
while IFS=$'\t' read -r -a fields
do
    genus_species=${fields[1]}
    individual_name=${fields[4]}
    number=${fields[11]}
    if [[ $number == 3-* ]]; then
        echo "$number $individual_name $genus_species - SELECTED"
        strain_list+=("$number")
    fi
done < $STRAINS_FILE

strain_batch=()
i=0
for strain in "${strain_list[@]}"; do
    strain_batch+=("$strain")
    i=$i+1
    if [[ $i -eq 10 ]]; then
        echo ${strain_batch[@]}
        process_batch
        strain_batch=()
        i=0
    fi
done
echo ${strain_batch[@]}
process_batch

exit

#${DIRECTORY}/botseq_lte_merge_bam.py > ${DIRECTORY}/botseq_combine_bam.mk
#make -f ${DIRECTORY}/botseq_combine_bam.mk -j 4




The mapped variant are in "vcf" files.

References
http://www.broadinstitute.org/igv/book/export/html/16
  File formats

http://vcftools.sourceforge.net/perl_module.html
  VCF perl tools

http://sourceforge.net/projects/samtools/files/tabix/


Monday, November 5, 2012

Wednesday, October 31, 2012

bio386, paper presentations

-----------
2012 Oct 31, Wed
Costanzo 2012 Science, genetic network -> Jasmine, 2012 Oct 31 PDF document
zotenko 2008 plos, essential hub genes -> Jessica, 2012 Oct 31 presentation

Monday, October 29, 2012

bio386, Dhami11, Gasch2000

------------
2012 Oct 29. Monday
Dhami 11 paper, Ella and Teneisha, 2012 Oct 29.

Gasch 2000 paper, Khayla and Asha, 2012 Oct 29
 Clustering exercise
 CV calculation

Saturday, September 1, 2012

bio386 fall 2012 log

------------
2012 Oct 29. Monday
Dhami 11 paper, Ella and Teneisha, 2012 Oct 29.

Gasch 2000 paper, Khayla and Asha, 2012 Oct 29
 Clustering exercise
 CV calculation

-------
2012 Oct 24 Wed.
inclass self-paced moodle quiz on qin's research proposal.
------------
2012 Oct 22 Monday
 review exam
Read DNA microarray wikipedia entry:
  http://en.wikipedia.org/wiki/DNA_microarray

read Qin's proposal
read Gasch paper, presentation
what is robustness? how to measure them?

--------------
2012 Oct 17 Wed, midterm exam, collaborative part
em: permutaiton on gIN

--------
3 days, intro to cellular aging and research
---------------------
2012 Oct 10.
 yeast aging presentation to m0 and G formula.

 take-home exam, due Oct 17 Wed before class. 1) permutation on genetic network 2) compare yeast gNet and PIN: are there correlation between genetic interactions and protein interactions?

 review genetic network assignment
 student presentations (Dhami paper, Newman paper)

--------
2012 Oct 8.
 intro to yeast aging.
    (aging, gompertz model, dS/dt = slope, non-aging)
    RLS, CLS
 figure 3B.

-----
2012 Oct 3, Wed
  match slides

  Figure 2
  partial regression demo, age, shoesize, readingability

  Permutation
  homework on figure 3B.
-----

quiz on Wed to see whether Fraser paper data can be loaded to R and first few lines can be ran.
set up dropbox accounts:

-----
2012 Sep 26 Wed
summary key points
  Ka, Ks, poistive, negative, neutral selection
  pairwise interaction -> network
  yeast ORF names
  competive growth fitness measures (using bar codes)
  use table to counter protein interactions
  data.frames

  match

For review and quiz, load genetic interaction data into R.
convert ORF to letters.

----------
2012 Sep 24, Mon
 discussion of Fraser Science paper

Some key ponts:

Protein interaction network
For Fig 1:
connectivity = number of interactions per gene
evolution rate =K
linear regression
For Fig 2: causal relationships (daycare example), multiple regression
For Fig 3: null distribution and p-value; permutation

Key messages:
 science paper is not a big deal
 how to read a scientific paper
 how to interpret figures
 p-value and null distribution

----------
2012 Sep 19, Wed
 ***collaborative exam, student demo and exercise on screen. This method works well!
-----------
2012 Sep 17, Mon
 exercises and reviews
 go over exam1
-------------
2012 Sep 12 Wed
  2.exericse
  function on make solution
  give home work
  input out,
 summary, leave homework, quiz on Monday.

---------------
=>2012 Sep 10, Mon
  quiz on daycare score again
  basic programming concepts: loops, conditions, functions.
---------------
=>2012 Sep 5, Wed
  Quiz on salary.R
  Homework on fraser paper
  salary.R 
  review new learnings. regression, t.test(), p-value.
  homework is requested.
//
-------------------
=>2012 August 29, Wed
  quiz: a list of values (0.1, 0.01, 0.001), take log
  irb signature: ella
  salary example. socratice method, working on it, the ask questions.
  give review guide.

skills and functions to cover:
str, read.table(), pick columns, pick rows, pick rows and columns,
hist
table() #how many female ‘Arts’ faculty
#how many female ‘Assistant’, ‘Associate’, and ‘Full’ professors
//

-------------------
=>2012 August 27, Mon
  welcome new comers
  simple.R takes 2 hours
//

-------------------
=> 2012 Aug 22, Wed
x irb signature
x go over syllabus, writing milestones, previous grades,
x pre-survey
* foucs on why computing for biology majors (four students just come to class for no reasons without computing backgrounds)
 googleDoc to work on list of reasons for biology majors to learn programming and computing concepts and skills
using cards to explain computational thinking and search space

Reasons why biology major should learn programming and computing
    Learning programming skills and computational thinking offers a key set of problem solving skills.
    genomics medicine
    highlights on resumes when applying for medical school or graduate schools
    more competitive for jobs
    Another useful language
    Computing holds the key to understand complicated biology phenomena.
    Further understanding of genomic dynamics of emerging pathogens and diseases
    To use computer storage and other programs to study the biological data and maps of the human genome sequence
    Updated on new technology
    Understanding programming and computing can aid in drug discovery
    Aids in conducting research projects

How to find out a missing card from a stack? (A key concept is search space)
Plan A: count card one by one. Search space is 52 possibilities.
Plan B: separate into sets and colors
Question: What are the key differences between these two search plans?
Answers: Random data versus organized (structured) data

* I should ask students to introduce themselves.

Tuesday, August 21, 2012

20120821 DHE DHR BY4743 H2O2

During Clibur measure, we measured blanks, DHE, DHR, and DHEDHR, and "on" for overnight DHR signals. The overnight DHR sample were basically left in the dark at room temperature (as I recall).





Wednesday, February 22, 2012

Tuesday, January 10, 2012

bio386, spring 2012 log

-> exam question: yeast gene in FASTA format, calculate its length, find out
 mean ORF length.



partion H2O2-LOH data to bio320 classes for assignment

Exam 2-> deg factor on salary


-> bayesian network modeling?
-> bio320 projects: story paper, morphology, expression; wynter gwa study; realibility simulation and threshold trait;


=> 2012 Feb 21
 Dropbox account creation for projects
 Levy's presentation and explanation of data;
 Go over research projects;
 Pubmed and Google scholar search to find the most recent protein interaction network data in S. cerevisiae.


=>2012 Jan 26, 3.zip. The exercises take the entire class,

=>2012 Jan 23Tue discuss my MRI proposal

=>2012 Jan 19Thu
 proofread an NSF proposal. 5 students, working 3 groups. 5 pages per group.
//

=> Jan 17, 2012 Tues
work through salary example. R2 and p-value take a long time.
One students ask for open-ended qustions. I asked them study
'deg' effect on 'salary', 'gender', and 'rank'.


=> Jan 12, 2012 Thursday
survey
hp laptops usages
Moodle site
go over syllabus, writing milestones
previous student projects, and posters
install R, Rstudio, notepad++,
worked on simple.R
assignment: watch youtube videos, 1st ppt, salary.R