示例#1
0
    def __init__(self, settings, session, path, uri_set=None):

        SourceFile.__init__(self, settings, session, path, uri_set=uri_set)

        self.type = 'gff'

        self.abstraction_dict = {}

        self.domain_knowledge_dict = {}

        self.pos_attr_list = [
            'position_taxon', 'position_ref', 'position_start', 'position_end',
            'position_strand'
        ]

        self.categories_list = ['position_taxon', 'position_ref', 'position_strand']

        self.taxon = ''

        self.entities = []

        self.timestamp = datetime.datetime.now().isoformat()

        self.getLabelFromUri = {}

        if uri_set and len(uri_set)>0:
            self.prefix = self.uri[0]
        else:
            self.prefix=None
示例#2
0
    def __init__(self, settings, session, path, uri_set=None):

        SourceFile.__init__(self, settings, session, path, uri_set=uri_set)

        self.type = 'gff'

        self.abstraction_dict = {}

        self.domain_knowledge_dict = {}

        self.pos_attr_list = [
            'position_taxon', 'position_ref', 'position_start', 'position_end',
            'position_strand'
        ]

        self.categories_list = [
            'position_taxon', 'position_ref', 'position_strand'
        ]

        self.taxon = ''

        self.entities = []

        self.timestamp = datetime.datetime.now().isoformat()

        self.getLabelFromUri = {}
示例#3
0
    def __init__(self, settings, session, path, file_type='ttl'):

        newfile = path
        
        if not file_type == 'ttl':
            newfile = self.convert_to_ttl(path,file_type)

        SourceFile.__init__(self, settings, session, newfile)

        self.type = 'ttl'
        self.origine_type = file_type
        #overload name
        self.name =  os.path.basename(path)
示例#4
0
    def __init__(self, settings, session, path, preview_limit, uri_set=None):
        SourceFile.__init__(self, settings, session, path, uri_set=uri_set)
        self.type = 'tsv'

        self.preview_limit = preview_limit

        self.forced_column_types = ['entity']
        self.disabled_columns = []
        self.key_columns = []
        self.headers = self.get_headers_by_file

        self.category_values = defaultdict(set)

        self.type_dict = {
            'numeric' : 'xsd:decimal',
            'text'    : 'xsd:string',
            'category': ':',
            'taxon': ':',
            'ref': ':',
            'strand': ':',
            'start': 'xsd:decimal',
            'end': 'xsd:decimal',
            'entity'  : ':',
            'entitySym'  : ':',
            'entity_start'  : ':',
            'goterm': '',
            'date': 'xsd:dateTime'
            }

        self.delims = {
            'numeric' : ('', ''),
            'text'    : ('', '^^xsd:string'),
            'category': ('', ''),
            'taxon': ('', ''),
            'ref': ('', ''),
            'strand': ('', ''),
            'start' : ('', ''),
            'end' : ('', ''),
            'entity'  : ('', ''),
            'entitySym'  : ('', ''),
            'entity_start'  : ('', ''),
            'goterm': ('<http://purl.obolibrary.org/obo/GO_', '>'),
            'date': ('', '^^xsd:dateTime')
            }
示例#5
0
    def __init__(self, settings, session, path, preview_limit, uri_set=None):
        SourceFile.__init__(self, settings, session, path, uri_set=uri_set)
        self.type = 'tsv'

        self.preview_limit = preview_limit

        self.forced_column_types = ['entity']
        self.disabled_columns = []
        self.key_columns = []
        self.headers = self.get_headers_by_file

        self.category_values = defaultdict(set)

        self.type_dict = {
            'numeric': 'xsd:decimal',
            'text': 'xsd:string',
            'category': ':',
            'taxon': ':',
            'ref': ':',
            'strand': ':',
            'start': 'xsd:decimal',
            'end': 'xsd:decimal',
            'entity': ':',
            'entitySym': ':',
            'entity_start': ':',
            'goterm': '',
            'date': 'xsd:dateTime'
        }

        self.delims = {
            'numeric': ('', ''),
            'text': ('', '^^xsd:string'),
            'category': ('', ''),
            'taxon': ('', ''),
            'ref': ('', ''),
            'strand': ('', ''),
            'start': ('', ''),
            'end': ('', ''),
            'entity': ('', ''),
            'entitySym': ('', ''),
            'entity_start': ('', ''),
            'goterm': ('<http://purl.obolibrary.org/obo/GO_', '>'),
            'date': ('', '^^xsd:dateTime')
        }
示例#6
0
    def __init__(self, settings, session, path, tax, ent):

        SourceFile.__init__(self, settings, session, path)

        self.type = 'gff'

        self.abstraction_dict = {}

        self.domain_knowledge_dict = {}

        self.pos_attr_list = [
            'position_taxon', 'position_ref', 'position_start', 'position_end',
            'position_strand'
        ]

        self.categories_list = ['position_taxon', 'position_ref', 'position_strand']

        self.taxon = tax

        self.entities = ent
示例#7
0
    def __init__(self, settings, session, path, preview_limit):

        SourceFile.__init__(self, settings, session, path)

        self.type = 'tsv'

        self.preview_limit = preview_limit

        self.forced_column_types = ['entity']

        self.category_values = defaultdict(set)

        self.type_dict = {
            'numeric' : 'xsd:decimal',
            'text'    : 'xsd:string',
            'category': ':',
            'taxon': ':',
            'ref': ':',
            'strand': ':',
            'start': 'xsd:decimal',
            'end': 'xsd:decimal',
            'entity'  : ':',
            'entitySym'  : ':',
            'entity_start'  : ':',
            'entityGoterm'  : ''}

        self.delims = {
            'numeric' : ('', ''),
            'text'    : ('"', '"'),
            'category': (':', ''),
            'taxon': (':', ''),
            'ref': (':', ''),
            'strand': (':', ''),
            'start' : ('', ''),
            'end' : ('', ''),
            'entity'  : (':', ''),
            'entitySym'  : (':', ''),
            'entity_start'  : (':', ''),
            'entityGoterm'  : ('"', '"')}
示例#8
0
    def __init__(self, settings, session, path, uri_set=None):

        SourceFile.__init__(self, settings, session, path, uri_set=uri_set)

        self.type = 'bed'

        self.abstraction_dict = {}

        self.domain_knowledge_dict = {}

        self.pos_attr_list = [
            'position_taxon', 'position_ref', 'position_start', 'position_end',
            'position_strand'
        ]

        self.categories_list = ['position_taxon', 'position_ref', 'position_strand']

        self.taxon = ''

        self.timestamp = datetime.datetime.now().isoformat()

        self.get_label_from_uri = {}

        self.entity = ''
示例#9
0
    def __init__(self, settings, session, path):

        SourceFile.__init__(self, settings, session, path)

        self.type = 'ttl'
示例#10
0
    def __init__(self, settings, session, url):

        SourceFile.__init__(self, settings, session, url)
示例#11
0
    def __init__(self, settings, session, url):

        SourceFile.__init__(self, settings, session, url)