#!/usr/bin/env python
# -*- coding: utf-8 -*-

# *********************************************************************
# featureExtract() function will extract subgraph features
# *********************************************************************

# import the modules needed to run the script
import os,sys

subgraphSize = str(sys.argv[1])  # subgraph size(2,3,4,234)
dbEnd = int(sys.argv[2])  # the end number of the database

# valid subgraph size
validSize=['2','3','4','234']
if subgraphSize in validSize:
    print '\n*********************************************************************\n'
    print "Subgraph size: ",subgraphSize,' is valid!\n'
else:
    print '\n*********************************************************************\n'
    print "Invalid subgraph size, system exit! "
    print '\n*********************************************************************\n'
    raise SystemExit

# subgraph size 234 is the combination of subgraph size 2, 3 and 4
if subgraphSize == '234':
    runSize = ['2','3','4']
else:
    runSize = [subgraphSize]

# subgraph size 2, 3 and 4 have 2, 13 and 199 types of subgraph, respectively
for e_subgraphSize in runSize: