Question: SAMBaseCounts.pl Something is Wrong
0
gravatar for lcushma
13 months ago by
lcushma0
lcushma0 wrote:

when I run Meyer's newest pipeline, i get this error when counting nucleotide frequencies

beginning analysis of nucleotide frequencies in gmapperFiltered.sam...
Reading reference...
Finished loading reference. into memory.
Reading alignments and counting nucleotides at each position...

    Something is wrong.
     G A A T G T T G A G G T G C A G T A C G A T G C C A G T G A T A C 5 6 0 0 0 0 0   7 0 2 8 4 2 2   7 0 2 8 4 2 2 . ^M A T G
     1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36

I've tried to troubleshoot and started the pipeline over 3 times in 3 separate directories, still no luck. can anyone offer any insight to what this error means? In the original script, the error occurs when,

#count each base toward nucleotide frequencies at the corresponding reference position
    @reada = split("",$cols[9]);

    if (@reada ne @codea) {print "Something is wrong.\n @reada \n @codea\n"; exit;}
    $readpos = -1;
    foreach $b (@reada)
        {
        $readpos++;
        if ($codea[$readpos] eq 0) {next;}
        if ($codea[$readpos] eq "") {next;}
        $nfh{$cols[2]}{$codea[$readpos]}{$b}++;
        }
    }
print "Finished reading and counting alignments.\n";

I don't know PERL well enough tot troubleshoot the cause. thanks!

software error • 349 views
ADD COMMENTlink modified 13 months ago • written 13 months ago by lcushma0
1

Why does your read have numbers in it?

ADD REPLYlink written 13 months ago by swbarnes27.8k

I take it that’s what the ne is in the if statement? I have no idea why there’s numbers in the reads. I will double check them. Thanks for your input!

ADD REPLYlink written 13 months ago by lcushma0

No, that statement is checking to see if the reada array has the same number of elements as codea array (don't know how it's populating that). That check is false, and to help debug, it's outputting both arrays.

ADD REPLYlink written 13 months ago by swbarnes27.8k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 915 users visited in the last hour