File: __init__.py

package info (click to toggle)
python-pbcore 2.1.2%2Bdfsg-11
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 6,552 kB
  • sloc: python: 13,404; xml: 2,504; makefile: 226; sh: 66
file content (79 lines) | stat: -rw-r--r-- 2,041 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
"""Doctest resources"""

import os
from importlib import resources

XML_FILES = ["alignment.dataset.xml",  # 0
             "barcode.dataset.xml",
             "ccsread.dataset.xml",
             "contig.dataset.xml",
             "reference.dataset.xml",  # 4
             "subread.dataset.xml",
             "transformed_rs_subread_dataset.xml",
             "pbalchemysim0.alignmentset.xml",
             "pbalchemysim0.referenceset.xml",  # 8
             "pbalchemysim0.subreadset.xml",
             "pbalchemysim1.alignmentset.xml",
             "pbalchemysim.alignmentset.xml",  # both sim0 and sim1 bam files
             "pbalchemysim1.subreadset.xml",
             "subreadSetWithStats.xml",  # 13
             "pbalchemysim0.alignmentset.chunk0contigs.xml",
             "pbalchemysim0.alignmentset.chunk1contigs.xml",
             "ccsaligned.dataset.xml",
             "CollectionMetadata.xml",  # 17
             ]
BAM_FILES = ["pbalchemysim0.pbalign.bam",
             "pbalchemysim1.pbalign.bam",
             os.path.join('..', 'bam_mapping.bam'),
             "empty_lambda.aligned.bam", ]
STATS_FILES = [
    "m150430_142051_Mon_p1_b25.sts.xml",
    "m150616_053259_ethan_c100710482550000001823136404221563_s1_p0.sts.xml"]
FOFN_FILES = ["fofn.fofn"]


def _getAbsPath(fname):
    with resources.as_file(
        resources.files('pbcore') /
            'data/datasets' / fname) as ret:
        return str(ret)


def getXml(no=0):
    return _getAbsPath(XML_FILES[no])


def getXmlWithStats():
    return _getAbsPath(XML_FILES[13])


def getBam(no=0):
    return _getAbsPath(BAM_FILES[no])


def getEmptyAlignedBam():
    return _getAbsPath(BAM_FILES[3])


def getStats(no=0):
    return _getAbsPath(STATS_FILES[no])


def getFofn(no=0):
    return _getAbsPath(FOFN_FILES[no])


def getRef():
    return _getAbsPath(XML_FILES[8])


def getSubreadSet():
    return _getAbsPath(XML_FILES[5])


def getBarcodedBam():
    return _getAbsPath(BAM_FILES[3])


def getMockCollectionMetadata():
    return _getAbsPath(XML_FILES[17])