<gh_stars>1-10
"""Contains the AlaskaSample class.

Contains all information on a given sample. AlaskaProjects hold multiple
AlaskaSample objects, one per sample.
"""

__author__ = '<NAME> (<NAME>'
__copyright__ = 'Copyright 2017 WormLabCaltech'
__credits__ = ['<NAME>', '<NAME>', '<NAME>']
__license__ = "MIT"
__version__ = "alpha"
__maintainer__ = "<NAME> (J<NAME>"
__email__ = "<EMAIL>"
__status__ = "alpha"

from Alaska import Alaska
import datetime as dt


class AlaskaSample(Alaska):
    """
    AlaskaSample. Class to wrap all sample data.
    """

    def __init__(self, _id, name=''):
        """
        AlaskaSample constructor. Must receive id.

        Arguments:
        _id  -- (str) id of this sample
        name -- (str) nickname of this sample

        Returns: None
        """
        self.id = _id
        self.name = name
        self.type = 1       # 1: single-end, 2: pair-end
        self.pairs = []
        self.organism = {'genus'  : None,
                         'species': None,
                         'version': None}
        self.length = 0     # used for single-end
        self.stdev = 0      # used for single-end
        self.bootstrap_n = 100  # number of bootstraps to perform
        self.reads = {}     # keys: folders; values: list of read files
        self.projects = []  # list of projects that refer to this sample

        # METADATA
        self.meta = {}
        self.meta['title'] = ''
        self.meta['contributors'] = []
        self.meta['chars'] = {}
        self.meta['description'] = ''
        self.meta['platform'] = ''
        self.datetime = dt.datetime.now().strftime(Alaska.DATETIME_FORMAT)

"""Contains the AlaskaSample class.

Contains all information on a given sample. AlaskaProjects hold multiple
AlaskaSample objects, one per sample.
"""

__author__ = '<NAME> (<NAME>'
__copyright__ = 'Copyright 2017 WormLabCaltech'
__credits__ = ['<NAME>', '<NAME>', '<NAME>']
__license__ = "MIT"
__version__ = "alpha"
__maintainer__ = "<NAME> (J<NAME>"
__email__ = "<EMAIL>"
__status__ = "alpha"

from Alaska import Alaska
import datetime as dt


class AlaskaSample(Alaska):
    """
    AlaskaSample. Class to wrap all sample data.
    """

    def __init__(self, _id, name=''):
        """
        AlaskaSample constructor. Must receive id.

        Arguments:
        _id  -- (str) id of this sample
        name -- (str) nickname of this sample

        Returns: None
        """
        self.id = _id
        self.name = name
        self.type = 1       # 1: single-end, 2: pair-end
        self.pairs = []
        self.organism = {'genus'  : None,
                         'species': None,
                         'version': None}
        self.length = 0     # used for single-end
        self.stdev = 0      # used for single-end
        self.bootstrap_n = 100  # number of bootstraps to perform
        self.reads = {}     # keys: folders; values: list of read files
        self.projects = []  # list of projects that refer to this sample

        # METADATA
        self.meta = {}
        self.meta['title'] = ''
        self.meta['contributors'] = []
        self.meta['chars'] = {}
        self.meta['description'] = ''
        self.meta['platform'] = ''
        self.datetime = dt.datetime.now().strftime(Alaska.DATETIME_FORMAT)
Contains the AlaskaSample class.  Contains all information on a given sample. AlaskaProjects hold multiple AlaskaSample objects, one per sample. AlaskaSample. Class to wrap all sample data. AlaskaSample constructor. Must receive id.          Arguments:         _id  -- (str) id of this sample         name -- (str) nickname of this sample          Returns: None # 1: single-end, 2: pair-end # used for single-end # used for single-end # number of bootstraps to perform # keys: folders; values: list of read files # list of projects that refer to this sample # METADATA