2c2
<  # Copyright (c) 2012, Moitrayee Bhattacharyya, Kallol Gupta, P. Balaram, Indian Institute of Science, Bangalore, India.
---
>  # Copyright (c) 2012, Moitrayee Bhattacharyya, Kallol Gupta, P. Balaram, Indian Institute of Science, Bangalore, India
13c13
<  # (3) Neither the name of the Indian Institute of Science, Bangalore, India 
---
>  # (3) Neither the name of the Indian Institute of Science, Bangalore, India
29a30
> 
38c39
< use constant COMBINATION_EXE => './comb';
---
> use constant COMBINATION_EXE => 'comb_win';
101,104d101
< my @off1 = ();
< my @off2 = ();
< my %offset1 = ();
< my %offset2 = ();
110d106
< my $neg_seq = 0;
112d107
< # Parse arguments and assign to variables
126d120
< # Open the fil_pep_cys.out (contains string of characters in every line, which are to be combined) 
130,132d123
< # Parse the file and gather all the information in it in the arrays
< # File format - 3 columns:
< #    <string contains peptides sequence>    <mass of peptide sequence>     <number of cystines>
135,140c126,128
<  	# remove new lines, spaces, etc. from the end
< 	chomp $line;     
< 	my @flds = trim split(/\s+/, $line); 
< 
< 	# Add the  
< 	push @peptides, uc $flds[0] if( @flds && scalar @flds > 1 && $flds[0] =~ /^[A-Z]+$/i);
---
> 	chomp $line;
> 	my @flds = trim split(/\s+/, $line);
> 	push @peptides , uc $flds[0] if( @flds && scalar @flds > 1 && $flds[0] =~ /^[A-Z]+$/i);
143,144d130
< 	push @off1, $flds[3] if ( @flds && scalar @flds > 1 );
< 	push @off2, $flds[4] if ( @flds && scalar @flds > 1 );
147,150d132
< 
< 
< # Assign unique tag to each peptide sequence and insert them into hashtables
< #print "Assigning unique tags and splitting with '$new_delim'\n";
154d135
<     #  	print "\tTAG: $tag\n";
158,162c139
< 	$offset1{$tag} = $off1[$i];
< 	$offset2{$tag} = $off2[$i];
< #	print "\t\tpeptide_map\{\$tag\} = $peptide_map{$tag}\n";
< 
< 	# Split the sequence into individual peptides and put them into a second level map
---
> #	print "$peptide_m{$tag}\n";
167c144
< #		print "\t\t\tsplit = $_\n";
---
> #		print $_,"\n";
172d148
< # For each peptide sequence  
179,185c155
< 		my ($start_offset_i, $start_offset_j, $end_offset_i, $end_offset_j);
< 		$start_offset_i = $offset1{$tag_i};
< 		$start_offset_j = $offset1{$tag_j};
< 		$end_offset_i = $offset2{$tag_i};
< 		$end_offset_j = $offset2{$tag_j};
< 
< 		if ( ($start_offset_j >= $start_offset_i && $start_offset_j <= $end_offset_i) || ($start_offset_i >= $start_offset_j && $start_offset_i <= $end_offset_j)) 
---
> 		foreach my $str ( keys %{ $conflict_list{$tag_i} } )
187,196c157,161
< 			$conflict_map{$tag_i}{$tag_j} = 1;
< 		}	
< 			
< 		# foreach my $str ( keys %{ $conflict_list{$tag_i} } )
< 		#{
< 		#	if( $peptide_map{$tag_j} =~ /^$str/ )
< 		#	{
< 		#		$conflict_map{$tag_i}{$tag_j} = 1;
< 		#	}
< 		#}
---
> 			if( $peptide_map{$tag_j} =~ /^$str/ )
> 			{
> 				$conflict_map{$tag_i}{$tag_j} = 1;
> 			}
> 		}
225,226c190
< 
< $tuple=$#bag+1;
---
> #print "$sstr\n";
237d200
< 
240c203
< 	#	print $str,"\n"; 
---
> #		print $str,"\n"; 
