#####################
## LOAD YOUR DATA ###
#####################
### you would use:
# my.plants <- storing.inds(folder)
### where folder is the path where your samples are, i.e. "~/Documents"
### here we just load our example data
?my.plants
data(my.plants)
my.plants <- my.plants[1:2]
#######################
## MATCH YOU LADDER ###
#######################
### create a vector indicating the sizes of your ladder
my.ladder <- c(120, 125, 129, 150, 175, 200, 225, 250, 275, 300, 325, 350, 375)
### match your ladder to the peaks and attach the information
### to the R environment using the function:
ladder.info.attach(stored=my.plants, ladder=my.ladder)
#######################
## CREATE A PANEL ###
#######################
### you may use overview2 or overview to create you customized panel using:
### here we select the channel 3 (yellow) by setting 'cols=3'
### and providing the samples and ladder
overview2(my.inds=my.plants, cols = 3, ladder=my.ladder, init.thresh=5000)
### you could also click on the peaks you think are real
### by using the 'locator' function and press 'Esc' when you're done:
# my.panel <- locator(type="p", pch=20, col="red")$x
### so you can click over the peaks and get the sizes
### in base pairs stored in a vector named my.panel
### Instead of doing that I will use the suggested peaks by
### the program using overview2, which provides a vector with
### expected DNA sizes to be used in the next step for scoring
### we'll do it in the 160-190 bp region
my.panel <- overview2(my.inds=my.plants, cols = 3,
ladder=my.ladder, init.thresh=7000, xlim=c(160,190)); my.panel
##########################
## SCORE YOUR SAMPLES ###
##########################
a <- score.easy (my.inds=my.plants, cols = 3, panel=my.panel, ladder=my.ladder, electro=FALSE)
### extract your peaks in a data.frame
final.results <- get.scores(a)
final.results
Run the code above in your browser using DataLab