File: __init__.py

package info (click to toggle)
python-pbcore 1.2.11%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 18,612 kB
  • ctags: 5,336
  • sloc: python: 22,160; xml: 2,667; makefile: 239
file content (69 lines) | stat: -rwxr-xr-x 2,164 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
"""Doctest resources"""

import os
from pkg_resources import Requirement, resource_filename

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",
             "hdfsubread_dataset.xml",
             "pbalchemysim0.alignmentset.xml",
             "pbalchemysim0.referenceset.xml", #9
             "pbalchemysim0.subreadset.xml",
             "pbalchemysim1.alignmentset.xml",
             "pbalchemysim.alignmentset.xml", # both sim0 and sim1 bam files
             "pbalchemysim1.subreadset.xml",
             "subreadSetWithStats.xml", #14
             "pbalchemysim0.alignmentset.chunk0contigs.xml",
             "pbalchemysim0.alignmentset.chunk1contigs.xml",
             "pbalchemysim0.hdfsubreadset.xml",
             "pbalchemysim1.hdfsubreadset.xml",
             "pbalchemysim.hdfsubreadset.xml", #19
             "ccsaligned.dataset.xml",
            ]
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):
    return resource_filename(Requirement.parse('pbcore'),
                             'pbcore/data/datasets/%s' % fname)

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

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

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[9])

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

def getHdfSubreadSet():
    return _getAbsPath(XML_FILES[7])

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