No intermediate file calculation for FDR
#!perluse warnings;use Strict;die "perl $ <pvalue file> <outprefix>\n" if @ARGV! = 2;my (%va,%out); open FA, $ARGV [0] or Die $!; while (<FA>) {<span style= "white-space:pre" ></span>chomp;<span style= "White-space:pre" > </span>my @tmp = Split;<span style= "White-space:pre" ></span> $va {$tmp [0]} = $tmp [7];<span style=] White-space:pre "></span> $out {$tmp [0]} = $_;} My @arr, my $n = 0;foreach my $i (sort {$va {$a} <=> $va {$b}} keys%va) {<span style= "White-space:pre" ></SPAN&G t; $arr [$n]{$i} = $va {$i};<span style= "White-space:pre" ></span> $n + +;} Open out, "> $ARGV [1].FDR] or Die $!; for (my $i = 0; $i < @arr; $i + +) {<span style= "white-space:pre" ></span>foreach my $j (keys%{$arr [$i]}) <sp An style= "White-space:pre" ></span>{<span style= "White-space:pre" ></span>my $fdr = ($arr [$i]{$j } * ($n + 1))/($i + 1); <span style= "White-space:pre" ></span>print out "$out {$j}\t$fdr\n "; <span style=" White-space:pre "></SPAN>}}
Perl's sort is still not ripe ...
Multi-group Variance analysis (no homogeneity test)
Args<-commandargs (T) Mat <-read.table (args[1], sep= "\ T") column <-C (Rep (0, Nrow (MAT))) for (I in 1:nrow (MAT)) { DAT <-as.numeric (mat[i, 2:ncol (MAT)]) groups <-factor (Rep (letters[1:3], each = 2)) Fit <-lm (formula = Dat ~ Grou PS) Column[i] <-Anova (FIT) [1,5]}f = Cbind (Mat, column) write.table (f, file=args[2], Sep = "\ t", quote=false,row.names= FALSE, Col.names=f)
No intermediate file for FDR and multi-group variance analysis (no homogeneity test)