Question: Help in NGS QC Toolkit
0
gravatar for caelyn5201314
4.4 years ago by
China/Beijing/Chinese Academic Of Science
caelyn520131410 wrote:

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 • 2.0k views
ADD COMMENTlink modified 4.4 years ago • written 4.4 years ago by caelyn520131410

Please give us the exact command you used.

ADD REPLYlink written 4.4 years ago by RamRS21k

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"; 

ADD REPLYlink written 4.4 years ago by caelyn520131410

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

ADD REPLYlink written 4.4 years ago by RamRS21k
#!/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";
    }
}
ADD REPLYlink modified 4.4 years ago by RamRS21k • written 4.4 years ago by caelyn520131410

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

ADD REPLYlink written 4.4 years ago by RamRS21k

oh,i have a lot files, like : 

DRP000568

SRP222222

SRP999999

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

ADD REPLYlink written 4.4 years ago by caelyn520131410

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

ADD REPLYlink written 4.4 years ago by RamRS21k

@filename2 is the length of the array

ADD REPLYlink written 4.4 years ago by caelyn520131410

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

ADD REPLYlink written 4.4 years ago by RamRS21k
1

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

ADD REPLYlink written 4.4 years ago by caelyn520131410

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

ADD REPLYlink written 4.4 years ago by RamRS21k

ok...thank you !!!:)

ADD REPLYlink written 4.4 years ago by caelyn520131410

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 wanna use?

ADD REPLYlink written 4.4 years ago by RamRS21k
0
gravatar for geek_y
4.4 years ago by
geek_y9.6k
Barcelona/CRG/London/Imperial
geek_y9.6k wrote:

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 Rams said, keep print statements and see what command will  run. 

ADD COMMENTlink modified 4.4 years ago • written 4.4 years ago by geek_y9.6k

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

ADD REPLYlink written 4.4 years ago by RamRS21k
0
gravatar for caelyn5201314
4.4 years ago by
China/Beijing/Chinese Academic Of Science
caelyn520131410 wrote:

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

ADD COMMENTlink written 4.4 years ago by caelyn520131410
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: 1153 users visited in the last hour