Warning message:
In readChar(file, size, TRUE) : truncating string with embedded nuls
    p_values[lower.tri(p_values,diag=TRUE)] <- NA

    p_values2 = as.data.frame(as.table(as.matrix(p_values))) 
    
    if(nrow(p_values2) > 10000){
      p_values2 = p_values2[sample(nrow(p_values2), (nrow(p_values2)/20)) , ]
    }
    p_values2 = p_values2[complete.cases(p_values2),]
    p_values2 = p_values2[order(p_values2$Freq, decreasing = F),]
    p_values2$n = c(1:nrow(p_values2))/nrow(p_values2)
    
    p_values = get.pval(obj,type_stat = "G")
    p_values[lower.tri(p_values,diag=TRUE)] <- NA
    
    p_values3 = as.data.frame(as.table(as.matrix(p_values))) 
    if(nrow(p_values3) > 10000){
      p_values3 = p_values3[sample(nrow(p_values3), (nrow(p_values3)/20)),]
    }
    
    p_values3 = p_values3[complete.cases(p_values3),]
    p_values3 = p_values3[order(p_values3$Freq, decreasing = F),]
    p_values3$n = c(1:nrow(p_values3))/nrow(p_values3)
    print(dim(p_values2))
    print(dim(p_values3))
    
    
    p_values2$Type = "Chi-squared test"
    p_values3$Type = "G-test"
    
    p_values = rbind(p_values2,p_values3)
    
    
    #---------for p-values form pearson correlation usign Seurat normalization
    seur.obj <- CreateSeuratObject(counts = as.matrix(obj@raw), project = "neg", 
                                   min.cells = 0, min.features = 2)
    seur.obj <- NormalizeData(seur.obj)

    #seur.obj[["RNA"]]@data[1:10,1:10]

    seurat.data = as.matrix(seur.obj[["RNA"]]@data)
    p_val.pearson = rcorr(t(seurat.data), type="pearson")
    
    p_values4 = as.data.frame(as.table(as.matrix(p_val.pearson$P))) 
    
    if(nrow(p_values4) > 10000){
        p_values4 = p_values4[sample(nrow(p_values4), (nrow(p_values4)/20)) , ]
    }
    p_values4 = p_values4[complete.cases(p_values4),]
    p_values4 = p_values4[order(p_values4$Freq, decreasing = F),]
    p_values4$n = c(1:nrow(p_values4))/nrow(p_values4)
    p_values4$Type = "Pearson"
    
    p_values = rbind(p_values,p_values4)
    #-----------------------------
    
    plot_p = ggplot(p_values, aes(x = Freq, y = n,colour = Type)) +
      theme(axis.text.x = element_text(size = 12, angle = 0, hjust = .5, vjust = .5, face = "plain"),
            axis.text.y = element_text( size = 12, angle = 0, hjust = 0, vjust = .5, face = "plain"),  
            axis.title.x = element_text( size = 12, angle = 0, hjust = .5, vjust = 0, face = "plain"),
            axis.title.y = element_text( size = 12, angle = 90, hjust = .5, vjust = .5, face = "plain"))       + 
      labs(x = "p-value", y = "percentile" ) +
      geom_line(size = 1.5) + 
      scale_x_log10(breaks = trans_breaks("log10", function(x) 10^x),
              labels = trans_format("log10", math_format(10^.x))) +
      scale_y_log10(breaks = trans_breaks("log10", function(x) 10^x),
              labels = trans_format("log10", math_format(10^.x))) +
      annotation_logticks()
    return(plot_p)
}

1 Technical negative dataset: ERCC 10x

NULL
[1] "Get p-values genome wide on columns genome wide on rows"
[1] "Using function S"
[1] "function to generate S "
NULL
[1] "Get p-values genome wide on columns genome wide on rows"
[1] "Using function G"
[1] "function to generate G "
[1] "Generating contingency tables for observed data"
[1] "mu estimator creation"
[1] "expected contingency tables creation"
[1] "The distance between estimated n of zeros and observed number of zero is 0.00446406311693362 over 66"
[1] "Done"
[1] "G estimation"
[1] 2145    4
[1] 2145    4
Performing log-normalization
0%   10   20   30   40   50   60   70   80   90   100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|

null device 
          1 

GDI plot with density

[1] "function to generate GDI dataframe"
[1] "Using S"
[1] "function to generate S "

2 Biological negative dataset: CD14+

NULL
[1] "Get p-values genome wide on columns genome wide on rows"
[1] "Using function S"
[1] "function to generate S "
NULL
[1] "Get p-values genome wide on columns genome wide on rows"
[1] "Using function G"
[1] "function to generate G "
[1] "Generating contingency tables for observed data"
[1] "mu estimator creation"
[1] "expected contingency tables creation"
[1] "The distance between estimated n of zeros and observed number of zero is 0.0486027452293039 over 7850"
[1] "Done"
[1] "G estimation"
[1] 1540172       4
[1] 1542243       4
Performing log-normalization
0%   10   20   30   40   50   60   70   80   90   100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|

null device 
          1 

GDI plot with density

LS0tCnRpdGxlOiAiTmVnYXRpdmUgZGF0YXNldCBhbmFseXNpcyIKb3V0cHV0OgogIGh0bWxfZG9jdW1lbnQ6CiAgICBjb2xsYXBzZWQ6IG5vCiAgICBjc3M6IGh0bWwtbWQtMDEuY3NzCiAgICBmaWdfY2FwdGlvbjogeWVzCiAgICBoaWdobGlnaHQ6IGhhZGRvY2sKICAgIG51bWJlcl9zZWN0aW9uczogeWVzCiAgICB0aGVtZTogc3BhY2VsYWIKICAgIHRvYzogeWVzCiAgICB0b2NfZmxvYXQ6IHllcwogIGh0bWxfbm90ZWJvb2s6CiAgICBjb2xsYXBzZWQ6IG5vCiAgICBjc3M6IGh0bWwtbWQtMDEuY3NzCiAgICBmaWdfY2FwdGlvbjogeWVzCiAgICBoaWdobGlnaHQ6IGhhZGRvY2sKICAgIG51bWJlcl9zZWN0aW9uczogeWVzCiAgICB0aGVtZTogc3BhY2VsYWIKICAgIHRvYzogeWVzCiAgICB0b2NfZmxvYXQ6IHllcwotLS0KYGBge3IsIGluY2x1ZGUgPSBGQUxTRX0Ka25pdHI6Om9wdHNfY2h1bmskc2V0KAogIGNvbGxhcHNlID0gVFJVRSwKICBjb21tZW50ID0gIiM+IiwKICBlY2hvID0gVFJVRSwKICB3YXJuaW5nID0gRkFMU0UsCiAgdGlkeSA9IFRSVUUsIHRpZHkub3B0cz1saXN0KHdpZHRoLmN1dG9mZj00MCkKKQpvcHRpb25zKHJtYXJrZG93bi5odG1sX3ZpZ25ldHRlLmNoZWNrX3RpdGxlID0gRkFMU0UpCmBgYAoKCmBgYHtyIH0KbGlicmFyeShnZ3Bsb3QyKQpsaWJyYXJ5KGdncmVwZWwpCmxpYnJhcnkoQ09UQU4pCmxpYnJhcnkoSG1pc2MpCmxpYnJhcnkoU2V1cmF0KQpsaWJyYXJ5KHBhdGNod29yaykKbGlicmFyeShzY2FsZXMpCgpwX3ZhbHVlX3Bsb3QgPC1mdW5jdGlv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SwgIAogICAgICAgICAgICAgICAgICAgIGF4aXMudGl0bGUueCA9IGVsZW1lbnRfYmxhbmsoKSwKICAgICAgICAgICAgICAgICAgICBheGlzLnRpdGxlLnkgPSAKICAgICAgICAgICAgICAgICAgICAgIGVsZW1lbnRfdGV4dCggc2l6ZSA9IHNpLCBhbmdsZSA9IDkwLCBoanVzdCA9IC41LCB2anVzdCA9IC41LCBmYWNlID0gInBsYWluIiwgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG91ciA9IiMzQzU0ODhGRiIpLAogICAgICAgICAgICAgICAgICAgIGxlZ2VuZC5wb3NpdGlvbiA9ICJub25lIikgCiAgICAgIAogICAgICB0aGVtZXkgPSB0aGVtZShheGlzLnRleHQueSA9IAogICAgICAgICAgICAgICAgICAgICAgIGVsZW1lbnRfdGV4dCggc2l6ZSA9IHNpLCBhbmdsZSA9IDAsIGhqdXN0ID0gLjUsIHZqdXN0ID0gLjUsIGZhY2UgPSAicGxhaW4iLCAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG91ciA9IiMzQzU0ODhGRiIpLAogICAgICAgICAgICAgICAgICAgICBheGlzLnRpdGxlLnggPSAKICAgICAgICAgICAgICAgICAgICAgICBlbGVtZW50X3RleHQoIHNpemUgPSBzaSwgYW5nbGUgPSAwLCBoanVzdCA9IC41LCB2anVzdCA9IC41LCBmYWNlID0gInBsYWluIiwgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvdXIgPSIjM0M1NDg4RkYiKSwKICAgICAgICAgICAgICAgICAgICAgYXhpcy50ZXh0LnguYm90dG9tID0gZWxlbWVudF9ibGFuaygpLAogICAgICAgICAgICAgICAgICAgICBheGlzLnRpdGxlLnkgPSBlbGVtZW50X2JsYW5rKCksCiAgICAgICAgICAgICAgICAgICAgIGxlZ2VuZC5wb3NpdGlvbiA9ICJub25lIikgCgogIAogICAgICBmMSA9IGdncGxvdChHREkuZGYsIGFlcyh4PXN1bS5yYXcubm9ybSwgeT1HREkpKSArICBnZW9tX3BvaW50KGFscGhhID0gMC40LCBjb2xvciA9ICIjODQ5MUI0QjIiLCBzaXplPTIuNSkKICAgICAgCiAgICAgIAogICAgICBHREkuZGZfbGluID0gZjEgKyAKICAgICAgICBnZW9tX2hsaW5lKHlpbnRlcmNlcHQ9MS41LCBsaW5ldHlwZT0iZG90dGVkIiwgY29sb3IgPSAicmVkIiwgc2l6ZT0gMSkgKwogICAgICAgIHNjYWxlX2NvbG9yX21hbnVhbCgiU3RhdHVzIiwgdmFsdWVzID0gbXljb2xvdXJzKSAgKwogICAgICAgIHNjYWxlX2ZpbGxfbWFudWFsKCJTdGF0dXMiLCB2YWx1ZXMgPSBteWNvbG91cnMpICArCiAgICAgICAgeGxhYigibG9nIG5vcm1hbGl6ZWQgY291bnRzIikreWxhYigiR0RJIikrCiAgICAgICAgdGhlbWUoYXhpcy50ZXh0LnggPSAKICAgICAgICAgICAgICAgIGVsZW1lbnRfdGV4dChzaXplID0gc2ksIGFuZ2xlID0gMCwgaGp1c3QgPSAuNSwgdmp1c3QgPSAuNSwgZmFjZSA9ICJwbGFpbiIsIGNvbG91ciA9IiMzQzU0ODhGRiIgKSwKICAgICAgICAgICAgICBheGlzLnRleHQueSA9IAogICAgICAgICAgICAgICAgZWxlbWVudF90ZXh0KCBzaXplID0gc2ksIGFuZ2xlID0gMCwgaGp1c3QgPSAwLCB2anVzdCA9IC41LCBmYWNlID0gInBsYWluIiwgY29sb3VyID0iIzNDNTQ4OEZGIiksICAKICAgICAgICAgICAgICBheGlzLnRpdGxlLnggPSAKICAgICAgICAgICAgICAgIGVsZW1lbnRfdGV4dCggc2l6ZSA9IHNpLCBhbmdsZSA9IDAsIGhqdXN0ID0gLjUsIHZqdXN0ID0gMCwgZmFjZSA9ICJwbGFpbiIsIGNvbG91ciA9IiMzQzU0ODhGRiIpLAogICAgICAgICAgICAgIGF4aXMudGl0bGUueSA9IAogICAgICAgICAgICAgICAgZ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