<s> """<STR_LIT>""" <EOL> class Summary ( object ) : <EOL> """<STR_LIT>""" <EOL> @ property <EOL> def fieldsNames ( self ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError ( "<STR_LIT>" ) <EOL> @ property <EOL> def fields ( self ) : <EOL> """<STR_LIT>""" <EOL> raise NotImplementedError ( "<STR_LIT>" ) <EOL> def __str__ ( self ) : <EOL> return "<STR_LIT:\n>" . join ( [ "<STR_LIT>" . format ( name = name , val = val ) <EOL> for name , val in zip ( self . fieldsNames , self . fields ) ] ) <EOL> def write ( self , outFile ) : <EOL> """<STR_LIT>""" <EOL> assert ( len ( self . fieldsNames ) == len ( self . fields ) ) <EOL> with open ( outFile , '<STR_LIT:w>' ) as writer : <EOL> writer . write ( self . __str__ ( ) + "<STR_LIT:\n>" ) <EOL> class ClassifySummary ( Summary ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self ) : <EOL> Summary . __init__ ( self ) <EOL> self . num_reads = <NUM_LIT:0> <EOL> self . num_5_seen = <NUM_LIT:0> <EOL> self . num_3_seen = <NUM_LIT:0> <EOL> self . num_polyA_seen = <NUM_LIT:0> <EOL> self . num_filtered_short_reads = <NUM_LIT:0> <EOL> self . num_fl = <NUM_LIT:0> <EOL> self . num_flnc = <NUM_LIT:0> <EOL> self . num_flc = <NUM_LIT:0> <EOL> self . num_flnc_bases = <NUM_LIT:0> <EOL> self . num_nfl = <NUM_LIT:0> <EOL> self . num_nflnc = None <EOL> self . num_nflc = None <EOL> @ property <EOL> def avg_flnc_len ( self ) : <EOL> """<STR_LIT>""" <EOL> return int ( self . num_flnc_bases / self . num_flnc ) <EOL> @ property <EOL> def fieldsNames ( self ) : <EOL> """<STR_LIT>""" <EOL> rets = [ "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" ] <EOL> if self . num_nflnc is not None and self . num_nflc is not None : <EOL> rets . extend ( [ "<STR_LIT>" , <EOL> "<STR_LIT>" ] ) <EOL> return rets <EOL> @ property <EOL> def fields ( self ) : <EOL> """<STR_LIT>""" <EOL> rets = [ self . num_reads , <EOL> self . num_5_seen , <EOL> self . num_3_seen , <EOL> self . num_polyA_seen , <EOL> self . num_filtered_short_reads , <EOL> self . num_nfl , <EOL> self . num_fl , <EOL> self . num_flnc , <EOL> self . avg_flnc_len ] <EOL> if self . num_nflnc is not None and self . num_nflc is not None : <EOL> rets . extend ( [ self . num_nflnc , self . num_nflc ] ) <EOL> return rets <EOL> class ClusterSummary ( Summary ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self ) : <EOL> Summary . __init__ ( self ) <EOL> self . numConsensusIsoforms = <NUM_LIT:0> <EOL> self . numTotalBases = <NUM_LIT:0> <EOL> self . num_polished_hq_isoforms = None <EOL> self . num_polished_lq_isoforms = None <EOL> @ property <EOL> def avgConsensusIsoformLength ( self ) : <EOL> """<STR_LIT>""" <EOL> return int ( self . numTotalBases / self . numConsensusIsoforms ) <EOL> @ property <EOL> def fieldsNames ( self ) : <EOL> """<STR_LIT>""" <EOL> fs = [ "<STR_LIT>" , <EOL> "<STR_LIT>" ] <EOL> if self . num_polished_hq_isoforms is not None : <EOL> fs += [ "<STR_LIT>" ] <EOL> if self . num_polished_lq_isoforms is not None : <EOL> fs += [ "<STR_LIT>" ] <EOL> return fs <EOL> @ property <EOL> def fields ( self ) : <EOL> """<STR_LIT>""" <EOL> fv = [ self . numConsensusIsoforms , <EOL> self . avgConsensusIsoformLength ] <EOL> if self . num_polished_hq_isoforms is not None : <EOL> fv += [ self . num_polished_hq_isoforms ] <EOL> if self . num_polished_lq_isoforms is not None : <EOL> fv += [ self . num_polished_lq_isoforms ] <EOL> return fv </s>
