#!/bin/bash
#===========================================================
# File Name: calfdr
# Version: 1.0
# Author: tanyuexi
# Contact: tanyuexi@gmail.com
# Date: Thu Oct 18 14:09:48 CST 2012
# Discription: This script is used to calculate FDR using Benjamini-Hochberg method.
#===========================================================
bn=`basename $0`
if [ -z $2 ]
then
echo -e "Usage: $bn In_p-value_list OutFile"
exit 1
fi
infile=$1
outfile=$2
cat >$infile.R <<__eof__>
p.srt
p.rank
output
fdrlevels
for(fdr in fdrlevels){for(i in length(p.srt):1){tmp
write(output,file="$outfile",ncolumn=1)
quit(save="no")
__EOF__
R CMD BATCH $infile.R $infile.Rout && rm $infile.R $infile.Rout
#EOF
转载本文请联系原作者获取授权,同时请注明本文来自谭月茜科学网博客。
收藏
分享
分享到: