reading gz fastq File
shalu sharma <[email protected]> Mon, 25 Feb 2019 11:00:09 -0500
| Newsgroups | gmane.comp.lang.perl.bio.general |
|---|---|
| Message-ID | <CAFb_c-GbR-qf-cL+2P59DH3fDz2kGzwM7Jq-8_2Cwmc+f5ZPiQ@mail.gmail.com> |
--===============7239016018342646306==
Content-Type: multipart/alternative; boundary="000000000000a15f080582ba09b0"
--000000000000a15f080582ba09b0
Content-Type: text/plain; charset="UTF-8"
Hi Everyone,
So i am trying to work on gzip fastq files. In past my script used to
work fine. Now when i ran the same script it gives me an error.
I am just pasting few lines for example and an error message.
Would really appreciate your help.
use Bio::SeqIO;
use Bio::Seq::Quality;
$in = Bio::SeqIO->new(-file => "gunzip -c $ARGV[0]|", -format => 'fastq');
while(my $seq = $in->next_seq){
my $id = $seq->id;
print "$id\n";
}
Error message:
MSG: Could not read file 'gunzip -c com.fastq.gz|': No such file or
directory
STACK: Error::throw
STACK: Bio::Root::Root::throw
/usr/local/apps/eb/BioPerl/1.7.1-foss-2016b-Perl-5.24.1/lib/perl5/site_perl/5.24.1/Bio/Root/Root.pm:447
STACK: Bio::Root::IO::_initialize_io
/usr/local/apps/eb/BioPerl/1.7.1-foss-2016b-Perl-5.24.1/lib/perl5/site_perl/5.24.1/Bio/Root/IO.pm:268
STACK: Bio::SeqIO::_initialize
/usr/local/apps/eb/BioPerl/1.7.1-foss-2016b-Perl-5.24.1/lib/perl5/site_perl/5.24.1/Bio/SeqIO.pm:513
STACK: Bio::SeqIO::fastq::_initialize
/usr/local/apps/eb/BioPerl/1.7.1-foss-2016b-Perl-5.24.1/lib/perl5/site_perl/5.24.1/Bio/SeqIO/
fastq.pm:30
STACK: Bio::SeqIO::new
/usr/local/apps/eb/BioPerl/1.7.1-foss-2016b-Perl-5.24.1/lib/perl5/site_perl/5.24.1/Bio/SeqIO.pm:389
STACK: Bio::SeqIO::new
/usr/local/apps/eb/BioPerl/1.7.1-foss-2016b-Perl-5.24.1/lib/perl5/site_perl/5.24.1/Bio/SeqIO.pm:435
STACK: testGZ.pl:5
Thanks
Shalu
--000000000000a15f080582ba09b0
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Hi Everyone,<div>=C2=A0 =C2=A0 So i am trying to work on g=
zip fastq files. In past my script used to work fine. Now when i ran the sa=
me script it gives me an error.</div><div>I am just pasting few lines for e=
xample and an error message.</div><div>Would really appreciate your help.</=
div><div>
<p class=3D"gmail-p1" style=3D"margin:0px;font-variant-numeric:normal;font-=
variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:no=
rmal;font-family:Menlo;color:rgb(0,0,0)"><span class=3D"gmail-s1" style=3D"=
font-variant-ligatures:no-common-ligatures">use Bio::SeqIO;</span></p>
<p class=3D"gmail-p1" style=3D"margin:0px;font-variant-numeric:normal;font-=
variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:no=
rmal;font-family:Menlo;color:rgb(0,0,0)"><span class=3D"gmail-s1" style=3D"=
font-variant-ligatures:no-common-ligatures">use Bio::Seq::Quality;</span></=
p>
<p class=3D"gmail-p1" style=3D"margin:0px;font-variant-numeric:normal;font-=
variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:no=
rmal;font-family:Menlo;color:rgb(0,0,0)"><span class=3D"gmail-s1" style=3D"=
font-variant-ligatures:no-common-ligatures">$in =3D Bio::SeqIO->new(-fil=
e =3D> "gunzip -c $ARGV[0]|", -format =3D> 'fastq')=
;<span class=3D"gmail-Apple-converted-space">=C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0</span></span></p>
<p class=3D"gmail-p1" style=3D"margin:0px;font-variant-numeric:normal;font-=
variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:no=
rmal;font-family:Menlo;color:rgb(0,0,0)"><span class=3D"gmail-s1" style=3D"=
font-variant-ligatures:no-common-ligatures">while(my $seq =3D $in->next_=
seq){</span></p>
<p class=3D"gmail-p1" style=3D"margin:0px;font-variant-numeric:normal;font-=
variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:no=
rmal;font-family:Menlo;color:rgb(0,0,0)"><span class=3D"gmail-s1" style=3D"=
font-variant-ligatures:no-common-ligatures"><span class=3D"gmail-Apple-conv=
erted-space">=C2=A0 =C2=A0 =C2=A0 </span>my $id =3D $seq->id;</span></p>
<p class=3D"gmail-p1" style=3D"margin:0px;font-variant-numeric:normal;font-=
variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:no=
rmal;font-family:Menlo;color:rgb(0,0,0)"><span class=3D"gmail-s1" style=3D"=
font-variant-ligatures:no-common-ligatures"><span class=3D"gmail-Apple-conv=
erted-space">=C2=A0 =C2=A0 =C2=A0 </span>print "$id\n";</span></p=
>
<p class=3D"gmail-p1" style=3D"margin:0px;font-variant-numeric:normal;font-=
variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:no=
rmal;font-family:Menlo;color:rgb(0,0,0)"><span class=3D"gmail-s1" style=3D"=
font-variant-ligatures:no-common-ligatures">}</span></p><p class=3D"gmail-p=
1" style=3D"margin:0px;font-variant-numeric:normal;font-variant-east-asian:=
normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Me=
nlo;color:rgb(0,0,0)"><span class=3D"gmail-s1" style=3D"font-variant-ligatu=
res:no-common-ligatures"><br></span></p><p class=3D"gmail-p1" style=3D"marg=
in:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stre=
tch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,=
0,0)"><span class=3D"gmail-s1" style=3D"font-variant-ligatures:no-common-li=
gatures">Error message:</span></p><p class=3D"gmail-p1" style=3D"margin:0px=
;font:11px Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span =
class=3D"gmail-s1" style=3D"font-variant-ligatures:no-common-ligatures">MSG=
: Could not read file 'gunzip -c com.fastq.gz|': No such file or di=
rectory</span></p><p class=3D"gmail-p1" style=3D"margin:0px;font:11px Menlo=
;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class=3D"gmail-s=
1" style=3D"font-variant-ligatures:no-common-ligatures">STACK: Error::throw=
</span></p><p class=3D"gmail-p1" style=3D"margin:0px;font:11px Menlo;color:=
rgb(0,0,0);background-color:rgb(255,255,255)"><span class=3D"gmail-s1" styl=
e=3D"font-variant-ligatures:no-common-ligatures">STACK: Bio::Root::Root::th=
row /usr/local/apps/eb/BioPerl/1.7.1-foss-2016b-Perl-5.24.1/lib/perl5/site_=
perl/5.24.1/Bio/Root/Root.pm:447</span></p><p class=3D"gmail-p1" style=3D"m=
argin:0px;font:11px Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255=
)"><span class=3D"gmail-s1" style=3D"font-variant-ligatures:no-common-ligat=
ures">STACK: Bio::Root::IO::_initialize_io /usr/local/apps/eb/BioPerl/1.7.1=
-foss-2016b-Perl-5.24.1/lib/perl5/site_perl/5.24.1/Bio/Root/IO.pm:268</span=
></p><p class=3D"gmail-p1" style=3D"margin:0px;font:11px Menlo;color:rgb(0,=
0,0);background-color:rgb(255,255,255)"><span class=3D"gmail-s1" style=3D"f=
ont-variant-ligatures:no-common-ligatures">STACK: Bio::SeqIO::_initialize /=
usr/local/apps/eb/BioPerl/1.7.1-foss-2016b-Perl-5.24.1/lib/perl5/site_perl/=
5.24.1/Bio/SeqIO.pm:513</span></p><p class=3D"gmail-p1" style=3D"margin:0px=
;font:11px Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span =
class=3D"gmail-s1" style=3D"font-variant-ligatures:no-common-ligatures">STA=
CK: Bio::SeqIO::fastq::_initialize /usr/local/apps/eb/BioPerl/1.7.1-foss-20=
16b-Perl-5.24.1/lib/perl5/site_perl/5.24.1/Bio/SeqIO/<a href=3D"http://fast=
q.pm:30">fastq.pm:30</a></span></p><p class=3D"gmail-p1" style=3D"margin:0p=
x;font:11px Menlo;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span=
class=3D"gmail-s1" style=3D"font-variant-ligatures:no-common-ligatures">ST=
ACK: Bio::SeqIO::new /usr/local/apps/eb/BioPerl/1.7.1-foss-2016b-Perl-5.24.=
1/lib/perl5/site_perl/5.24.1/Bio/SeqIO.pm:389</span></p><p class=3D"gmail-p=
1" style=3D"margin:0px;font:11px Menlo;color:rgb(0,0,0);background-color:rg=
b(255,255,255)"><span class=3D"gmail-s1" style=3D"font-variant-ligatures:no=
-common-ligatures">STACK: Bio::SeqIO::new /usr/local/apps/eb/BioPerl/1.7.1-=
foss-2016b-Perl-5.24.1/lib/perl5/site_perl/5.24.1/Bio/SeqIO.pm:435</span></=
p><p class=3D"gmail-p1" style=3D"margin:0px;font-variant-numeric:normal;fon=
t-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:=
normal;font-family:Menlo;color:rgb(0,0,0)"><span class=3D"gmail-s1" style=
=3D"font-variant-ligatures:no-common-ligatures">
</span></p><p class=3D"gmail-p1" style=3D"margin:0px;font-variant-numeric:n=
ormal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;lin=
e-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class=3D"gmail-s1=
" style=3D"font-variant-ligatures:no-common-ligatures">STACK: testGZ.pl:5</=
span></p><p class=3D"gmail-p1" style=3D"margin:0px;font-variant-numeric:nor=
mal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-=
height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class=3D"gmail-s1" =
style=3D"font-variant-ligatures:no-common-ligatures"><br></span></p><p clas=
s=3D"gmail-p1" style=3D"margin:0px;font-variant-numeric:normal;font-variant=
-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;fo=
nt-family:Menlo;color:rgb(0,0,0)"><span style=3D"font-variant-ligatures:no-=
common-ligatures">Thanks</span></p><p class=3D"gmail-p1" style=3D"margin:0p=
x;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:n=
ormal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"=
><span style=3D"font-variant-ligatures:no-common-ligatures">Shalu</span></p=
></div></div>
--000000000000a15f080582ba09b0--
--===============7239016018342646306==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Bioperl-l mailing list
[email protected]
http://mailman.open-bio.org/mailman/listinfo/bioperl-l
--===============7239016018342646306==--