if(1==0)
{
rm(list=ls(all=TRUE))
library("flowQB")
library(flowCore)
# TO READ FCS FILE, the flowcore library is needed
# Where is the file and its name?
fpath = system.file("extdata","FCSSMALLEVENTS.fcs",package="flowQB")
# fpath="/home/fkhettabi/Desktop/newflowQB2014/flowQB/inst/extdata/FCSSMALLEVENTS.fcs"
# Name of the FCS file
file=fpath
# Singlet Parameter:
# R: gate by an ellipse of radius R on the scatter data
R=2
# width: a parameter used to find the lower bound (default width at half maximum) and the upper bound (default .5).
width=.5
# fraction: a parameter used to find the densest fraction of cells (default .1).
fraction=.1
# Number of the peaks in the data
numberoftotalepeaks=8
# To define the indices of the FS and SS.
# NOW GO THE THE INPUT
fcs <- read.FCS(file)
names(fcs)
# Scatters FS & SS are:
scatters=c(2,5)
# Channels of interest, you need to select at least two channels, for instance:
CHANNELTOBEPROCESSED=c(8,9,36,37,38,39)
names(fcs)[CHANNELTOBEPROCESSED]
nClusters=numberoftotalepeaks
###################################################
### PEAKS TO BE USED IN THE REGRESSION
###################################################
pi=1
pf=7
output=""
RESULTS=BEADflowQBCalculation(file,R,width,fraction,numberoftotalepeaks,scatters,CHANNELTOBEPROCESSED,pi,pf,0,output)
}
if( 1==0)
{
rm(list=ls(all=TRUE))
library("flowQB")
NAMEOFTHEFILES=c("935295.fcs","935297.fcs","935299.fcs","935301.fcs","935303.fcs","935305.fcs")
# GET THE FILES WITH THEIR PATHS
# bulid "input"
input=rep("",length(NAMEOFTHEFILES))
for( i in 1:length(NAMEOFTHEFILES))
{
input[i] = system.file("extdata",NAMEOFTHEFILES[i],package="flowQB")
}
# TO READ FCS FILE, the flowcore library is needed
library(flowCore)
# read one file to have the name of the channels of interest!
fcs <- read.FCS(input[1])
orgdata=data.frame(exprs(fcs))
# Channels of interest, for instance:
CHANNELTOBEPROCESSEDx=c(8,9,36,37,38,39)
CHANNELTOBEPROCESSED = names(orgdata)[CHANNELTOBEPROCESSEDx]
# Minimum MFI to consider for the events.
minF=0
# Maximum MFI to consider for the events.
maxF=100000
RESULTS=LEDflowQBCalculation(input,CHANNELTOBEPROCESSED,minF,maxF)
}
Run the code above in your browser using DataLab