How to modify function of samr.estimate.depth of samr
1
0
Entering edit mode
yuan.qing ▴ 10
@yuanqing-8002
Last seen 9.5 years ago
United States

How to modify the source code in samr? I want to do the TMM normalization.

I had the following:

SAMseq.test = SAMseq(countdata1, finaldata1$Group, geneid=as.character(rownames(countdata1)), 
                    genenames=as.character(rownames(countdata1)),
                    resp.type="Two class unpaired",nperms=1000, random.seed = 1234, fdr.output=0.2)
print(SAMseq.test)


In case of TMM normalization, one can manipulate the function, but how?
"samr.estimate.depth" of the source code as below and then resintall the package with the new source file.
# samr.estimate.depth
# function (x) 
# {
#   library(edgeR)
#   cmeans <- calcNormFactors(x) * colSums(x)
#   depth <- cmeans/mean(cmeans)
#   return(depth)
# }
# <environment: namespace:samr>

If anyone knows how?

Thanks a lot!

samr • 985 views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 3 days ago
United States

The samr package isn't part of Bioconductor, so this isn't the appropriate forum. In addition, this forum is not really about how to program using R.

I just did a google search for 'R package modify' and came up with lots of apparently useful hits. You might try the same.
 

ADD COMMENT

Login before adding your answer.

Traffic: 474 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