예제 #1
0
    def __init__(self,
                 app,
                 session,
                 file_info,
                 host_url=None,
                 external_endpoint=None,
                 custom_uri=None):
        """init

        Parameters
        ----------
        app : Flask
            Flask app
        session :
            AskOmics session
        file_info : dict
            file info
        host_url : None, optional
            AskOmics url
        """
        File.__init__(self,
                      app,
                      session,
                      file_info,
                      host_url,
                      external_endpoint=external_endpoint,
                      custom_uri=custom_uri)

        self.entity_name = ''
        self.category_values = {}
        self.attributes = {}
        self.attribute_abstraction = []
        self.faldo_entity = True
예제 #2
0
    def __init__(self,
                 app,
                 session,
                 file_info,
                 host_url=None,
                 external_endpoint=None,
                 custom_uri=None):
        """init

        Parameters
        ----------
        app : Flask
            Flask app
        session :
            AskOmics session
        file_info : dict
            file info
        host_url : None, optional
            AskOmics url
        """
        File.__init__(self,
                      app,
                      session,
                      file_info,
                      host_url,
                      external_endpoint=external_endpoint,
                      custom_uri=custom_uri)

        self.type_dict = {
            "rdf/ttl": "turtle",
            "rdf/xml": "xml",
            "rdf/nt": "nt"
        }
예제 #3
0
    def __init__(self,
                 app,
                 session,
                 file_info,
                 host_url=None,
                 external_endpoint=None,
                 custom_uri=None):
        """init

        Parameters
        ----------
        app : Flask
            Flask app
        session :
            AskOmics session
        file_info : dict
            file info
        host_url : None, optional
            AskOmics url
        """
        File.__init__(self,
                      app,
                      session,
                      file_info,
                      host_url,
                      external_endpoint=external_endpoint,
                      custom_uri=custom_uri)
예제 #4
0
파일: GffFile.py 프로젝트: xgaia/flaskomics
    def integrate(self, dataset_id, entities, public=True):
        """Integrate GFF file

        Parameters
        ----------
        entities : List
            Entities to integrate
        public : bool, optional
            Insert in public dataset
        """
        self.public = public
        self.entities_to_integrate = entities

        File.integrate(self, dataset_id=dataset_id)
예제 #5
0
    def integrate(self, dataset_id, entity_name="", public=True):
        """Integrate BED file

        Parameters
        ----------
        entities : List
            Entities to integrate
        public : bool, optional
            Insert in public dataset
        """
        self.public = public
        if entity_name:
            self.entity_name = entity_name
        else:
            self.entity_name = self.human_name

        File.integrate(self, dataset_id=dataset_id)
예제 #6
0
    def integrate(self,
                  dataset_id,
                  forced_columns_type,
                  forced_header_names=None,
                  public=False):
        """Integrate the file

        Parameters
        ----------
        forced_columns_type : list
            columns type
        public : bool, optional
            True if dataset will be public
        """
        self.public = public
        self.set_preview_and_header()
        self.force_columns_type(forced_columns_type)
        if forced_header_names:
            self.force_header_names(forced_header_names)
        File.integrate(self, dataset_id=dataset_id)
예제 #7
0
    def __init__(self,
                 app,
                 session,
                 file_info,
                 host_url=None,
                 external_endpoint=None,
                 custom_uri=None):
        """init

        Parameters
        ----------
        app : Flask
            Flask app
        session :
            AskOmics session
        file_info : dict
            file info
        host_url : None, optional
            AskOmics url
        """
        File.__init__(self,
                      app,
                      session,
                      file_info,
                      host_url,
                      external_endpoint=external_endpoint,
                      custom_uri=custom_uri)
        self.preview_limit = 30
        try:
            self.preview_limit = self.settings.getint("askomics", "npreview")
        except Exception:
            pass
        self.header = []
        self.preview = []
        self.columns_type = []
        self.category_values = {}