Re: need help from a new hand for perl
At 03:43 PM 8/19/2009 -0500, Fei Shi wrote: Only when I run the code below I have a little problem: *cat ids_overlap_* | sort -u a file name* I have 3 files named as *ids_overlap_*(21Us/coding/ram)*. The error message is: *The system cannot find the file specified. cat.exe: write error : invalid argument* Why are there star characters there? If u are trying to run that line from within a perl script it won't work. system 'cat ids_overlap_* | sort -u a file name'; or @return = `cat ids_overlap_* | sort -u a file name`; -- REMEMBER THE WORLD TRADE CENTER ---= WTC 911 =-- ...ne cede malis 0100 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: need help from a new hand for perl
On Tue, Aug 25, 2009 at 1:08 PM, Chris Wagnerwagn...@plebeian.com wrote: At 03:43 PM 8/19/2009 -0500, Fei Shi wrote: Only when I run the code below I have a little problem: *cat ids_overlap_* | sort -u a file name* I have 3 files named as *ids_overlap_*(21Us/coding/ram)*. The error message is: *The system cannot find the file specified. cat.exe: write error : invalid argument* Why are there star characters there? If u are trying to run that line from within a perl script it won't work. system 'cat ids_overlap_* | sort -u a file name'; or @return = `cat ids_overlap_* | sort -u a file name`; I have not seen the previous posts but if you are trying to run this on windows it won't as you are trying to invoke a unix-is shell command. Maybe under Cygwin. I don't know what are you trying to achieve but I guess the next line is reading the file a file name so you will have the list of ids_overlap_* files in an array. It would be easier to use the glob() function of perl: @return = glob ids_overlap_*; and if you want them sorted then this will do it: @return = sort glob ids_overlap_*; Gabor http://szabgab.com/blog.html ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: need help from a new hand for perl
Fei Shi wrote: The error message is as follows: *Copying subject file 'cp' is not recognized as an internal or external command, operable program or batch file. formatting subject file [NULL_Caption] ERROR: Could not open blast_dir_temp/file_subject Try to install MSYS: http://www.mingw.org/wiki/msys It contains rm, cp and other unix-like commands. -- Serguei Trouchelle ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: need help from a new hand for perl
Hi Fei, I had the same problem some time ago. I solved it with tools from the following resource. http://www.math.utah.edu/~beebe/gnu-on-windows.html Many DOS commands are different in UNIX. Like dir / ls or del rm. The other issue you will have to consider when modifying the script is how you move/direct to directories. I do not remember exactly but in some cases in windows // were necessary. I finally moved to Mac Hope it helps. Daniel On Aug 18, 2009, at 5:39 PM, Fei Shi wrote: Hi, Dear perl experts: I am a new hand of perl. I use perl because I am trying to use a package called miRDeep. I install the activeperl 5.10 for windows. Then I used the MS DOS to try perl. But there is an error coming out when I tried to run this command their demo: perl auto_blast.pl 454_aligned.fa precursors. fa-b signatures. The error message is as follows: Copying subject file 'cp' is not recognized as an internal or external command, operable program or batch file. formatting subject file [NULL_Caption] ERROR: Could not open blast_dir_temp/file_subject Blasting query file against subject file [NULL_Caption] WARNING: readdb: wrong version of formatdb was used to make database blast_dir_temp/file_subject. [NULL_Caption] WARNING: bartel_100023_x1: readdb: wrong version of formatdb was used to make database blast_dir_temp/file_subject. Parsing blast output: 'cat' is not recognized as an internal or external command, operable program or batch file. 'cat' is not recognized as an internal or external command, operable program or batch file. 'cat' is not recognized as an internal or external command, operable program or batch file. 'rm' is not recognized as an internal or external command, operable program or batch file. 'rm' is not recognized as an internal or external command, operable program or batch file. But I think the perl code auto_blast.pl is tested maturely by the author of the package so I am suspicious that there may be something wrong with my system? The MS DOS is 5.1.2600 by windows XP. I wonder if the above error message due to this or other reasons? I really appreciate if someone can point me out of this and give me a clue of the problem. Thank you very much for your time. Sincerely, Fei ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: need help from a new hand for perl
Hi, All: Thank you for all your inputs. They really help me a lot~~[?] I downloaded the package UnxUtils and put my perl program under its bin folder. After I changed the windows system path variable, I can run the perl in the DOS system. Only when I run the code below I have a little problem: *cat ids_overlap_* | sort -u a file name* I have 3 files named as *ids_overlap_*(21Us/coding/ram)*. The error message is: *The system cannot find the file specified. cat.exe: write error : invalid argument* I wonder there is more than one version of cat.exe or sort.exe or the calling code (_*?) is not right? Again, thanks for all your inputs. Have a nice day! Fei On Wed, Aug 19, 2009 at 10:20 AM, Daniel Bara daniel.b...@predictionlabs.com wrote: Hi Fei, I had the same problem some time ago. I solved it with tools from the following resource. http://www.math.utah.edu/~beebe/gnu-on-windows.htmlhttp://www.math.utah.edu/%7Ebeebe/gnu-on-windows.html Many DOS commands are different in UNIX. Like dir / ls or del rm. The other issue you will have to consider when modifying the script is how you move/direct to directories. I do not remember exactly but in some cases in windows // were necessary. I finally moved to Mac Hope it helps. * * Daniel On Aug 18, 2009, at 5:39 PM, Fei Shi wrote: Hi, Dear perl experts: I am a new hand of perl. I use perl because I am trying to use a package called miRDeephttp://www.mdc-berlin.de/en/research/research_teams/systems_biology_of_gene_regulatory_elements/projects/miRDeep/index.html. I install the *activeperl 5.10 for windows*. Then I used the MS DOS to try perl. But there is an error coming out when I tried to run this command their demo: perl auto_blast.pl 454_aligned.fa precursors. fa-b signatures. The error message is as follows: *Copying subject file 'cp' is not recognized as an internal or external command, operable program or batch file. formatting subject file [NULL_Caption] ERROR: Could not open blast_dir_temp/file_subject Blasting query file against subject file [NULL_Caption] WARNING: readdb: wrong version of formatdb was used to make database blast_dir_temp/file_subject. [NULL_Caption] WARNING: bartel_100023_x1: readdb: wrong version of formatdb was used to make database blast_dir_temp/file_subject. Parsing blast output: 'cat' is not recognized as an internal or external command, operable program or batch file. 'cat' is not recognized as an internal or external command, operable program or batch file. 'cat' is not recognized as an internal or external command, operable program or batch file. 'rm' is not recognized as an internal or external command, operable program or batch file. 'rm' is not recognized as an internal or external command, operable program or batch file. * But I think the perl code *auto_blast.pl* is tested maturely by the author of the package so I am suspicious that there may be something wrong with my system? The *MS DOS is 5.1.2600 by windows XP*. I wonder if the above error message due to this or other reasons? I really appreciate if someone can point me out of this and give me a clue of the problem. Thank you very much for your time. Sincerely, Fei ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs 330.gif___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
need help from a new hand for perl
Hi, Dear perl experts: I am a new hand of perl. I use perl because I am trying to use a package called miRDeephttp://www.mdc-berlin.de/en/research/research_teams/systems_biology_of_gene_regulatory_elements/projects/miRDeep/index.html. I install the *activeperl 5.10 for windows*. Then I used the MS DOS to try perl. But there is an error coming out when I tried to run this command their demo: perl auto_blast.pl 454_aligned.fa precursors. fa-b signatures. The error message is as follows: *Copying subject file 'cp' is not recognized as an internal or external command, operable program or batch file. formatting subject file [NULL_Caption] ERROR: Could not open blast_dir_temp/file_subject Blasting query file against subject file [NULL_Caption] WARNING: readdb: wrong version of formatdb was used to make database blast_dir_temp/file_subject. [NULL_Caption] WARNING: bartel_100023_x1: readdb: wrong version of formatdb was used to make database blast_dir_temp/file_subject. Parsing blast output: 'cat' is not recognized as an internal or external command, operable program or batch file. 'cat' is not recognized as an internal or external command, operable program or batch file. 'cat' is not recognized as an internal or external command, operable program or batch file. 'rm' is not recognized as an internal or external command, operable program or batch file. 'rm' is not recognized as an internal or external command, operable program or batch file. * But I think the perl code *auto_blast.pl* is tested maturely by the author of the package so I am suspicious that there may be something wrong with my system? The *MS DOS is 5.1.2600 by windows XP*. I wonder if the above error message due to this or other reasons? I really appreciate if someone can point me out of this and give me a clue of the problem. Thank you very much for your time. Sincerely, Fei ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: need help from a new hand for perl
Hi Fei Shi, It looks like your auto_blast.pl is not set up to run on Windows. Those are UNIX system commands that it's erroring on (rm, cp, cat). On Tue, Aug 18, 2009 at 3:39 PM, Fei Shijustfly2...@gmail.com wrote: Hi, Dear perl experts: I am a new hand of perl. I use perl because I am trying to use a package called miRDeep. I install the activeperl 5.10 for windows. Then I used the MS DOS to try perl. But there is an error coming out when I tried to run this command their demo: perl auto_blast.pl 454_aligned.fa precursors. fa-b signatures. The error message is as follows: Copying subject file 'cp' is not recognized as an internal or external command, operable program or batch file. formatting subject file [NULL_Caption] ERROR: Could not open blast_dir_temp/file_subject Blasting query file against subject file [NULL_Caption] WARNING: readdb: wrong version of formatdb was used to make database blast_dir_temp/file_subject. [NULL_Caption] WARNING: bartel_100023_x1: readdb: wrong version of formatdb was used to make database blast_dir_temp/file_subject. Parsing blast output: 'cat' is not recognized as an internal or external command, operable program or batch file. 'cat' is not recognized as an internal or external command, operable program or batch file. 'cat' is not recognized as an internal or external command, operable program or batch file. 'rm' is not recognized as an internal or external command, operable program or batch file. 'rm' is not recognized as an internal or external command, operable program or batch file. But I think the perl code auto_blast.pl is tested maturely by the author of the package so I am suspicious that there may be something wrong with my system? The MS DOS is 5.1.2600 by windows XP. I wonder if the above error message due to this or other reasons? I really appreciate if someone can point me out of this and give me a clue of the problem. Thank you very much for your time. Sincerely, Fei ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: need help from a new hand for perl
At 04:39 PM 8/18/2009 -0500, Fei Shi wrote: But there is an error coming out when I tried to run this command their demo: perl auto_blast.pl 454_aligned.fa precursors. fa-b signatures. The error message is as follows: *Copying subject file 'cp' is not recognized as an internal or external Yep, it looks like that perl script is not Windows compatible. It's using Unix shell commands instead of the pure Perl equivalents. One thing u can do is install Cygwin and use its version of Perl to try running the script. Cygwin provides a Unix like shell for Windows. cygwin.com -- REMEMBER THE WORLD TRADE CENTER ---= WTC 911 =-- ...ne cede malis 0100 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs