Mercurial > repos > john-mccallum > ssr_marker_design
comparison MISA/p3_in.pl @ 0:3006582bfc76
Uploaded V1.0 MISA tools and helper scripts
author | john-mccallum |
---|---|
date | Wed, 14 Sep 2011 23:57:57 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:3006582bfc76 |
---|---|
1 #!/usr/bin/perl -w | |
2 # Author: Thomas Thiel | |
3 # Program name: primer3_in.pl | |
4 # Description: creates a PRIMER3 input file based on SSR search results | |
5 | |
6 open (IN,"<$ARGV[0]") || die ("\nError: Couldn't open misa.pl results file (*.misa) !\n\n"); | |
7 | |
8 #my $filename = $ARGV[0]; | |
9 #$filename =~ s/\.misa//; | |
10 open (SRC,"<$ARGV[1]") || die ("\nError: Couldn't open source file containing original FASTA sequences !\n\n"); | |
11 open (OUT,">$ARGV[2]"); | |
12 | |
13 undef $/; | |
14 $in = <IN>; | |
15 study $in; | |
16 | |
17 $/= ">"; | |
18 | |
19 #my $count; | |
20 while (<SRC>) | |
21 { | |
22 next unless (my ($id,$seq) = /(.*?)\n(.*)/s); | |
23 $seq =~ s/[\d\s>]//g;#remove digits, spaces, line breaks,... | |
24 while ($in =~ /$id\t(\d+)\t\S+\t\S+\t(\d+)\t(\d+)/g) | |
25 { | |
26 my ($ssr_nr,$size,$start) = ($1,$2,$3); | |
27 #$count++; | |
28 print OUT "PRIMER_SEQUENCE_ID=$id"."_$ssr_nr\nSEQUENCE=$seq\n"; | |
29 print OUT "PRIMER_PRODUCT_SIZE_RANGE=100-280\n"; | |
30 print OUT "TARGET=",$start-3,",",$size+6,"\n"; | |
31 print OUT "PRIMER_MAX_END_STABILITY=250\n=\n" | |
32 }; | |
33 }; | |
34 #print "\n$count records created.\n"; |