Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • shirley47162928
    Member
    • Jan 2015
    • 15

    sva package for batch correction

    Hello,
    I am trying to do Batch correction using SVA package (with ComBat function) for my RNA-seq raw counts data.
    When performing step 4: Applying the sva fuction, I found an error message like this:

    PHP Code:
    n.sv num.sv(edata2,mod,method="leek")
    n.sv
    [114
    svobj sva(edata2,mod,mod0,n.sv=n.sv)
    Number of significant surrogate variables is:  14 
    Iteration 
    (out of 5 ):Error in density.default(xadjust adj) : 'x' contains missing values
    In addition
    Warning message:
    In pf(fstatsdf1 = (df1 df0), df2 = (df1)) : NaNs produced
    Error during wrapup
    cannot open the connection 
    Because my raw counts data have many genes show zero expression, I then removed those lines with zero. And I also removed batches that had only one sample each. Then this error message was still there. But I can go ahead with step 7: Applying the ComBat function and get the adjusted data.

    I wonder if it correct that I remove those lines with zero.

    my original expression data looks like this:
    PHP Code:
    head(edata)
             
    FH1.B2.K100813 FH0.B3.K100823 FH1.B2.K100826 FH1.B2.K100831 FH0.B2.K101448 FH0.B2.K102654 FH0.B5.K104200 FH0.B5.K104238 FH0.B2.K104250 FH0.B2.K104343 FH0.B3.K104403 FH0.B5.K104443
    40969             69.00          11.00           4.00          55.00          78.67         138.00         109.00          70.00         144.00         127.92         118.00          57.00
    40970            569.43          73.22           6.00         534.51         153.15         400.14         351.60         440.97         127.28         214.97         106.65         455.01
    40974           1647.12         150.30          51.58        1932.85        1018.62        1039.99        2019.72        2080.37        1634.20         847.77         882.49        1834.79
    ADAM23             5.01           0.00           0.00           4.96          32.00           0.00          33.00          19.91          30.01          10.01          23.00           9.92
    ASNS              91.39          31.00           6.00          99.32         157.44         130.71         176.98          76.58         290.99         113.38         127.00         101.89
    C14ORF10          14.01           4.07           0.00          32.78          15.74           8.29          22.71          31.55          19.09          18.76           7.58          19.44
             FH1
    .B5.K104506 FH0.B2.K104603 FH0.B2.K104638 FH1.B2.K104824
    40969            120.00         191.00          56.00          58.00
    40970            550.40         764.77         310.11         329.31
    40974           1742.01        2296.24        1081.09         911.42
    ADAM23            19.91          39.98          20.02           4.98
    ASNS              84.12          89.83          63.28          95.25
    C14ORF10          13.40          29.57          15.75          11.14 
  • boilermaker
    Junior Member
    • Apr 2014
    • 5

    #2
    Did you find the solution?

    I am getting the same error message. Did you ever find an answer?

    Comment

    • fp1
      Junior Member
      • Nov 2014
      • 1

      #3
      Also having the same problem...

      ...and wondering if you found an answer?

      In my case, the number of significant surrogate variables estimated = 6

      I do find that everything runs fine if I lower that to 5, but I'm really not sure why that should be...

      Comment

      • anton.kratz
        Junior Member
        • Jun 2016
        • 7

        #4
        I am running into the very same error:

        "Error in density.default(x, adjust = adj) : 'x' contains missing values"

        I found various posts (stackoverflow, bioconductor support forum, biostars) referrin to this error but now solution, only workarounds without any understanding or explanation what causes the error, or why workarounds seem to work. Suggested solutions were: reducing the number of n.sv until it works, removing genes with low counts until it works.

        Did anyone find a solution to this?

        Comment

        Latest Articles

        Collapse

        • SEQadmin2
          Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
          by SEQadmin2



          Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
          ...
          07-09-2026, 11:10 AM
        • SEQadmin2
          Cancer Drug Resistance: The Lingering Barrier to Rising Survival
          by SEQadmin2



          Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

          There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
          07-08-2026, 05:17 AM
        • GATTACAT
          Reply to Nine Things a Sample Prep Scientist Thinks About Before Sequencing
          by GATTACAT
          Love this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
          07-01-2026, 11:43 AM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by SEQadmin2, 07-13-2026, 10:26 AM
        0 responses
        20 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 07-09-2026, 10:04 AM
        0 responses
        30 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 07-08-2026, 10:08 AM
        0 responses
        18 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 07-07-2026, 11:05 AM
        0 responses
        34 views
        0 reactions
        Last Post SEQadmin2  
        Working...