GCSscore: Main GCS-score Function

Description Usage Arguments Details Value Examples

View source: R/GCSscore.R

Description

The main function used to call and run the GCS-score algorithm.

Usage

1
2
3
GCSscore(celFile1 = NULL, celFile2 = NULL, celTable = NULL,celTab.names = FALSE,
typeFilter = 1, method = 1, SF1 = NULL, SF2 = NULL, fileout = FALSE, 
gzip = FALSE, verbose = FALSE)

Arguments

celFile1

If a one comparison run is desired, enter the filename and path to the 1st Affymetrix CEL file

celFile2

If a one comparison run is desired, enter the filename and path to the 2nd Affymetrix CEL file

celTable

If a batch run is desired, enter the filename and path to the CSV file containing the batch information

celTab.names

If set to TRUE, then the GCS-score batch output is assigned the user-designated name (specified in the first column of the celTable CSV file (see examples))

typeFilter

If set to 0, all available probe types are included in the calculation and normalization of the GCS-score values. If set to 1, only probes well-annotated probe_ids (from BioConductor .db packages) are included in the calculation and normalization of the GCS-score output

method

This determines the method used to group and tally the probes_ids when calculating GCS-scores. For Whole Transcriptome (WT) arrays, for gene-level (transcript_cluster_id-based) analysis, set method = 1, and for exon-level (probeset_id-based) analysis, set method = 2. For the older generation arrays (3' IVT-style), if a PM-MM based background correction is desired, set method = 1 (PM-MM gives identical results to the original sscore package). If a GC-content based background correction is desired on the 3' IVT arrays, set method = 2

rm.outmask

If set to TRUE, then probes that are flagged as MASKED or OUTLIER in either CEL file 1 or CEL file 2 will be removed from the analysis. If set to FALSE, these probes are not filtered out and will be used in the GCS-score calculation

SF1

Input a pre-determined Scaling Factor (SF) for the 1st CEL file

SF2

Input a pre-determined Scaling Factor (SF) for the 2nd CEL file

fileout

Determines if the resulting GCS-score coutput is written to disk in a CSV format following the completion of the function. By default, this is set to FALSE so unnecessary GCS-score outputs are not saved to disk after each run

gzip

If set to TRUE, the GCSscore output that is written to disk is compressed. This could prove useful if a large number runs are input using the batch submission

verbose

If set to TRUE, more information will be printed to the console during while the algorithm is running

Details

The input accepts individual CEL files or reads in a CSV file for batch runs. The user also inputs parameters to determine the method used by the GCS-score algorithm to group and tally the individual probes on a given array.

Value

A data.table object with GCS-score values for the probe groupings (determined by the method argument) and the relevant annotation informtaion

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
if (length(list.files(path = ".", pattern = "*.CEL")) != 0){

##Single run example:
# get the path to example CEL files in the package directory:
celpath1 <- system.file("extdata/ex_dat",
                        "MN_2_3.CEL", package = "GCSscore")
celpath2 <- system.file("extdata/ex_dat",
                        "MN_4_1.CEL", package = "GCSscore")
# run GCSscore() function directly on two .CEL files:
Ss2_clarS <- GCSscore(celFile1 = celpath1, celFile2 = celpath2)

# display selected columns of GCSscore output:
Ss2_clarS[1:6,c(1,3,6,7,8,11)]

## Batch run example:
# get the path to example CSV file in the package directory:
celtab_path <- system.file("extdata/ex_dat",
                        "Ss2_BATCH_example.csv", package = "GCSscore")
# read in the .CSV file with fread():
celtab <- fread(celtab_path)
# view structure of 'celTable' input:
celtab

# For the following example, the .CEL files are not in the working
# directory.  The path to the .CEL files must be added to allow
# the GCSscore() function to find them.

# add path to celFile names in batch input:
path <- system.file("extdata/ex_dat",
                    "", package = "GCSscore")
celtab$CelFile1 <- celtab[,paste(path,CelFile1,sep="")]
celtab$CelFile2 <- celtab[,paste(path,CelFile2,sep="")]

# run GCSscore() function with batch input:
Ss_clarS_batch <- GCSscore(celTable = celtab, celTab.names = TRUE)
# display selected columns of GCSscore batch output:
Ss_clarS_batch[1:6,c(1,3,11,12,13,14,15,16)]
}

mfmiles/Sscore2 documentation built on Oct. 1, 2019, 6:04 a.m.