Module Import alias ImportFrom alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr Str For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str If CompareEq Call NameLoad NameLoad Num body Assign SubscriptStore NameLoad Index SubscriptLoad NameLoad Index Num Call AttributeLoad SubscriptLoad NameLoad Index Num attr Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Assign NameStore Dict Assign NameStore NameLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr Str If CompareNotEq Call NameLoad NameLoad Num body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr Str If CompareEq Call NameLoad NameLoad Num body Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore Call AttributeLoad Call AttributeLoad SubscriptLoad NameLoad Index Num attr Str attr Str Assign SubscriptStore NameLoad Index NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Str For NameStore NameLoad body If CompareIn NameLoad NameLoad body If NameLoad body AugAssignAdd NameStore BinOpMod Str TupleLoad NameLoad SubscriptLoad NameLoad Index NameLoad orelse AugAssignAdd NameStore BinOpMod Str TupleLoad NameLoad SubscriptLoad NameLoad Index NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If Call AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore Call NameLoad NameLoad Str Return NameLoad decorator_list ClassDef bases NameLoad body Assign NameStore BinOpAdd AttributeLoad NameLoad attr TupleLoad Call NameLoad Str keyword Str keyword Str Call NameLoad Str keyword Str keyword Str Call NameLoad Str keyword Str keyword Str Call NameLoad Str keyword Str keyword Str Call NameLoad Str keyword Str keyword Str Call NameLoad Str keyword Str keyword Str Call NameLoad Str keyword Str keyword Str Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call NameLoad NameLoad FunctionDef arguments args NameParam defaults vararg kwarg body If SubscriptLoad NameLoad Index Str body Assign AttributeStore NameLoad attr Call AttributeLoad SubscriptLoad NameLoad Index Str attr If CompareIn AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Expr Call NameLoad AttributeLoad NameLoad attr If SubscriptLoad NameLoad Index Str body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str orelse If SubscriptLoad NameLoad Index Str body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str orelse If SubscriptLoad NameLoad Index Str body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str orelse If SubscriptLoad NameLoad Index Str body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str orelse If SubscriptLoad NameLoad Index Str body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str orelse If SubscriptLoad NameLoad Index Str body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str orelse Raise Call NameLoad Str orelse Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpAdd AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpAdd AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr Assign NameStore Call NameLoad NameLoad For NameStore NameLoad body If CompareNotEq SubscriptLoad NameLoad Index Num Str body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr Str If CompareEq SubscriptLoad NameLoad Index Num Str body TryExcept body Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore ListLoad Str Str Str Str Str Str Str Assign NameStore Str Assign NameStore BinOpMod NameLoad TupleLoad AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr orelse If CompareEq SubscriptLoad NameLoad Index Num Str body Assign NameStore Call NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str Assign NameStore NameLoad orelse AugAssignAdd NameStore NameLoad Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr NameLoad If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore BinOpAdd AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad orelse Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpAdd AttributeLoad NameLoad attr Str If BoolOpOr CompareEq AttributeLoad NameLoad attr Str CompareEq AttributeLoad NameLoad attr Str CompareEq AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad orelse Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpAdd AttributeLoad NameLoad attr Str If BoolOpOr CompareEq AttributeLoad NameLoad attr Str CompareEq AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad orelse Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr NameLoad If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore BinOpAdd AttributeLoad NameLoad attr Str Assign NameStore ListLoad Str Str Str Str Str Str Str Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad orelse If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore BinOpAdd AttributeLoad NameLoad attr Str Assign NameStore ListLoad Str Str Str Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad orelse If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore BinOpAdd AttributeLoad NameLoad attr Str Assign NameStore ListLoad Str Str Str Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr Assign NameStore Call NameLoad NameLoad For NameStore NameLoad body If CompareNotEq SubscriptLoad NameLoad Index Num Str body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Num Assign NameStore Str Expr Call NameLoad NameLoad NameLoad Assign NameStore BinOpMod NameLoad Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr Assign NameStore Call NameLoad NameLoad For NameStore NameLoad body If CompareNotEq SubscriptLoad NameLoad Index Num Str body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Assign NameStore Call NameLoad keyword SubscriptLoad NameLoad Index Num keyword SubscriptLoad NameLoad Index Num keyword SubscriptLoad NameLoad Index Num keyword SubscriptLoad NameLoad Index Num keyword SubscriptLoad NameLoad Index Num keyword SubscriptLoad NameLoad Index Num keyword SubscriptLoad NameLoad Index Num keyword SubscriptLoad NameLoad Index Num keyword SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr Assign NameStore Call NameLoad NameLoad For NameStore NameLoad body If CompareNotEq SubscriptLoad NameLoad Index Num Str body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Assign NameStore Call NameLoad keyword SubscriptLoad NameLoad Index Num keyword SubscriptLoad NameLoad Index Num keyword SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A logging optparse make_option N/A os N/A gzip django.conf settings django.core.exceptions ObjectDoesNotExist django.core.management.base BaseCommand CommandError annotation_server models annotation_server utils file_store.models _mkdir N/A Helper command to deal with additional annotation tracks not available from
UCSC genome browser

TODO: Should we import annotation files into file_server?
how to cleanup directories used to store and download files
 N/A logger N/A N/A logging getLogger __name__ parse_wig_attribute N/A N/A wig N/A N/A N/A Helper function for dealing w/ wig tracks N/A ret_dict N/A N/A t2 N/A N/A N/A N/A wig strip split N/A item t2 N/A N/A t3 N/A N/A item split = N/A N/A N/A len t3 2 N/A N/A N/A ret_dict N/A N/A t3 N/A 0 N/A N/A N/A t3 N/A 1 strip " N/A ret_dict N/A parse_gff_attribute N/A N/A attr N/A N/A N/A Helper function for dealing w/ parse_gff_attributes,
    converts " " or ";" string into a dictionary
     N/A t2 N/A N/A N/A N/A attr strip split ; N/A ret_dict N/A N/A k None N/A item t2 N/A N/A t3 N/A N/A N/A N/A item strip split = N/A N/A N/A len t3 2 N/A N/A t3 N/A N/A N/A N/A item strip split N/A N/A N/A len t3 2 N/A N/A k N/A t3 N/A 0 N/A v N/A N/A N/A N/A N/A t3 N/A 1 strip " strip ' N/A N/A ret_dict N/A k v N/A ret_dict N/A parse_db_string N/A N/A attr sym N/A N/A N/A Helper function for entering gff, gtf, files into models N/A ret_string N/A var sym N/A N/A N/A var attr N/A N/A ret_string N/A N/A ret_string N/A , %s="%s" N/A var N/A attr N/A var N/A N/A ret_string N/A %s="%s" N/A var N/A attr N/A var N/A ret_string N/A getFileHandle N/A N/A file_in N/A N/A N/A Helper function for returning a file handler
    :param file_in: Path for file
    :type file_in: str.
    :returns: file handler
     N/A N/A N/A file_in endswith .gz N/A N/A handle N/A N/A gzip open file_in N/A N/A handle N/A open file_in r N/A handle N/A Command N/A BaseCommand N/A N/A option_list N/A N/A BaseCommand option_list N/A N/A make_option --genome dest genome help Genome build i.e. dm3, ce10, hg19 N/A make_option --gene_annotation dest gene_annotation help Additional genome information N/A make_option --map_theoretical dest map_theoretical help Adding Annotation for Theoretical Mappability information N/A make_option --map_empirical dest map_empirical help Adding Annotation for Empirical Mappability information N/A make_option --gap_regions dest gap_regions help Adding Annotation for Gap Regions information N/A make_option --gc dest gc help Adding Annotation for GC content N/A make_option --conservation dest conservation help Adding Annotation for Conservation scores N/A can_import_settings True N/A GENOME_BUILD None N/A ANNOTATION_DIR annotation_server N/A ANNOTATION_BASE_DIR N/A N/A N/A os path join N/A settings MEDIA_ROOT ANNOTATION_DIR N/A N/A N/A N/A N/A os path isdir ANNOTATION_BASE_DIR N/A N/A N/A _mkdir ANNOTATION_BASE_DIR handle N/A N/A self N/A args options N/A N/A N/A options N/A genome N/A N/A N/A self GENOME_BUILD N/A N/A N/A options N/A genome strip N/A N/A N/A self GENOME_BUILD N/A utils SUPPORTED_GENOMES N/A N/A N/A self ANNOTATION_TEMP_DIR N/A N/A N/A os path join N/A self ANNOTATION_BASE_DIR N/A self GENOME_BUILD N/A N/A N/A N/A N/A os path isdir N/A self ANNOTATION_TEMP_DIR N/A N/A N/A _mkdir N/A self ANNOTATION_TEMP_DIR N/A N/A options N/A gene_annotation N/A N/A N/A N/A self geneAnnotation N/A options N/A gene_annotation N/A N/A N/A options N/A map_empirical N/A N/A N/A N/A self mappabilityEmpirical N/A options N/A map_empirical N/A N/A N/A options N/A map_theoretical N/A N/A N/A N/A self mappabilityTheoretical N/A options N/A map_theoretical N/A N/A N/A options N/A gap_regions N/A N/A N/A N/A self gapRegions N/A options N/A gap_regions N/A N/A N/A options N/A gc N/A N/A N/A N/A self gcContent N/A options N/A gc N/A N/A N/A options N/A conservation N/A N/A N/A N/A self conservation N/A options N/A conservation N/A N/A N/A CommandError Selected genome build currently not supported N/A N/A N/A CommandError Please specify which genome to build i.e. hg19, dm3 N/A gcContent N/A N/A self wig_file N/A N/A N/A Function for dealing w/ gc content annotation tracks N/A N/A N/A logger debug annotation_server.gcContent called for genome: %s, file: %s N/A self GENOME_BUILD wig_file N/A db_table N/A N/A self GENOME_BUILD _GC N/A N/A N/A self addWigAnnotation wig_file db_table GC N/A conservation N/A N/A self wig_file N/A N/A N/A Function for dealing conservation annotation tracks N/A N/A N/A logger debug annotation_server.conservation called for genome: %s, file: %s N/A self GENOME_BUILD wig_file N/A db_table N/A N/A self GENOME_BUILD _Conservation N/A N/A N/A self addWigAnnotation wig_file db_table conservation N/A addWigAnnotation N/A N/A self wig_file db_model annot_type N/A N/A N/A General function for adding Wig files into the annotation_server
        specifically for Conservation and GC content
         N/A current_table N/A eval db_model N/A N/A N/A N/A N/A N/A current_table objects all delete N/A handle N/A getFileHandle wig_file N/A line handle N/A N/A N/A N/A line N/A 0 # N/A N/A t1 N/A N/A N/A N/A line strip split N/A N/A N/A t1 N/A 0 track N/A N/A N/A N/A item N/A N/A N/A N/A models WigDescription objects get genome_build N/A self GENOME_BUILD annotation_type annot_type N/A N/A N/A item delete N/A N/A N/A ObjectDoesNotExist N/A N/A N/A N/A logger debug WigDescription does not exist for genome: %s, annotation_type: %s N/A self GENOME_BUILD annot_type N/A ret_attr N/A parse_wig_attribute line N/A table_vals N/A name altColor color visibility priority type description N/A db_string WigDescription(genome_build='%s', annotation_type='%s', %s) N/A db_string N/A db_string N/A N/A self GENOME_BUILD annot_type N/A parse_db_string ret_attr table_vals N/A item N/A eval db_string N/A N/A N/A item save N/A N/A N/A N/A t1 N/A 0 fixedStep N/A N/A attr N/A parse_wig_attribute line N/A chrom N/A attr N/A chrom N/A start N/A int N/A attr N/A start N/A step N/A int N/A attr N/A step N/A curr_pos start N/A N/A curr_pos step N/A wigItem N/A current_table annot item chrom chrom position curr_pos value N/A t1 N/A 0 N/A N/A N/A wigItem save N/A mappabilityTheoretical N/A N/A self bed_file N/A N/A N/A Annotation tracks pertaining to Theoretical Mappability
        params: annotation_file
         N/A N/A N/A logger debug annotation_server.mappabilityTheoretical called for genome: %s, file: %s N/A self GENOME_BUILD bed_file N/A N/A N/A self GENOME_BUILD hg19 N/A N/A db_table N/A N/A self GENOME_BUILD _MappabilityTheoretical N/A N/A N/A self addBedAnnotation bed_file db_table N/A N/A N/A CommandError Theoretical Mappability Annotation track only supported for hg19 currently N/A mappabilityEmpirical N/A N/A self bed_file N/A N/A N/A Annotation tracks pertaining to Empirical Mappability
        params: annotation_file
         N/A N/A N/A logger debug annotation_server.mappabilityEmpirical called for genome: %s, file: %s N/A self GENOME_BUILD bed_file N/A db_table N/A N/A self GENOME_BUILD _MappabilityEmpirial N/A N/A N/A N/A self GENOME_BUILD hg19 N/A N/A self GENOME_BUILD dm3 N/A N/A self GENOME_BUILD ce10 N/A N/A N/A N/A self addBedAnnotation bed_file db_table N/A N/A N/A CommandError Empirical Mappability Annotation track only supported for hg19 currently N/A gapRegions N/A N/A self bed_file N/A N/A N/A Annotation tracks pertaining to GapRegions
        params: annotation_file
         N/A N/A N/A logger debug annotation_server.gapRegions called for genome: %s, file: %s N/A self GENOME_BUILD bed_file N/A db_table N/A N/A self GENOME_BUILD _GapRegions N/A N/A N/A N/A self GENOME_BUILD hg19 N/A N/A self GENOME_BUILD dm3 N/A N/A N/A N/A self addGapRegions bed_file db_table N/A N/A N/A CommandError GapRegions Annotation track only supported for hg19 and dm3 N/A geneAnnotation N/A N/A self gff_file N/A N/A N/A Adding additional annotation tracks from
        Gencode / Wormbase / Flybase based on the GFF file format
        params: annotation_file
         N/A N/A N/A logger debug annotation_server.addGeneAnnotation called for genome: %s, file: %s N/A self GENOME_BUILD gff_file N/A N/A N/A self GENOME_BUILD hg19 N/A N/A db_table N/A N/A self GENOME_BUILD _GenCode N/A db_vars N/A gene_id transcript_id gene_type gene_status gene_name transcript_type transcript_status transcript_name N/A N/A N/A self addGeneAnnotation gff_file db_table db_vars N/A N/A N/A N/A self GENOME_BUILD ce10 N/A N/A db_table N/A N/A self GENOME_BUILD _WormBase N/A db_vars N/A cds clone gene Name N/A N/A N/A self addGeneAnnotation gff_file db_table db_vars N/A N/A N/A N/A self GENOME_BUILD dm3 N/A N/A db_table N/A N/A self GENOME_BUILD _FlyBase N/A db_vars N/A Alias description fullname symbol N/A N/A N/A self addGeneAnnotation gff_file db_table db_vars N/A addGeneAnnotation N/A N/A self gff_file db_model table_vals N/A N/A N/A Function for adding additional gene annotation files
        i.e hg19 gencode, dm3 flybase, ce10 wormbase
         N/A current_table N/A eval db_model N/A N/A N/A N/A N/A N/A current_table objects all delete N/A handle N/A getFileHandle gff_file N/A line handle N/A N/A N/A N/A line N/A 0 # N/A N/A t1 N/A N/A N/A N/A line strip split N/A attrib N/A parse_gff_attribute N/A t1 N/A 8 N/A db_string current_table(chrom=t1[0], source=t1[1], feature=t1[2], start=t1[3], end=t1[4], score=t1[5], strand=t1[6], frame=t1[7], attribute=t1[8], %s) N/A N/A parse_db_string attrib table_vals N/A db_string N/A db_string N/A parse_db_string attrib table_vals N/A item N/A eval db_string N/A N/A N/A item save N/A addGapRegions N/A N/A self bed_file db_model N/A N/A N/A Function for adding additional annotation files giving in BED format
        encode project i.e. gap_regions
         N/A N/A N/A logger debug annotation_server.addGapRegions called for genome: %s, file: %s table: %s N/A self GENOME_BUILD bed_file db_model N/A current_table N/A eval db_model N/A N/A N/A N/A N/A N/A current_table objects all delete N/A handle N/A getFileHandle bed_file N/A line handle N/A N/A N/A N/A line N/A 0 # N/A N/A t1 N/A N/A N/A N/A line strip split N/A item N/A current_table bin N/A t1 N/A 0 chrom N/A t1 N/A 1 chromStart N/A t1 N/A 2 chromEnd N/A t1 N/A 3 ix N/A t1 N/A 4 n N/A t1 N/A 5 size N/A t1 N/A 6 type N/A t1 N/A 7 bridge N/A t1 N/A 8 N/A N/A N/A item save N/A addBedAnnotation N/A N/A self bed_file db_model N/A N/A N/A Function for adding additional annotation files giving in BED format
        encode project i.e. empirical mappability, theoretical mappability
         N/A N/A N/A logger debug annotation_server.addBedAnnotation called for genome: %s, file: %s table: %s N/A self GENOME_BUILD bed_file db_model N/A current_table N/A eval db_model N/A N/A N/A N/A N/A N/A current_table objects all delete N/A handle N/A getFileHandle bed_file N/A line handle N/A N/A N/A N/A line N/A 0 # N/A N/A t1 N/A N/A N/A N/A line strip split N/A item N/A current_table chrom N/A t1 N/A 0 chromStart N/A t1 N/A 1 chromEnd N/A t1 N/A 2 N/A N/A N/A item save N/A N/A