# HG changeset patch # User takakoron # Date 1455616380 18000 # Node ID c870a3e95aa6427e86db925ea3789dede150ba56 # Parent 5569f88a8194dde7606c78937749a62f3ac9c92b Uploaded diff -r 5569f88a8194 -r c870a3e95aa6 fastq2fasta.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fastq2fasta.pl Tue Feb 16 04:53:00 2016 -0500 @@ -0,0 +1,47 @@ +#!/usr/bin/perl + +#*--<>-----------------------------------------* +#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 = ) { + $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;