Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

replace 454 names for sga to work

  • Loading branch information...
commit 29ef062d9da38a686ba1505507ddb986d910383d 1 parent dd5e1e2
Jason Stajich authored
Showing with 32 additions and 0 deletions.
  1. +32 −0 short-read/fix_454_names_for_sga.pl
32 short-read/fix_454_names_for_sga.pl
View
@@ -0,0 +1,32 @@
+#!/usr/bin/perl -w
+use strict;
+use warnings;
+
+=head1 NAME
+
+fix_454_for_sga.pl
+
+=head1 USAGE
+
+ perl fix_454_for_sga.pl FILE > NEWFIL
+
+=head1 DESCRIPTION
+
+Fix the read names to be /A /B instead of ending in a,b
+
+=cut1
+
+while(<>) {
+ my $id = $_;
+ if( $id =~ /^(\@\S+)([ABab])(\s+.*)/ ) {
+ $id = sprintf("%s/%s%s",$1,uc($2),$3);
+ if( $id !~ /\n$/ ) { $id .= "\n"; }
+ } else {
+ chomp($id);
+ die("cannot process ID - $id doesn't match any pattern\n");
+ }
+ my $seq = <>;
+ my $dsc = <>;
+ my $qual = <>;
+ print $id, $seq, "+\n", $qual;
+}
Please sign in to comment.
Something went wrong with that request. Please try again.