Filetypes¶
The following filetypes are available to use:
AlignmentInput
CramOrBamPath
BamPath
CramPath
GvcfPath
FastqPair
FastqPairs
You can import them from the cpg_flow
package:
from cpg_flow import AlignmentInput, CramOrBamPath, BamPath, CramPath, GvcfPath, FastqPair, FastqPairs
cpg_flow.filetypes.AlignmentInput
¶
Bases: ABC
Data that works as input for alignment or realignment.
exists
abstractmethod
¶
exists()
Check if all files exist.
Source code in src/cpg_flow/filetypes.py
21 22 23 24 25 |
|
cpg_flow.filetypes.CramOrBamPath
¶
CramOrBamPath(
path, index_path=None, reference_assembly=None
)
Bases: AlignmentInput
, ABC
Represents a path to a CRAM or a BAM file, optionally with corresponding index.
Source code in src/cpg_flow/filetypes.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
|
ext
abstractmethod
property
¶
ext
The canonical extension for the file type, without a '.' at the start.
index_ext
abstractmethod
property
¶
index_ext
The canonical index file extension, without a '.' at the start.
exists
¶
exists()
CRAM file exists.
Source code in src/cpg_flow/filetypes.py
76 77 78 79 80 |
|
resource_group
¶
resource_group(b)
Create a Hail Batch resource group
Source code in src/cpg_flow/filetypes.py
82 83 84 85 86 87 88 89 90 91 92 |
|
cpg_flow.filetypes.BamPath
¶
BamPath(path, index_path=None)
Bases: CramOrBamPath
Represents a path to a BAM file, optionally with corresponding index.
Source code in src/cpg_flow/filetypes.py
103 104 105 106 107 108 |
|
exists
¶
exists()
CRAM file exists.
Source code in src/cpg_flow/filetypes.py
76 77 78 79 80 |
|
resource_group
¶
resource_group(b)
Create a Hail Batch resource group
Source code in src/cpg_flow/filetypes.py
82 83 84 85 86 87 88 89 90 91 92 |
|
cpg_flow.filetypes.CramPath
¶
CramPath(path, index_path=None, reference_assembly=None)
Bases: CramOrBamPath
Represents a path to a CRAM file, optionally with corresponding index.
Source code in src/cpg_flow/filetypes.py
127 128 129 130 131 132 133 134 |
|
exists
¶
exists()
CRAM file exists.
Source code in src/cpg_flow/filetypes.py
76 77 78 79 80 |
|
resource_group
¶
resource_group(b)
Create a Hail Batch resource group
Source code in src/cpg_flow/filetypes.py
82 83 84 85 86 87 88 89 90 91 92 |
|
cpg_flow.filetypes.GvcfPath
¶
GvcfPath(path)
Represents GVCF data on a bucket within the workflow. Includes a path to a GVCF file along with a corresponding TBI index, and a corresponding fingerprint path.
Source code in src/cpg_flow/filetypes.py
152 153 154 |
|
exists
¶
exists()
GVCF file exists.
Source code in src/cpg_flow/filetypes.py
162 163 164 165 166 |
|
resource_group
¶
resource_group(b)
Create a Hail Batch resource group
Source code in src/cpg_flow/filetypes.py
175 176 177 178 179 180 181 182 183 184 |
|
cpg_flow.filetypes.FastqPair
dataclass
¶
FastqPair(r1, r2)
Bases: AlignmentInput
Pair of FASTQ files
as_resources
¶
as_resources(b)
Makes a pair of ResourceFile objects for r1 and r2.
Source code in src/cpg_flow/filetypes.py
203 204 205 206 207 208 209 210 211 212 213 214 215 216 |
|
cpg_flow.filetypes.FastqPairs
¶
Bases: list[FastqPair]
, AlignmentInput
Multiple FASTQ file pairs belonging to the same sequencing_group (e.g. multiple lanes or top-ups).