Request for feature addition to to extract specified length of flanking sequence around a SSR form MISA output file (genome.misa)
Entering edit mode
12 months ago
Aneesha • 0

I am using obtained from "" to generate input file for the primer3 software. My genome file has chromosome level assembly, the script "" takes whole chromosome for each predicted SSR in a specific chromosome. For example if chromosome-1 has 800 SSR this script put the chromosome-1 800 times in the generated output file which makes file so large to be processed by primer3 software.

The script is given below:


!/usr/bin/perl -w

Author: Thomas Thiel, Sebastian Beier

Program name:

Description: creates a PRIMER3 input file based on SSR search results

open (IN,"<$ARGV[0]") || die ("\nError: Couldn't open results file (*.misa) !\n\n");

my $filename = $ARGV[0];

$filename =~ s/.misa//;

open (SRC,"<$filename") || die ("\nError: Couldn't open source file containing original FASTA sequences !\n\n"); open (OUT,">$filename.p3in");

undef $/;

$in = <IN>;

study $in;


$/= ">";

my $count=0; while (<SRC>) { next unless (my ($id,$seq) = /(.?)\n(.)/s); $seq =~ s/[\d\s>]//g;#remove digits, spaces, line breaks,...

$/="\n"; while(my $line = <IN>) { $line =~ s/\R//g; $id =~ s/\R//g; next unless $line =~ /$id\t(\d+)\t\S+\t\S+\t(\d+)\t(\d+)\t\d+/g; my ($ssr_nr,$size,$start) = ($1,$2,$3);

print OUT "SEQUENCE_ID=$id"."_$ssr_nr\nSEQUENCE_TEMPLATE=$seq\n";
print OUT "SEQUENCE_TARGET=",$start-3,",",$size+6,"\n";

$/= ">"; }; print "\n$count records created.\n"; close(IN); close(SRC); close(OUT); '''

This script is working good with smaller sequence, but in larger sequences it produces very large input file.

If anyone could help to modify the script so that instead of taking whole chromosome, this script can extract a specified length of flanking sequence around the SSR, it will be helpful.

Thank you..

Primer3 ssr MISA Flanking Sequence • 482 views

Login before adding your answer.

Traffic: 1963 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6