Question: miRdeep2 mapper error
1
gravatar for priscilaneuberndeoliveira
5.4 years ago by
Brazil

Hi everybody!

I'm using the following mapper script for miRNA alignment in miRdeep2, but the reads_vs_genome.arf is empty!

mapper.pl config_teste2.txt -d -e -h -j -l 18 -m -p /storage/raid/home/poliveira/from_ensembl/index -s reads_collapsed.fa -t reads_vs_genome.arf -v -n

and I'm having the following error message:

Use of uninitialized value $count2 in subtraction (-) at /usr/local/bioinfo/opt/mirdeep2_0_0_7/mapper.pl line 704.

total: 18969876 Use of uninitialized value $count2 in print at /usr/local/bioinfo/opt/mirdeep2_0_0_7/mapper.pl line 704.

        18969876        Use of uninitialized value $count2 in division (/) at /usr/local/bioinfo/opt/mirdeep2_0_0_7/mapper.pl line 705.

Use of uninitialized value $count2 in division (/) at /usr/local/bioinfo/opt/mirdeep2_0_0_7/mapper.pl line 705.

 

Please, could somebody help me???

Thanks,

 

mirna alignment software error • 2.7k views
ADD COMMENTlink modified 5.4 years ago • written 5.4 years ago by priscilaneuberndeoliveira20

Thank you very much Nicola!

But instead of -s and -t what I have to use?

ADD REPLYlink modified 12 months ago by RamRS30k • written 5.4 years ago by priscilaneuberndeoliveira20

Try to run the same command without one of them. Let's see what happen.

ADD REPLYlink written 5.4 years ago by Nicola Casiraghi450

Hi,

I tried without -t and I had the following message:

usage: /usr/local/bioinfo/opt/mirdeep2_0_0_7/convert_bowtie_output.pl reads_mapped.bwt
ADD REPLYlink modified 12 months ago by RamRS30k • written 5.4 years ago by priscilaneuberndeoliveira20

HI,

I think is like the alignment is empty, there is any temporary file directly from bowtie, any map or sam file? That part of the code is counting how many hits you have, but since it never enter the loop.

btw: answer should be only answer to the question, anything like comments, should be added using add comment button. :)

ADD REPLYlink modified 12 months ago by RamRS30k • written 5.4 years ago by Lorena Pantano360
0
gravatar for Nicola Casiraghi
5.4 years ago by
Germany, Heidelberg, DKFZ EMBL
Nicola Casiraghi450 wrote:

The error is linked to the presence of options -s and -t that imply some statistics on outputs.

## get some statistics about mapped reads if options{'s'} and options{'t'} are supplied
if($options{'s'} and $options{'t'}){
    read_stats();
}

The part of the script that generates the error is the following. Maybe someone with more experience than me in perl can check it and add more comments. The variable $count2 is present only in this part of the code.

sub read_stats{
    my %hash;
    my $count;
    my %k2;
    my $total;

    open IN,"$options{'s'}" or die "No reads file in fasta format given\n";
    while(<IN>){
        if(/^>*((\S\S\S)\S+_x(\d+))/){
            next if($hash{$1});
            $hash{$1} = 1;
            $count+=$3;
            $k2{$2}+=$3;
        }
    }
    close IN;
    my %hash2;
    my $count2;
    my %k22;

    print STDERR "Mapping statistics\n";
    open IN, "$options{'t'}" or die "No mapping file given\n";
    while(<IN>){
        if(/^>*((\S\S\S)\S+_x(\d+))/){
            next if($hash2{$1});
            $hash2{$1} = 1;
            $count2+=$3;
            $k22{$2}+=$3;
        }
    }

    print STDERR "\n#desc\ttotal\tmapped\tunmapped\t%mapped\t%unmapped\n";
    print STDERR "total: ",$count,"\t",$count2,"\t",$count-$count2,"\t";
    printf STDERR "%.3f\t%.3f\n",$count2/$count,1-($count2/$count);
    foreach(sort keys %k2){
        print STDERR "$_: ",$k2{$_},"\t",$k22{$_},"\t",$k2{$_}-$k22{$_},"\t";
        printf STDERR "%.3f\t%.3f\n",$k22{$_}/$k2{$_},1-($k22{$_}/$k2{$_});
    }
}
ADD COMMENTlink modified 12 months ago by RamRS30k • written 5.4 years ago by Nicola Casiraghi450
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: 1029 users visited in the last hour