Module Import alias alias alias alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias ImportFrom alias ImportFrom alias FunctionDef arguments args NameParam NameParam NameParam defaults Str body Expr Str FunctionDef arguments args NameParam defaults body For NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str body If Call AttributeLoad NameLoad attr Str body Return SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num Return NameLoad decorator_list Assign NameStore Call NameLoad For NameStore Call NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad If CompareIs NameLoad NameLoad body Raise NameLoad Call AttributeLoad Str attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Dict For NameStore NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad Str attr NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Print AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index NameLoad Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Str For NameStore Call NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr Call AttributeLoad Str attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr keyword Lambda arguments args NameParam defaults Call NameLoad NameLoad Assign NameStore ListComp AttributeLoad SubscriptLoad NameLoad Index NameLoad attr comprehension NameStore NameLoad Return Call NameLoad Lambda arguments args NameParam defaults CompareGt AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Num NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults Num NameLoad Num Str body Expr Str Assign NameStore Num Assign NameStore Num Assign NameStore Call NameLoad Lambda arguments args defaults Num For NameStore Call NameLoad NameLoad body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad AugAssignAdd SubscriptStore NameLoad Index BinOpDiv NameLoad Num Call NameLoad AttributeLoad NameLoad attr Assign NameStore BinOpDiv NameLoad Num Assign NameStore BinOpAdd BinOpDiv NameLoad Num IfExp CompareGt BinOpMod NameLoad Num Num Num Num If CompareIsNot NameLoad NameLoad body If CompareGt SubscriptLoad NameLoad Index Num NameLoad body Raise NameLoad Call AttributeLoad Str attr NameLoad If CompareLt SubscriptLoad NameLoad Index Num NameLoad body Raise NameLoad Call AttributeLoad Str attr NameLoad Assign NameStore NameLoad orelse Assign NameStore Call NameLoad NameLoad BinOpAdd NameLoad Num NameLoad Print AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpSub Call NameLoad NameLoad Num Assign NameStore Call NameLoad Lambda arguments args defaults Num Assign NameStore Call NameLoad Lambda arguments args defaults Num Assign NameStore Call NameLoad Lambda arguments args defaults Num If CompareIsNot NameLoad NameLoad body For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad Call NameLoad Num BinOpSub Call NameLoad NameLoad NameLoad Num AugAssignAdd SubscriptStore NameLoad Index NameLoad NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index NameLoad BinOpAdd Call NameLoad BinOpDiv BinOpDiv BinOpMult NameLoad Num BinOpPow Num Num NameLoad IfExp CompareGt BinOpMod BinOpDiv BinOpMult NameLoad Num BinOpPow Num Num NameLoad Num Num Num Assign NameStore Dict For NameStore Call NameLoad BinOpSub Call NameLoad NameLoad Num body For NameStore Call NameLoad SubscriptLoad NameLoad Index NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad Str attr SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index BinOpAdd NameLoad Num NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Print AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index TupleLoad NameLoad NameLoad Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Str For NameStore Call NameLoad NameLoad body Assign NameStore BinOpDiv Call NameLoad AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad NameLoad Call NameLoad Num BinOpSub Call NameLoad NameLoad NameLoad Num Assign NameStore BinOpMod SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad AugAssignAdd SubscriptStore NameLoad Index NameLoad Num Expr Call AttributeLoad SubscriptLoad NameLoad Index TupleLoad NameLoad NameLoad attr Call AttributeLoad Str attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Print AttributeLoad NameLoad attr Call AttributeLoad Str attr Call NameLoad AttributeLoad NameLoad attr AttributeLoad SubscriptLoad NameLoad Index TupleLoad NameLoad NameLoad attr For NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Assign NameStore ListLoad For NameStore Call NameLoad BinOpSub Call NameLoad NameLoad Num body For NameStore Call NameLoad SubscriptLoad NameLoad Index NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad NameLoad Index TupleLoad NameLoad NameLoad attr Return Call NameLoad Lambda arguments args NameParam defaults CompareGt AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Num NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Str body Expr Str Assign NameStore Dict Assign NameStore Dict Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Print AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index Call AttributeLoad Str attr keyword NameLoad keyword NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign SubscriptStore NameLoad Index Call AttributeLoad Str attr keyword NameLoad keyword NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad For NameStore Call NameLoad NameLoad body Assign NameStore Call AttributeLoad Str attr keyword NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore Call NameLoad NameLoad body Assign NameStore Call AttributeLoad Str attr keyword NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Print AttributeLoad NameLoad attr Str AttributeLoad AttributeLoad NameLoad attr attr Print AttributeLoad NameLoad attr Str AttributeLoad AttributeLoad NameLoad attr attr Return TupleLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Num Num Num NameLoad Num body Expr Str Assign NameStore Call AttributeLoad Str attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Print AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call AttributeLoad Str attr keyword NameLoad Print AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call AttributeLoad Str attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If NameLoad body AugAssignAdd NameStore Call AttributeLoad Str attr keyword NameLoad orelse AugAssignAdd NameStore Call AttributeLoad Str attr keyword NameLoad Print AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad If NameLoad body Return BinOpAdd NameLoad Str orelse Return BinOpAdd NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str keyword NameLoad keyword Call AttributeLoad NameLoad attr Assign NameStore ListLoad Assign NameStore ListLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Raise NameLoad Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Raise NameLoad Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad BinOpAdd NameLoad Str Str keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad BinOpAdd NameLoad Str Str keyword NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str BinOpAdd NameLoad Str keyword NameLoad Print AttributeLoad NameLoad attr Str BinOpAdd NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad Str attr keyword NameLoad keyword NameLoad keyword NameLoad Print AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str Expr Call NameLoad NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Str keyword Num keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Num keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Str keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str keyword Num keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword BinOpAdd Str Call NameLoad Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body ImportFrom alias If UnaryOpNot AttributeLoad NameLoad attr body Print AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Num If CompareIs AttributeLoad NameLoad attr NameLoad body Print AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Num If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Print AttributeLoad NameLoad attr Call AttributeLoad Str attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Print AttributeLoad NameLoad attr Call AttributeLoad Str attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Assign NameStore IfExp CompareIs AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr Assign NameStore Call NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore Call NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore Call NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Str attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Str If AttributeLoad NameLoad attr body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr orelse Assign NameStore IfExp CompareIsNot AttributeLoad NameLoad attr NameLoad Call NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr Print AttributeLoad NameLoad attr Call AttributeLoad Str attr AttributeLoad NameLoad attr Call NameLoad NameLoad If BoolOpAnd AttributeLoad NameLoad attr CompareIs AttributeLoad NameLoad attr NameLoad body Print AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Print AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Print AttributeLoad NameLoad attr Str NameLoad Expr Call NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr orelse If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Raise NameLoad Call AttributeLoad Str attr AttributeLoad NameLoad attr For NameStore Call NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr If BoolOpAnd CompareGt Call NameLoad NameLoad Num UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Raise NameLoad Call AttributeLoad Str attr NameLoad AttributeLoad NameLoad attr Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Print AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Continue Print AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword Call NameLoad AttributeLoad NameLoad attr keyword Call NameLoad AttributeLoad NameLoad attr keyword Call NameLoad AttributeLoad NameLoad attr keyword Call NameLoad AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign NameStore Call NameLoad AttributeLoad NameLoad attr keyword Num Assign NameStore Call AttributeLoad NameLoad attr With Call NameLoad Str Str NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad BinOpSub NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad orelse Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign TupleStore NameStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad With Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Str Str NameStore body Expr Call NameLoad Dict Str Str NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call NameLoad NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad BinOpAdd NameLoad Str keyword Num decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A N/A os sys argparse subprocess binascii time cPickle * pbcore.io.FastaIO FastaReader pbcore.io.FastqIO FastqReader FastqWriter pbtools.pbtranscript.Utils realpath pbtools.pbtranscript.Cluster Cluster pbtools.pbtranscript.ClusterOptions IceOptions SgeOptions IceQuiverHQLQOptions pbtools.pbtranscript.PBTranscriptOptions add_cluster_arguments pbtools.pbtranscript.ice.IceUtils convert_fofn_to_fasta pbtools.pbtranscript.counting get_read_count_from_collapsed sp bisect bisect_right collections defaultdict pbtools.pbtranscript.__init__ get_version sep_flnc_by_primer N/A N/A flnc_filename root_dir output_filename N/A isoseq_flnc.fasta N/A N/A 
    Separate flnc fasta by primer. Useful for targeted sequencing.
    ex: make <root_dir>/primer0/isoseq_flnc.fasta ... etc ...
     get_primer N/A N/A r N/A N/A N/A x N/A N/A N/A r name split ; N/A N/A N/A N/A x startswith primer= N/A N/A N/A N/A N/A x split = N/A 1 N/A None N/A N/A primers N/A set N/A r N/A FastaReader flnc_filename N/A N/A p N/A get_primer r N/A N/A p None N/A N/A Exception N/A N/A ERROR: Unable to find primer information from sequence ID for {0}! Abort! format N/A r name N/A N/A N/A primers add p N/A handles N/A N/A p primers N/A N/A dirname N/A N/A N/A os path join root_dir N/A N/A primer{0} format p N/A N/A N/A N/A os path exists dirname N/A N/A N/A sys stderr N/A N/A WARNING: {0} already exists. format dirname N/A N/A N/A N/A os makedirs dirname N/A N/A handles N/A p N/A open N/A N/A N/A os path join dirname output_filename w N/A r N/A FastaReader flnc_filename N/A N/A p N/A get_primer r N/A N/A N/A N/A handles N/A p write N/A N/A >{0}
{1}
 format N/A r name N/A r sequence N/A f N/A N/A handles itervalues N/A N/A N/A N/A f close N/A primers N/A list primers N/A N/A N/A primers sort key N/A N/A N/A x N/A N/A int x N/A names N/A N/A N/A handles N/A x name N/A x primers N/A N/A filter N/A N/A N/A x N/A N/A N/A N/A N/A os stat x st_size 0 names N/A sep_flnc_by_size N/A N/A flnc_filename root_dir bin_size_kb bin_manual max_base_limit_MB output_filename N/A 1 None 600 isoseq_flnc.fasta N/A N/A 
    Separate flnc fasta into different size bins
    ex: make <root_dir>/0to2k/isoseq_flnc.fasta ... etc ...

    If <bin_manual> (ex: (0, 2, 4, 12)) is given, <bin_size_kb> is ignored.

    If max_base_limit_MB is not None, it caps the per-partition # of bases (in Mb)
    So could have 0to1k_part1, 0to2k_part2...etc...
     N/A min_size 0 N/A max_size 0 N/A base_in_each_size N/A defaultdict N/A N/A N/A N/A 0 N/A r N/A FastaReader flnc_filename N/A N/A seqlen N/A len N/A r sequence N/A min_size N/A min min_size seqlen N/A max_size N/A max max_size seqlen N/A N/A base_in_each_size N/A N/A seqlen 1000 N/A len N/A r sequence N/A min_size_kb N/A min_size 1000 N/A max_size_kb N/A N/A max_size 1000 N/A N/A N/A max_size 1000 1 1 0 N/A N/A bin_manual None N/A N/A N/A N/A bin_manual N/A 0 min_size_kb N/A N/A Exception N/A N/A Min sequence length is {0} kb, below the bin! format min_size N/A N/A N/A bin_manual N/A -1 max_size_kb N/A N/A Exception N/A N/A Max sequence length is {0} kb, above the bin! format max_size N/A bins bin_manual N/A N/A bins N/A range min_size_kb N/A max_size_kb 1 bin_size_kb N/A N/A sys stderr bins N/A max_bin N/A N/A len bins 1 N/A base_in_each_bin N/A defaultdict N/A N/A N/A N/A 0 N/A num_parts_in_each_bin N/A defaultdict N/A N/A N/A N/A 1 N/A part_counter_in_each_bin N/A defaultdict N/A N/A N/A N/A 0 N/A N/A max_base_limit_MB None N/A N/A N/A kb_size num_bases N/A N/A base_in_each_size iteritems N/A N/A i N/A min max_bin N/A max 0 N/A N/A bisect_right bins kb_size 1 N/A N/A base_in_each_bin N/A i num_bases N/A N/A bin_i num_bases N/A N/A base_in_each_bin iteritems N/A N/A N/A num_parts_in_each_bin N/A bin_i N/A N/A int N/A N/A N/A num_bases 1.0 N/A 10 6 max_base_limit_MB N/A N/A N/A N/A N/A num_bases 1.0 N/A 10 6 max_base_limit_MB 0 1 0 N/A handles N/A N/A i N/A xrange N/A N/A len bins 1 N/A N/A part N/A xrange N/A num_parts_in_each_bin N/A i N/A N/A dirname N/A N/A N/A os path join root_dir N/A N/A {0}to{1}kb_part{2} format N/A bins N/A i N/A bins N/A N/A i 1 part N/A N/A N/A N/A os path exists dirname N/A N/A N/A sys stderr N/A N/A WARNING: {0} already exists. format dirname N/A N/A N/A N/A os makedirs dirname N/A N/A handles N/A N/A i part N/A open N/A N/A N/A os path join dirname output_filename w N/A r N/A FastaReader flnc_filename N/A N/A kb_size N/A N/A len N/A r sequence 1000 N/A i N/A min max_bin N/A max 0 N/A N/A bisect_right bins kb_size 1 N/A part N/A N/A part_counter_in_each_bin N/A i N/A num_parts_in_each_bin N/A i N/A N/A part_counter_in_each_bin N/A i 1 N/A N/A N/A N/A handles N/A N/A i part write N/A N/A >{0}
{1}
 format N/A r name N/A r sequence N/A N/A sys stderr N/A N/A putting {0} in {1} format N/A len N/A r sequence N/A N/A handles N/A N/A i part name N/A h N/A N/A handles itervalues N/A N/A N/A N/A h close N/A names N/A N/A i N/A xrange N/A N/A len bins 1 N/A N/A part N/A xrange N/A num_parts_in_each_bin N/A i N/A N/A N/A N/A names append N/A N/A handles N/A N/A i part name N/A N/A filter N/A N/A N/A x N/A N/A N/A N/A N/A os stat x st_size 0 names N/A combine_quiver_results N/A N/A split_dirs output_dir hq_filename lq_filename tofu_prefix N/A N/A N/A 
    For each size bin result, ex: clusterOut/0to2k/all.quiveredXXX.fastq
    combine it together, remember to add a prefix (ex: i0|c12, i1|c13/....)
     N/A prefix_dict_hq N/A N/A prefix_dict_lq N/A N/A fout_hq N/A FastqWriter N/A N/A N/A os path join output_dir all_sizes.quivered_hq.fastq N/A fout_lq N/A FastqWriter N/A N/A N/A os path join output_dir all_sizes.quivered_lq.fastq N/A N/A i d N/A enumerate split_dirs N/A N/A file_hq N/A N/A N/A os path join d hq_filename N/A file_lq N/A N/A N/A os path join d lq_filename N/A N/A sys stderr N/A N/A Adding prefix i{0}| to {1},{2}... format i file_hq file_lq N/A N/A prefix_dict_hq N/A N/A N/A i{i}HQ_{p} format i i p tofu_prefix N/A N/A N/A os path abspath d N/A N/A prefix_dict_lq N/A N/A N/A i{i}LQ_{p} format i i p tofu_prefix N/A N/A N/A os path abspath d N/A r N/A FastqReader file_hq N/A N/A _name_ N/A N/A i{i}HQ_{p}|{n} format p tofu_prefix i i n N/A r name N/A N/A N/A fout_hq writeRecord _name_ N/A r sequence N/A r quality N/A r N/A FastqReader file_lq N/A N/A _name_ N/A N/A i{i}LQ_{p}|{n} format p tofu_prefix i i n N/A r name N/A N/A N/A fout_lq writeRecord _name_ N/A r sequence N/A r quality N/A N/A N/A fout_hq close N/A N/A N/A fout_lq close N/A N/A sys stderr HQ quivered output combined to: N/A N/A fout_hq file name N/A N/A sys stderr LQ quivered output combined to: N/A N/A fout_lq file name N/A N/A N/A N/A fout_hq file name N/A N/A fout_lq file name prefix_dict_hq prefix_dict_lq N/A run_collapse_sam N/A N/A fastq_filename gmap_db_dir gmap_db_name cpus min_coverage min_identity dun_merge_5_shorter max_fuzzy_junction N/A 24 0.99 0.95 False 5 N/A N/A 
    Wrapper for running collapse script
    (a) run GMAP
    (b) sort GMAP sam
    (c) run collapse_isoforms_by_sam
     N/A cmd N/A N/A gmap -D {d} -d {name} -n 0 -t {cpus} -z sense_force --cross-species -f samse {fq} > {fq}.sam 2> {fq}.sam.log format d gmap_db_dir name gmap_db_name cpus cpus fq fastq_filename N/A N/A sys stderr CMD: cmd N/A N/A N/A subprocess check_call cmd shell True N/A cmd N/A N/A sort -k 3,3 -k 4,4n {fq}.sam > {fq}.sorted.sam format fq fastq_filename N/A N/A sys stderr CMD: cmd N/A N/A N/A subprocess check_call cmd shell True N/A cmd N/A N/A collapse_isoforms_by_sam.py --input {fq} --fq -s {fq}.sorted.sam --max_fuzzy_junction {j} -c {c} -i {i} format c min_coverage i min_identity fq fastq_filename j max_fuzzy_junction N/A dun_merge_5_shorter N/A N/A cmd N/A N/A  --dun-merge-5-shorter -o {fq}.no5merge format fq fastq_filename N/A N/A cmd N/A N/A  -o {fq}.5merge format fq fastq_filename N/A N/A sys stderr CMD: cmd N/A N/A N/A subprocess check_call cmd shell True N/A dun_merge_5_shorter N/A N/A N/A fastq_filename .no5merge.collapsed N/A N/A N/A fastq_filename .5merge.collapsed N/A get_abundance N/A N/A collapse_prefix prefix_dict output_prefix restricted_movies N/A None N/A N/A cid_info N/A N/A sp read_group_filename N/A collapse_prefix .group.txt is_cid True sample_prefixes N/A N/A prefix_dict keys N/A fl_pickles N/A N/A nfl_pickles N/A N/A N/A i d N/A N/A prefix_dict iteritems N/A N/A file N/A N/A N/A os path join d output/final.pickle N/A N/A N/A N/A N/A os path exists file N/A N/A Exception N/A N/A Expected FL pickle file {0} but not found! format file N/A N/A N/A fl_pickles append N/A i file N/A file N/A N/A N/A os path join d output/map_noFL/nfl.all.partial_uc.pickle N/A N/A N/A N/A N/A os path exists file N/A N/A Exception N/A N/A Expected nFL pickle file {0} but not found! format file N/A N/A N/A nfl_pickles append N/A i file N/A N/A N/A sp output_read_count_FL cid_info fl_pickles N/A output_prefix .read_stat.txt w restricted_movies restricted_movies N/A N/A N/A sp output_read_count_nFL cid_info nfl_pickles N/A output_prefix .read_stat.txt a restricted_movies restricted_movies N/A N/A N/A sp make_abundance_file N/A output_prefix .read_stat.txt N/A output_prefix .abundance.txt restricted_movies restricted_movies N/A N/A sys stderr Abundance file written to N/A output_prefix .abundance.txt N/A run_filtering_by_count N/A N/A input_prefix output_prefix min_count N/A N/A N/A cmd N/A N/A filter_by_count.py {i} {o} --min_count {c} format i input_prefix o output_prefix c min_count N/A N/A sys stderr CMD: cmd N/A N/A N/A subprocess check_call cmd shell True N/A tofu_wrap_main N/A N/A N/A N/A N/A parser N/A N/A argparse ArgumentParser prog tofu_wrap N/A N/A add_cluster_arguments parser show_sge_env_name True show_sge_queue True N/A N/A N/A parser add_argument --bin_size_kb default 1 type int help Bin size by kb (default: 1) N/A N/A N/A parser add_argument --bin_manual default None help Bin manual (ex: (1,2,3,5)), overwrites bin_size_kb N/A N/A N/A parser add_argument --bin_by_primer default False action store_true help Instead of binning by size, bin by primer (overwrites --bin_size_kb and --bin_manual) N/A N/A N/A parser add_argument --max_base_limit_MB default 600 type int help Maximum number of bases per partitioned bin, in MB (default: 600) N/A N/A N/A parser add_argument --gmap_name default hg19 help GMAP DB name (default: hg19) N/A N/A N/A parser add_argument --gmap_db default /home/UNIXHOME/etseng/share/gmap_db_new/ help GMAP DB location (default: /home/UNIXHOME/etseng/share/gmap_db_new/) N/A N/A N/A parser add_argument --output_seqid_prefix type str default None help Output seqid prefix. If not given, a random ID is generated N/A N/A N/A parser add_argument --mem_debug default False action store_true help N/A argparse SUPPRESS N/A N/A N/A parser add_argument --max_fuzzy_junction default 5 type int help Max fuzzy junction (default: 5 bp) N/A N/A N/A parser add_argument --version action version version N/A %(prog)s  N/A str N/A get_version N/A args N/A N/A parser parse_args N/A N/A args mem_debug N/A memory_profiler memory_usage N/A N/A N/A args quiver N/A N/A N/A sys stderr --quiver must be turned on for tofu_wrap. Quit. N/A N/A N/A sys exit -1 N/A N/A N/A args nfl_fa None N/A N/A N/A sys stderr --nfl_fa must be provided for tofu_wrap. Quit. N/A N/A N/A sys exit -1 N/A N/A N/A N/A N/A os path exists N/A args gmap_db N/A N/A N/A sys stderr N/A N/A GMAP DB location not valid: {0}. Quit. format N/A args gmap_db N/A N/A N/A sys exit -1 N/A N/A N/A N/A N/A os path exists N/A N/A N/A os path join N/A args gmap_db N/A args gmap_name N/A N/A N/A sys stderr N/A N/A GMAP name not valid: {0}. Quit. format N/A args gmap_name N/A N/A N/A sys exit -1 N/A tofu_prefix N/A N/A N/A args output_seqid_prefix None N/A N/A binascii b2a_hex N/A N/A os urandom 3 N/A args output_seqid_prefix N/A ice_opts N/A IceOptions quiver N/A args quiver use_finer_qv N/A args use_finer_qv targeted_isoseq N/A args targeted_isoseq ece_penalty N/A args ece_penalty ece_min_len N/A args ece_min_len N/A sge_opts N/A SgeOptions unique_id N/A args unique_id use_sge N/A args use_sge max_sge_jobs N/A args max_sge_jobs blasr_nproc N/A args blasr_nproc quiver_nproc N/A args quiver_nproc gcon_nproc N/A args gcon_nproc sge_env_name N/A args sge_env_name sge_queue N/A args sge_queue N/A ipq_opts N/A IceQuiverHQLQOptions qv_trim_5 N/A args qv_trim_5 qv_trim_3 N/A args qv_trim_3 hq_quiver_min_accuracy N/A args hq_quiver_min_accuracy hq_isoforms_fa N/A args hq_isoforms_fa hq_isoforms_fq N/A args hq_isoforms_fq lq_isoforms_fa N/A args lq_isoforms_fa lq_isoforms_fq N/A args lq_isoforms_fq N/A quiver_hq_filename N/A N/A all_quivered_hq.{0}_{1}_{2:.2f}.fastq format N/A args qv_trim_5 N/A args qv_trim_3 N/A args hq_quiver_min_accuracy N/A quiver_lq_filename all_quivered_lq.fastq N/A N/A args bin_by_primer N/A N/A split_files N/A sep_flnc_by_primer N/A args flnc_fa N/A N/A N/A os path abspath N/A args root_dir N/A N/A bin_manual N/A N/A N/A args bin_manual None N/A eval N/A args bin_manual None N/A split_files N/A sep_flnc_by_size N/A args flnc_fa N/A args root_dir bin_size_kb N/A args bin_size_kb bin_manual bin_manual max_base_limit_MB N/A args max_base_limit_MB N/A N/A sys stderr N/A N/A split input {0} into {1} bins format N/A args flnc_fa N/A len split_files N/A N/A N/A args quiver N/A N/A args fasta_fofn None N/A N/A N/A sys stderr Making fasta_fofn now N/A nfl_dir N/A N/A N/A os path abspath N/A N/A N/A os path join N/A args root_dir fasta_fofn_files N/A N/A N/A N/A N/A os path exists nfl_dir N/A N/A N/A N/A os makedirs nfl_dir N/A N/A args fasta_fofn N/A N/A N/A os path join nfl_dir input.fasta.fofn N/A N/A sys stderr fasta_fofn N/A args fasta_fofn N/A N/A sys stderr nfl_dir nfl_dir N/A N/A convert_fofn_to_fasta fofn_filename N/A args bas_fofn out_filename N/A args fasta_fofn fasta_out_dir nfl_dir cpus N/A args blasr_nproc N/A N/A N/A N/A N/A N/A os path exists N/A args fasta_fofn N/A N/A Exception N/A N/A fasta_fofn {0} does not exist! format N/A args fasta_fofn N/A line N/A open N/A args fasta_fofn N/A N/A file N/A N/A line strip N/A N/A N/A N/A len file 0 N/A N/A N/A N/A os path exists file N/A N/A Exception N/A N/A File {0} does not exists in {1} format file N/A args fasta_fofn N/A split_dirs N/A N/A cur_file split_files N/A N/A cur_dir N/A N/A N/A os path abspath N/A N/A N/A os path dirname cur_file N/A N/A N/A split_dirs append cur_dir N/A cur_out_cons N/A N/A N/A os path join cur_dir N/A args consensusFa N/A hq_quiver N/A N/A N/A os path join cur_dir quiver_hq_filename N/A N/A N/A N/A os path exists hq_quiver N/A N/A N/A sys stderr N/A N/A {0} already exists. SKIP! format hq_quiver N/A N/A N/A sys stderr running ICE/Quiver on cur_dir N/A start_t N/A N/A time time N/A obj N/A Cluster root_dir cur_dir flnc_fa cur_file nfl_fa N/A realpath N/A args nfl_fa bas_fofn N/A realpath N/A args bas_fofn ccs_fofn N/A realpath N/A args ccs_fofn fasta_fofn N/A realpath N/A args fasta_fofn out_fa cur_out_cons sge_opts sge_opts ice_opts ice_opts ipq_opts ipq_opts report_fn N/A args report_fn summary_fn N/A args summary_fn nfl_reads_per_split N/A args nfl_reads_per_split N/A N/A args mem_debug N/A N/A mem_usage N/A memory_usage N/A obj run interval 60 N/A end_t N/A N/A time time N/A N/A open mem_debug.log a f N/A N/A N/A N/A f write N/A N/A Running ICE/Quiver on {0} took {1} secs.
 format cur_dir N/A end_t start_t N/A N/A N/A f write N/A N/A Maximum memory usage: {0}
 format N/A max mem_usage N/A N/A N/A f write N/A N/A Memory usage: {0}
 format mem_usage N/A N/A N/A N/A obj run N/A combined_dir N/A N/A N/A os path join N/A args root_dir combined N/A N/A N/A N/A N/A os path exists combined_dir N/A N/A N/A N/A os makedirs combined_dir N/A N/A hq_filename lq_filename hq_pre_dict lq_pre_dict N/A combine_quiver_results split_dirs combined_dir quiver_hq_filename quiver_lq_filename tofu_prefix N/A N/A open N/A N/A N/A os path join N/A args root_dir combined combined.hq_lq_pre_dict.pickle w f N/A N/A N/A dump N/A HQ LQ hq_pre_dict lq_pre_dict f N/A collapse_prefix_hq N/A run_collapse_sam hq_filename N/A args gmap_db N/A args gmap_name cpus N/A args blasr_nproc max_fuzzy_junction N/A args max_fuzzy_junction N/A N/A get_abundance collapse_prefix_hq hq_pre_dict collapse_prefix_hq N/A N/A run_filtering_by_count collapse_prefix_hq N/A collapse_prefix_hq .min_fl_2 min_count 2 N/A N/A N/A __name__ __main__ N/A N/A N/A tofu_wrap_main