Tuesday 14 May 2013

[Perl] FASTAQ To FASTA Converter

Codes to convert FASTAQ to FASTA format in Perl programming language

#/usr/bin/perl -w
use strict;

my $file;
my $fileOutput;
my $write=0;

$file = $ARGV[0];
$fileOutput = $ARGV[1];
open (IN, $file) or die “file can not open -$!”;
open OUTPUT, “>$fileOutput”;


while (my $line = )
{
    if($line =~ m/^\@/) {
      print OUTPUT ""
      .">". substr($line,1);
      $write=1;
    } elsif ($write){
      print OUTPUT ""
      .$line. "\n";
      $write=0;
    [...]

Original post : [Perl] FASTAQ To FASTA Converter

No comments:

Post a Comment