This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Help in NGS QC Toolkit

Hi All! I was use NGS QC Toolkit IlluQC.pl),and it keep throw the error:

Use of uninitialized value $avgQRangeF2 in split at /leofs/zhangz_group/xial/NGSQCToolkit_v2.3.3/QC/lib/html.pl line 25.
Use of uninitialized value $seqFormatName in concatenation (.) or string at /leofs/zhangz_group/xial/NGSQCToolkit_v2.3.3/QC/lib/html.pl line 142.

Please someone help me! Thank you

rna-seq

Please give us the exact command you used.

system "perl /leofs/zhangz_group/xial/NGSQCToolkit_v2.3.3/QC/IlluQC.pl -pe /leofs/zhangz_group/xial/data-fastq/Pair-end/$Filename2[$i]/$file1 /leofs/zhangz_group/xial/data-fastq/Pair-end/$Filename2[$i]/$file2 N A -t 2 -l 70 -s 20";

Is that a command you ran on the command line? Or is it a line from a perl script?

#!/usr/bin/perl
use strict;
use warnings;

opendir(FILE,"/share_bio/nas2/zhangz_group/xial/test") or die "Can't open dir ";
my @Filename=readdir(FILE);
closedir(FILE);

my @Filename2 = grep(/^[A-Z]/,@Filename);

for (my $i=0;$i<@Filename2;$i++)
{ 
    next unless ($Filename2[$i] eq "DRP000568"); 
    opendir(FILE,"/share_bio/nas2/zhangz_group/xial/test/$Filename2[$i]") or die "Can't open dir ";
    my @temp=readdir(FILE); 

    my @realFiles = grep(/^[A-Z]/,@temp);

    for (my $j=0;$j<@realFiles;$j++)
    {
        system "perl /share_bio/nas2/zhangz_group/xial/software/NGSQCToolkit_v2.3.3/QC/IlluQC_PRLL.pl -se /share_bio/nas2/zhangz_group/xial/test/$Filename2[$i]/$realFiles[$j] N A –t 2 –l 70 –s 20";
    }
}

I have quite a few questions, but let's address the easy ones first. What is the motive behind comparing a scalar and an array in the for loop? I'm referring to the part which goes $i<@Filename2

oh, I have a lot files, like:

DRP000568
SRP222222
SRP999999

and "next unless" is just want to test if one file works out

Yes, but that doesn't validate comparing a scalar (one value) to an array (a set of values).

No, it's not. scalar(@filename2) will give the length of the filtered array and scalar(@filename) will give you length of the unfiltered array.

I print scalar(@Filename2) and print @filename,it's the same!

True, Perl adapts to scalar and list contexts, but it is always better to be explicit IMO.

Q2: Could you maybe just print the command (like so: print "<command>" instead of system "<command>") and we could verify it is indeed generating the command you want to use?

thank you RamRS and Geek_y !!!!! It worked !!! thanks a lot !!!!

1 answer

Can you run the program externally?

Just run the following command and see if you get all the options

perl /leofs/zhangz_group/xial/NGSQCToolkit_v2.3.3/QC/IlluQC.pl -h

First make sure the program is running properly. Then you can think of integrating it in to perl. Read the manual and make sure you have installed all the dependencies required. Update the modules if necessary.

If the program runs correctly, then as RamRS said, keep print statements and see what command will run.

Yes, this would be a good fail-safe check too.

Log in to answer this question.