Sydney-Informatics-Hub / RNASeq-DE

GNU General Public License v3.0
1 stars 2 forks source link

tpmcalculator_make_matrix.pbs returning empty TPM_GeneLevel.counts & TPM_TranscriptLevel.counts #6

Open NJNataren opened 5 months ago

NJNataren commented 5 months ago

When running the tpmcalculator_make_matrix.pbs to create the gene and transcript level counts matrix, providing the correct tpmdir=../cohort_TPMCalculator path, the job returned an empty table.

This was due to the initialisation of the variable i= as my $i=0; prior to the foreach for loop in both tpmcalculator_make_matrix.pl and tpmcalculator_transcript_make_matrix.pl but being reassigned to i==1 in the for loop my(@col)=split(" ",$_); my $gene=$col[0]; my $tpm=$col[6]; if($i==1){

The code below resolved the issue in the tpmcalculator_make_matrix.pl script:

print "Saving gene level TPMs into memory...\n"; my $genecountshash = {}; my $i=1; # Initialising this as "my $i=1" corrected the issue my @allgenes; my $gene; my $count;

The code below resolved the issue in the tpmcalculator_transcript_make_matrix.pl script:

print "Saving transcript level TPMs into memory...\n"; my $transcriptcountshash = {}; my $geneidhash = {}; my $i=1; # Initialising this as "my $i=1" corrected the issue my @alltranscripts; my $gene; my $transcript; my $count;