Running multiple pairs through Paired PSCBS

Skip to first unread message

Gaius Augustus

Jun 9, 2016, 2:31:29 PM6/9/16
to aroma.affymetrix
I have a few hundred paired samples that I'd like to run through Paired PSCBS.  The example at is very clear on how to set up this protocol for one pair of samples.  In order to do a test run, I used a for loop to run Paired PSCBS on each pair one at a time.

Is there another way to do this?

For example, I have two vectors with file names

TumorSamples <- c("Sample1_T.CEL", "Sample2_T.CEL", "Sample3_T.CEL")
NormalSamples <- c("Sample1_N.CEL", "Sample2_N.CEL", "Sample3_N.CEL")

instead of pair <- c(T="GSM318736", N="GSM318737")

within a for loop, I ran TumorNormalpair <- c(T=dsT[i], N=dsN[i])


Amy Sherborne

Nov 1, 2016, 9:47:17 AM11/1/16
to aroma.affymetrix
Hi Gaius,

I have just written an R script to do exactly the thing you you are asking about, I hope it helps.

Instead of calling the Tumor and Normal separately within the loop, I put them into a data frame and then just recalled the entire row - that way I had to change very little of the code from the PairedPSCBS vignette.

Using your example:
T <- c("Sample1_T.CEL", "Sample2_T.CEL", "Sample3_T.CEL")
N <- c("Sample1_N.CEL", "Sample2_N.CEL", "Sample3_N.CEL")
pair = data.frame(T, N, stringsAsFactors=F)

Then within my for loop I called csR <- csR[indexOf(csR, pair[i,])].

Full code is up on my github:
Reply all
Reply to author
0 new messages