Module Expr Str Import alias Import alias ImportFrom alias alias Import alias ClassDef bases NameLoad body Assign NameStore Num FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body AugAssignAdd AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr BinOpMod Str AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If UnaryOpNot AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad If BoolOpOr UnaryOpNot AttributeLoad NameLoad attr CompareGtE NameLoad AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr BinOpAdd NameLoad Num If UnaryOpNot CompareIn AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AugAssignAdd AttributeStore NameLoad attr Num If AttributeLoad NameLoad attr body If UnaryOpNot AttributeLoad AttributeLoad NameLoad attr attr body If UnaryOpNot CompareIn AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AugAssignAdd AttributeStore NameLoad attr Num orelse If UnaryOpNot CompareIn AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AugAssignAdd AttributeStore NameLoad attr Num orelse If AttributeLoad AttributeLoad NameLoad attr attr body AugAssignAdd AttributeStore NameLoad attr Num orelse AugAssignAdd AttributeStore NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore ListLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call NameLoad Call NameLoad AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr If CompareGt AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str orelse Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr Str decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults Num Num NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad Assign NameStore NameLoad Assign NameStore NameLoad For NameStore Call NameLoad NameLoad keyword Num body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore AttributeLoad NameLoad attr body If AttributeLoad NameLoad attr body Continue If BoolOpOr NameLoad UnaryOpNot AttributeLoad AttributeLoad NameLoad attr attr body If BoolOpOr UnaryOpNot NameLoad CompareNotEq AttributeLoad NameLoad attr NameLoad CompareLt BinOpAdd AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr body If BoolOpAnd NameLoad CompareGtE AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr orelse If BoolOpOr UnaryOpNot NameLoad CompareNotEq AttributeLoad NameLoad attr NameLoad CompareLt BinOpAdd AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr body If BoolOpAnd NameLoad CompareGtE AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr If BoolOpAnd NameLoad CompareGtE AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If BoolOpAnd NameLoad CompareGtE AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Print NameLoad Print Str Expr Call AttributeLoad NameLoad attr Num decorator_list If CompareEq NameLoad Str body Assign NameStore NameLoad Assign NameStore Num Assign NameStore Num Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad For NameStore SubscriptLoad AttributeLoad NameLoad attr Slice Num body If CompareEq NameLoad Str body Assign NameStore Call NameLoad NameLoad Assign NameStore NameLoad orelse If CompareEq NameLoad Str body Assign NameStore Call NameLoad NameLoad Assign NameStore NameLoad orelse If CompareEq NameLoad Str body Expr Call NameLoad orelse If CompareEq NameLoad Str body Assign NameStore NameLoad orelse If CompareEq NameLoad Str body Assign NameStore NameLoad orelse If CompareIn NameLoad ListLoad Str Str body Assign NameStore NameLoad orelse If BoolOpAnd UnaryOpNot NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore NameLoad orelse Print BinOpMod Str NameLoad Expr Call NameLoad If UnaryOpNot NameLoad body Expr Call NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad
N/A N/A 
Finds regions expressed in a BAM file

This will scan a BAM file, looking for regions of mapped reads. The found
regions are output in BED format. These regions are found in a model-free
manner, so they may represent novel or known transcripts. This is also helpful
for peak-finding in ChIP-seq experiments.
 N/A sys N/A os ngsutils.bam bam_pileup_iter bam_open N/A pysam ExpressedRegion N/A object N/A N/A _count 0 __init__ N/A N/A self chrom only_uniq_starts N/A False N/A N/A N/A ExpressedRegion _count 1 N/A N/A self name N/A region_%s N/A ExpressedRegion _count N/A N/A self chrom chrom N/A N/A self start None N/A N/A self end None N/A N/A self fwd_count 0 N/A N/A self rev_count 0 N/A N/A self reads N/A set N/A N/A self read_count 0 N/A N/A self only_uniq_starts only_uniq_starts N/A N/A self uniq_starts N/A set N/A add_column N/A N/A self read pos N/A N/A N/A N/A N/A self start N/A N/A N/A self start pos N/A N/A N/A N/A self end N/A pos N/A self end N/A N/A N/A self end N/A pos 1 N/A N/A N/A N/A N/A read alignment qname N/A self reads N/A N/A N/A N/A N/A self reads add N/A N/A read alignment qname N/A N/A self read_count 1 N/A N/A self only_uniq_starts N/A N/A N/A N/A N/A read alignment is_reverse N/A N/A N/A N/A N/A N/A read alignment pos N/A self uniq_starts N/A N/A N/A N/A N/A self uniq_starts add N/A N/A read alignment pos N/A N/A self fwd_count 1 N/A N/A N/A N/A N/A N/A read alignment aend N/A self uniq_starts N/A N/A N/A N/A N/A self uniq_starts add N/A N/A read alignment aend N/A N/A self rev_count 1 N/A N/A N/A N/A read alignment is_reverse N/A N/A N/A self rev_count 1 N/A N/A N/A self fwd_count 1 N/A write N/A N/A self fs N/A N/A N/A cols N/A N/A N/A N/A cols append N/A self chrom N/A N/A N/A cols append N/A str N/A self start N/A N/A N/A cols append N/A str N/A self end N/A N/A N/A cols append N/A self name N/A N/A self only_uniq_starts N/A N/A N/A N/A cols append N/A str N/A len N/A self uniq_starts N/A N/A N/A N/A cols append N/A str N/A self read_count N/A N/A N/A self fwd_count N/A self rev_count N/A N/A N/A N/A cols append + N/A N/A N/A N/A cols append - N/A N/A N/A fs write N/A N/A join cols N/A N/A N/A fs write N/A N/A bam_find_regions N/A N/A bam_name merge_distance min_read_count only_uniq_starts nostrand out N/A 10 2 False False N/A sys stdout N/A N/A bamfile N/A bam_open bam_name N/A region_plus None N/A region_minus None N/A pileup N/A bam_pileup_iter bamfile mask 1540 N/A N/A chrom N/A N/A bamfile getrname N/A pileup tid N/A read N/A pileup pileups N/A N/A N/A read is_del N/A N/A N/A N/A nostrand N/A N/A N/A read alignment is_reverse N/A N/A N/A N/A region_plus N/A N/A region_plus chrom chrom N/A N/A N/A region_plus end merge_distance N/A pileup pos N/A N/A N/A region_plus N/A N/A region_plus read_count min_read_count N/A N/A N/A N/A region_plus write out N/A region_plus N/A ExpressedRegion chrom only_uniq_starts N/A N/A N/A region_plus add_column read N/A pileup pos N/A N/A N/A N/A region_minus N/A N/A region_minus chrom chrom N/A N/A N/A region_minus end merge_distance N/A pileup pos N/A N/A N/A region_minus N/A N/A region_minus read_count min_read_count N/A N/A N/A N/A region_minus write out N/A region_minus N/A ExpressedRegion chrom only_uniq_starts N/A N/A N/A region_minus add_column read N/A pileup pos N/A N/A region_plus N/A N/A region_plus read_count min_read_count N/A N/A N/A N/A region_plus write out N/A N/A region_minus N/A N/A region_minus read_count min_read_count N/A N/A N/A N/A region_minus write out N/A N/A N/A bamfile close N/A usage N/A N/A N/A N/A N/A __doc__ N/A Usage: bamutils expressed {options} bamfile

Options:
-ns             Ignore strandedness when creating regions
                (default: false)

-uniq           Only use unique starting positions when performing counts
                (default: false)

-dist N         minimum distance required between regions - they will be
                merged if w/in this distance
                (default: 10)

-mincount N     The minimum number of reads required in a region
                (default: 2)
 N/A N/A N/A sys exit 1 N/A N/A N/A __name__ __main__ N/A N/A uniq False N/A dist 10 N/A mincount 2 N/A fname None N/A last None N/A nostrand False N/A arg N/A N/A sys argv N/A 1 N/A N/A N/A last -dist N/A N/A dist N/A int arg N/A last None N/A N/A N/A last -mincount N/A N/A mincount N/A int arg N/A last None N/A N/A N/A arg -h N/A N/A N/A usage N/A N/A N/A arg -uniq N/A N/A uniq True N/A N/A N/A arg -ns N/A N/A nostrand True N/A N/A N/A arg N/A -dist -mincount N/A N/A last arg N/A N/A N/A N/A fname N/A N/A N/A os path exists arg N/A N/A fname arg N/A N/A N/A Unknown argument: %s arg N/A N/A usage N/A N/A fname N/A N/A N/A usage N/A N/A bam_find_regions fname dist mincount uniq nostrand