annotate rapsodyn/fastaGroomerForMakeBlastdb.pl @ 2:761fecc07fa9 draft

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