This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Retrieving count averages from a binding matrix

I am interested in being able to retrieve count averages from a diffBind count matrix using a set of intervals, specifically to be able to limit my count average retrieval to specific columns in the count matrix of a set of unique intervals. Wondering if there are any good approaches to do that, thanks.

So the count matrix looks as follows:

        MBV1 MBV2  MBV3  FBV1 FBV2  FBV3  MBE7  MBE8  MBE9  FBE1  FBE2  FBE3
4          1    1     1     1    1     1     1    66     1     1    50    34
5         22    1     1     1    1     1     6    98     1    22   100     1

And here is the DESeq2 results output example of a few rows:

log2 fold change (MLE): group EB vs vehicle 
Wald test p-value: group EB vs vehicle 
DataFrame with 324899 rows and 6 columns
                                               baseMean     log2FoldChange                        

    4     chr1   3011001-3011351      * |   37.5265278603838 -0.245442215042177 
    5     chr1   3012575-3012925      * |   82.6779411160294  0.494119517305561

So I would like to take rows 4 and 5 that I got in the DESeq2 results and query count averages back in the matrix in specific columns, and to do this on many sites at once giving an input that has both the original row numbers as well as the GRanges of the final result.

diffbind deseq2 chip-seq

Please add representative input and expected output.

Ok so the count matrix looks as follows:

        MBV1 MBV2  MBV3  FBV1 FBV2  FBV3  MBE7  MBE8  MBE9  FBE1  FBE2  FBE3
4          1    1     1     1    1     1     1    66     1     1    50    34
5         22    1     1     1    1     1     6    98     1    22   100     1

And here is the DESeq2 results output example of a few rows:

log2 fold change (MLE): group EB vs vehicle 
Wald test p-value: group EB vs vehicle 
DataFrame with 324899 rows and 6 columns
                                                   baseMean     log2FoldChange         

    4     chr1   3011001-3011351      * |     37.5265278603838 -0.245442215042177  
    5     chr1   3012575-3012925      * |     82.6779411160294  0.494119517305561

So I would like to take rows 4 and 5 that I got in the DESeq2 results and query count averages back in the matrix in specific columns, and to do this on many sites at once giving an input that has both the original row numbers as well as the GRanges of the final result.

0 answers

No answers yet.

Log in to answer this question.