Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
NJNataren opened this issue Mar 20, 2024 · 0 comments

Comments

@NJNataren
Copy link

NJNataren commented Mar 20, 2024

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;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant