Compare commits
5
Commits
49f1f396c6
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
18c420d56a | ||
|
|
aa79bc02fb | ||
|
|
523667afac | ||
|
|
b53ddf0962 | ||
|
|
2ce1435a96 |
@@ -9,10 +9,11 @@
|
|||||||
strain-exact reference assemblies in the panel) + the Escherichia false-positive trap
|
strain-exact reference assemblies in the panel) + the Escherichia false-positive trap
|
||||||
(Paenibacillus / Aeromonas traps are deferred until read sources exist — `unused_trap_species`).
|
(Paenibacillus / Aeromonas traps are deferred until read sources exist — `unused_trap_species`).
|
||||||
- Stage A: pod5 download (1-in-12 chunk downsampling) → dorado basecall (HAC, barcodes classified
|
- Stage A: pod5 download (1-in-12 chunk downsampling) → dorado basecall (HAC, barcodes classified
|
||||||
via `--kit-name SQK-RBK114-96`) → minimap2 → labels parquet → signal store (trap reads excluded
|
via `--kit-name SQK-RBK114-96`) with native alignment (`--reference` → per-batch CRAM, no merge
|
||||||
from training) → 12-point arch/param ladder ({cnn, linatt} × {1M, 5M, 20M} × stride {4, 8}) →
|
step) → labels parquet → signal store (trap reads excluded from training) → 12-point arch/param
|
||||||
shuffled-label control → per-run test evaluation with the trap store (`custom_models test`)
|
ladder ({cnn, linatt} × {1M, 5M, 20M} × stride {4, 8}) → shuffled-label control → per-run test
|
||||||
→ gate verdict (`custom_models gate` → `../data/ml_models/gate_verdict.json`).
|
evaluation with the trap store (`custom_models test`) → gate verdict (`custom_models gate` →
|
||||||
|
`../data/ml_models/gate_verdict.json`).
|
||||||
- Stage B (after picking the Stage-A winner from the ladder `report.json`): windows ablation
|
- Stage B (after picking the Stage-A winner from the ladder `report.json`): windows ablation
|
||||||
(store with `--max-windows-per-read 4`), robustness variants (barcode-level `holdout_runs`,
|
(store with `--max-windows-per-read 4`), robustness variants (barcode-level `holdout_runs`,
|
||||||
`core_clade` 8-genera / optional `bacillus_group` restricted trainings) and the alignment
|
`core_clade` 8-genera / optional `bacillus_group` restricted trainings) and the alignment
|
||||||
|
|||||||
+1
-1
Submodule custom_models updated: 87c64278ba...cda6cfd34e
@@ -18,6 +18,10 @@ fast_model_name: "dna_r10.4.1_e8.2_400bps_fast@v5.2.0" # v2 alignment baseline
|
|||||||
fast_benchmarks_file: "" # add path if available
|
fast_benchmarks_file: "" # add path if available
|
||||||
fast_min_q: 8 # "" or 0 to disable
|
fast_min_q: 8 # "" or 0 to disable
|
||||||
minimap_extra: "-N 10" # secondary alignments kept for label-QC visibility
|
minimap_extra: "-N 10" # secondary alignments kept for label-QC visibility
|
||||||
|
# Alignment preset — single knob for every aligner invocation (dorado --mm2-opts,
|
||||||
|
# the minimap2 index build and the rocm fallback chain). R10.4.1 / V14 chemistry
|
||||||
|
# data: lr:hq per ONT's recommendation (map-ont is the pre-V14 default).
|
||||||
|
align_preset: "lr:hq"
|
||||||
|
|
||||||
# dataset wiring
|
# dataset wiring
|
||||||
pod5_dataset: "nomiss_96BC_P2I_SUP_2026"
|
pod5_dataset: "nomiss_96BC_P2I_SUP_2026"
|
||||||
|
|||||||
@@ -15,4 +15,4 @@ dependencies:
|
|||||||
# copies env yamls into .snakemake/conda/, where relative paths
|
# copies env yamls into .snakemake/conda/, where relative paths
|
||||||
# break. Bump the ref together with the `custom_models` submodule
|
# break. Bump the ref together with the `custom_models` submodule
|
||||||
# pointer (git submodule update --remote custom_models).
|
# pointer (git submodule update --remote custom_models).
|
||||||
- git+ssh://git@git.tk-ai.eu/Tom/eDNA_Stream_E01_custom_models.git@87c6427
|
- git+ssh://git@git.tk-ai.eu/Tom/eDNA_Stream_E01_custom_models.git@cda6cfd
|
||||||
|
|||||||
@@ -14,4 +14,4 @@ dependencies:
|
|||||||
# copies env yamls into .snakemake/conda/, where relative paths
|
# copies env yamls into .snakemake/conda/, where relative paths
|
||||||
# break. Bump the ref together with the `custom_models` submodule
|
# break. Bump the ref together with the `custom_models` submodule
|
||||||
# pointer (git submodule update --remote custom_models).
|
# pointer (git submodule update --remote custom_models).
|
||||||
- git+ssh://git@git.tk-ai.eu/Tom/eDNA_Stream_E01_custom_models.git@87c6427
|
- git+ssh://git@git.tk-ai.eu/Tom/eDNA_Stream_E01_custom_models.git@cda6cfd
|
||||||
|
|||||||
@@ -1,14 +1,18 @@
|
|||||||
"""Data pipeline: pod5 download -> dorado basecall (+ barcode classification)
|
"""Data pipeline: pod5 download -> dorado basecall (+ barcode classification,
|
||||||
-> alignment to the panel -> merged BAM per (dataset, model).
|
native alignment via --reference) -> label-ready alignment artifacts.
|
||||||
|
|
||||||
The 'hac' arm supplies the probe labels (stores); the 'fast' arm is the E1-v2
|
The 'hac' arm supplies the probe labels (stores); the 'fast' arm is the E1-v2
|
||||||
alignment baseline (dorad-fast + minimap2 + LCA). On CUDA the label job
|
alignment baseline (dorado-fast + minimap2 + LCA). On CUDA, alignment runs
|
||||||
threads dorado's classified SAM (per-read barcode tags from --kit-name)
|
inside dorado (--reference <fasta> + --mm2-opts) and each pod5 chunk is
|
||||||
straight into minimap2 (tags survive alignment, verified on minimap2 2.31)
|
written straight to CRAM (space-efficient; no merge step — the label job
|
||||||
and samtools view; per-batch BAMs are merged per (dataset, model). On ROCm
|
consumes the per-batch CRAMs directly, so no dataset-sized intermediate
|
||||||
(slorado, non-barcode) the original fastq->align->bam chain is kept as the
|
exists at all). The external minimap2-over-SAM pipe was dropped because
|
||||||
fallback; barcodes are then unavailable and labels fall back to the dataset
|
htslib rejected minimap2's re-emitted dorado records ("CIGAR and query
|
||||||
name as source_run.
|
sequence are of different length"); dorado's own aligned writer keeps the
|
||||||
|
per-record BC/RG barcode tags that bam2annotation needs for source_run.
|
||||||
|
On ROCm (slorado, non-barcode) the fastq->minimap2->bam chain is kept as
|
||||||
|
the fallback; barcodes are then unavailable and labels fall back to the
|
||||||
|
dataset name as source_run.
|
||||||
|
|
||||||
Host prerequisites: dorado on PATH, aws cli, curl; --resources gpu=N serialises
|
Host prerequisites: dorado on PATH, aws cli, curl; --resources gpu=N serialises
|
||||||
the GPU label jobs.
|
the GPU label jobs.
|
||||||
@@ -131,9 +135,9 @@ if GPU_STACK == "cuda":
|
|||||||
input:
|
input:
|
||||||
pod5="../data/raw_pod5/{dataset}/{run}_{batch}.pod5",
|
pod5="../data/raw_pod5/{dataset}/{run}_{batch}.pod5",
|
||||||
model=get_model_requirement,
|
model=get_model_requirement,
|
||||||
ref="../data/reference_genomes/full_reference.mmi"
|
ref="../data/reference_genomes/full_reference.fasta"
|
||||||
output:
|
output:
|
||||||
bam=temp("../data/aligned_reads/{dataset}/{model}/{run}_{batch}.bam")
|
alignments=temp("../data/aligned_reads/{dataset}/{model}/{run}_{batch}.cram")
|
||||||
threads: 32
|
threads: 32
|
||||||
resources:
|
resources:
|
||||||
gpu=1
|
gpu=1
|
||||||
@@ -142,27 +146,10 @@ if GPU_STACK == "cuda":
|
|||||||
benchmarking=get_benchmarking_file,
|
benchmarking=get_benchmarking_file,
|
||||||
min_q=get_qscore,
|
min_q=get_qscore,
|
||||||
kit_flag=get_kit_flag,
|
kit_flag=get_kit_flag,
|
||||||
minimap_extra=config["minimap_extra"],
|
mm2_opts=f"-x {config['align_preset']} {config['minimap_extra']}",
|
||||||
conda:
|
|
||||||
"../envs/minimap.yaml"
|
|
||||||
shell:
|
shell:
|
||||||
"""
|
"""
|
||||||
dorado basecaller --models-directory {config[dorado_model_dir]} --emit-sam {params.benchmarking} {params.min_q} {params.kit_flag} {params.dorado_model} {input.pod5} \
|
dorado basecaller --models-directory {config[dorado_model_dir]} --emit-cram {params.benchmarking} {params.min_q} {params.kit_flag} --reference {input.ref} --mm2-opts "{params.mm2_opts}" {params.dorado_model} {input.pod5} > {output}
|
||||||
| minimap2 -a -x map-ont {params.minimap_extra} -t {threads} {input.ref} - \
|
|
||||||
| samtools view -b -@ {threads} > {output}
|
|
||||||
"""
|
|
||||||
|
|
||||||
rule merge_aligned_reads:
|
|
||||||
input:
|
|
||||||
bams=expand("../data/aligned_reads/{{dataset}}/{{model}}/{run}_{batch}.bam", batch=get_batch_range, run=get_run_name),
|
|
||||||
output:
|
|
||||||
bam=temp("../data/aligned_reads/{dataset}_{model}_to_genome.bam"),
|
|
||||||
threads: 8
|
|
||||||
conda:
|
|
||||||
"../envs/samtools.yaml"
|
|
||||||
shell:
|
|
||||||
"""
|
|
||||||
samtools cat -@ {threads} -o {output.bam} {input.bams}
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
elif GPU_STACK == "rocm":
|
elif GPU_STACK == "rocm":
|
||||||
@@ -207,7 +194,7 @@ elif GPU_STACK == "rocm":
|
|||||||
"../envs/minimap.yaml"
|
"../envs/minimap.yaml"
|
||||||
shell:
|
shell:
|
||||||
"""
|
"""
|
||||||
minimap2 -ax map-ont {params.minimap_extra} -t {threads} {input.ref} {input.fastq} > {output}
|
minimap2 -a -x {config[align_preset]} {params.minimap_extra} -t {threads} {input.ref} {input.fastq} > {output}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
rule convert_sam_to_bam:
|
rule convert_sam_to_bam:
|
||||||
|
|||||||
@@ -123,6 +123,31 @@ def train_run_id(w):
|
|||||||
return f"{w.arch}_{fmt_budget(w.budget)}_s{w.stride}_g{n}{spec['suffix']}"
|
return f"{w.arch}_{fmt_budget(w.budget)}_s{w.stride}_g{n}{spec['suffix']}"
|
||||||
|
|
||||||
|
|
||||||
|
# Effective optimiser batch stays the spec's 256; --grad-accum splits it into
|
||||||
|
# micro-batches that fit the 16 GB RTX 4060 Ti. Values from measured bf16
|
||||||
|
# fwd+bwd peaks (2026-11-04, this machine): peak(32) per point scaled with a
|
||||||
|
# 1.3 safety factor to keep every run under ~8 GiB. Unknown combinations fall
|
||||||
|
# back to 32 micro-steps of 8 (safe for the largest lattice shapes).
|
||||||
|
GRAD_ACCUM = {
|
||||||
|
("cnn", "1000000", "4"): 4,
|
||||||
|
("cnn", "1000000", "8"): 1,
|
||||||
|
("cnn", "5000000", "4"): 8,
|
||||||
|
("cnn", "5000000", "8"): 4,
|
||||||
|
("cnn", "20000000", "4"): 16,
|
||||||
|
("cnn", "20000000", "8"): 8,
|
||||||
|
("linatt", "1000000", "4"): 4,
|
||||||
|
("linatt", "1000000", "8"): 1,
|
||||||
|
("linatt", "5000000", "4"): 16,
|
||||||
|
("linatt", "5000000", "8"): 8,
|
||||||
|
("linatt", "20000000", "4"): 32,
|
||||||
|
("linatt", "20000000", "8"): 16,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def train_grad_accum(w):
|
||||||
|
return GRAD_ACCUM.get((str(w.arch), str(w.budget), str(w.stride)), 32)
|
||||||
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# labels + signal stores
|
# labels + signal stores
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
@@ -134,9 +159,24 @@ wildcard_constraints:
|
|||||||
stride=r"4|8",
|
stride=r"4|8",
|
||||||
model="hac|fast"
|
model="hac|fast"
|
||||||
|
|
||||||
|
def label_alignments(w):
|
||||||
|
"""Input function: alignment artifacts feeding the label parquet.
|
||||||
|
|
||||||
|
CUDA branch: the per-batch CRAMs written by dorado's native aligner
|
||||||
|
(consumed directly, no merge step -> no dataset-sized intermediate).
|
||||||
|
ROCm fallback: the single merged BAM from the fastq->minimap2 chain.
|
||||||
|
"""
|
||||||
|
if GPU_STACK == "cuda":
|
||||||
|
return [
|
||||||
|
f"../data/aligned_reads/{w.dataset}/{w.model}/{run_name(w.dataset)}_{b}.cram"
|
||||||
|
for b in batch_names(w.dataset)
|
||||||
|
]
|
||||||
|
return f"../data/aligned_reads/{w.dataset}_{w.model}_to_genome.bam"
|
||||||
|
|
||||||
|
|
||||||
rule prepare_read_labels:
|
rule prepare_read_labels:
|
||||||
input:
|
input:
|
||||||
bamfile="../data/aligned_reads/{dataset}_{model}_to_genome.bam",
|
alignments=label_alignments,
|
||||||
reference="../data/reference_genomes/full_reference.fasta",
|
reference="../data/reference_genomes/full_reference.fasta",
|
||||||
output:
|
output:
|
||||||
"../data/ml_inputs/{dataset}_{model}_label_store.pq",
|
"../data/ml_inputs/{dataset}_{model}_label_store.pq",
|
||||||
@@ -190,6 +230,10 @@ rule build_store_windows_ablation:
|
|||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# training (Stage-A ladder, control, Stage-B variants)
|
# training (Stage-A ladder, control, Stage-B variants)
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
# TORCH_DISABLE_NATIVE_JIT=1: torch 2.13 dispatches some matmul/einsum
|
||||||
|
# backwards to Triton-compiled native ops that cannot build in this conda env
|
||||||
|
# (no CUDA headers) -> fall back to cuBLAS. expandable_segments fights
|
||||||
|
# fragmentation on the 16 GB card.
|
||||||
rule train_probe:
|
rule train_probe:
|
||||||
input:
|
input:
|
||||||
store=lambda w: train_spec(w)["store"],
|
store=lambda w: train_spec(w)["store"],
|
||||||
@@ -205,17 +249,20 @@ rule train_probe:
|
|||||||
stage=lambda w: train_spec(w)["stage"],
|
stage=lambda w: train_spec(w)["stage"],
|
||||||
flags=lambda w: train_spec(w)["flags"],
|
flags=lambda w: train_spec(w)["flags"],
|
||||||
genera_flag=lambda w: train_spec(w)["genera_flag"],
|
genera_flag=lambda w: train_spec(w)["genera_flag"],
|
||||||
|
grad_accum=train_grad_accum,
|
||||||
threads: 8
|
threads: 8
|
||||||
resources:
|
resources:
|
||||||
gpu=1
|
gpu=1
|
||||||
conda: config["torch_env"]
|
conda: config["torch_env"]
|
||||||
shell:
|
shell:
|
||||||
"""
|
"""
|
||||||
|
TORCH_DISABLE_NATIVE_JIT=1 PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True \
|
||||||
python -m custom_models train \
|
python -m custom_models train \
|
||||||
--arch {wildcards.arch} \
|
--arch {wildcards.arch} \
|
||||||
--budget {wildcards.budget} \
|
--budget {wildcards.budget} \
|
||||||
--stride {wildcards.stride} \
|
--stride {wildcards.stride} \
|
||||||
--budget-tol {config[budget_tolerance]} \
|
--budget-tol {config[budget_tolerance]} \
|
||||||
|
--grad-accum {params.grad_accum} \
|
||||||
{params.flags} {params.genera_flag} \
|
{params.flags} {params.genera_flag} \
|
||||||
--store {input.store} \
|
--store {input.store} \
|
||||||
--out-dir {params.run_dir} \
|
--out-dir {params.run_dir} \
|
||||||
@@ -242,6 +289,7 @@ rule test_probe:
|
|||||||
conda: config["torch_env"]
|
conda: config["torch_env"]
|
||||||
shell:
|
shell:
|
||||||
"""
|
"""
|
||||||
|
TORCH_DISABLE_NATIVE_JIT=1 PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True \
|
||||||
python -m custom_models test \
|
python -m custom_models test \
|
||||||
--run-dir {params.run_dir} \
|
--run-dir {params.run_dir} \
|
||||||
--trap-store {input.trap_store} \
|
--trap-store {input.trap_store} \
|
||||||
|
|||||||
@@ -80,5 +80,5 @@ rule create_minimap_index:
|
|||||||
"../envs/minimap.yaml"
|
"../envs/minimap.yaml"
|
||||||
shell:
|
shell:
|
||||||
"""
|
"""
|
||||||
minimap2 -x map-ont -t {threads} -d {output} {input}
|
minimap2 -x {config[align_preset]} -t {threads} -d {output} {input}
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -53,8 +53,8 @@ def _source_run(record, fallback):
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
input_bamfile = snakemake.input[0]
|
alignment_paths = [str(p) for p in snakemake.input.alignments]
|
||||||
reference_genomes = snakemake.input[1]
|
reference_genomes = snakemake.input.reference
|
||||||
output_parquet = snakemake.output[0]
|
output_parquet = snakemake.output[0]
|
||||||
dataset_tag = snakemake.wildcards.dataset
|
dataset_tag = snakemake.wildcards.dataset
|
||||||
|
|
||||||
@@ -67,68 +67,72 @@ if __name__ == '__main__':
|
|||||||
'ref_length' : len(ref.seq)
|
'ref_length' : len(ref.seq)
|
||||||
}
|
}
|
||||||
|
|
||||||
# Open Bamfile for reading (unsorted BAM -> plain iteration, no index needed)
|
# Parse alignments (per-batch CRAMs on the cuda branch, one merged BAM on rocm;
|
||||||
bamfile = pysam.AlignmentFile(input_bamfile,'rb')
|
# CRAM decoding needs the reference fasta)
|
||||||
|
|
||||||
# Transcribe Taxonomy from Sequence ID dict to bam header position list for fast lookup
|
|
||||||
ref_data = []
|
|
||||||
for ref_id in bamfile.header.references:
|
|
||||||
if ref_id not in ref_tax_data:
|
|
||||||
raise KeyError(f'reference {ref_id} from BAM header missing in {reference_genomes}')
|
|
||||||
ref_data.append(
|
|
||||||
ReferenceMetadata(
|
|
||||||
ref_id = ref_id,
|
|
||||||
genus = ref_tax_data[ref_id]['genus'],
|
|
||||||
species = ref_tax_data[ref_id]['species'],
|
|
||||||
ref_len = ref_tax_data[ref_id]['ref_length']
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
# Parse alignments
|
|
||||||
data = []
|
data = []
|
||||||
n_records = 0
|
n_records = 0
|
||||||
n_unmapped = 0
|
n_unmapped = 0
|
||||||
n_secondary = 0
|
n_secondary = 0
|
||||||
n_supplementary = 0
|
n_supplementary = 0
|
||||||
n_primary = 0
|
n_primary = 0
|
||||||
for record in bamfile:
|
for path in alignment_paths:
|
||||||
n_records += 1
|
if path.endswith('.cram'):
|
||||||
if record.is_unmapped:
|
bamfile = pysam.AlignmentFile(path, 'rc', reference_filename=str(reference_genomes))
|
||||||
n_unmapped += 1
|
else:
|
||||||
continue
|
bamfile = pysam.AlignmentFile(path, 'rb')
|
||||||
if record.is_secondary:
|
|
||||||
n_secondary += 1
|
# Transcribe Taxonomy from Sequence ID dict to bam header position list for fast lookup
|
||||||
continue
|
ref_data = []
|
||||||
if record.is_supplementary:
|
for ref_id in bamfile.header.references:
|
||||||
n_supplementary += 1
|
if ref_id not in ref_tax_data:
|
||||||
continue
|
raise KeyError(f'reference {ref_id} from alignment header missing in {reference_genomes}')
|
||||||
n_primary += 1
|
ref_data.append(
|
||||||
nm_count = -1
|
ReferenceMetadata(
|
||||||
for tag in record.get_tags():
|
ref_id = ref_id,
|
||||||
if tag[0] == 'NM':
|
genus = ref_tax_data[ref_id]['genus'],
|
||||||
nm_count = tag[1]
|
species = ref_tax_data[ref_id]['species'],
|
||||||
assert nm_count != -1
|
ref_len = ref_tax_data[ref_id]['ref_length']
|
||||||
assert isinstance(nm_count,int)
|
)
|
||||||
rlen = record.infer_read_length()
|
)
|
||||||
assert rlen is not None
|
|
||||||
qlen = record.infer_query_length()
|
for record in bamfile:
|
||||||
assert qlen is not None
|
n_records += 1
|
||||||
ref = ref_data[record.reference_id]
|
if record.is_unmapped:
|
||||||
data.append(
|
n_unmapped += 1
|
||||||
{
|
continue
|
||||||
'read_id' : record.query_name,
|
if record.is_secondary:
|
||||||
'ref_name' : ref.ref_id,
|
n_secondary += 1
|
||||||
'genus' : ref.genus,
|
continue
|
||||||
'species' : ref.species,
|
if record.is_supplementary:
|
||||||
'identity' : 1 - (nm_count / qlen),
|
n_supplementary += 1
|
||||||
'aligned_len' : qlen,
|
continue
|
||||||
'query_len' : rlen,
|
n_primary += 1
|
||||||
'source_run' : _source_run(record, dataset_tag),
|
nm_count = -1
|
||||||
}
|
for tag in record.get_tags():
|
||||||
)
|
if tag[0] == 'NM':
|
||||||
|
nm_count = tag[1]
|
||||||
|
assert nm_count != -1
|
||||||
|
assert isinstance(nm_count,int)
|
||||||
|
rlen = record.infer_read_length()
|
||||||
|
assert rlen is not None
|
||||||
|
qlen = record.infer_query_length()
|
||||||
|
assert qlen is not None
|
||||||
|
ref = ref_data[record.reference_id]
|
||||||
|
data.append(
|
||||||
|
{
|
||||||
|
'read_id' : record.query_name,
|
||||||
|
'ref_name' : ref.ref_id,
|
||||||
|
'genus' : ref.genus,
|
||||||
|
'species' : ref.species,
|
||||||
|
'identity' : 1 - (nm_count / qlen),
|
||||||
|
'aligned_len' : qlen,
|
||||||
|
'query_len' : rlen,
|
||||||
|
'source_run' : _source_run(record, dataset_tag),
|
||||||
|
}
|
||||||
|
)
|
||||||
df = pd.DataFrame(data)
|
df = pd.DataFrame(data)
|
||||||
df.to_parquet(output_parquet,index=False)
|
df.to_parquet(output_parquet,index=False)
|
||||||
print(f'Processed {input_bamfile}:')
|
print(f'Processed {len(alignment_paths)} alignment file(s): {", ".join(alignment_paths)}')
|
||||||
print(f'\t{n_records} alignment records')
|
print(f'\t{n_records} alignment records')
|
||||||
print(f'\t{n_primary} primary alignments')
|
print(f'\t{n_primary} primary alignments')
|
||||||
print(f'\t{n_unmapped} unmapped reads')
|
print(f'\t{n_unmapped} unmapped reads')
|
||||||
|
|||||||
Reference in New Issue
Block a user