in reply to Re: Identifying Overlapping Area in a Set of Strings
in thread Identifying Overlapping Area in a Set of Strings
And thismy $fseq1= 'CCCCGCGC'; my @nsub1= ('CCCCG', 'CCCGC', 'CGCGC'); #produces $result1 = [ [ 0, 'C----' ], [ 1, '----C' ], [ 1, 'CC---' ], # but this is extra [ 2, '---GC' ] ];
my $fseq2= 'CCGCGCTC'; my @nsub2= ( 'CCGCG', 'CGCGC', 'GCGCT', 'CGCTC' ); #produces $result2 = [ [ 0,'C----' ], [ 1,'----C' ], [ 1,'C----' ], # extra [ 2,'----T' ], [ 2,'G----' ], # extra [ 3,'----C' ], ];
# So here we can observe that every element of the # array is only produced 'once' # E.g (0,1,2) versus (0,1,1,2) $result1 = [ [ 0, 'C----' ], [ 1, '----C' ], [ 2, '---GC' ] ]; # E.g (0,1,2,3) versus (0,1,1,2,2,3) $result2 = [ [ 0,'C----' ], [ 1,'----C' ], [ 2,'----T' ], [ 3,'----C' ], ];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Identifying Overlapping Area in a Set of Strings
by rnahi (Curate) on Jul 29, 2005 at 17:35 UTC | |
by monkfan (Curate) on Jul 30, 2005 at 04:01 UTC |