X-Git-Url: https://git.donarmstrong.com/?p=rsem.git;a=blobdiff_plain;f=rsem_perl_utils.pm;h=01a357651daf51b3578332c77fc6a64c26196e1d;hp=b2a040f53be5ed4b53d4e278008697167dfb7dfe;hb=92b24279a3ecc72946e7e7c23149ad0d181f373a;hpb=142c0168622638bb25f09796c3598fab28a1f94c diff --git a/rsem_perl_utils.pm b/rsem_perl_utils.pm index b2a040f..01a3576 100644 --- a/rsem_perl_utils.pm +++ b/rsem_perl_utils.pm @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl package rsem_perl_utils; @@ -31,12 +31,13 @@ sub runCommand { print "\n"; } +my @allele_title = ("allele_id", "transcript_id", "gene_id", "length", "effective_length", "expected_count", "TPM", "FPKM", "AlleleIsoPct", "AlleleGenePct", "posterior_mean_count", "posterior_standard_deviation_of_count", "pme_TPM", "pme_FPKM", "AlleleIsoPct_from_pme_TPM", "AlleleGenePct_from_pme_TPM", "TPM_ci_lower_bound", "TPM_ci_upper_bound", "FPKM_ci_lower_bound", "FPKM_ci_upper_bound"); -my @transcript_title = ("transcript_id", "gene_id", "length", "effective_length", "expected_count", "TPM", "FPKM", "IsoPct", "pme_expected_count", "pme_TPM", "pme_FPKM", "IsoPct_from_pme_TPM", "TPM_ci_lower_bound", "TPM_ci_upper_bound", "FPKM_ci_lower_bound", "FPKM_ci_upper_bound"); +my @transcript_title = ("transcript_id", "gene_id", "length", "effective_length", "expected_count", "TPM", "FPKM", "IsoPct", "posterior_mean_count", "posterior_standard_deviation_of_count", "pme_TPM", "pme_FPKM", "IsoPct_from_pme_TPM", "TPM_ci_lower_bound", "TPM_ci_upper_bound", "FPKM_ci_lower_bound", "FPKM_ci_upper_bound"); -my @gene_title = ("gene_id", "transcript_id(s)", "length", "effective_length", "expected_count", "TPM", "FPKM", "pme_expected_count", "pme_TPM", "pme_FPKM", "TPM_ci_lower_bound", "TPM_ci_upper_bound", "FPKM_ci_lower_bound", "FPKM_ci_upper_bound"); +my @gene_title = ("gene_id", "transcript_id(s)", "length", "effective_length", "expected_count", "TPM", "FPKM", "posterior_mean_count", "posterior_standard_deviation_of_count", "pme_TPM", "pme_FPKM", "TPM_ci_lower_bound", "TPM_ci_upper_bound", "FPKM_ci_lower_bound", "FPKM_ci_upper_bound"); -# inpF, outF +# type, inpF, outF sub collectResults { my $local_status; my ($inpF, $outF); @@ -69,7 +70,8 @@ sub collectResults { my @out_arr = (); for (my $i = 0; $i < $n; $i++) { - if ($_[0] eq "isoform") { push(@out_arr, $transcript_title[$i]); } + if ($_[0] eq "allele") { push(@out_arr, $allele_title[$i]); } + elsif ($_[0] eq "isoform") { push(@out_arr, $transcript_title[$i]); } elsif ($_[0] eq "gene") { push(@out_arr, $gene_title[$i]); } else { print "A bug on 'collectResults' is detected!\n"; exit(-1); } } @@ -84,9 +86,9 @@ sub collectResults { close(OUTPUT); } -# dir +# 0, dir sub showVersionInfo { - open(INPUT, "$_[0]\WHAT_IS_NEW"); + open(INPUT, "$_[0]/WHAT_IS_NEW"); my $line = ; chomp($line); close(INPUT);