Skip to content

Commit

Permalink
fixed warning related to flat samples
Browse files Browse the repository at this point in the history
  • Loading branch information
shenmskcc committed Mar 3, 2016
1 parent 84b2916 commit c51f052
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/facets-emcncf.R
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ emcncf=function(x,trace=FALSE,unif=FALSE,min.nhet=15,maxiter=10,eps=1e-3){
n=length(logR)

#diploid genome with purity=1
if(all(seg$cf==1&seg$tcn==2)|max(mafR.clust, na.rm = T) < 0.05){
if(all(seg$cf[seg$chrom<23]==1&seg$tcn[seg$chrom<23]==2)|max(mafR.clust[seg$chrom<23], na.rm = T) < 0.05){
rhov.em=rep(1,nseg)
t.em=rep(2,nseg); minor.em=rep(1,nseg)
minor.em[nhet<min.nhet]=NA
Expand All @@ -62,7 +62,7 @@ emcncf=function(x,trace=FALSE,unif=FALSE,min.nhet=15,maxiter=10,eps=1e-3){
gamma=2
out1=data.frame(seg,cf.em=rhov.em,tcn.em=t.em, lcn.em=minor.em)
emflags=paste(emflags,"Insufficient information. Likely diplod or purity too low.",sep=" ")
out=list(purity=rho,ploidy=gamma,cncf=out1,emflags=emflags)
out=list(purity=rho,ploidy=gamma,dipLogR=dipLogR,start=startseq,end=endseq,seglen=seglen,cncf=out1, emflags=emflags)
return(out)
stop("Insufficient information",call.=F)
}
Expand Down

0 comments on commit c51f052

Please sign in to comment.