Skip to content

Commit c51f052

Browse files
committed
fixed warning related to flat samples
1 parent 84b2916 commit c51f052

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

R/facets-emcncf.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ emcncf=function(x,trace=FALSE,unif=FALSE,min.nhet=15,maxiter=10,eps=1e-3){
5353
n=length(logR)
5454

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

0 commit comments

Comments
 (0)