Module Expr Str Import alias Import alias identifier ImportFrom alias alias ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body If BoolOpOr CompareIs AttributeLoad NameLoad attr NameLoad CompareEq Call NameLoad AttributeLoad NameLoad attr Num body Return BinOpAdd BinOpAdd Call AttributeLoad Str attr keyword AttributeLoad NameLoad attr Str Call AttributeLoad Str attr keyword AttributeLoad NameLoad attr orelse Return BinOpAdd BinOpAdd Call AttributeLoad Str attr keyword AttributeLoad NameLoad attr Call AttributeLoad Str attr keyword Call NameLoad AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Call AttributeLoad Str attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareGt NameLoad Num body Raise Call NameLoad BinOpAdd Str Str Assign NameStore Call AttributeLoad Str attr keyword AttributeLoad NameLoad attr keyword NameLoad Return Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Num Assign AttributeStore NameLoad attr ListLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr NameLoad If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr With Call NameLoad AttributeLoad NameLoad attr NameStore body For TupleStore NameStore NameStore Call NameLoad NameLoad body If BoolOpAnd BoolOpOr BoolOpAnd CompareEq NameLoad Num CompareEq NameLoad NameLoad BoolOpAnd CompareGt NameLoad Num CompareEq BinOpMod NameLoad AttributeLoad NameLoad attr Num CompareNotEq NameLoad Num body AugAssignAdd NameStore Num Expr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Return Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Import alias Assign NameStore Call AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Import alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad ImportFrom alias Expr Call NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr keyword Call AttributeLoad NameLoad attr NameLoad keyword Call NameLoad Expr Call NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr decorator_list If CompareEq NameLoad Str body Import alias Expr Call AttributeLoad NameLoad attr Call NameLoad
N/A N/A Define Class `FastaSplitter` which splits a fasta file into
smaller files each containing `reads_per_split` reads. N/A os N/A os.path op pbcore.io FastaReader FastaWriter pbtools.pbtranscript.Utils mkdir FastaSplitter N/A object N/A N/A An object of `FastaSplitter` splits a fasta file into
    smaller chunks with a given prefix. __init__ N/A N/A self input_fasta reads_per_split out_dir out_prefix N/A N/A N/A N/A self input_fasta input_fasta N/A N/A self out_dir out_dir N/A N/A self reads_per_split reads_per_split N/A N/A self out_prefix out_prefix N/A N/A self out_fns None N/A N/A mkdir N/A self out_dir N/A __str__ N/A N/A self N/A N/A N/A N/A N/A N/A self out_fns None N/A N/A len N/A self out_fns 0 N/A N/A N/A N/A N/A N/A {input_fasta}  format input_fasta N/A self input_fasta will be splitted into files each has  N/A N/A {n} reads. format n N/A self reads_per_split N/A N/A N/A N/A N/A N/A {input_fasta} has been splitted into  format input_fasta N/A self input_fasta N/A N/A {m} files each has {n} reads:
 format m N/A len N/A self out_fns n N/A self reads_per_split N/A N/A ; join N/A self out_fns N/A _out_fn N/A N/A self split_index N/A N/A N/A Return name of the `split_index`-th splitted file. N/A N/A split_index 999 N/A N/A N/A ValueError N/A Too many splitted files to generate: number  of splitted files exceed 1000. N/A name N/A N/A {prefix}_{idx:03d}.fasta format prefix N/A self out_prefix idx split_index N/A N/A N/A op join N/A self out_dir name N/A split N/A N/A self first_split N/A None N/A N/A Split `input_fasta` into smaller files each containing
        `reads_per_split` reads. Return splitted fasta. N/A split_index 0 N/A N/A self out_fns N/A N/A writer N/A FastaWriter N/A N/A self _out_fn split_index N/A N/A N/A N/A self out_fns append N/A N/A self _out_fn split_index N/A N/A first_split None N/A N/A first_split N/A self reads_per_split N/A N/A FastaReader N/A self input_fasta reader N/A N/A N/A ridx r N/A enumerate reader N/A N/A N/A N/A N/A N/A split_index 0 N/A ridx first_split N/A N/A split_index 0 N/A N/A ridx N/A self reads_per_split 0 N/A ridx 0 N/A N/A split_index 1 N/A N/A N/A writer close N/A writer N/A FastaWriter N/A N/A self _out_fn split_index N/A N/A N/A N/A self out_fns append N/A N/A self _out_fn split_index N/A N/A N/A writer writeRecord N/A r name N/A r sequence N/A N/A N/A writer close N/A N/A list N/A self out_fns N/A rmOutFNs N/A N/A self N/A N/A N/A Remove splitted files. N/A f N/A self out_fns N/A N/A N/A N/A os remove f N/A N/A self out_fns N/A N/A N/A splitFasta N/A N/A input_fasta reads_per_split out_dir out_prefix first_split N/A None N/A N/A 
    Split input_fasta into small fasta files each containing at most
    reads_per_split reads. All splitted fasta files will be placed under
    out_dir with out_prefix. Return paths to splitted files in a list.
     N/A obj N/A FastaSplitter input_fasta input_fasta reads_per_split reads_per_split out_dir out_dir out_prefix out_prefix N/A N/A N/A obj split first_split N/A get_args N/A N/A N/A N/A N/A Get arguments. N/A argparse N/A parser N/A N/A argparse ArgumentParser description Split a fasta file into smaller chunks. N/A N/A N/A parser add_argument input_fasta type str help Input fasta to be splitted. N/A N/A N/A parser add_argument reads_per_split type int help Reads per split. N/A N/A N/A parser add_argument out_dir type str help Output directory. N/A N/A N/A parser add_argument out_prefix type str help Output files prefix. N/A this_args N/A N/A parser parse_args N/A this_args N/A main N/A N/A N/A N/A N/A Main function, split a fasta into smaller chunks. N/A logging pbtools.pbtranscript.__init__ get_version N/A log N/A N/A logging getLogger __name__ N/A args N/A get_args pbtools.pbtranscript.Utils setup_log N/A N/A setup_log alog log level N/A logging DEBUG N/A N/A N/A log info N/A N/A Running {f} v{v}. format f N/A N/A op basename __file__ v N/A get_version N/A N/A splitFasta input_fasta N/A args input_fasta reads_per_split N/A args reads_per_split out_dir N/A args out_dir out_prefix N/A args out_prefix N/A N/A N/A __name__ __main__ N/A N/A sys N/A N/A N/A sys exit N/A main