Question: How to modify function of samr.estimate.depth of samr
0
gravatar for yuan.qing
4.3 years ago by
yuan.qing0
United States
yuan.qing0 wrote:

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 • 426 views
ADD COMMENTlink modified 4.3 years ago by James W. MacDonald51k • written 4.3 years ago by yuan.qing0
Answer: How to modify function of samr.estimate.depth of samr
0
gravatar for James W. MacDonald
4.3 years ago by
United States
James W. MacDonald51k wrote:

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 COMMENTlink written 4.3 years ago by James W. MacDonald51k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 195 users visited in the last hour