Module Import alias Import alias ImportFrom alias Import alias ImportFrom alias Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Str FunctionDef arguments args NameParam defaults body Expr Str Return ListComp Call AttributeLoad NameLoad attr comprehension NameStore Call NameLoad NameLoad UnaryOpNot Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Expr Call AttributeLoad NameLoad attr Str Assign NameStore BoolOpOr NameLoad ListLoad Assign NameStore BoolOpOr NameLoad ListLoad With Call NameLoad NameLoad Str NameStore body For NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body If NameLoad body Assign AttributeStore NameLoad attr BinOpAdd Str AttributeLoad NameLoad attr If CompareIn AttributeLoad NameLoad attr NameLoad body Continue If CompareIn AttributeLoad NameLoad attr NameLoad body Continue Expr Call AttributeLoad NameLoad attr BinOpAdd Call NameLoad NameLoad Str Return NameLoad decorator_list If CompareEq NameLoad Str body Import alias Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr Str 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 Str Expr Call AttributeLoad NameLoad attr Str 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 ListLoad Str Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign NameStore ListLoad If AttributeLoad NameLoad attr body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore ListLoad If AttributeLoad NameLoad attr body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr BinOpAdd AttributeLoad NameLoad attr Str keyword AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr keyword NameLoad keyword ListLoad Str keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str With Call NameLoad AttributeLoad NameLoad attr Str NameStore body For NameStore Call AttributeLoad NameLoad attr Str body Assign NameStore AttributeLoad NameLoad attr Assign NameStore ListLoad Assign NameStore ListLoad For NameStore Call AttributeLoad NameLoad attr NameLoad keyword Num body Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad For NameStore Call AttributeLoad NameLoad attr NameLoad keyword Num body If CompareNotIn AttributeLoad NameLoad attr ListLoad Str Str body Continue Expr Call AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Assign NameStore Call NameLoad ListComp AttributeLoad NameLoad attr comprehension NameStore NameLoad If CompareGt Call NameLoad NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Num Index Num Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad NameLoad Assign NameStore ListLoad For NameStore NameLoad body Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore NameLoad If AttributeLoad NameLoad attr body If CompareGt Call NameLoad NameLoad Num body Assign NameStore ListLoad Call NameLoad GeneratorExp AttributeLoad NameLoad attr comprehension NameStore NameLoad Call NameLoad GeneratorExp AttributeLoad NameLoad attr comprehension NameStore NameLoad Assign NameStore ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareNotEq NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad NameLoad If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Call NameLoad NameLoad keyword Lambda arguments args NameParam defaults AttributeLoad NameLoad attr Assign AttributeStore SubscriptLoad NameLoad Index Num attr AttributeLoad NameLoad attr Assign AttributeStore SubscriptLoad NameLoad Index Num attr AttributeLoad NameLoad attr Assign NameStore NameLoad For NameStore NameLoad body Assign NameStore SubscriptLoad Call AttributeLoad Call NameLoad NameLoad attr Str Slice Num Assign NameStore Call AttributeLoad Str attr NameLoad NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Num AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd Call AttributeLoad Str attr NameLoad Str Expr Call AttributeLoad NameLoad attr BinOpMod Str AttributeLoad NameLoad attr
N/A N/A os N/A logging collections Counter N/A gffutils gffutils.create logger N/A N/A N/A logger setLevel N/A logging INFO N/A usage 

    Converts a GFF file downloaded from FlyBase into a GTF file suitable for
    use with Cufflinks.  Support for ignoring chromosomes, featuretypes, and
    fixing various issues with the original GFF file.
 read_ignore_list N/A N/A fn N/A N/A N/A 
    Converts a file into a list
     N/A N/A N/A N/A i strip N/A i N/A open fn N/A N/A N/A i startswith # N/A clean_gff N/A N/A gff cleaned add_chr chroms_to_ignore featuretypes_to_ignore N/A False None None N/A N/A 
    Cleans a GFF file by removing features on unwanted chromosomes and of
    unwanted featuretypes.  Optionally adds "chr" to chrom names.
     N/A N/A N/A logger info Cleaning GFF N/A chroms_to_ignore N/A chroms_to_ignore N/A N/A featuretypes_to_ignore N/A featuretypes_to_ignore N/A N/A N/A open cleaned w fout N/A N/A i N/A N/A N/A gffutils iterators DataIterator gff N/A N/A add_chr N/A N/A N/A i chrom N/A chr N/A i chrom N/A N/A N/A i chrom chroms_to_ignore N/A N/A N/A N/A N/A i featuretype featuretypes_to_ignore N/A N/A N/A N/A N/A fout write N/A N/A str i N/A cleaned N/A N/A N/A __name__ __main__ N/A N/A argparse N/A ap N/A N/A argparse ArgumentParser usage usage N/A N/A N/A ap add_argument --gff help GFF file downloaded from FlyBase.  Not
                    required if --db already exists N/A N/A N/A ap add_argument --db required True help Database that will be
                    created from FlyBase GFF N/A N/A N/A ap add_argument --gtf required True help GTF file that will
                    be created N/A N/A N/A ap add_argument --featuretype-ignore help File containing the
                    featuretypes to ignore in the GFF file, one featuretype on
                    each line.  This can speed up processing dramatically N/A N/A N/A ap add_argument --chrom-ignore help File containing chromosomes to
                    ignore in the GFF file.  If --add-chr, then chromosomes in
                    this list should also have "chr" N/A N/A N/A ap add_argument --add-chr action store_true help Prepend a "chr"
                    to chromosome names N/A N/A N/A ap add_argument --fix-strand action store_true help When exporting
                    the GTF file, check to ensure that all exons of a gene have
                    the same strand.  If not, then issue a warning and fix them
                    so that they all have the most common strand across all the
                    gene's exons. N/A N/A N/A ap add_argument --fix-extent choices N/A gene exon help When
                    exporting the GTF file, check that all exons fall within
                    the gene's annotated extent.  If not, then issue a warning,
                    and, if --fix-extent=gene, then assume the gene annotation
                    is correct; if --fix-extent=exon then assume the exon
                    annotations are correct and make no changes to the exported
                    exons N/A args N/A N/A ap parse_args N/A N/A args gff N/A N/A chroms_to_ignore N/A N/A N/A args chrom_ignore N/A N/A chroms_to_ignore N/A read_ignore_list N/A args chrom_ignore N/A featuretypes_to_ignore N/A N/A N/A args featuretype_ignore N/A N/A featuretypes_to_ignore N/A read_ignore_list N/A args featuretype_ignore N/A cleaned N/A clean_gff N/A args gff N/A N/A args gff .cleaned add_chr N/A args add_chr chroms_to_ignore chroms_to_ignore featuretypes_to_ignore featuretypes_to_ignore N/A db N/A N/A gffutils create_db N/A N/A args gff .cleaned N/A args db verbose True id_spec N/A ID force True N/A db N/A N/A gffutils FeatureDB N/A args db N/A N/A N/A logger info Creating GTF file N/A N/A open N/A args gtf w fout N/A N/A gene N/A N/A db features_of_type gene N/A N/A gene_id N/A gene id N/A transcripts N/A N/A exons N/A N/A child N/A N/A db children gene level 1 N/A N/A transcript_id N/A child id N/A N/A N/A transcripts append child N/A grandchild N/A N/A db children child level 1 N/A N/A N/A N/A grandchild featuretype N/A exon CDS N/A N/A N/A N/A N/A exons append grandchild N/A N/A args fix_strand N/A N/A c N/A Counter N/A N/A i strand N/A i exons N/A N/A N/A len c 1 N/A N/A most_common N/A N/A c most_common N/A new_strand N/A N/A most_common N/A 0 N/A 0 N/A N/A N/A logger warning N/A Gene %s has inconsistent strands: %s.  Changing all exons to "%s" strand N/A gene_id most_common new_strand N/A new_exons N/A N/A exon exons N/A N/A N/A exon strand new_strand N/A N/A N/A new_exons append exon N/A exons new_exons N/A N/A args fix_extent N/A N/A N/A N/A len exons 0 N/A N/A exon_extent N/A N/A min N/A N/A i start N/A i exons N/A max N/A N/A i stop N/A i exons N/A gene_extent N/A N/A gene start N/A gene stop N/A N/A exon_extent gene_extent N/A N/A N/A N/A logger warning N/A Exons of gene %s do not match gene annotation. Gene extent: %s.  Exon extent: %s N/A gene_id exon_extent gene_extent N/A N/A N/A args fix_extent gene N/A N/A new_exons N/A sorted exons key N/A N/A N/A x N/A N/A x start N/A N/A N/A new_exons N/A 0 start N/A gene start N/A N/A N/A new_exons N/A -1 stop N/A gene stop N/A exons new_exons N/A exon exons N/A N/A fields N/A N/A N/A N/A str grandchild split N/A -1 N/A attributes N/A N/A gene_id "{0}"; transcript_id "{1}"; gene_name "{2}" transcript_type="{3}" format gene_id transcript_id N/A N/A N/A gene attributes N/A Name N/A 0 N/A child featuretype N/A N/A N/A fields append attributes N/A N/A N/A fout write N/A N/A N/A join fields N/A N/A N/A logger info N/A Wrote %s N/A args gtf