ssf2tnt_pos.pl 479 Bytes
Newer Older
priyank's avatar
priyank committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
#!/usr/bin/perl


sub ssf2tnt_pos{
	my $line;
	while ($line = <>)
	{
		chomp($line);
		if($line=~/<\/S/)
		{
			print "\n";
			next;
		}
		if($line =~ /^\s*$/)  # if the line has all space charcters 
		{
			print "\n";
			next;
		}
		$line=~s/[ ]+/___/g;
		my ($att1,$att2,$att3,$att4) = split (/[\t]+/, $line);
		if($att1 =~ /$\<.*/ || $att2 eq "((" || $att2 eq "))") #unwanted lines
		{
			next;
		}
		else
		{
			print $att2,"\t",$att3,"\t",$att4,"\n";
		}
	}
}
&ssf2tnt_pos;