Friday, October 9, 2015

*** h2, heritability

http://content.csbs.utah.edu/~rogers/ant5221/lecture/QTs2.pdf






See also 


My R code on h2

set.seed(2015)
N=1E3
genotype_elements = c(-1,0,1)
#genotype_elements = rnorm(N)
error = rnorm(N)
tb = data.frame(error)
tb$g1 = sample(genotype_elements, N, replace=T)
h2 = 0.5
tb$phynotype = sqrt(h2)*tb$g1 + sqrt(1-h2)*tb$error
summary(lm(tb$phynotype ~ tb$g1))

tb$g2 = sample(genotype_elements, N, replace=T)
h2 = 1/10
tb$phynotype = sqrt(h2)*tb$g1 + sqrt(h2)*tb$g2+ sqrt(1-2*h2)*tb$error
summary(lm(tb$phynotype ~ tb$g1 + tb$g2))

h2 = 1/10
tb$g3 = sample(genotype_elements, N, replace=T)
tb$phynotype = sqrt(h2)*tb$g1 + sqrt(h2)*tb$g2 + sqrt(h2)*tb$g3 + sqrt(1-2*h2)*tb$error
summary(lm(tb$phynotype ~ tb$g1 + tb$g2 + tb$g3))
summary(lm(tb$phynotype ~ tb$g1 ))
summary(lm(tb$phynotype ~ tb$g2 ))
summary(lm(tb$phynotype ~ tb$g3 ))






NSF proposal guideline



Use one of the following typefaces identified below:
  • Arial10, Courier New, or Palatino Linotype at a font size of 10 points or larger;
  • Times New Roman at a font size of 11 points or larger; or
  • Computer Modern family of fonts at a font size of 11 points or larger.
  •  

Thursday, October 8, 2015

Precision medicine initative cohort



http://www.nih.gov/precisionmedicine/09172015-pmi-working-group-report.pdf

bio233, 20151008Thu Ecoli genome investigation in R

2:30-3:20pm. short class. Using R code to analyze E coli K12 genome.
Ask students to work in pairs. Several students said, "We like this exercise."

Youtube:  https://youtu.be/UeUVSxnK8qo

R Code:
source("http://bioconductor.org/biocLite.R")
biocLite('seqinr')
require(seqinr)

# Change working direcotry to the current folder
list.files()

seqs = read.fasta(file="EcoliK12.fna")
# seqs = seqs[[1:3]]
str(seqs);

# look at the first sequence
seq1 = seqs[[789]]
getName(seqs[[789]])
table( seq1 ); #nucleotide composition
GC(seq1);  # GC content
  
# now, try to find name and GC content for 865th gene.

# a loop for all sequences 
num = 1:length(seqs); #these are storages for later use
gc  = 1:length(seqs); # gc = num; 
out = data.frame( cbind( num, gc ) );

for( i in 1:length(seqs) ) {
  out$gene_name = getName( seqs[[i]] )
  out$gc[i] = GC( seqs[[i]] );
}
head(out)

write.csv(out, "gc.csv", row.names=F) # output the results

#### now, calculate the length of each gene
num = 1:length(seqs);
out2 = data.frame( cbind( num) );
for( i in 1:length(seqs) ) {
  out2$name[i] = getName( seqs[[i]] )
  out2$len[i] = length( seqs[[i]] );  
  out2$gc[i] = GC( seqs[[i]] );
}
out2;

write.csv(out2, "gc2.csv", row.names=F) # output the results

prot = translate( seqs[[999 ]])
length(prot)
prot
table(prot)

# now, find the protein length  for 1005th gene

#### now, translate the ORF into proteins
num = 1:length(seqs);
out3 = data.frame( cbind( num) );
for( i in 1:length(seqs) ) {
  out3$name[i] = getName( seqs[[i]] )
  out3$ORFLen[i] = length( seqs[[i]] );  
  prot = translate( seqs[[i ]])
  length(prot)
  out3$ProtLen[i] = length( prot)  
}
out3;
write.csv( out3, "gc-prot.csv")

Tuesday, October 6, 2015

bio233, Tue, serial dilution data analysis for hemocytometer

Led 20 students download and install R and Rstudio.
Then run sample R code to analyze the class data on hemocytometer.

=> Problems:
-> Many students did not ZIP file and how to extract them. On windows computer, the R code can be openned directly using Rstudio, but now xlsx or csv files.
-> R package 'xlsx' lead to runtime error on Yosemite Rstudio.  I had to convert xlsx to csv files for these students to run the codes.  Lessons: Simple methods are always safer than fancier ways in classrooms. 

=> Solutions
-> I went step-by-step on screen, and make sure most students caught up.
-> I ask students who finished the steps to help students that were stuck.

JC HHMI project,

30 mintues to save documents and turn off applications on student's frezon laptop

15 minutes on Github account

todo Github clone  https://github.com/hongqin/mactower-network-failure-simulation
R code and PPT of past materials.




Monday, October 5, 2015

*** (in progress) bio233, serial dilution lab.

20150928Monday, streak DBY1394, box 1, I1 to YPD plate. 30C O/N. DBY1394 grew relatively slower than wild isolates.

20150930Wed, Pick colonies for growth in 5ml YPD, 30C O/N in 10ml falcon tube. (Cell precipated at the bottom).



  Made fresh YPD plates, 20% glucose.

20151001Thu. 5pm. Added 1ml of overnight grown culture into 10 ml of YPD in large glass tube. 30C shaker.  A total of 4 tubes were prepared.

Friday, expand to 4 more large glass tubes

20151005 Monday
1pm:  mix all tubes and do serial dilutions. I prepared 9 groups, but only 6 group actually formed.

2pm, bio233 lab. I did not do a demo for the class, and many mistakes happened.
1) many student put pipetman deep into glass culture tubes, and bunsen burners were not turned on.
2) many students did not know which pipetman to use for what volumes.
3) some students forgot to put cover skips on hemocytomers.
4) some students put glassbeads onto their gloved hands and then to plates.
5) many students did vortex their samples before put them on YPD plates.

3:45pm. Students put their number into master googleDoc sheet.

Items:
10 sets of pipettman. P1000, P200, P20. tips.  YPD plates.  Nutrient plates. Glass beads. Hemocytometer. Tally counters.


Reference:
http://hongqinlab.blogspot.com/2014/02/bio233-lab-serial-dilution-feb-26-2014.html
http://hongqinlab.blogspot.com/2014/10/bio233-20131006-serial-dilution-loh.html


references for 2-credits bioinformatics course


Genomics Medicine Gets Personal, EdX
https://courses.edx.org/courses/course-v1:GeorgetownX+MEDX202-01+2015_3T/courseware/83df4b53f2d444a38a90558b5c639711/aa544225cd604b689f7e421c90a624fe/

https://www.coursera.org/courses/?query=bioinformatics
https://www.coursera.org/specializations/bioinformatics


Introduction to Bioinformatics 4th Edition, Arthur Lesk


Bioinformatics for biologists, 
http://www.amazon.com/Bioinformatics-Biologists-Pavel-Pevzner/dp/1107648874/ref=sr_1_8?s=books&ie=UTF8&qid=1443631856&sr=1-8&keywords=bioinformatics&refinements=p_n_feature_nine_browse-bin%3A3291437011%2Cp_72%3A1250221011

Thursday, October 1, 2015

HU experiment changes, bio125

* HU+ cell left in water after day 1.  HU- cells left in SD media to avoid water induced G1 arrest.

* Add antibiotics to the media to avoid bacteria growth.



bio233, chapter 5, growth (part 1)

Class started 10 mintues later.

Students worked on two problems.

1) Growth curve problem.
For the slope and intercept, one student volunteered to solve the problem on the board.
For generation calculation, I asked two students to work on the board. Most students can reach
 N = N0 * 2^n.  However, most did not know how to solve for "n".

2) Hemocytometer problem.
I let students read the manual of Hausser bright line hemocytomer counter.




bio386 20151001Thu midterm exam released

Released midterm exam. Found the keys were somehow released as well, luckily I correct the error before most students downloaded the files.

I then let students worked on practical problems.