Пример #1
0
from collections import OrderedDict
from pathlib import Path
import yaml
import ngcloud as ng
from ngcloud.util import open, _val_bool_or_none

logger = ng._create_logger(__name__)

class Sample:
    """Sample experiment run information.

    Parameters
    ----------
    name : string
    pair_end : {'R1', 'R2', False}, optional
    stranded : bool, optional

    Attributes
    ----------
    name : string
        Sample name. Pair-end samples should have same `name`
    full_name : string
        Auto-generated full sample name, containing pair-end info.

    Examples
    --------
    If a sample is pair-end, say sample 5566 has read 1 and 2, then one should
    explicitly creates two Sample instances

        >>> pe = [Sample(name='5566' % pe, pair_end=pe) for pe in ['R1', 'R2']]
        >>> pe
Пример #2
0
from pathlib import Path
from ngcloud import _create_logger
from ngcloud.report import Stage, Report
from ngcloud.pipe import get_shared_template_root, get_shared_static_root
from ngcloud.pipe import tuxedo

logger = _create_logger(__name__)
_here = Path(__file__).parent

class GATKBaseStage(Stage):
    template_find_paths = [
        _here / "report" / "templates",
        get_shared_template_root(),
    ]

class IndexStage(GATKBaseStage):
    template_entrances = 'index.html'

class QCStage(tuxedo.QCStage):
    # template_find_paths = GATKBaseStage.template_find_paths
    # template_find_paths.append(
    #     _get_builtin_template_root() / 'tuxedo'
    # )
    template_find_paths = (
        GATKBaseStage.template_find_paths[:1] +
        tuxedo.QCStage.template_find_paths
    )

class AlignStage(GATKBaseStage):
    template_entrances = 'align.html'