annotate rapsodyn/fastaGroomerForMakeBlastdb.pl @ 8:d857538d9fea draft

Uploaded
author mcharles
date Fri, 10 Oct 2014 07:05:36 -0400
parents 3f7b0788a1c4
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
1 #!/usr/bin/perl
7
3f7b0788a1c4 Uploaded
mcharles
parents: 0
diff changeset
2 #V1.0.0
0
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
3 my $inputfasta = $ARGV[0];
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
4
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
5 open(IB, $inputfasta) or die ("Can't open $inputfasta \n");
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
6
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
7 while (my $ligne = <IB>){
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
8 if ($ligne=~/\[.*?\=.*?\]/){
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
9 $ligne =~ s/[\[\]]//g;
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
10 print $ligne;
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
11 }
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
12 elsif ($ligne =~/^\>/){
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
13 print $ligne;
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
14 $ligne = <IB>;
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
15 $ligne =~ s/N/a/g;
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
16 print $ligne;
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
17 }
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
18 else {
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
19 print $ligne;
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
20 }
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
21 }
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
22
442a7c88b886 Uploaded
mcharles
parents:
diff changeset
23 close (IB);