Re: [aroma.affymetrix] Errors occurred in the PSCBS analysis

2015-02-23 Thread Chengyu Liu
Thanks Henrik,

You are right. The sample is really noisy. 

On Wednesday, February 18, 2015 at 11:23:13 PM UTC+2, Henrik Bengtsson 
wrote:
>
> I'll try to catch up with a few questions; comments below. 
>
> On Mon, Feb 9, 2015 at 3:52 AM, Chengyu Liu  > wrote: 
> > Hi, 
> > 
> > I am doing allele-specific analysis using PSCBS package. I have paired 
> > tumor-normal matched samples. 
> > For one of the samples, i got an error which is like 
> > 
> >   at #06. lapply(names.T[8:length(names.T)], function(x) { 
> >   print(x) 
> >   y <- grep(x, names(df)) 
> >   if (length(y) != 3) { 
> >   stop("Length of y is not 3") 
> >   } 
> >   d <- dropSegmentationOutliers(y = df[, y[1]], chromosome = 
> > df[, 
> >   1], x = df[, 2]) 
> >   d <- data.frame(chromosome = df[, 1], x = df[, 2], CT = d, 
> >   betaT = df[, y[2]], betaN = df[, y[3]]) 
> >   fit <- segmentByPairedPSCBS(CT = d[, 3], betaT = d[, 4], 
> >   betaN = d[, 5], chromosome = d$chromosome, x = d$x) 
> >   segs <- getSegments(fit) 
> >   pairName <- x 
> >   chrTag <- sprintf("Chr%s", 
> > seqToHumanReadable(getChromosomes(fit))) 
> >   toPNG(pairName, tags = c(chrTag, "PairedPSCBS"), width = 
> 840, 
> >   aspectRatio = 0.6, { 
> >   plotTracks(fit) 
> >   }) 
> >   ret <- data.frame(sample = x, segs) 
> >   return(ret) 
> >   }) 
> >   - lapply() is in environment 'base' 
> >   - originating from 'cytoscanHD.processing.R' 
> > 
> >   at #05. aroma.affy.snp.preprocessing(path = 
> > "/storageBig/storageBig1/czliu/input/azhar/aroma/", 
> >   chipType = "CytoScanHD_Array", dataSet = "dataset1", 
> > combineAlleles = FALSE, 
> >   paired = TRUE, verbose = FALSE, PSCNA = FALSE, na.rm = 
> TRUE) 
> >   - aroma.affy.snp.preprocessing() is in environment 
> 'R_GlobalEnv' 
> >   - originating from 'cytoscanHD.processing.R' 
> > 
> >   at #04. eval(expr, envir, enclos) 
> >   - eval() is local of the calling function 
> > 
> >   at #03. eval(ei, envir) 
> >   - eval() is in environment 'base' 
> > 
> >   at #02. withVisible(eval(ei, envir)) 
> >   - withVisible() is in environment 'base' 
> > 
> >   at #01. source("cytoscanHD.processing.R") 
> >   - source() is in environment 'base' 
> > 
> > Error: All genotypes ('muN') called from the normal allele B fractions 
> > ('betaN') are NAs: 2819494 (100%) out of 2819494 
> > In addition: There were 30 warnings (use warnings() to see them) 
> > 
> > It seems all BAF values were NA. Why does it happen ? Is there something 
> > wrong with the sample ? 
>
> This is a sanity check kicking in preventing a likely error in 
> data/annotation from propagating further in your analysis.  As genome 
> types are called from the normal BAFs, i.e. betaN = d[, 5] in your 
> case.  Have a look at those BAF signals, e.g. plotDensity(betaN) to 
> see if they're showing the three expected BAF modes near 0%, 50% and 
> 100%.  If your data is extremely noisy genotype calling will fail. 
> Internally, segmentByPairedPSCBS() uses: 
>
>   muN <- aroma.light::callNaiveGenotypes(betaN, censorAt=c(0,1)) 
>
> so you can look at the calls made that way too. 
>
> Hope this helps 
>
> /Henrik 
>
> > 
> > 
> > Br, 
> > Chengyu 
> > 
> > -- 
> > -- 
> > When reporting problems on aroma.affymetrix, make sure 1) to run the 
> latest 
> > version of the package, 2) to report the output of sessionInfo() and 
> > traceback(), and 3) to post a complete code example. 
> > 
> > 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "aroma.affymetrix" group with website http://www.aroma-project.org/. 
> > To post to this group, send email to [email protected] 
>  
> > To unsubscribe and other options, go to 
> http://www.aroma-project.org/forum/ 
> > 
> > --- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "aroma.affymetrix" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to [email protected] . 
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
-- 
When reporting problems on aroma.affymetrix, make sure 1) to run the latest 
version of the package, 2) to report the output of sessionInfo() and 
traceback(), and 3) to post a complete code example.


You received this message because you are subscribed to the Google Groups 
"aroma.affymetrix" group with website http://www.aroma-project.org/.
To post to this group, send email to [email protected]
To unsubscribe and other options, go to http://www.aroma-project.org/forum/

--- 
You received this message because you are subscribed to the Google Groups 

Re: [aroma.affymetrix] Errors occurred in the PSCBS analysis

2015-02-18 Thread Henrik Bengtsson
I'll try to catch up with a few questions; comments below.

On Mon, Feb 9, 2015 at 3:52 AM, Chengyu Liu  wrote:
> Hi,
>
> I am doing allele-specific analysis using PSCBS package. I have paired
> tumor-normal matched samples.
> For one of the samples, i got an error which is like
>
>   at #06. lapply(names.T[8:length(names.T)], function(x) {
>   print(x)
>   y <- grep(x, names(df))
>   if (length(y) != 3) {
>   stop("Length of y is not 3")
>   }
>   d <- dropSegmentationOutliers(y = df[, y[1]], chromosome =
> df[,
>   1], x = df[, 2])
>   d <- data.frame(chromosome = df[, 1], x = df[, 2], CT = d,
>   betaT = df[, y[2]], betaN = df[, y[3]])
>   fit <- segmentByPairedPSCBS(CT = d[, 3], betaT = d[, 4],
>   betaN = d[, 5], chromosome = d$chromosome, x = d$x)
>   segs <- getSegments(fit)
>   pairName <- x
>   chrTag <- sprintf("Chr%s",
> seqToHumanReadable(getChromosomes(fit)))
>   toPNG(pairName, tags = c(chrTag, "PairedPSCBS"), width = 840,
>   aspectRatio = 0.6, {
>   plotTracks(fit)
>   })
>   ret <- data.frame(sample = x, segs)
>   return(ret)
>   })
>   - lapply() is in environment 'base'
>   - originating from 'cytoscanHD.processing.R'
>
>   at #05. aroma.affy.snp.preprocessing(path =
> "/storageBig/storageBig1/czliu/input/azhar/aroma/",
>   chipType = "CytoScanHD_Array", dataSet = "dataset1",
> combineAlleles = FALSE,
>   paired = TRUE, verbose = FALSE, PSCNA = FALSE, na.rm = TRUE)
>   - aroma.affy.snp.preprocessing() is in environment 'R_GlobalEnv'
>   - originating from 'cytoscanHD.processing.R'
>
>   at #04. eval(expr, envir, enclos)
>   - eval() is local of the calling function
>
>   at #03. eval(ei, envir)
>   - eval() is in environment 'base'
>
>   at #02. withVisible(eval(ei, envir))
>   - withVisible() is in environment 'base'
>
>   at #01. source("cytoscanHD.processing.R")
>   - source() is in environment 'base'
>
> Error: All genotypes ('muN') called from the normal allele B fractions
> ('betaN') are NAs: 2819494 (100%) out of 2819494
> In addition: There were 30 warnings (use warnings() to see them)
>
> It seems all BAF values were NA. Why does it happen ? Is there something
> wrong with the sample ?

This is a sanity check kicking in preventing a likely error in
data/annotation from propagating further in your analysis.  As genome
types are called from the normal BAFs, i.e. betaN = d[, 5] in your
case.  Have a look at those BAF signals, e.g. plotDensity(betaN) to
see if they're showing the three expected BAF modes near 0%, 50% and
100%.  If your data is extremely noisy genotype calling will fail.
Internally, segmentByPairedPSCBS() uses:

  muN <- aroma.light::callNaiveGenotypes(betaN, censorAt=c(0,1))

so you can look at the calls made that way too.

Hope this helps

/Henrik

>
>
> Br,
> Chengyu
>
> --
> --
> When reporting problems on aroma.affymetrix, make sure 1) to run the latest
> version of the package, 2) to report the output of sessionInfo() and
> traceback(), and 3) to post a complete code example.
>
>
> You received this message because you are subscribed to the Google Groups
> "aroma.affymetrix" group with website http://www.aroma-project.org/.
> To post to this group, send email to [email protected]
> To unsubscribe and other options, go to http://www.aroma-project.org/forum/
>
> ---
> You received this message because you are subscribed to the Google Groups
> "aroma.affymetrix" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
-- 
When reporting problems on aroma.affymetrix, make sure 1) to run the latest 
version of the package, 2) to report the output of sessionInfo() and 
traceback(), and 3) to post a complete code example.


You received this message because you are subscribed to the Google Groups 
"aroma.affymetrix" group with website http://www.aroma-project.org/.
To post to this group, send email to [email protected]
To unsubscribe and other options, go to http://www.aroma-project.org/forum/

--- 
You received this message because you are subscribed to the Google Groups 
"aroma.affymetrix" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.


[aroma.affymetrix] Errors occurred in the PSCBS analysis

2015-02-09 Thread Chengyu Liu
Hi,

I am doing allele-specific analysis using PSCBS package. I have paired 
tumor-normal matched samples. 
For one of the samples, i got an error which is like

  at #06. lapply(names.T[8:length(names.T)], function(x) {
  print(x)
  y <- grep(x, names(df))
  if (length(y) != 3) {
  stop("Length of y is not 3")
  }
  d <- dropSegmentationOutliers(y = df[, y[1]], chromosome = 
df[, 
  1], x = df[, 2])
  d <- data.frame(chromosome = df[, 1], x = df[, 2], CT = d, 
  betaT = df[, y[2]], betaN = df[, y[3]])
  fit <- segmentByPairedPSCBS(CT = d[, 3], betaT = d[, 4], 
  betaN = d[, 5], chromosome = d$chromosome, x = d$x)
  segs <- getSegments(fit)
  pairName <- x
  chrTag <- sprintf("Chr%s", 
seqToHumanReadable(getChromosomes(fit)))
  toPNG(pairName, tags = c(chrTag, "PairedPSCBS"), width = 840, 
  aspectRatio = 0.6, {
  plotTracks(fit)
  })
  ret <- data.frame(sample = x, segs)
  return(ret)
  })
  - lapply() is in environment 'base'
  - originating from 'cytoscanHD.processing.R'

  at #05. aroma.affy.snp.preprocessing(path = 
"/storageBig/storageBig1/czliu/input/azhar/aroma/", 
  chipType = "CytoScanHD_Array", dataSet = "dataset1", 
combineAlleles = FALSE, 
  paired = TRUE, verbose = FALSE, PSCNA = FALSE, na.rm = TRUE)
  - aroma.affy.snp.preprocessing() is in environment 'R_GlobalEnv'
  - originating from 'cytoscanHD.processing.R'

  at #04. eval(expr, envir, enclos)
  - eval() is local of the calling function

  at #03. eval(ei, envir)
  - eval() is in environment 'base'

  at #02. withVisible(eval(ei, envir))
  - withVisible() is in environment 'base'

  at #01. source("cytoscanHD.processing.R")
  - source() is in environment 'base'

Error: All genotypes ('muN') called from the normal allele B fractions 
('betaN') are NAs: 2819494 (100%) out of 2819494
In addition: There were 30 warnings (use warnings() to see them)

It seems all BAF values were NA. Why does it happen ? Is there something 
wrong with the sample ?


Br,
Chengyu

-- 
-- 
When reporting problems on aroma.affymetrix, make sure 1) to run the latest 
version of the package, 2) to report the output of sessionInfo() and 
traceback(), and 3) to post a complete code example.


You received this message because you are subscribed to the Google Groups 
"aroma.affymetrix" group with website http://www.aroma-project.org/.
To post to this group, send email to [email protected]
To unsubscribe and other options, go to http://www.aroma-project.org/forum/

--- 
You received this message because you are subscribed to the Google Groups 
"aroma.affymetrix" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.