Skip to content

portah/repeats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

repeats

Qt program reads standart input and looks for all repeats in a string longer then min and less then max. Output is the longest strike for the sequence.

compile

qmake
make

run

cat file |./substrings -min=4 -max=15 |sort -k1,1

example

Input string: MRFPSIFTAVLFAASSALAAPVNTTTEDETAQIPAEAVIGYLDLEGDFDVAVLPFSNSTNNGLLFINTTIASIAAKEEGVSLDKREAEAWHWLQLKPGQPMYKREAEAEAWHWLQLKPGQPMYKREADAEAWHWLQLKPGQPMYKREADAEAWHWLQLKPGQPMY

Ouptut:

ADAEAWHWLQLKPGQ	2
AEAWHWLQLKPGQPM	4
AWHWLQLKPGQPMYK	3
DAEAWHWLQLKPGQP	2
EADAEAWHWLQLKPG	2
EAEA	3
EAEAWHWLQLKPGQP	2
EAWHWLQLKPGQPMY	4
GQPMY	4
GQPMYKREA	3
GQPMYKREADAEAWH	2
HWLQLKPGQPMY	4
HWLQLKPGQPMYKRE	3
KPGQPMY	4
KPGQPMYKREA	3
KPGQPMYKREADAEA	2
KREA	4
KREADAEAWHWLQLK	2
KREAEA	2
LKPGQPMY	4
LKPGQPMYKREA	3
LKPGQPMYKREADAE	2
LQLKPGQPMY	4
LQLKPGQPMYKREA	3
LQLKPGQPMYKREAD	2
MYKREA	3
MYKREADAEAWHWLQ	2
PGQPMY	4
PGQPMYKREA	3
PGQPMYKREADAEAW	2
PMYKREA	3
PMYKREADAEAWHWL	2
QLKPGQPMY	4
QLKPGQPMYKREA	3
QLKPGQPMYKREADA	2
QPMY	4
QPMYKREA	3
QPMYKREADAEAWHW	2
READAEAWHWLQLKP	2
REAEA	2
WHWLQLKPGQPMY	4
WHWLQLKPGQPMYKR	3
WLQLKPGQPMY	4
WLQLKPGQPMYKREA	3
YKREA	3
YKREADAEAWHWLQL	2