Skip to main content
. Author manuscript; available in PMC: 2011 Dec 2.
Published in final edited form as: Nat Protoc. 2011 Jun 2;6(6):870–895. doi: 10.1038/nprot.2011.328
> for(chr in chrs) {
# For each chromosome,
>  RTc = subset(RT, CHR == chr)
# Create subset of timing values in the chromosome
>  RSc = subset(RefSeq, CHR == chr)
# Create subset of RefSeq genes in the chromosome
>  cat(“Current chromosome: “, chr, “\n”)
# Output current chromosome to console
>  lspan = 300000/(max(RTc$POSITION)-min(RTc$POSITION))
# Set smoothing span
>  smLym1 = loess(RT$mLymphR1 ~ RT$POSITION, span = lspan)
# Smooth dataset 1
>  smLym2 = loess(RT$mLymphR2 ~ RT$POSITION, span = lspan)
# Smooth dataset 2
>  smLym3 = loess(RT$mLymphAve ~ RT$POSITION, span = lspan)
# Smooth dataset 3
>  Lym1 = predict(smLym1, RSc$TSS)
# Predict (interpolate) values at transcription start sites
>  Lym2 = predict(smLym2, RSc$TSS)
# Predict values for dataset 2
>  Lym3 = predict(smLym3, RSc$TSS)
# Predict values for dataset 3
>  ChrSm = data.frame(CHR=chr,POSITION= RSc$TSS, Lym1, Lym2, Lym3)
>  AllSm = rbind(AllSm, ChrSm)
# Combine information for all experiments/chromosomes
> }
# End for loop