diff NEUMA-1.2.1/gNIR2gFVKM.pl @ 0:c44c43d185ef draft default tip

NEUMA-1.2.1 Uploaded
author chawhwa
date Thu, 08 Aug 2013 00:46:13 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/NEUMA-1.2.1/gNIR2gFVKM.pl	Thu Aug 08 00:46:13 2013 -0400
@@ -0,0 +1,32 @@
+#!/usr/bin/perl
+
+if(@ARGV<2) { print "usage: $0 gNIR_file EUMA_file > output.gFVKM\n"; exit; }
+my ($gNIR_file,$EUMA_file) = @ARGV;
+
+open IN, $gNIR_file or die "Can't open gNIR_file $gNIR_file\n";
+<IN>; # skip header
+while(<IN>){
+  chomp;
+  split/\t/;
+  $RNAseq{$_[0]}=$_[1];
+}
+close IN;
+
+open IN, $EUMA_file or die "Can't open EUMA file $EUMA_file\n";
+while(<IN>){
+  chomp;
+  split/\t/;
+  $EUMA{$_[0]}=$_[1];
+}
+close IN;
+
+
+print "gene\tgFVK\tread.count\tgEUMA(bp)\n";
+for my $gene (sort keys %EUMA){
+ next if $EUMA{$gene} ==0;
+ if(!exists $RNAseq{$gene}){ $RNAseq{$gene} = 0; }
+ $gFVKM = $RNAseq{$gene} / $EUMA{$gene} * 1000;
+ print "$gene\t$gFVKM\t$RNAseq{$gene}\t$EUMA{$gene}\n";
+}
+
+