Mercurial > repos > takakoron > fastq2fasta
view fastq2fasta.pl @ 1:0d2b0feee15b
commit
| author | takakoron <tm@nig.ac.jp> |
|---|---|
| date | Tue, 16 Feb 2016 18:03:52 +0900 |
| parents | eeb91602f5e9 |
| children |
line wrap: on
line source
#!/usr/bin/perl #*--<<Definision>>-----------------------------------------* #PGID fastq2fastq.pl #Kind of PG Main PG #Create Date 2011/02/01 # # Comandline Input File(fasta) # Output File(fastq) #*---------------------------------------------------------* #*********************************************************** # use?錾 #*********************************************************** use 5.8.0; use utf8; use strict; #*********************************************************** # #*********************************************************** my $input; my $output; my $line; #*********************************************************** # Main Coading #*********************************************************** $input = $ARGV[0]; $output = $ARGV[1]; open(OUTPUT, ">$output"); open(INPUT, "<$input") || die "\nThe input file does not exist.\n\n"; my $index = 0; while ($line = <INPUT>) { $index++; if($index == 1){ my $name = substr($line,1); print OUTPUT ">"; print OUTPUT "$name"; }elsif($index == 2){ print OUTPUT "$line"; } if($index == 4){ $index = 0; } } close OUTPUT; close INPUT;
