clusterCTSS() error when running CAGEr
1
1
Entering edit mode
bo_yan ▴ 10
@bo_yan-14188
Last seen 7.1 years ago

I am using CAGEr to analyze some of my CAGE data. However I run into some errors when I tried to cluster the TSSs using clusterCTSS() function.

I use CAGEr 1.18 and R 3.3.2.

My input is the CTSS file for human genome 38 chr1, e.g.:

chr1    10594   -       1

chr1    10595   -       3

chr1    10597   -       14

chr1    10599   -       4

chr1    10600   -       17

Here are the commands I used before clustering:

>myCAGEset <- new("CAGEset", genomeName = "BSgenome.Hsapiens.UCSC.hg38", inputFiles = ctss_file, inputFilesType = 'ctss', sampleLabels=c("test”))

>getCTSS(myCAGEset)

>normalizeTagCount(myCAGEset, method = "powerLaw",fitInRange = c(5, 1000), alpha = 1.0, T = 10^6)

>ctss <- CTSStagCount(myCAGEset)

> clusterCTSS(object = myCAGEset, method = "paraclu")

Filtering CTSSs below threshold...

Clustering...

    -> test

Error in subset.default(clusters, (max_d >= (minStability * min_d)) &  : 

  object 'max_d' not found

 

Thanks a lot!

CAGEr • 1.2k views
ADD COMMENT
0
Entering edit mode
@charles-plessy-7857
Last seen 14 months ago
Japan

Thanks for the report. On a virtual machine running R 3.2.3, I tried the following test, which worked;

load(system.file("data", "exampleCAGEset.RData", package="CAGEr"))
clusterCTSS(object = exampleCAGEset, method = "paraclu")

Then I tried after normalisation and it did not work anymore.

load(system.file("data", "exampleCAGEset.RData", package="CAGEr"))
normalizeTagCount(exampleCAGEset, method = "powerLaw",fitInRange = c(5, 1000), alpha = 1.0, T = 10^6)
clusterCTSS(object = exampleCAGEset, method = "paraclu")

The reason is that the normalizeTagCount() command turned all the expression values to zero:

> summary(CTSSnormalizedTpm(exampleCAGEset))
    chr            pos          strand      sample1     sample2     sample3
 chr13:5272   Min.   :3000059   +:2840   Min.   :0   Min.   :0   Min.   :0  
              1st Qu.:4318065   -:2432   1st Qu.:0   1st Qu.:0   1st Qu.:0  
              Median :5238722            Median :0   Median :0   Median :0  
              Mean   :5370033            Mean   :0   Mean   :0   Mean   :0  
              3rd Qu.:6266246            3rd Qu.:0   3rd Qu.:0   3rd Qu.:0  
              Max.   :7993858            Max.   :0   Max.   :0   Max.   :0  

The problem seems to be that you set alpha = 1.0.  I recommend you to try a different value (for instance, following the output of plotReverseCumulatives) or a different normalisation method.

ADD COMMENT

Login before adding your answer.

Traffic: 629 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6