From 6608c4c758066f543901cf6108a35c6bce2b6b25 Mon Sep 17 00:00:00 2001 From: sainsachiko Date: Sun, 24 May 2026 02:32:11 +0100 Subject: [PATCH 01/20] Test commit: Use new code from this PR --- .github/workflows/download_pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/download_pipeline.yml b/.github/workflows/download_pipeline.yml index 45884ff9..52784804 100644 --- a/.github/workflows/download_pipeline.yml +++ b/.github/workflows/download_pipeline.yml @@ -32,7 +32,7 @@ jobs: run: | echo "REPO_LOWERCASE=${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT" echo "REPOTITLE_LOWERCASE=$(basename ${GITHUB_REPOSITORY,,})" >> "$GITHUB_OUTPUT" - echo "REPO_BRANCH=${{ github.event.inputs.testbranch || 'dev' }}" >> "$GITHUB_OUTPUT" + echo "REPO_BRANCH=${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.event.inputs.testbranch || 'dev' }}" >> "$GITHUB_OUTPUT" download: runs-on: ubuntu-latest From aa302afab27d08a5b58b25ad8b025bd3541451dc Mon Sep 17 00:00:00 2001 From: sainsachiko Date: Thu, 28 May 2026 19:08:03 +0100 Subject: [PATCH 02/20] Add subWF to handle extra_header --- subworkflows/local/prepare_read_groups.nf | 64 +++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 subworkflows/local/prepare_read_groups.nf diff --git a/subworkflows/local/prepare_read_groups.nf b/subworkflows/local/prepare_read_groups.nf new file mode 100644 index 00000000..04ff501d --- /dev/null +++ b/subworkflows/local/prepare_read_groups.nf @@ -0,0 +1,64 @@ +// +// Prepare read-group metadata from optional extra_header and BAM input headers +// + +include { SAMTOOLS_SPLITHEADER } from '../../modules/nf-core/samtools/splitheader/main' + +workflow PREPARE_READ_GROUPS { + take: + reads // channel: [ val(meta), /path/to/read_file ] + rg_mode // string: read-group mode: 'long' (minimap2 style) or 'short' (samtools addreplacerg style) + + main: + // Build mode-specific RG prefix once and reuse it for all reads in this invocation. + def rg_lead = rg_mode == 'long' ? '-y' : '' + def rg_flag = rg_mode == 'long' ? '-R' : '-r' + + // Pre-populate read_group for all inputs; downstream steps may override it from extracted @RG lines + ch_reads_prefixed = reads.map { meta, read_file -> [meta + [read_group: "${rg_lead} ${rg_flag} $meta.read_group", replace_rg: true], read_file] } + + ch_reads_extra_header = ch_reads_prefixed + .branch { meta, read_file -> + // Inputs with explicit extra_header metadata should be parsed directly + has_extra_header: meta.extra_header != [] + return [meta + [read_file: read_file], meta.extra_header] + // For BAM/CRAM without extra_header metadata, extract header from the alignment file. + no_extra_header_bam_cram: meta.extra_header == [] && read_file.name ==~ /.*\.(bam|cram)$/ + // FASTQ and remaining inputs keep the pre-populated read_group. + no_extra_header_fastq: true + } + + // Extract @RG/@PG from provided extra_header files and BAM/CRAM headers + SAMTOOLS_SPLITHEADER(ch_reads_extra_header.has_extra_header.mix(ch_reads_extra_header.no_extra_header_bam_cram)) + + ch_reads_with_rg = SAMTOOLS_SPLITHEADER.out.readgroup + .join(SAMTOOLS_SPLITHEADER.out.programs) + .join(ch_reads_extra_header.has_extra_header.mix(ch_reads_extra_header.no_extra_header_bam_cram), by: 0) + .map { meta, rg_file, program_file, read_files -> + def rglines = file(rg_file).readLines() + // Prefer extracted @RG lines; fallback to the existing read_group only when extraction is empty + def rg_args = rglines ? [ + rg_lead, + rglines.collect { line -> + // Add SM when not present to avoid errors from downstream tools (e.g. variant callers) + def l = line.contains('SM:') ? line + : meta.sample ? "${line}\tSM:${meta.sample}" + : "${line}\tSM:${meta.id}" + "${rg_flag} '${l.replaceAll("\t", "\\\\t")}'" + }.join(' ') + ].findAll { it }.join(' ') + : (meta.read_group ?: '') + + def output_read_files = meta.read_file ?: read_files + // If RG came from an existing BAM/CRAM header, and no extra RG provided to overwrite, preserve it and avoid replacing downstream + // If PG came from an existing BAM/CRAM header, and no extra PG provided to overwrite, preserve it and avoid replacing downstream + def replace_rg = !meta.extra_header && rglines ? false : true + def add_pg = !meta.extra_header && program_file ? false : true + def new_meta = meta.subMap(meta.keySet() - ['read_file']) + [read_group: rg_args, replace_rg: replace_rg, add_pg: add_pg] + [new_meta, output_read_files] + } + .mix(ch_reads_extra_header.no_extra_header_fastq) + + emit: + reads = ch_reads_with_rg // channel: [ val(meta), /path/to/read_file ] +} From b281f831ea338ebda3c6ed2099e9656e1274a37d Mon Sep 17 00:00:00 2001 From: sainsachiko Date: Thu, 28 May 2026 19:09:11 +0100 Subject: [PATCH 03/20] Apply new subWF to handle read_group from extra_header --- assets/schema_input.json | 8 ++++ conf/modules.config | 1 + modules.json | 2 +- subworkflows/local/align_long.nf | 41 +++++------------- subworkflows/local/align_short.nf | 71 ++++++++++++++++--------------- subworkflows/local/input_check.nf | 1 + 6 files changed, 58 insertions(+), 66 deletions(-) diff --git a/assets/schema_input.json b/assets/schema_input.json index 5a4d16de..70754236 100644 --- a/assets/schema_input.json +++ b/assets/schema_input.json @@ -45,6 +45,14 @@ "errorMessage": "Sample barcode cannot contain spaces", "default": "", "meta": ["barcode"] + }, + "extra_header": { + "type": "string", + "format": "file-path", + "exists": true, + "pattern": "^\\S+\\.(sam|sam.gz)$", + "errorMessage": "SAM header file cannot contain spaces and must be in SAM format", + "meta": ["extra_header"] } }, "required": ["specimen", "run", "datatype", "datafile"] diff --git a/conf/modules.config b/conf/modules.config index 1c86d8f2..f7f2b817 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -113,6 +113,7 @@ process { } withName: SAMTOOLS_ADDREPLACERG { + ext.args = { "${meta.read_group}" } ext.prefix = { "${input.baseName}_addRG" } } diff --git a/modules.json b/modules.json index 979208ba..c00ecfad 100644 --- a/modules.json +++ b/modules.json @@ -77,7 +77,7 @@ }, "samtools/addreplacerg": { "branch": "master", - "git_sha": "156feda0cb6589cd29c04902004fa3b53bc00205", + "git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120", "installed_by": ["modules"] }, "samtools/bgzip": { diff --git a/subworkflows/local/align_long.nf b/subworkflows/local/align_long.nf index 2f3a8c8f..4982e0d1 100644 --- a/subworkflows/local/align_long.nf +++ b/subworkflows/local/align_long.nf @@ -4,6 +4,7 @@ // Include local modules and subworkflows include { MERGE_OUTPUT } from '../../subworkflows/local/merge_output' +include { PREPARE_READ_GROUPS } from '../../subworkflows/local/prepare_read_groups' include { PACBIO_PREPROCESS } from '../../subworkflows/sanger-tol/pacbio_preprocess/main' include { PACBIO_PREPROCESS as PACBIO_PREPROCESS_ULI } from '../../subworkflows/sanger-tol/pacbio_preprocess/main' @@ -12,7 +13,6 @@ include { FASTX_MAP_LONG_READS } from '../../subworkflows/ // Include nf-core modules include { FASTQC as FASTQC_FILTERED } from '../../modules/nf-core/fastqc/main' include { GAWK as GAWK_MODIFY_YAML_BARCODE } from '../../modules/nf-core/gawk/main' -include { SAMTOOLS_SPLITHEADER } from '../../modules/nf-core/samtools/splitheader/main' include { SAMTOOLS_FASTQ } from '../../modules/nf-core/samtools/fastq/main' workflow ALIGN_LONG { @@ -30,39 +30,18 @@ workflow ALIGN_LONG { // // PRESERVE READ GROUP INFORMATION // - ch_reads_branch = reads - .map { meta, read_files -> [meta + [read_group: "-y -R $meta.read_group"], read_files] } - .branch { _meta, read_files -> - bam: read_files.name.endsWith("bam") - fastq: true - } - - // Extract read group information from BAM files if BAM files are provided as input - SAMTOOLS_SPLITHEADER(ch_reads_branch.bam) - - // Replace constructed read group information with the one extracted from BAM header - ch_bam_rg = SAMTOOLS_SPLITHEADER.out.readgroup - .join (ch_reads_branch.bam, by:0) - .map { meta, rg_file, bam -> - def rglines = file(rg_file).readLines() - def rg_args = rglines ? '-y ' + rglines.collect { line -> - // Add SM when not present to avoid errors from downstream tool (e.g. variant callers) - def l = line.contains("SM:") ? line - : meta.sample ? "${line}\tSM:${meta.sample}" - : "${line}\tSM:${meta.id}" - "-R '${l.replaceAll("\t", "\\\\t")}'" - }.join(' ') - : meta.read_group - [ meta + [read_group:rg_args], bam ] - } - - ch_reads_rg = ch_bam_rg.mix( ch_reads_branch.fastq ) + PREPARE_READ_GROUPS(reads, 'long') + ch_read_rg = PREPARE_READ_GROUPS.out.reads + ch_read_rg_branch = ch_read_rg.branch { _meta, read_files -> + bam: read_files.name.endsWith("bam") + fastq: true + } // // PACBIO READ PREPROCESSING // if (val_pacbio_adapter_fasta || val_pacbio_adapter_yaml || val_pacbio_uli_adapter) { // pacbio_adapter_fasta, pacbio_adapter_yaml, pacbio_uli_adapter always provided - ch_reads = ch_reads_rg + ch_reads = ch_read_rg .branch { meta, read_files -> pacbio: meta.datatype == "pacbio" // non pacbio includes ONT and pacbio clr @@ -144,8 +123,8 @@ workflow ALIGN_LONG { fastx = pacbio_fastx.mix( ch_reads.non_pacbio_fastx ) } else { // if no processing needed at all, prepare CRAM for alignment directly from original reads (both pacbio and non-pacbio reads) - bam_to_fastx = ch_bam_rg - fastx = ch_reads_branch.fastq + bam_to_fastx = ch_read_rg_branch.bam + fastx = ch_read_rg_branch.fastq } // readmapping take only 1 FASTA as reference SAMTOOLS_FASTQ ( bam_to_fastx, false ) diff --git a/subworkflows/local/align_short.nf b/subworkflows/local/align_short.nf index 0b035b5e..1b91a437 100644 --- a/subworkflows/local/align_short.nf +++ b/subworkflows/local/align_short.nf @@ -2,10 +2,11 @@ // Align short read (HiC and Illumina) data against the genome // -include { CRAM_MAP_ILLUMINA_HIC as CRAM_MAP_ILLUMINA } from '../../subworkflows/sanger-tol/cram_map_illumina_hic' -include { MERGE_OUTPUT } from '../../subworkflows/local/merge_output' -include { SAMTOOLS_ADDREPLACERG } from '../../modules/nf-core/samtools/addreplacerg/main' -include { SAMTOOLS_VIEW as CONVERT_CRAM } from '../../modules/nf-core/samtools/view/main' +include { CRAM_MAP_ILLUMINA_HIC as CRAM_MAP_SHORT_READS } from '../../subworkflows/sanger-tol/cram_map_illumina_hic' +include { MERGE_OUTPUT } from '../../subworkflows/local/merge_output' +include { PREPARE_READ_GROUPS } from '../../subworkflows/local/prepare_read_groups' +include { SAMTOOLS_ADDREPLACERG } from '../../modules/nf-core/samtools/addreplacerg/main' +include { SAMTOOLS_VIEW as CONVERT_CRAM } from '../../modules/nf-core/samtools/view/main' workflow ALIGN_SHORT { take: @@ -14,54 +15,56 @@ workflow ALIGN_SHORT { main: + // + // SUBWORKFLOW: Preserve read-group information from optional extra_header metadata + // + PREPARE_READ_GROUPS(reads, 'short') + reads_with_rg = PREPARE_READ_GROUPS.out.reads + + // + // LOGIC: Convert FASTQ to CRAM adn add RG information if needed + // // Check file types and branch - ch_reads = reads - .branch { - meta, reads_files -> - cram : reads_files.findAll { file -> file.name.endsWith(".cram") } - [meta + [from: "cram"], reads_files] - bam: reads_files.findAll { file -> file.name.endsWith(".bam") } - [meta + [from: "bam"], reads_files] - fastx: true - [meta + [from: "fastx"], reads_files] + ch_reads = reads_with_rg.branch { meta, read_files -> + cram: read_files.name.endsWith(".cram") + non_cram: true } - // Convert FASTQ to CRAM only if FASTQ were provided as input - ch_reads_non_crams = ch_reads.fastx - .mix ( ch_reads.bam ) - .map { meta, file -> [ meta, file, [] ] } + ch_reads_non_crams = ch_reads.non_cram.map { meta, file -> [ meta, file, [] ] } fasta_dummy_idx = fasta.map { meta, fasta_file -> [ meta, fasta_file, [] ] } CONVERT_CRAM ( ch_reads_non_crams, fasta_dummy_idx, [[],[]], [[],[]], "" ) - ch_converted_crams = CONVERT_CRAM.out.cram + // Add read group information to CRAMs if not already present, and merge with CRAMs that already have RG information + ch_crams_to_addrg = CONVERT_CRAM.out.cram + .mix ( ch_reads.cram ) .branch { meta, cram -> - with_rg: meta.from == "bam" - without_rg: true + replace_rg: meta.replace_rg == true + not_replace_rg: true } SAMTOOLS_ADDREPLACERG ( - ch_converted_crams.without_rg.map{ meta, cram -> [ meta, cram, [], meta.read_group ] }, + ch_crams_to_addrg.replace_rg.map{ meta, cram -> [ meta, cram, [], [] ] }, // empty value for RG as the modules will use meta.read_group instead (see conf/modules.config) [[],[],[],[]] ) - ch_reads_cram = SAMTOOLS_ADDREPLACERG.out.cram - .mix ( ch_converted_crams.with_rg ) - .mix ( ch_reads.cram ) - .map{ meta, cram_file -> [ meta + [ reads_size: cram_file.size() ] , cram_file ] } - - ch_illumina = ch_reads_cram - .combine(fasta) - .multiMap { meta, cram, meta_, fasta_file -> - cram: [ meta_ + meta + [ assembly_id: meta_.id ] , cram ] - fasta: [ meta_ + meta + [ assembly_id: meta_.id ] , fasta_file ] - } + // + // SUBWORKFLOW: Align short reads + // + ch_cram_to_map = SAMTOOLS_ADDREPLACERG.out.cram + .mix ( ch_crams_to_addrg.not_replace_rg ) + .map{ meta, cram_file -> [ meta + [ reads_size: cram_file.size() ] , cram_file ] } + .combine(fasta) + .multiMap { meta, cram, meta_, fasta_file -> + cram: [ meta_ + meta + [ assembly_id: meta_.id ] , cram ] + fasta: [ meta_ + meta + [ assembly_id: meta_.id ] , fasta_file ] + } - CRAM_MAP_ILLUMINA( ch_illumina.fasta, ch_illumina.cram, params.short_aligner, params.short_reads_map_chunk_size ) + CRAM_MAP_SHORT_READS( ch_cram_to_map.fasta, ch_cram_to_map.cram, params.short_aligner, params.short_reads_map_chunk_size ) // // SUBWORKFLOW: Merge all alignment outputs by specimen // - MERGE_OUTPUT( CRAM_MAP_ILLUMINA.out.bam ) + MERGE_OUTPUT( CRAM_MAP_SHORT_READS.out.bam ) emit: bam = MERGE_OUTPUT.out.bam // channel: [ val(meta), /path/to/bam ] diff --git a/subworkflows/local/input_check.nf b/subworkflows/local/input_check.nf index 9a5f2cc3..07be329a 100644 --- a/subworkflows/local/input_check.nf +++ b/subworkflows/local/input_check.nf @@ -55,6 +55,7 @@ def create_data_channel ( LinkedHashMap row, datafile, stats ) { meta.datatype = row.datatype meta.library = row.library meta.barcode = row.barcode + meta.extra_header = row.extra_header ? file(row.extra_header, checkExists:true) : [] def platform = (meta.datatype == "hic" || meta.datatype == "illumina") ? "ILLUMINA" : (meta.datatype == "pacbio" || meta.datatype == "pacbio_clr") ? "PACBIO" : From 0e8e096f0eaa8fe51c88f3fc8625b4ce70bdb7c2 Mon Sep 17 00:00:00 2001 From: sainsachiko Date: Fri, 29 May 2026 01:22:56 +0100 Subject: [PATCH 04/20] Add PG lines for output alignment files --- .../reheader/samtools_replaceheader.nf | 14 ++++++++--- subworkflows/local/convert_stats.nf | 25 +++++++++++++------ 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/modules/local/samtools/reheader/samtools_replaceheader.nf b/modules/local/samtools/reheader/samtools_replaceheader.nf index d522ece5..fd06babd 100644 --- a/modules/local/samtools/reheader/samtools_replaceheader.nf +++ b/modules/local/samtools/reheader/samtools_replaceheader.nf @@ -8,8 +8,8 @@ process SAMTOOLS_REHEADER { : 'community.wave.seqera.io/library/htslib_samtools:1.23.1--5b6bb4ede7e612e5'}" input: - tuple val(meta), path(file, stageAs: "input/*") - path(header) + tuple val(meta), path(file, stageAs: "input/*"), path(sample_extra_header, stageAs: "extra_header/*") + path(header_template) output: tuple val(meta), path("${prefix}.bam") , optional:true, emit: bam @@ -22,17 +22,23 @@ process SAMTOOLS_REHEADER { script: prefix = task.ext.prefix ?: "${meta.id}" suffix = file.getExtension() + def sq_template = header_template ? " | grep -v ^@SQ && grep '^@SQ' ${header_template}" : "" + // Suffix all PG IDs from sample extra_header to keep them distinct from native file-header PG IDs. + def pg_extra = sample_extra_header ? "grep '^@PG' ${sample_extra_header} | awk 'BEGIN { FS = OFS = \"\\t\" } { for (i = 1; i <= NF; i++) if (\$i ~ /^ID:/) { \$i = \$i \".extra_header\"; break } print }' || true" : "true" if ("$file" == "${prefix}.${suffix}") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" """ # Replace SQ lines with those from external template - ( samtools view --no-PG --header-only ${file} | \\ - grep -v ^@SQ && grep ^@SQ ${header} ) > temp.header.sam + ( samtools view --no-PG --header-only ${file} \\ + ${sq_template} ) > temp.header.sam # custom sort for readability (retain order of insertion but sort groups by tag) + # Add PG lines from sample header + # Sort order: HD, SQ, RG, extra PG, PG, other ( grep ^@HD temp.header.sam || true && \\ grep ^@SQ temp.header.sam || true && \\ grep ^@RG temp.header.sam || true && \\ + ${pg_extra} && \\ grep ^@PG temp.header.sam || true && \\ grep -v -E '^@HD|^@SQ|^@RG|^@PG' temp.header.sam || true; \\ ) > temp.sorted.header.sam diff --git a/subworkflows/local/convert_stats.nf b/subworkflows/local/convert_stats.nf index 27199274..e8ad5005 100644 --- a/subworkflows/local/convert_stats.nf +++ b/subworkflows/local/convert_stats.nf @@ -4,9 +4,10 @@ // MODULE: local modules +include { CHANGE_NAME } from '../../modules/local/change_name' +include { SAMTOOLS_REHEADER as SAMTOOLS_ADD_PG } from '../../modules/local/samtools/reheader/samtools_replaceheader' include { SAMTOOLS_REHEADER as SAMTOOLS_REHEADER_BAM } from '../../modules/local/samtools/reheader/samtools_replaceheader' include { SAMTOOLS_REHEADER as SAMTOOLS_REHEADER_CRAM } from '../../modules/local/samtools/reheader/samtools_replaceheader' -include { CHANGE_NAME } from '../../modules/local/change_name' // MODULE: nf-core modules include { BLOBTK_DEPTH } from '../../modules/nf-core/blobtk/depth/main' @@ -34,6 +35,7 @@ workflow CONVERT_STATS { // Split outfmt parameter into a list def outfmt_options = params.outfmt.split(',').collect { fmt -> fmt.trim() } + // (Optionally) Compress the quality scores of Illumina and PacBio CCS alignments if ( params.compression == "crumble" ) { crumble_selector = bam @@ -56,7 +58,16 @@ workflow CONVERT_STATS { CHANGE_NAME ( ch_bams_for_renaming, fasta ) ch_renamed_bams = CHANGE_NAME.out.file - .map { meta, bam_file -> [meta, bam_file, []] } + .branch { meta, bam_file -> + extra_header: meta.add_pg + return [ meta, bam_file, meta.extra_header ] + no_extra_header: true + } + + SAMTOOLS_ADD_PG( ch_renamed_bams.extra_header, [] ) + ch_bams_add_pg = SAMTOOLS_ADD_PG.out.bam + .mix( ch_renamed_bams.no_extra_header ) + .map { meta, bam_file -> [ meta, bam_file, [] ] } // (Optionally) convert to CRAM if it's specified in outfmt ch_cram = channel.empty() @@ -64,12 +75,12 @@ workflow CONVERT_STATS { fasta_dummy_idx = fasta.map { meta, fasta_file -> [ meta, fasta_file, [] ] } if ( "cram" in outfmt_options ) { - SAMTOOLS_CRAM ( ch_renamed_bams, fasta_dummy_idx, [[],[]], [[],[]], "" ) + SAMTOOLS_CRAM ( ch_bams_add_pg, fasta_dummy_idx, [[],[]], [[],[]], "" ) ch_cram = SAMTOOLS_CRAM.out.cram ch_crai = SAMTOOLS_CRAM.out.crai if ( params.header ) { - SAMTOOLS_REHEADER_CRAM ( SAMTOOLS_CRAM.out.cram, header.first() ) + SAMTOOLS_REHEADER_CRAM ( SAMTOOLS_CRAM.out.cram.map{ meta, cram -> [ meta, cram, []] }, header.first() ) SAMTOOLS_INDEX_CRAM ( SAMTOOLS_REHEADER_CRAM.out.cram ) ch_cram = SAMTOOLS_INDEX_CRAM.out.input ch_crai = SAMTOOLS_INDEX_CRAM.out.index @@ -84,8 +95,8 @@ workflow CONVERT_STATS { ch_bai = channel.empty() if ( "bam" in outfmt_options ) { - // Reindex BAM - ch_bam = params.header ? SAMTOOLS_REHEADER_BAM ( CHANGE_NAME.out.file, header.first() ).bam : CHANGE_NAME.out.file + // Re-header && reindex BAM + ch_bam = params.header ? SAMTOOLS_REHEADER_BAM ( ch_bams_add_pg, header.first() ).bam : ch_bams_add_pg.map{ meta, bam, _empty-> [ meta, bam ] } SAMTOOLS_INDEX_BAM ( ch_bam ) // Set the BAM and BAI channels for emission @@ -99,7 +110,7 @@ workflow CONVERT_STATS { } // Calculate read depth - BLOBTK_DEPTH ( ch_renamed_bams ) + BLOBTK_DEPTH ( ch_bams_add_pg ) BGZIP_BEDGRAPH ( BLOBTK_DEPTH.out.bed ) // Calculate statistics From 3b65a08b57ec4c8da65c2bd137519fc1137933bb Mon Sep 17 00:00:00 2001 From: sainsachiko Date: Fri, 29 May 2026 02:01:07 +0100 Subject: [PATCH 05/20] Update docs --- .nf-core.yml | 2 +- CHANGELOG.md | 7 +++++++ CITATION.cff | 4 ++-- docs/usage.md | 13 +++++++------ nextflow.config | 2 +- 5 files changed, 18 insertions(+), 10 deletions(-) diff --git a/.nf-core.yml b/.nf-core.yml index 177a80fe..0bf7c36f 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -47,4 +47,4 @@ template: - igenomes - multiqc - fastqc - version: 2.0.3 + version: 2.1.0-dev diff --git a/CHANGELOG.md b/CHANGELOG.md index 81366e54..349e1ff4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [[v2.1.0-dev](https://github.com/sanger-tol/readmapping/releases/tag/2.1.0-dev)] - 2.1.0-dev - [release-date] + +### Enhancements & fixes + +- Support extra_header at read-file level to provide `@RG` and `@PG` lines (see [usage](docs/usage.md)) + ## [[v2.0.3](https://github.com/sanger-tol/readmapping/releases/tag/2.0.3)] - Hungarian Horntail (patch 3) - [2026-05-15] ### Enhancements & fixes diff --git a/CITATION.cff b/CITATION.cff index bfb43879..265d7c9a 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -57,7 +57,7 @@ license: MIT message: If you use this software, please cite it using the metadata from this file and all references from CITATIONS.md . repository-code: https://github.com/sanger-tol/readmapping -title: sanger-tol/readmapping v2.0.3 - Hungarian Horntail (patch 3) +title: sanger-tol/readmapping 2.1.0-dev - 2.1.0-dev type: software url: https://pipelines.tol.sanger.ac.uk/readmapping -version: 2.0.3 +version: 2.1.0-dev diff --git a/docs/usage.md b/docs/usage.md index 8379b8dc..20ce093c 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -32,12 +32,12 @@ The samplesheet can have as many columns as you desire, however, there is a stri A final samplesheet file consisting of both HiC and PacBio data may look something like the one below. ```console -specimen,run,datatype,datafile,library,barcode -specimen1,run1,hic,hic1.cram,, -specimen1,run2,hic,hic2.cram,, -specimen2,run3,hic,hic3.cram,, -specimen2,run4,pacbio,pacbio1.bam,uli, -specimen3,run5,pacbio,pacbio2.bam,, +specimen,run,datatype,datafile,library,barcode,extra_header +specimen1,run1,hic,hic1.cram,,, +specimen1,run2,hic,hic2.cram,,, +specimen2,run3,hic,hic3.cram,,, +specimen2,run4,pacbio,pacbio1.bam,uli,,headers/pacbio_rg.sam +specimen3,run5,pacbio,pacbio2.bam,,, ``` | Column | Description | @@ -48,6 +48,7 @@ specimen3,run5,pacbio,pacbio2.bam,, | `datafile` | Full path to read data file. Must be `bam`, `cram`, `fastq.gz` or `fq.gz` for `illumina` and `hic`. Must be `bam`, `fastq.gz` or `fq.gz` for `pacbio`, `pacbio_clr`, and `ont`. Note that FASTQ inputs should be interleaved if paired-end. | | `library` | (Optional) The library value is a unique identifier which is assigned to read group (`@RG`) ID. If the library name is not specified, the pipeline will auto-create library name using the data filename provided in the samplesheet. | | `barcode` | (Optional) Barcode identifier used to trim barcode adapter for PacBio reads. If empty, barcode-specific adapter sequences will not be trimmed. | +| `extra_header` | (Optional) Path to a SAM file containing additional SAM header lines including `@RG`, `@PG`. These information will be injected into output BAM/CRAM headers. `@RG` lines are overwritten, while `@PG` lines are added to the existing headers (auto add `.extra_header` to `@PG ID`). | An [example samplesheet](../assets/samplesheet.csv) has been provided with the pipeline. diff --git a/nextflow.config b/nextflow.config index f43ad01c..e67c1370 100644 --- a/nextflow.config +++ b/nextflow.config @@ -322,7 +322,7 @@ manifest { mainScript = 'main.nf' defaultBranch = 'main' nextflowVersion = '!>=25.04.0' - version = '2.0.3' + version = '2.1.0-dev' doi = '10.5281/zenodo.6563577' } From a89e51a98de0fdd21aa24a34c1aa37443c7ac19c Mon Sep 17 00:00:00 2001 From: sainsachiko Date: Fri, 29 May 2026 02:13:24 +0100 Subject: [PATCH 06/20] Update tests --- assets/samplesheet.csv | 16 +- assets/samplesheet_long_read.csv | 8 +- assets/samplesheet_short_reads.csv | 2 +- assets/samplesheet_uli.csv | 6 +- tests/default.nf.test | 15 +- tests/default.nf.test.snap | 178 +++++++++++++++++++++- tests/short_aligner_minimap2.nf.test | 13 ++ tests/short_aligner_minimap2.nf.test.snap | 95 +++++++++++- tests/uli.nf.test | 14 ++ tests/uli.nf.test.snap | 39 ++++- tests/uli_no_lima.nf.test | 14 ++ tests/uli_no_lima.nf.test.snap | 37 ++++- tests/untrim.nf.test | 14 ++ tests/untrim.nf.test.snap | 71 ++++++++- 14 files changed, 483 insertions(+), 39 deletions(-) diff --git a/assets/samplesheet.csv b/assets/samplesheet.csv index b742ba18..9792153a 100644 --- a/assets/samplesheet.csv +++ b/assets/samplesheet.csv @@ -1,8 +1,8 @@ -specimen,run,datatype,datafile,library,barcode -SAMEA7524438,ERR6688599,illumina,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel1/illumina/31231_3_1.subset.cram,, -SAMEA7524439,ERR6688600,illumina,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel2/illumina/31231_4_1.subset.fastq.gz,, -SAMEA7524440,ERR6688402,hic,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel3/hic/35528_2_1.subset.cram,, -SAMEA7524440,PAE35587,ont,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel3/ont/PAE35587_pass_1f1f0707_115.subset.fastq.gz,, -SAMEA7524440,PAE35587_test,ont,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel3/ont/PAE35587_pass_1f1f0707_115.subset.addrg.bam,, -SAMEA7524440,ERR6939248,pacbio,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel3/pacbio/m64094_200910_173211.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.bam,, -SAMEA7524440,ERR6939249,pacbio,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel3/pacbio/m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.fastq.gz,,bc1022 +specimen,run,datatype,datafile,library,barcode,extra_header +SAMEA7524438,ERR6688599,illumina,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel1/illumina/31231_3_1.subset.cram,,, +SAMEA7524439,ERR6688600,illumina,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel2/illumina/31231_4_1.subset.fastq.gz,,, +SAMEA7524440,ERR6688402,hic,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel3/hic/35528_2_1.subset.cram,,,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel3/hic/35528_2_1.subset.header_no_rg.sam +SAMEA7524440,PAE35587,ont,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel3/ont/PAE35587_pass_1f1f0707_115.subset.fastq.gz,,, +SAMEA7524440,PAE35587_test,ont,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel3/ont/PAE35587_pass_1f1f0707_115.subset.addrg.bam,,, +SAMEA7524440,ERR6939248,pacbio,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel3/pacbio/m64094_200910_173211.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.header_no_rg.bam,,,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel3/pacbio/m64094_200910_173211.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.header.sam +SAMEA7524440,ERR6939249,pacbio,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel3/pacbio/m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.fastq.gz,,bc1022,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel3/pacbio/m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.header.sam diff --git a/assets/samplesheet_long_read.csv b/assets/samplesheet_long_read.csv index 7fbd570a..c3b7831c 100644 --- a/assets/samplesheet_long_read.csv +++ b/assets/samplesheet_long_read.csv @@ -1,4 +1,4 @@ -specimen,run,datatype,datafile,library,barcode -SAMEA7524440,PAE35587,ont,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel3/ont/PAE35587_pass_1f1f0707_115.subset.fastq.gz,, -SAMEA7524440,ERR6939248,pacbio,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel3/pacbio/m64094_200910_173211.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.bam,,bc1022 -SAMEA7524440,ERR6939249,pacbio,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel3/pacbio/m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.fastq.gz,,bc1022 +specimen,run,datatype,datafile,library,barcode,extra_header +SAMEA7524440,PAE35587,ont,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel3/ont/PAE35587_pass_1f1f0707_115.subset.fastq.gz,,, +SAMEA7524440,ERR6939248,pacbio,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel3/pacbio/m64094_200910_173211.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.bam,,bc1022, +SAMEA7524440,ERR6939249,pacbio,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel3/pacbio/m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.fastq.gz,,bc1022,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel3/pacbio/m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.header.sam diff --git a/assets/samplesheet_short_reads.csv b/assets/samplesheet_short_reads.csv index b7865466..9af9dc64 100644 --- a/assets/samplesheet_short_reads.csv +++ b/assets/samplesheet_short_reads.csv @@ -1,4 +1,4 @@ specimen,run,datatype,datafile,library,barcode SAMEA7524438,ERR6688599,illumina,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel1/illumina/31231_3_1.subset.bam,, SAMEA7524439,ERR6688600,illumina,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel2/illumina/31231_4_1.subset.fastq.gz,, -SAMEA7524440,ERR6688402,hic,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel3/hic/35528_2_1.subset.cram,, +SAMEA7524440,ERR6688402,hic,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel3/hic/35528_2_1.subset.cram,,,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel3/hic/35528_2_1.subset.header_no_rg.sam diff --git a/assets/samplesheet_uli.csv b/assets/samplesheet_uli.csv index 793b6fe7..16ac2758 100644 --- a/assets/samplesheet_uli.csv +++ b/assets/samplesheet_uli.csv @@ -1,3 +1,3 @@ -specimen,run,datatype,datafile,library,barcode -SAMEA114784749,ERR14209104,pacbio,https://tolit.cog.sanger.ac.uk/test-data/Acropora_cervicornis/genomic_data/m84093_241116_151316_s2.hifi_reads.bc2028.subset.bam,uli,bc2028 -SAMEA114784749,ERR14209104_test,pacbio,https://tolit.cog.sanger.ac.uk/test-data/Acropora_cervicornis/genomic_data/m84093_241116_151316_s2.hifi_reads.bc2028.subset.bam,,bc2028 +specimen,run,datatype,datafile,library,barcode,extra_header +SAMEA114784749,ERR14209104,pacbio,https://tolit.cog.sanger.ac.uk/test-data/Acropora_cervicornis/genomic_data/m84093_241116_151316_s2.hifi_reads.bc2028.subset.bam,uli,bc2028, +SAMEA114784749,ERR14209104_test,pacbio,https://tolit.cog.sanger.ac.uk/test-data/Acropora_cervicornis/genomic_data/m84093_241116_151316_s2.hifi_reads.bc2028.subset.bam,,bc2028, diff --git a/tests/default.nf.test b/tests/default.nf.test index a2806c11..e827d4a4 100644 --- a/tests/default.nf.test +++ b/tests/default.nf.test @@ -27,6 +27,17 @@ nextflow_pipeline { def bam_path = getAllFilesFromDir(params.outdir, include: ['**/*.bam'], relative: true, includeDir: false) def fasta = 'https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/assembly/release/mMelMel3.1_paternal_haplotype/GCA_922984935.2.subset.fasta' + def strip_absolute_path_lines = { text -> + def lines = text?.getClass()?.isArray() + ? text.toList() + : (text instanceof Collection ? text : (text?.toString()?.readLines() ?: [])) + lines + .collect { line -> + line.toString() + .replaceAll(/\bUR:\/((?:[^\/\s]+\/){2})\S+/, 'UR:/$1') + } + } + assertAll( { assert workflow.success}, { assert snapshot( @@ -40,8 +51,10 @@ nextflow_pipeline { // Stable mapping files bam_path.collect{ f -> [(new File(f).getName()): bam("${params.outdir}/${f}").getStatistics()] }.collectEntries{ it }.sort(), cram_path.collect{ f -> [(new File(f).getName()): cram("${params.outdir}/${f}", fasta).getStatistics()] }.collectEntries{ it }.sort(), + bam_path.collect{ f -> [(new File(f).getName()): strip_absolute_path_lines(bam("${params.outdir}/${f}").getHeader())] }.collectEntries{ it }.sort(), + cram_path.collect{ f -> [(new File(f).getName()): strip_absolute_path_lines(cram("${params.outdir}/${f}", fasta).getHeader())] }.collectEntries{ it }.sort(), - // Stable trimming json + // Stable trimming json hifitrimmer_json.collect{ f -> def obj = path("${params.outdir}/${f}").json obj.remove('run_info') diff --git a/tests/default.nf.test.snap b/tests/default.nf.test.snap index 8dec181a..d33de6ed 100644 --- a/tests/default.nf.test.snap +++ b/tests/default.nf.test.snap @@ -1,7 +1,7 @@ { "-profile test": { "content": [ - 175, + 182, { "BGZIP_BEDGRAPH": { "samtools": "1.23.1" @@ -73,6 +73,9 @@ "SAMTOOLS_ADDREPLACERG": { "samtools": "1.23.1" }, + "SAMTOOLS_ADD_PG": { + "samtools": "1.23.1" + }, "SAMTOOLS_CRAM": { "samtools": "1.23.1" }, @@ -110,7 +113,7 @@ "samtools": "1.23.1" }, "Workflow": { - "sanger-tol/readmapping": "v2.0.3" + "sanger-tol/readmapping": "v2.1.0-dev" } }, [ @@ -377,6 +380,175 @@ "sorted": false } }, + { + + }, + { + "GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram": [ + "@HD\tVN:1.6\tSO:coordinate", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@RG\tID:35528_2_1\tPL:ILLUMINA\tSM:SAMEA7524440", + "@PG\tID:SCS.extra_header\tVN:1.7.0\tPN:NovaSeq Control Software\tDS:Controlling software on instrument", + "@PG\tID:basecalling.extra_header\tPP:SCS\tVN:Unknown\tPN:Unknown\tDS:Basecalling Package", + "@PG\tID:bambi.extra_header\tPP:basecalling\tVN:0.13.1\tCL:/software/pkgg/bambi/0.13.1/bin/bambi i2b --intensity-dir=/lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities --basecalls-dir=/lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BaseCalls --lane=2 --platform-unit=201117_A00948_0206_AHGML2DSXY_2 --read-group-id=35528_2 --study-name=\"ERP116890: Sequencing and assembly of genomes from British species for the Darwin Tree of Life Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ \" --sample-alias=SAMEA5962964,mCerEla1 --threads=8 --output-file=- --compression-level=0\tPN:bambi\tDS:Convert Illumina BCL to BAM or SAM file", + "@PG\tID:bambi.1.extra_header\tPN:bambi\tPP:bambi\tVN:0.13.1\tCL:/software/pkgg/bambi/0.13.1/bin/bambi decode --metrics-file /lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BAM_basecalls_20201119-090808/35528_2.bam.tag_decode.metrics --barcode-file /lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BAM_basecalls_20201119-090808/metadata_cache_35528/lane_2.taglist --compression-level 0 -", + "@PG\tID:bamcollate2.extra_header\tPN:bamcollate2\tCL:/software/pkgg/biobambam2/2.0.79/bin/bamcollate2 collate=2 level=0\tPP:bambi.1\tVN:2.0.79", + "@PG\tID:minimap2.extra_header\tPN:minimap2\tCL:minimap2 -ax sr --MD -t 3 -Y -F 1200 -K 100000000 /lustre/scratch121/npg_repository/references/PhiX/Sanger-SNPs/all/minimap2/phix_unsnipped_short_no_N.fa.mmi /tmp/wr_cwd/0/e/8/dce75fe12433429e1b439b8872bc7693328371/tmp/s0uOqe6xfG/alnphix_bamtofastq_out\tPP:bamcollate2\tVN:2.10-r761", + "@PG\tID:samtools.extra_header\tPN:samtools\tCL:/software/pkgg/samtools/1.11.0/bin/samtools view --threads 3 -u -F 0x900 -\tPP:minimap2\tVN:1.11", + "@PG\tID:bam12auxmerge.extra_header\tPN:bam12auxmerge\tCL:/software/pkgg/biobambam2/2.0.79/bin/bam12auxmerge level=0 rankstrip=1 ranksplit=1 zztoname=0 clipreinsert=1 /tmp/wr_cwd/0/e/8/dce75fe12433429e1b439b8872bc7693328371/tmp/ac_8ARdDJl/tee_collated:td1_out\tPP:samtools\tVN:2.0.79", + "@PG\tID:samtools.1.extra_header\tPN:samtools\tPP:bam12auxmerge\tVN:1.11\tCL:/software/pkgg/samtools/1.11.0/bin/samtools split --threads 4 --output-fmt cram,no_ref=1 -f /lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BAM_basecalls_20201119-090808/no_cal/%!.cram -", + "@PG\tID:samtools.2.extra_header\tPN:samtools\tPP:samtools.1\tVN:1.11\tCL:/software/pkgg/samtools/1.11.0/bin/samtools merge -n -O BAM -l 0 --input-fmt-option no_ref=1 - /lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BAM_basecalls_20201119-090808/no_cal/35528_2#1.cram", + "@PG\tID:spf.extra_header\tPN:spatial_filter\tPP:samtools.2\tDS:A program to apply a spatial filter\tVN:0.13.1\tCL:/software/pkgg/bambi/0.13.1/bin/bambi spatial_filter -a --compression-level 0 -f -l /lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BAM_basecalls_20201119-090808/no_cal/archive/lane2/plex1/35528_2#1.spatial_filter.stats -F /lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BAM_basecalls_20201119-090808/no_cal/35528_2.spatial_filter --rg 35528_2#1 -", + "@PG\tID:bambi.2.extra_header\tPN:bambi\tPP:spf\tVN:0.13.1\tCL:/software/pkgg/bambi/0.13.1/bin/bambi select --compression-level 0 --input /tmp/wr_cwd/5/0/6/86a8369ba62bab2227fd63e2ff1ad119662395/tmp/9RE_mnwwls/ssfqc_tee_ssfqc:straight_through1_out --output /tmp/wr_cwd/5/0/6/86a8369ba62bab2227fd63e2ff1ad119662395/tmp/b6x1p8j3v_/alignment_filter:phix_bam_out_out -n /tmp/wr_cwd/5/0/6/86a8369ba62bab2227fd63e2ff1ad119662395/tmp/IuuBniSlRB/alignment_filter:target_bam_out_out -m 35528_2#1_bam_alignment_filter_metrics.json\tDS:Split alignments into different files", + "@PG\tID:scramble.extra_header\tPN:scramble\tPP:bambi.2\tVN:1.14.9\tCL:/software/pkgg/io_lib/1.14.9/bin/scramble -t 5 -7 -I bam -O cram -x ", + "@PG\tID:samtools.3.extra_header\tPN:samtools\tPP:scramble\tVN:1.15\tCL:/usr/local/bin/samtools view -h /lustre/scratch124/tol/projects/darwin/data/mammals/Meles_meles/genomic_data/mMelMel3/hic-arima2/35528_2#1.cram", + "@PG\tID:samtools.4.extra_header\tPN:samtools\tPP:samtools.3\tVN:1.20\tCL:/usr/local/bin/samtools view --cram 35528_2#1.subset.sam", + "@PG\tID:samtools.5.extra_header\tPN:samtools\tPP:samtools.4\tVN:1.23.1\tCL:samtools view -H 35528_2_1.subset.cram", + "@PG\tID:bwa-mem2\tPN:bwa-mem2\tVN:2.2.1\tCL:bwa-mem2 mem -5SPCp -t 4 ./bwamem2/GCA_922984935.2.subset.unmasked.fa -C -H @RG\\tID:35528_2_1\\tPL:ILLUMINA\\tSM:SAMEA7524440 -", + "@PG\tID:samtools\tPN:samtools\tPP:bwa-mem2\tVN:1.22.1\tCL:samtools fixmate -mpu - -", + "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.22.1\tCL:samtools view -h", + "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.22.1\tCL:samtools sort --write-index -l1 -@4 -T 35528_2_1.subset_addRG.cram.0.SAMEA7524440.ERR6688402_tmp -o 35528_2_1.subset_addRG.cram.0.SAMEA7524440.ERR6688402.bam -", + "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa - 1/35528_2_1.subset_addRG.cram.0.SAMEA7524440.ERR6688402.bam 2/35528_2_1.subset_addRG.cram.1.SAMEA7524440.ERR6688402.bam", + "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools markdup -T SAMEA7524440.ERR6688402 -f SAMEA7524440.ERR6688402.metrics --threads 4 --reference GCA_922984935.2.subset.unmasked.fa - SAMEA7524440.ERR6688402.bam", + "@PG\tID:crumble\tPN:crumble\tPP:samtools.4\tVN:0.9.1\tCL:crumble -O bam SAMEA7524440.ERR6688402.bam SAMEA7524440.ERR6688402.crumble.bam", + "@PG\tID:samtools.5\tPN:samtools\tPP:bam12auxmerge.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.bam", + "@PG\tID:samtools.6\tPN:samtools\tPP:samtools.2.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.bam", + "@PG\tID:samtools.7\tPN:samtools\tPP:spf.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.bam", + "@PG\tID:samtools.8\tPN:samtools\tPP:samtools.4.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.bam", + "@PG\tID:samtools.9\tPN:samtools\tPP:samtools.5.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.bam", + "@PG\tID:samtools.10\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.bam", + "@PG\tID:samtools.11\tPN:samtools\tPP:samtools.5\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.bam", + "@PG\tID:samtools.12\tPN:samtools\tPP:samtools.6\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.bam", + "@PG\tID:samtools.13\tPN:samtools\tPP:samtools.7\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.bam", + "@PG\tID:samtools.14\tPN:samtools\tPP:samtools.8\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.bam", + "@PG\tID:samtools.15\tPN:samtools\tPP:samtools.9\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.bam", + "@PG\tID:samtools.16\tPN:samtools\tPP:samtools.10\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.bam", + "@PG\tID:samtools.17\tPN:samtools\tPP:samtools.11\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram", + "@PG\tID:samtools.18\tPN:samtools\tPP:samtools.12\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram", + "@PG\tID:samtools.19\tPN:samtools\tPP:samtools.13\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram", + "@PG\tID:samtools.20\tPN:samtools\tPP:samtools.14\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram", + "@PG\tID:samtools.21\tPN:samtools\tPP:samtools.15\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram", + "@PG\tID:samtools.22\tPN:samtools\tPP:samtools.16\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram" + ], + "GCA_922984935.2.subset.illumina.SAMEA7524438.ERR6688599.bwamem2.cram": [ + "@HD\tVN:1.6\tSO:coordinate", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@RG\tID:31231_3#1\tDT:2019-10-03T01:00:00+0100\tPU:191003_HX4_31231_A_H3353CCX2_3#1\tLB:23687379\tPG:SCS\tSM:SAMEA5962962\tCN:SC\tPL:ILLUMINA\tDS:ERP114452: Sequencing and assembly of vertebrate genomes from British species for the Darwin Tree of Life Project in collaboration with the Vertebrate Genomes Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/", + "@PG\tID:bwa-mem2\tPN:bwa-mem2\tVN:2.2.1\tCL:bwa-mem2 mem -p -t 4 ./bwamem2/GCA_922984935.2.subset.unmasked.fa -C -H @RG\\tID:31231_3#1\\tDT:2019-10-03T00:00:00+0000\\tPU:191003_HX4_31231_A_H3353CCX2_3#1\\tLB:23687379\\tPG:SCS\\tSM:SAMEA5962962\\tCN:SC\\tPL:ILLUMINA\\tDS:ERP114452: Sequencing and assembly of vertebrate genomes from British species for the Darwin Tree of Life Project in collaboration with the Vertebrate Genomes Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ -", + "@PG\tID:samtools\tPN:samtools\tPP:bwa-mem2\tVN:1.22.1\tCL:samtools fixmate -mpu - -", + "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.22.1\tCL:samtools view -h", + "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.22.1\tCL:samtools sort --write-index -l1 -@4 -T 31231_3_1.subset.cram.0.SAMEA7524438.ERR6688599_tmp -o 31231_3_1.subset.cram.0.SAMEA7524438.ERR6688599.bam -", + "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa - 1/31231_3_1.subset.cram.0.SAMEA7524438.ERR6688599.bam 2/31231_3_1.subset.cram.1.SAMEA7524438.ERR6688599.bam", + "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools markdup -T SAMEA7524438.ERR6688599 -f SAMEA7524438.ERR6688599.metrics --threads 4 --reference GCA_922984935.2.subset.unmasked.fa - SAMEA7524438.ERR6688599.bam", + "@PG\tID:crumble\tPN:crumble\tPP:samtools.4\tVN:0.9.1\tCL:crumble -O bam SAMEA7524438.ERR6688599.bam SAMEA7524438.ERR6688599.crumble.bam", + "@PG\tID:samtools.5\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.illumina.SAMEA7524438.ERR6688599.bwamem2.cram GCA_922984935.2.subset.illumina.SAMEA7524438.ERR6688599.bwamem2.bam", + "@PG\tID:samtools.6\tPN:samtools\tPP:samtools.5\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.illumina.SAMEA7524438.ERR6688599.bwamem2.cram" + ], + "GCA_922984935.2.subset.illumina.SAMEA7524439.ERR6688600.bwamem2.cram": [ + "@HD\tVN:1.6\tSO:coordinate", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@RG\tID:31231_4_1\tPL:ILLUMINA\tSM:SAMEA7524439", + "@PG\tID:bwa-mem2\tPN:bwa-mem2\tVN:2.2.1\tCL:bwa-mem2 mem -p -t 4 ./bwamem2/GCA_922984935.2.subset.unmasked.fa -C -H @RG\\tID:31231_4_1\\tPL:ILLUMINA\\tSM:SAMEA7524439 -", + "@PG\tID:samtools\tPN:samtools\tPP:bwa-mem2\tVN:1.22.1\tCL:samtools fixmate -mpu - -", + "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.22.1\tCL:samtools view -h", + "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.22.1\tCL:samtools sort --write-index -l1 -@4 -T SAMEA7524439.ERR6688600_addRG.cram.0.SAMEA7524439.ERR6688600_tmp -o SAMEA7524439.ERR6688600_addRG.cram.0.SAMEA7524439.ERR6688600.bam -", + "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa - 1/SAMEA7524439.ERR6688600_addRG.cram.0.SAMEA7524439.ERR6688600.bam 2/SAMEA7524439.ERR6688600_addRG.cram.1.SAMEA7524439.ERR6688600.bam", + "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools markdup -T SAMEA7524439.ERR6688600 -f SAMEA7524439.ERR6688600.metrics --threads 4 --reference GCA_922984935.2.subset.unmasked.fa - SAMEA7524439.ERR6688600.bam", + "@PG\tID:crumble\tPN:crumble\tPP:samtools.4\tVN:0.9.1\tCL:crumble -O bam SAMEA7524439.ERR6688600.bam SAMEA7524439.ERR6688600.crumble.bam", + "@PG\tID:samtools.5\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.illumina.SAMEA7524439.ERR6688600.bwamem2.cram GCA_922984935.2.subset.illumina.SAMEA7524439.ERR6688600.bwamem2.bam", + "@PG\tID:samtools.6\tPN:samtools\tPP:samtools.5\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.illumina.SAMEA7524439.ERR6688600.bwamem2.cram" + ], + "GCA_922984935.2.subset.ont.SAMEA7524440.PAE35587.minimap2.cram": [ + "@HD\tVN:1.6\tSO:coordinate", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@RG\tID:PAE35587_pass_1f1f0707_115\tPL:ONT\tSM:SAMEA7524440", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-ont -y -R @RG\\tID:PAE35587_pass_1f1f0707_115\\tPL:ONT\\tSM:SAMEA7524440 -I1G -a GCA_922984935.2.subset.unmasked.mmi -", + "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o PAE35587_pass_1f1f0707_115.subset.fastq.gz.0.SAMEA7524440.PAE35587.bam -T PAE35587_pass_1f1f0707_115.subset.fastq.gz.0.SAMEA7524440.PAE35587_sort_tmp --write-index -l1 -", + "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa SAMEA7524440.PAE35587.merge.bam 1/PAE35587_pass_1f1f0707_115.subset.fastq.gz.0.SAMEA7524440.PAE35587.bam", + "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.ont.SAMEA7524440.PAE35587.minimap2.cram GCA_922984935.2.subset.ont.SAMEA7524440.PAE35587.minimap2.bam", + "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.ont.SAMEA7524440.PAE35587.minimap2.cram" + ], + "GCA_922984935.2.subset.ont.SAMEA7524440.PAE35587_test.minimap2.cram": [ + "@HD\tVN:1.6\tSO:coordinate", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@RG\tID:PAE35587_pass_1f1f0707_115\tPL:ONT\tSM:mMelMel3", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-ont -y -R @RG\\tID:PAE35587_pass_1f1f0707_115\\tPL:ONT\\tSM:mMelMel3 -I1G -a GCA_922984935.2.subset.unmasked.mmi -", + "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o SAMEA7524440.PAE35587_test_other.fastq.gz.0.SAMEA7524440.PAE35587_test.bam -T SAMEA7524440.PAE35587_test_other.fastq.gz.0.SAMEA7524440.PAE35587_test_sort_tmp --write-index -l1 -", + "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa SAMEA7524440.PAE35587_test.merge.bam 1/SAMEA7524440.PAE35587_test_other.fastq.gz.0.SAMEA7524440.PAE35587_test.bam", + "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.ont.SAMEA7524440.PAE35587_test.minimap2.cram GCA_922984935.2.subset.ont.SAMEA7524440.PAE35587_test.minimap2.bam", + "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.ont.SAMEA7524440.PAE35587_test.minimap2.cram" + ], + "GCA_922984935.2.subset.ont.SAMEA7524440.merged_1.minimap2.cram": [ + "@HD\tVN:1.6\tSO:coordinate", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@RG\tID:PAE35587_pass_1f1f0707_115\tPL:ONT\tSM:mMelMel3", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-ont -y -R @RG\\tID:PAE35587_pass_1f1f0707_115\\tPL:ONT\\tSM:mMelMel3 -I1G -a GCA_922984935.2.subset.unmasked.mmi -", + "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o SAMEA7524440.PAE35587_test_other.fastq.gz.0.SAMEA7524440.PAE35587_test.bam -T SAMEA7524440.PAE35587_test_other.fastq.gz.0.SAMEA7524440.PAE35587_test_sort_tmp --write-index -l1 -", + "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa SAMEA7524440.PAE35587_test.merge.bam 1/SAMEA7524440.PAE35587_test_other.fastq.gz.0.SAMEA7524440.PAE35587_test.bam", + "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p SAMEA7524440.merged_1.merge.bam 1/SAMEA7524440.PAE35587_test.merge.bam 2/SAMEA7524440.PAE35587.merge.bam", + "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.ont.SAMEA7524440.merged_1.minimap2.cram GCA_922984935.2.subset.ont.SAMEA7524440.merged_1.minimap2.bam", + "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.ont.SAMEA7524440.merged_1.minimap2.cram" + ], + "GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.cram": [ + "@HD\tVN:1.6\tSO:coordinate", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@RG\tID:61ddc6c3/15--15\tPL:PACBIO\tDS:READTYPE=CCS;BINDINGKIT=101-789-500;SEQUENCINGKIT=101-826-100;BASECALLERVERSION=5.0.0;FRAMERATEHZ=100.000000;BarcodeFile=/lustre/scratch116/vr/projects/vgp/ref/barcodes/Sequel_16_Barcodes_v3.fasta;BarcodeHash=e418d89cefcbef90f3cb0e6455b7e2a3;BarcodeCount=16;BarcodeMode=Symmetric;BarcodeQuality=Score\tLB:DN615654G-A1\tPU:m64094_200910_173211\tPM:SEQUELII\tBC:CACTCACGTGTGATATT\tCM:S/P4-C2/5.0-8M\tSM:SAMEA7524440", + "@PG\tID:ccs-4.2.0.extra_header\tPN:ccs\tVN:4.2.0\tDS:Generate circular consensus sequences (ccs) from subreads.\tCL:ccs ccs --chunk 1/64 -j 8 --max-length 50000 ../../m64094_200910_173211.subreads.bam m64094_200910_173211.ccs.bam", + "@PG\tID:lima.extra_header\tVN:1.11.0 (commit v1.11.0)\tCL:lima -j 8 --split-bam-named --same --peek-guess --guess-min-count 1000 --ccs m64094_200910_173211.ccs.bam /lustre/scratch116/vr/projects/vgp/ref/barcodes/Sequel_16_Barcodes_v3.fasta lima/m64094_200910_173211.ccs.bam", + "@PG\tID:samtools.extra_header\tPN:samtools\tVN:1.10\tPP:ccs-4.2.0\tCL:samtools merge -@8 -ncp -b m64094_200910_173211.chunks.fofn m64094_200910_173211.ccs.bam", + "@PG\tID:samtools.1.extra_header\tPN:samtools\tPP:samtools\tVN:1.19.2\tCL:samtools view -b -h -N /nfs/users/nfs_m/mm49/READS -o /nfs/users/nfs_m/mm49/x.bam m64094_200910_173211.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.bam", + "@PG\tID:samtools.2.extra_header\tPN:samtools\tPP:samtools.1\tVN:1.23.1\tCL:samtools view -H m64094_200910_173211.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.bam", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-hifi --cs=short -y -R @RG\\tID:61ddc6c3/15--15\\tPL:PACBIO\\tDS:READTYPE=CCS;BINDINGKIT=101-789-500;SEQUENCINGKIT=101-826-100;BASECALLERVERSION=5.0.0;FRAMERATEHZ=100.000000;BarcodeFile=/lustre/scratch116/vr/projects/vgp/ref/barcodes/Sequel_16_Barcodes_v3.fasta;BarcodeHash=e418d89cefcbef90f3cb0e6455b7e2a3;BarcodeCount=16;BarcodeMode=Symmetric;BarcodeQuality=Score\\tLB:DN615654G-A1\\tPU:m64094_200910_173211\\tPM:SEQUELII\\tBC:CACTCACGTGTGATATT\\tCM:S/P4-C2/5.0-8M\\tSM:SAMEA7524440 -I1G -a GCA_922984935.2.subset.unmasked.mmi -", + "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o pacbio.SAMEA7524440.ERR6939248.hifitrimmer.fastq.gz.0.SAMEA7524440.ERR6939248.bam -T pacbio.SAMEA7524440.ERR6939248.hifitrimmer.fastq.gz.0.SAMEA7524440.ERR6939248_sort_tmp --write-index -l1 -", + "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa SAMEA7524440.ERR6939248.merge.bam 1/pacbio.SAMEA7524440.ERR6939248.hifitrimmer.fastq.gz.0.SAMEA7524440.ERR6939248.bam", + "@PG\tID:crumble\tPN:crumble\tPP:samtools.1\tVN:0.9.1\tCL:crumble -y pbccs -O bam SAMEA7524440.ERR6939248.merge.bam SAMEA7524440.ERR6939248.merge.crumble.bam", + "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.bam", + "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.bam", + "@PG\tID:samtools.4\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.bam", + "@PG\tID:samtools.5\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.cram GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.bam", + "@PG\tID:samtools.6\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.cram GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.bam", + "@PG\tID:samtools.7\tPN:samtools\tPP:samtools.4\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.cram GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.bam", + "@PG\tID:samtools.8\tPN:samtools\tPP:samtools.5\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.cram", + "@PG\tID:samtools.9\tPN:samtools\tPP:samtools.6\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.cram", + "@PG\tID:samtools.10\tPN:samtools\tPP:samtools.7\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.cram" + ], + "GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.cram": [ + "@HD\tVN:1.6\tSO:coordinate", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@RG\tID:m64094_200911_174739\tPL:PACBIO\tSM:SAMEA7524440", + "@PG\tID:samtools.extra_header\tPN:samtools\tVN:1.22.1\tCL:samtools collate --output-fmt cram -O -u -T mMelMel3_T4.collate --threads 4 --reference GCA_922984935.2.subset.unmasked.fasta m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.fastq.gz -", + "@PG\tID:samtools.1.extra_header\tPN:samtools\tPP:samtools\tVN:1.22.1\tCL:samtools fixmate -m -u --threads 4 - -", + "@PG\tID:samtools.2.extra_header\tPN:samtools\tPP:samtools.1\tVN:1.22.1\tCL:samtools sort -u -T mMelMel3_T4.sort --threads 4 -", + "@PG\tID:samtools.3.extra_header\tPN:samtools\tPP:samtools.2\tVN:1.22.1\tCL:samtools markdup -T mMelMel3_T4.markdup -f mMelMel3_T4.metrics --threads 4 - mMelMel3_T4.cram", + "@PG\tID:samtools.4.extra_header\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools view -H m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.cram", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-hifi --cs=short -y -R @RG\\tID:m64094_200911_174739\\tPL:PACBIO\\tSM:SAMEA7524440 -I1G -a GCA_922984935.2.subset.unmasked.mmi -", + "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o pacbio.SAMEA7524440.ERR6939249.hifitrimmer.fastq.gz.0.SAMEA7524440.ERR6939249.bam -T pacbio.SAMEA7524440.ERR6939249.hifitrimmer.fastq.gz.0.SAMEA7524440.ERR6939249_sort_tmp --write-index -l1 -", + "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa SAMEA7524440.ERR6939249.merge.bam 1/pacbio.SAMEA7524440.ERR6939249.hifitrimmer.fastq.gz.0.SAMEA7524440.ERR6939249.bam", + "@PG\tID:crumble\tPN:crumble\tPP:samtools.1\tVN:0.9.1\tCL:crumble -y pbccs -O bam SAMEA7524440.ERR6939249.merge.bam SAMEA7524440.ERR6939249.merge.crumble.bam", + "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", + "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", + "@PG\tID:samtools.4\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", + "@PG\tID:samtools.5\tPN:samtools\tPP:samtools.3.extra_header\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.cram GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", + "@PG\tID:samtools.6\tPN:samtools\tPP:samtools.4.extra_header\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.cram GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", + "@PG\tID:samtools.7\tPN:samtools\tPP:samtools.4\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.cram GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", + "@PG\tID:samtools.8\tPN:samtools\tPP:samtools.5\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.cram", + "@PG\tID:samtools.9\tPN:samtools\tPP:samtools.6\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.cram", + "@PG\tID:samtools.10\tPN:samtools\tPP:samtools.7\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.cram" + ], + "GCA_922984935.2.subset.pacbio.SAMEA7524440.merged_1.minimap2.cram": [ + "@HD\tVN:1.6\tSO:coordinate", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@RG\tID:61ddc6c3/15--15\tPL:PACBIO\tDS:READTYPE=CCS;BINDINGKIT=101-789-500;SEQUENCINGKIT=101-826-100;BASECALLERVERSION=5.0.0;FRAMERATEHZ=100.000000;BarcodeFile=/lustre/scratch116/vr/projects/vgp/ref/barcodes/Sequel_16_Barcodes_v3.fasta;BarcodeHash=e418d89cefcbef90f3cb0e6455b7e2a3;BarcodeCount=16;BarcodeMode=Symmetric;BarcodeQuality=Score\tLB:DN615654G-A1\tPU:m64094_200910_173211\tPM:SEQUELII\tBC:CACTCACGTGTGATATT\tCM:S/P4-C2/5.0-8M\tSM:SAMEA7524440", + "@RG\tID:m64094_200911_174739\tPL:PACBIO\tSM:SAMEA7524440", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-hifi --cs=short -y -R @RG\\tID:61ddc6c3/15--15\\tPL:PACBIO\\tDS:READTYPE=CCS;BINDINGKIT=101-789-500;SEQUENCINGKIT=101-826-100;BASECALLERVERSION=5.0.0;FRAMERATEHZ=100.000000;BarcodeFile=/lustre/scratch116/vr/projects/vgp/ref/barcodes/Sequel_16_Barcodes_v3.fasta;BarcodeHash=e418d89cefcbef90f3cb0e6455b7e2a3;BarcodeCount=16;BarcodeMode=Symmetric;BarcodeQuality=Score\\tLB:DN615654G-A1\\tPU:m64094_200910_173211\\tPM:SEQUELII\\tBC:CACTCACGTGTGATATT\\tCM:S/P4-C2/5.0-8M\\tSM:SAMEA7524440 -I1G -a GCA_922984935.2.subset.unmasked.mmi -", + "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o pacbio.SAMEA7524440.ERR6939248.hifitrimmer.fastq.gz.0.SAMEA7524440.ERR6939248.bam -T pacbio.SAMEA7524440.ERR6939248.hifitrimmer.fastq.gz.0.SAMEA7524440.ERR6939248_sort_tmp --write-index -l1 -", + "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa SAMEA7524440.ERR6939248.merge.bam 1/pacbio.SAMEA7524440.ERR6939248.hifitrimmer.fastq.gz.0.SAMEA7524440.ERR6939248.bam", + "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p SAMEA7524440.merged_1.merge.bam 1/SAMEA7524440.ERR6939248.merge.bam 2/SAMEA7524440.ERR6939249.merge.bam", + "@PG\tID:crumble\tPN:crumble\tPP:samtools.2\tVN:0.9.1\tCL:crumble -y pbccs -O bam SAMEA7524440.merged_1.merge.bam SAMEA7524440.merged_1.merge.crumble.bam", + "@PG\tID:samtools.3\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.pacbio.SAMEA7524440.merged_1.minimap2.cram GCA_922984935.2.subset.pacbio.SAMEA7524440.merged_1.minimap2.bam", + "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.merged_1.minimap2.cram" + ] + }, [ "pacbio.SAMEA7524440.ERR6939248.hifitrimmer.summary.json:md5,d2d4198c3f7086437249909d94173359", "pacbio.SAMEA7524440.ERR6939249.hifitrimmer.summary.json:md5,83d9985a6d7a4477df704d8f4a23852c" @@ -386,6 +558,6 @@ "nf-test": "0.9.3", "nextflow": "25.10.4" }, - "timestamp": "2026-05-15T12:13:39.841579495" + "timestamp": "2026-05-29T01:57:02.637423352" } } \ No newline at end of file diff --git a/tests/short_aligner_minimap2.nf.test b/tests/short_aligner_minimap2.nf.test index 964a1537..e129528c 100644 --- a/tests/short_aligner_minimap2.nf.test +++ b/tests/short_aligner_minimap2.nf.test @@ -29,6 +29,17 @@ nextflow_pipeline { def bam_path = getAllFilesFromDir(params.outdir, include: ['**/*.bam'], relative: true, includeDir: false) def fasta = 'https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/assembly/release/mMelMel3.1_paternal_haplotype/GCA_922984935.2.subset.fasta' + def strip_absolute_path_lines = { text -> + def lines = text?.getClass()?.isArray() + ? text.toList() + : (text instanceof Collection ? text : (text?.toString()?.readLines() ?: [])) + lines + .collect { line -> + line.toString() + .replaceAll(/\bUR:\/((?:[^\/\s]+\/){2})\S+/, 'UR:/$1') + } + } + assertAll( { assert workflow.success }, { assert snapshot( @@ -42,6 +53,8 @@ nextflow_pipeline { // Stable mapping files bam_path.collect{ f -> [(new File(f).getName()): bam("${params.outdir}/${f}").getStatistics()] }.collectEntries{ it }.sort(), cram_path.collect{ f -> [(new File(f).getName()): cram("${params.outdir}/${f}", fasta).getStatistics()] }.collectEntries{ it }.sort(), + bam_path.collect{ f -> [(new File(f).getName()): strip_absolute_path_lines(bam("${params.outdir}/${f}").getHeader())] }.collectEntries{ it }.sort(), + cram_path.collect{ f -> [(new File(f).getName()): strip_absolute_path_lines(cram("${params.outdir}/${f}", fasta).getHeader())] }.collectEntries{ it }.sort(), // Stable trimming json hifitrimmer_json.collect{ f -> diff --git a/tests/short_aligner_minimap2.nf.test.snap b/tests/short_aligner_minimap2.nf.test.snap index f8e9d8b7..c48be2e6 100644 --- a/tests/short_aligner_minimap2.nf.test.snap +++ b/tests/short_aligner_minimap2.nf.test.snap @@ -1,7 +1,7 @@ { "-profile test --short_aligner minimap2 --outfmt 'bam,cram'": { "content": [ - 77, + 79, { "BGZIP_BEDGRAPH": { "samtools": "1.23.1" @@ -83,7 +83,7 @@ "samtools": "1.23.1" }, "Workflow": { - "sanger-tol/readmapping": "v2.0.3" + "sanger-tol/readmapping": "v2.1.0-dev" } }, [ @@ -220,14 +220,99 @@ "sorted": false } }, + { + "GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.bam": [ + "@HD\tVN:1.6\tSO:coordinate", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@RG\tID:35528_2#1\tDT:2020-11-17T00:00:00+0000\tPU:201117_A00948_0206_AHGML2DSXY_2#1\tLB:33637906\tPG:SCS\tSM:SAMEA5962964\tCN:SC\tPL:ILLUMINA\tDS:ERP116890: Sequencing and assembly of genomes from British species for the Darwin Tree of Life Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ ", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax sr --cs=short -I1.0G -y -R @RG\\tID:35528_2#1\\tDT:2020-11-17T00:00:00+0000\\tPU:201117_A00948_0206_AHGML2DSXY_2#1\\tLB:33637906\\tPG:SCS\\tSM:SAMEA5962964\\tCN:SC\\tPL:ILLUMINA\\tDS:ERP116890: Sequencing and assembly of genomes from British species for the Darwin Tree of Life Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ GCA_922984935.2.subset.unmasked.mmi -", + "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.22.1\tCL:samtools fixmate -mpu - -", + "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.22.1\tCL:samtools view -h", + "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.22.1\tCL:samtools sort --write-index -l1 -@4 -T 35528_2_1.subset.cram.0.SAMEA7524440.ERR6688402_tmp -o 35528_2_1.subset.cram.0.SAMEA7524440.ERR6688402.bam -", + "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa - 1/35528_2_1.subset.cram.0.SAMEA7524440.ERR6688402.bam 2/35528_2_1.subset.cram.1.SAMEA7524440.ERR6688402.bam", + "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools markdup -T SAMEA7524440.ERR6688402 -f SAMEA7524440.ERR6688402.metrics --threads 4 --reference GCA_922984935.2.subset.unmasked.fa - SAMEA7524440.ERR6688402.bam", + "@PG\tID:crumble\tPN:crumble\tPP:samtools.4\tVN:0.9.1\tCL:crumble -O bam SAMEA7524440.ERR6688402.bam SAMEA7524440.ERR6688402.crumble.bam", + "@PG\tID:samtools.5\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.bam" + ], + "GCA_922984935.2.subset.illumina.SAMEA7524438.ERR6688599.minimap2.bam": [ + "@HD\tVN:1.6\tSO:coordinate", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@RG\tID:31231_3#1\tDT:2019-10-03T01:00:00+0100\tPU:191003_HX4_31231_A_H3353CCX2_3#1\tLB:23687379\tPG:SCS\tSM:SAMEA5962962\tCN:SC\tPL:ILLUMINA\tDS:ERP114452: Sequencing and assembly of vertebrate genomes from British species for the Darwin Tree of Life Project in collaboration with the Vertebrate Genomes Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax sr --cs=short -I1.0G -y -R @RG\\tID:31231_3#1\\tDT:2019-10-03T00:00:00+0000\\tPU:191003_HX4_31231_A_H3353CCX2_3#1\\tLB:23687379\\tPG:SCS\\tSM:SAMEA5962962\\tCN:SC\\tPL:ILLUMINA\\tDS:ERP114452: Sequencing and assembly of vertebrate genomes from British species for the Darwin Tree of Life Project in collaboration with the Vertebrate Genomes Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ GCA_922984935.2.subset.unmasked.mmi -", + "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.22.1\tCL:samtools fixmate -mpu - -", + "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.22.1\tCL:samtools view -h", + "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.22.1\tCL:samtools sort --write-index -l1 -@4 -T SAMEA7524438.ERR6688599.cram.0.SAMEA7524438.ERR6688599_tmp -o SAMEA7524438.ERR6688599.cram.0.SAMEA7524438.ERR6688599.bam -", + "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa - 1/SAMEA7524438.ERR6688599.cram.0.SAMEA7524438.ERR6688599.bam 2/SAMEA7524438.ERR6688599.cram.1.SAMEA7524438.ERR6688599.bam", + "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools markdup -T SAMEA7524438.ERR6688599 -f SAMEA7524438.ERR6688599.metrics --threads 4 --reference GCA_922984935.2.subset.unmasked.fa - SAMEA7524438.ERR6688599.bam", + "@PG\tID:crumble\tPN:crumble\tPP:samtools.4\tVN:0.9.1\tCL:crumble -O bam SAMEA7524438.ERR6688599.bam SAMEA7524438.ERR6688599.crumble.bam", + "@PG\tID:samtools.5\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.illumina.SAMEA7524438.ERR6688599.minimap2.bam" + ], + "GCA_922984935.2.subset.illumina.SAMEA7524439.ERR6688600.minimap2.bam": [ + "@HD\tVN:1.6\tSO:coordinate", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@RG\tID:31231_4_1\tPL:ILLUMINA\tSM:SAMEA7524439", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax sr --cs=short -I1.0G -y -R @RG\\tID:31231_4_1\\tPL:ILLUMINA\\tSM:SAMEA7524439 GCA_922984935.2.subset.unmasked.mmi -", + "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.22.1\tCL:samtools fixmate -mpu - -", + "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.22.1\tCL:samtools view -h", + "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.22.1\tCL:samtools sort --write-index -l1 -@4 -T SAMEA7524439.ERR6688600_addRG.cram.0.SAMEA7524439.ERR6688600_tmp -o SAMEA7524439.ERR6688600_addRG.cram.0.SAMEA7524439.ERR6688600.bam -", + "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa - 1/SAMEA7524439.ERR6688600_addRG.cram.0.SAMEA7524439.ERR6688600.bam 2/SAMEA7524439.ERR6688600_addRG.cram.1.SAMEA7524439.ERR6688600.bam", + "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools markdup -T SAMEA7524439.ERR6688600 -f SAMEA7524439.ERR6688600.metrics --threads 4 --reference GCA_922984935.2.subset.unmasked.fa - SAMEA7524439.ERR6688600.bam", + "@PG\tID:crumble\tPN:crumble\tPP:samtools.4\tVN:0.9.1\tCL:crumble -O bam SAMEA7524439.ERR6688600.bam SAMEA7524439.ERR6688600.crumble.bam", + "@PG\tID:samtools.5\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.illumina.SAMEA7524439.ERR6688600.minimap2.bam" + ] + }, + { + "GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.cram": [ + "@HD\tVN:1.6\tSO:coordinate", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@RG\tID:35528_2#1\tDT:2020-11-17T00:00:00+0000\tPU:201117_A00948_0206_AHGML2DSXY_2#1\tLB:33637906\tPG:SCS\tSM:SAMEA5962964\tCN:SC\tPL:ILLUMINA\tDS:ERP116890: Sequencing and assembly of genomes from British species for the Darwin Tree of Life Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ ", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax sr --cs=short -I1.0G -y -R @RG\\tID:35528_2#1\\tDT:2020-11-17T00:00:00+0000\\tPU:201117_A00948_0206_AHGML2DSXY_2#1\\tLB:33637906\\tPG:SCS\\tSM:SAMEA5962964\\tCN:SC\\tPL:ILLUMINA\\tDS:ERP116890: Sequencing and assembly of genomes from British species for the Darwin Tree of Life Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ GCA_922984935.2.subset.unmasked.mmi -", + "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.22.1\tCL:samtools fixmate -mpu - -", + "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.22.1\tCL:samtools view -h", + "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.22.1\tCL:samtools sort --write-index -l1 -@4 -T 35528_2_1.subset.cram.0.SAMEA7524440.ERR6688402_tmp -o 35528_2_1.subset.cram.0.SAMEA7524440.ERR6688402.bam -", + "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa - 1/35528_2_1.subset.cram.0.SAMEA7524440.ERR6688402.bam 2/35528_2_1.subset.cram.1.SAMEA7524440.ERR6688402.bam", + "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools markdup -T SAMEA7524440.ERR6688402 -f SAMEA7524440.ERR6688402.metrics --threads 4 --reference GCA_922984935.2.subset.unmasked.fa - SAMEA7524440.ERR6688402.bam", + "@PG\tID:crumble\tPN:crumble\tPP:samtools.4\tVN:0.9.1\tCL:crumble -O bam SAMEA7524440.ERR6688402.bam SAMEA7524440.ERR6688402.crumble.bam", + "@PG\tID:samtools.5\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.cram GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.bam", + "@PG\tID:samtools.6\tPN:samtools\tPP:samtools.5\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.cram" + ], + "GCA_922984935.2.subset.illumina.SAMEA7524438.ERR6688599.minimap2.cram": [ + "@HD\tVN:1.6\tSO:coordinate", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@RG\tID:31231_3#1\tDT:2019-10-03T01:00:00+0100\tPU:191003_HX4_31231_A_H3353CCX2_3#1\tLB:23687379\tPG:SCS\tSM:SAMEA5962962\tCN:SC\tPL:ILLUMINA\tDS:ERP114452: Sequencing and assembly of vertebrate genomes from British species for the Darwin Tree of Life Project in collaboration with the Vertebrate Genomes Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax sr --cs=short -I1.0G -y -R @RG\\tID:31231_3#1\\tDT:2019-10-03T00:00:00+0000\\tPU:191003_HX4_31231_A_H3353CCX2_3#1\\tLB:23687379\\tPG:SCS\\tSM:SAMEA5962962\\tCN:SC\\tPL:ILLUMINA\\tDS:ERP114452: Sequencing and assembly of vertebrate genomes from British species for the Darwin Tree of Life Project in collaboration with the Vertebrate Genomes Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ GCA_922984935.2.subset.unmasked.mmi -", + "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.22.1\tCL:samtools fixmate -mpu - -", + "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.22.1\tCL:samtools view -h", + "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.22.1\tCL:samtools sort --write-index -l1 -@4 -T SAMEA7524438.ERR6688599.cram.0.SAMEA7524438.ERR6688599_tmp -o SAMEA7524438.ERR6688599.cram.0.SAMEA7524438.ERR6688599.bam -", + "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa - 1/SAMEA7524438.ERR6688599.cram.0.SAMEA7524438.ERR6688599.bam 2/SAMEA7524438.ERR6688599.cram.1.SAMEA7524438.ERR6688599.bam", + "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools markdup -T SAMEA7524438.ERR6688599 -f SAMEA7524438.ERR6688599.metrics --threads 4 --reference GCA_922984935.2.subset.unmasked.fa - SAMEA7524438.ERR6688599.bam", + "@PG\tID:crumble\tPN:crumble\tPP:samtools.4\tVN:0.9.1\tCL:crumble -O bam SAMEA7524438.ERR6688599.bam SAMEA7524438.ERR6688599.crumble.bam", + "@PG\tID:samtools.5\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.illumina.SAMEA7524438.ERR6688599.minimap2.cram GCA_922984935.2.subset.illumina.SAMEA7524438.ERR6688599.minimap2.bam", + "@PG\tID:samtools.6\tPN:samtools\tPP:samtools.5\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.illumina.SAMEA7524438.ERR6688599.minimap2.cram" + ], + "GCA_922984935.2.subset.illumina.SAMEA7524439.ERR6688600.minimap2.cram": [ + "@HD\tVN:1.6\tSO:coordinate", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@RG\tID:31231_4_1\tPL:ILLUMINA\tSM:SAMEA7524439", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax sr --cs=short -I1.0G -y -R @RG\\tID:31231_4_1\\tPL:ILLUMINA\\tSM:SAMEA7524439 GCA_922984935.2.subset.unmasked.mmi -", + "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.22.1\tCL:samtools fixmate -mpu - -", + "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.22.1\tCL:samtools view -h", + "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.22.1\tCL:samtools sort --write-index -l1 -@4 -T SAMEA7524439.ERR6688600_addRG.cram.0.SAMEA7524439.ERR6688600_tmp -o SAMEA7524439.ERR6688600_addRG.cram.0.SAMEA7524439.ERR6688600.bam -", + "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa - 1/SAMEA7524439.ERR6688600_addRG.cram.0.SAMEA7524439.ERR6688600.bam 2/SAMEA7524439.ERR6688600_addRG.cram.1.SAMEA7524439.ERR6688600.bam", + "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools markdup -T SAMEA7524439.ERR6688600 -f SAMEA7524439.ERR6688600.metrics --threads 4 --reference GCA_922984935.2.subset.unmasked.fa - SAMEA7524439.ERR6688600.bam", + "@PG\tID:crumble\tPN:crumble\tPP:samtools.4\tVN:0.9.1\tCL:crumble -O bam SAMEA7524439.ERR6688600.bam SAMEA7524439.ERR6688600.crumble.bam", + "@PG\tID:samtools.5\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.illumina.SAMEA7524439.ERR6688600.minimap2.cram GCA_922984935.2.subset.illumina.SAMEA7524439.ERR6688600.minimap2.bam", + "@PG\tID:samtools.6\tPN:samtools\tPP:samtools.5\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.illumina.SAMEA7524439.ERR6688600.minimap2.cram" + ] + }, [ - + ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.4" }, - "timestamp": "2026-04-29T19:13:10.330631613" + "timestamp": "2026-05-29T01:22:33.94399251" } -} +} \ No newline at end of file diff --git a/tests/uli.nf.test b/tests/uli.nf.test index 1438f913..befcb382 100644 --- a/tests/uli.nf.test +++ b/tests/uli.nf.test @@ -27,6 +27,18 @@ nextflow_pipeline { def bam_path = getAllFilesFromDir(params.outdir, include: ['**/*.bam'], relative: true, includeDir: false) def fasta = 'https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/assembly/release/mMelMel3.1_paternal_haplotype/GCA_922984935.2.subset.fasta' + def strip_absolute_path_lines = { text -> + def lines = text?.getClass()?.isArray() + ? text.toList() + : (text instanceof Collection ? text : (text?.toString()?.readLines() ?: [])) + lines + .collect { line -> + line.toString() + .replaceAll(/\bUR:\/(?:([^\/\s]+)\/([^\/\s]+)\/([^\/\s]+))\/\S+/, 'UR:/$1/$2/$3/') + .replaceAll(/(^|\s)\/(?:[^\s\/]+\/)+[^\s\/]+/, '$1') + } + } + assertAll( { assert workflow.success}, { assert snapshot( @@ -40,6 +52,8 @@ nextflow_pipeline { // Stable mapping files bam_path.collect{ f -> [(new File(f).getName()): bam("${params.outdir}/${f}").getStatistics()] }.collectEntries{ it }.sort(), cram_path.collect{ f -> [(new File(f).getName()): cram("${params.outdir}/${f}", fasta).getStatistics()] }.collectEntries{ it }.sort(), + bam_path.collect{ f -> [(new File(f).getName()): strip_absolute_path_lines(bam("${params.outdir}/${f}").getHeader())] }.collectEntries{ it }.sort(), + cram_path.collect{ f -> [(new File(f).getName()): strip_absolute_path_lines(cram("${params.outdir}/${f}", fasta).getHeader())] }.collectEntries{ it }.sort(), // Stable trimming json hifitrimmer_json.collect{ f -> diff --git a/tests/uli.nf.test.snap b/tests/uli.nf.test.snap index 7b8bbf66..cbc2ae1b 100644 --- a/tests/uli.nf.test.snap +++ b/tests/uli.nf.test.snap @@ -85,7 +85,7 @@ "samtools": "1.23.1" }, "Workflow": { - "sanger-tol/readmapping": "v2.0.3" + "sanger-tol/readmapping": "v2.1.0-dev" } }, [ @@ -143,7 +143,7 @@ "GCA_964034985.1.subset.pacbio.SAMEA114784749.ERR14209104_test.minimap2.stats.gz:md5,4f5930c586e221b776fdd20394b18700" ], { - + }, { "GCA_964034985.1.subset.pacbio.SAMEA114784749.ERR14209104.minimap2.cram": { @@ -169,6 +169,37 @@ "sorted": false } }, + { + + }, + { + "GCA_964034985.1.subset.pacbio.SAMEA114784749.ERR14209104.minimap2.cram": [ + "@HD\tVN:1.6\tSO:coordinate", + "@SQ\tSN:CAXIUN010000020.1\tLN:15094\tM5:eb4b4e09fa2962e012fc983eeb6b65dc\tUR:/lustre/scratch124/tol/", + "@SQ\tSN:CAXIUN010000038.1\tLN:1000\tM5:3fe8a9b5a85c60b19e74e88ca5ca434e\tUR:/lustre/scratch124/tol/", + "@SQ\tSN:CAXIUN010000104.1\tLN:10110\tM5:10013ae295fb0e1a002ab812d6c2e77e\tUR:/lustre/scratch124/tol/", + "@SQ\tSN:CAXIUN010000129.1\tLN:29940\tM5:9579779c87681c88e68a924f572f5599\tUR:/lustre/scratch124/tol/", + "@RG\tID:0de7f0a4/27--27\tPL:PACBIO\tDS:READTYPE=CCS;Ipd:CodecV1=ip;PulseWidth:CodecV1=pw;BINDINGKIT=102-739-100;SEQUENCINGKIT=102-118-800;BASECALLERVERSION=5.0;SMRTCELLKIT=102-202-200;SMRTCELLID=EA138735;RUNID=r84093_20241115_102726;ICSVERSION=13.0.0.212033;MOVIELENGTH=1440.0;FRAMERATEHZ=100.000000;BarcodeFile=metadata/m84093_241116_151316_s2.barcodes.fasta;BarcodeHash=86d73e586a6d3ede0295785b51105eea;BarcodeCount=96;BarcodeMode=Symmetric;BarcodeQuality=Score\tLB:TRAC-2-8053\tPU:m84093_241116_151316_s2\tSM:TOL_ASG14652249\tPM:REVIO\tBC:ACTGCAGCACGAGTAT\tCM:R/P1-C1/5.0-25M", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-hifi --cs=short -y -R @RG\\tID:0de7f0a4/27--27\\tPL:PACBIO\\tDS:READTYPE=CCS;Ipd:CodecV1=ip;PulseWidth:CodecV1=pw;BINDINGKIT=102-739-100;SEQUENCINGKIT=102-118-800;BASECALLERVERSION=5.0;SMRTCELLKIT=102-202-200;SMRTCELLID=EA138735;RUNID=r84093_20241115_102726;ICSVERSION=13.0.0.212033;MOVIELENGTH=1440.0;FRAMERATEHZ=100.000000;BarcodeFile=metadata/m84093_241116_151316_s2.barcodes.fasta;BarcodeHash=86d73e586a6d3ede0295785b51105eea;BarcodeCount=96;BarcodeMode=Symmetric;BarcodeQuality=Score\\tLB:TRAC-2-8053\\tPU:m84093_241116_151316_s2\\tSM:TOL_ASG14652249\\tPM:REVIO\\tBC:ACTGCAGCACGAGTAT\\tCM:R/P1-C1/5.0-25M -I1G -a GCA_964034985.1.subset.unmasked.mmi -", + "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o pacbio.SAMEA114784749.ERR14209104.hifitrimmer.fastq.gz.0.SAMEA114784749.ERR14209104.bam -T pacbio.SAMEA114784749.ERR14209104.hifitrimmer.fastq.gz.0.SAMEA114784749.ERR14209104_sort_tmp --write-index -l1 -", + "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_964034985.1.subset.unmasked.fa SAMEA114784749.ERR14209104.merge.bam 1/pacbio.SAMEA114784749.ERR14209104.hifitrimmer.fastq.gz.0.SAMEA114784749.ERR14209104.bam 2/pacbio.SAMEA114784749.ERR14209104.hifitrimmer.fastq.gz.1.SAMEA114784749.ERR14209104.bam 3/pacbio.SAMEA114784749.ERR14209104.hifitrimmer.fastq.gz.2.SAMEA114784749.ERR14209104.bam 4/pacbio.SAMEA114784749.ERR14209104.hifitrimmer.fastq.gz.3.SAMEA114784749.ERR14209104.bam 5/pacbio.SAMEA114784749.ERR14209104.hifitrimmer.fastq.gz.4.SAMEA114784749.ERR14209104.bam", + "@PG\tID:crumble\tPN:crumble\tPP:samtools.1\tVN:0.9.1\tCL:crumble -y pbccs -O bam SAMEA114784749.ERR14209104.merge.bam SAMEA114784749.ERR14209104.merge.crumble.bam", + "@PG\tID:samtools.2\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_964034985.1.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_964034985.1.subset.pacbio.SAMEA114784749.ERR14209104.minimap2.cram GCA_964034985.1.subset.pacbio.SAMEA114784749.ERR14209104.minimap2.bam" + ], + "GCA_964034985.1.subset.pacbio.SAMEA114784749.ERR14209104_test.minimap2.cram": [ + "@HD\tVN:1.6\tSO:coordinate", + "@SQ\tSN:CAXIUN010000020.1\tLN:15094\tM5:eb4b4e09fa2962e012fc983eeb6b65dc\tUR:/lustre/scratch124/tol/", + "@SQ\tSN:CAXIUN010000038.1\tLN:1000\tM5:3fe8a9b5a85c60b19e74e88ca5ca434e\tUR:/lustre/scratch124/tol/", + "@SQ\tSN:CAXIUN010000104.1\tLN:10110\tM5:10013ae295fb0e1a002ab812d6c2e77e\tUR:/lustre/scratch124/tol/", + "@SQ\tSN:CAXIUN010000129.1\tLN:29940\tM5:9579779c87681c88e68a924f572f5599\tUR:/lustre/scratch124/tol/", + "@RG\tID:0de7f0a4/27--27\tPL:PACBIO\tDS:READTYPE=CCS;Ipd:CodecV1=ip;PulseWidth:CodecV1=pw;BINDINGKIT=102-739-100;SEQUENCINGKIT=102-118-800;BASECALLERVERSION=5.0;SMRTCELLKIT=102-202-200;SMRTCELLID=EA138735;RUNID=r84093_20241115_102726;ICSVERSION=13.0.0.212033;MOVIELENGTH=1440.0;FRAMERATEHZ=100.000000;BarcodeFile=metadata/m84093_241116_151316_s2.barcodes.fasta;BarcodeHash=86d73e586a6d3ede0295785b51105eea;BarcodeCount=96;BarcodeMode=Symmetric;BarcodeQuality=Score\tLB:TRAC-2-8053\tPU:m84093_241116_151316_s2\tSM:TOL_ASG14652249\tPM:REVIO\tBC:ACTGCAGCACGAGTAT\tCM:R/P1-C1/5.0-25M", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-hifi --cs=short -y -R @RG\\tID:0de7f0a4/27--27\\tPL:PACBIO\\tDS:READTYPE=CCS;Ipd:CodecV1=ip;PulseWidth:CodecV1=pw;BINDINGKIT=102-739-100;SEQUENCINGKIT=102-118-800;BASECALLERVERSION=5.0;SMRTCELLKIT=102-202-200;SMRTCELLID=EA138735;RUNID=r84093_20241115_102726;ICSVERSION=13.0.0.212033;MOVIELENGTH=1440.0;FRAMERATEHZ=100.000000;BarcodeFile=metadata/m84093_241116_151316_s2.barcodes.fasta;BarcodeHash=86d73e586a6d3ede0295785b51105eea;BarcodeCount=96;BarcodeMode=Symmetric;BarcodeQuality=Score\\tLB:TRAC-2-8053\\tPU:m84093_241116_151316_s2\\tSM:TOL_ASG14652249\\tPM:REVIO\\tBC:ACTGCAGCACGAGTAT\\tCM:R/P1-C1/5.0-25M -I1G -a GCA_964034985.1.subset.unmasked.mmi -", + "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o pacbio.SAMEA114784749.ERR14209104_test.hifitrimmer.fastq.gz.0.SAMEA114784749.ERR14209104_test.bam -T pacbio.SAMEA114784749.ERR14209104_test.hifitrimmer.fastq.gz.0.SAMEA114784749.ERR14209104_test_sort_tmp --write-index -l1 -", + "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_964034985.1.subset.unmasked.fa SAMEA114784749.ERR14209104_test.merge.bam 1/pacbio.SAMEA114784749.ERR14209104_test.hifitrimmer.fastq.gz.0.SAMEA114784749.ERR14209104_test.bam", + "@PG\tID:crumble\tPN:crumble\tPP:samtools.1\tVN:0.9.1\tCL:crumble -y pbccs -O bam SAMEA114784749.ERR14209104_test.merge.bam SAMEA114784749.ERR14209104_test.merge.crumble.bam", + "@PG\tID:samtools.2\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_964034985.1.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_964034985.1.subset.pacbio.SAMEA114784749.ERR14209104_test.minimap2.cram GCA_964034985.1.subset.pacbio.SAMEA114784749.ERR14209104_test.minimap2.bam" + ] + }, [ "pacbio.SAMEA114784749.ERR14209104.hifitrimmer.summary.json:md5,238e515a0593f4c66e74bff41a33b63c", "pacbio.SAMEA114784749.ERR14209104_test.hifitrimmer.summary.json:md5,4ab835890a22ca1dd2206300f30fbc27" @@ -178,6 +209,6 @@ "nf-test": "0.9.3", "nextflow": "25.10.4" }, - "timestamp": "2026-04-29T19:20:07.06121781" + "timestamp": "2026-05-29T00:46:30.255398793" } -} +} \ No newline at end of file diff --git a/tests/uli_no_lima.nf.test b/tests/uli_no_lima.nf.test index 0efc9e1f..7db645a8 100644 --- a/tests/uli_no_lima.nf.test +++ b/tests/uli_no_lima.nf.test @@ -29,6 +29,18 @@ nextflow_pipeline { def bam_path = getAllFilesFromDir(params.outdir, include: ['**/*.bam'], relative: true, includeDir: false) def fasta = 'https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/assembly/release/mMelMel3.1_paternal_haplotype/GCA_922984935.2.subset.fasta' + def strip_absolute_path_lines = { text -> + def lines = text?.getClass()?.isArray() + ? text.toList() + : (text instanceof Collection ? text : (text?.toString()?.readLines() ?: [])) + lines + .collect { line -> + line.toString() + .replaceAll(/\bUR:\/(?:([^\/\s]+)\/([^\/\s]+)\/([^\/\s]+))\/\S+/, 'UR:/$1/$2/$3/') + .replaceAll(/(^|\s)\/(?:[^\s\/]+\/)+[^\s\/]+/, '$1') + } + } + assertAll( { assert workflow.success}, { assert snapshot( @@ -42,6 +54,8 @@ nextflow_pipeline { // Stable mapping files bam_path.collect{ f -> [(new File(f).getName()): bam("${params.outdir}/${f}").getStatistics()] }.collectEntries{ it }.sort(), cram_path.collect{ f -> [(new File(f).getName()): cram("${params.outdir}/${f}", fasta).getStatistics()] }.collectEntries{ it }.sort(), + bam_path.collect{ f -> [(new File(f).getName()): strip_absolute_path_lines(bam("${params.outdir}/${f}").getHeader())] }.collectEntries{ it }.sort(), + cram_path.collect{ f -> [(new File(f).getName()): strip_absolute_path_lines(cram("${params.outdir}/${f}", fasta).getHeader())] }.collectEntries{ it }.sort(), // Stable trimming json hifitrimmer_json.collect{ f -> diff --git a/tests/uli_no_lima.nf.test.snap b/tests/uli_no_lima.nf.test.snap index 1e08831b..ab978f72 100644 --- a/tests/uli_no_lima.nf.test.snap +++ b/tests/uli_no_lima.nf.test.snap @@ -82,7 +82,7 @@ "samtools": "1.23.1" }, "Workflow": { - "sanger-tol/readmapping": "v2.0.3" + "sanger-tol/readmapping": "v2.1.0-dev" } }, [ @@ -162,7 +162,36 @@ } }, { - + + }, + { + "GCA_964034985.1.subset.pacbio.SAMEA114784749.ERR14209104.minimap2.bam": [ + "@HD\tVN:1.6\tSO:coordinate", + "@SQ\tSN:CAXIUN010000020.1\tLN:15094", + "@SQ\tSN:CAXIUN010000038.1\tLN:1000", + "@SQ\tSN:CAXIUN010000104.1\tLN:10110", + "@SQ\tSN:CAXIUN010000129.1\tLN:29940", + "@RG\tID:0de7f0a4/27--27\tPL:PACBIO\tDS:READTYPE=CCS;Ipd:CodecV1=ip;PulseWidth:CodecV1=pw;BINDINGKIT=102-739-100;SEQUENCINGKIT=102-118-800;BASECALLERVERSION=5.0;SMRTCELLKIT=102-202-200;SMRTCELLID=EA138735;RUNID=r84093_20241115_102726;ICSVERSION=13.0.0.212033;MOVIELENGTH=1440.0;FRAMERATEHZ=100.000000;BarcodeFile=metadata/m84093_241116_151316_s2.barcodes.fasta;BarcodeHash=86d73e586a6d3ede0295785b51105eea;BarcodeCount=96;BarcodeMode=Symmetric;BarcodeQuality=Score\tLB:TRAC-2-8053\tPU:m84093_241116_151316_s2\tSM:TOL_ASG14652249\tPM:REVIO\tBC:ACTGCAGCACGAGTAT\tCM:R/P1-C1/5.0-25M", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-hifi --cs=short -y -R @RG\\tID:0de7f0a4/27--27\\tPL:PACBIO\\tDS:READTYPE=CCS;Ipd:CodecV1=ip;PulseWidth:CodecV1=pw;BINDINGKIT=102-739-100;SEQUENCINGKIT=102-118-800;BASECALLERVERSION=5.0;SMRTCELLKIT=102-202-200;SMRTCELLID=EA138735;RUNID=r84093_20241115_102726;ICSVERSION=13.0.0.212033;MOVIELENGTH=1440.0;FRAMERATEHZ=100.000000;BarcodeFile=metadata/m84093_241116_151316_s2.barcodes.fasta;BarcodeHash=86d73e586a6d3ede0295785b51105eea;BarcodeCount=96;BarcodeMode=Symmetric;BarcodeQuality=Score\\tLB:TRAC-2-8053\\tPU:m84093_241116_151316_s2\\tSM:TOL_ASG14652249\\tPM:REVIO\\tBC:ACTGCAGCACGAGTAT\\tCM:R/P1-C1/5.0-25M -I1G -a GCA_964034985.1.subset.unmasked.mmi -", + "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o pacbio.SAMEA114784749.ERR14209104.hifitrimmer.fastq.gz.0.SAMEA114784749.ERR14209104.bam -T pacbio.SAMEA114784749.ERR14209104.hifitrimmer.fastq.gz.0.SAMEA114784749.ERR14209104_sort_tmp --write-index -l1 -", + "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_964034985.1.subset.unmasked.fa SAMEA114784749.ERR14209104.merge.bam 1/pacbio.SAMEA114784749.ERR14209104.hifitrimmer.fastq.gz.0.SAMEA114784749.ERR14209104.bam", + "@PG\tID:crumble\tPN:crumble\tPP:samtools.1\tVN:0.9.1\tCL:crumble -y pbccs -O bam SAMEA114784749.ERR14209104.merge.bam SAMEA114784749.ERR14209104.merge.crumble.bam" + ], + "GCA_964034985.1.subset.pacbio.SAMEA114784749.ERR14209104_test.minimap2.bam": [ + "@HD\tVN:1.6\tSO:coordinate", + "@SQ\tSN:CAXIUN010000020.1\tLN:15094", + "@SQ\tSN:CAXIUN010000038.1\tLN:1000", + "@SQ\tSN:CAXIUN010000104.1\tLN:10110", + "@SQ\tSN:CAXIUN010000129.1\tLN:29940", + "@RG\tID:0de7f0a4/27--27\tPL:PACBIO\tDS:READTYPE=CCS;Ipd:CodecV1=ip;PulseWidth:CodecV1=pw;BINDINGKIT=102-739-100;SEQUENCINGKIT=102-118-800;BASECALLERVERSION=5.0;SMRTCELLKIT=102-202-200;SMRTCELLID=EA138735;RUNID=r84093_20241115_102726;ICSVERSION=13.0.0.212033;MOVIELENGTH=1440.0;FRAMERATEHZ=100.000000;BarcodeFile=metadata/m84093_241116_151316_s2.barcodes.fasta;BarcodeHash=86d73e586a6d3ede0295785b51105eea;BarcodeCount=96;BarcodeMode=Symmetric;BarcodeQuality=Score\tLB:TRAC-2-8053\tPU:m84093_241116_151316_s2\tSM:TOL_ASG14652249\tPM:REVIO\tBC:ACTGCAGCACGAGTAT\tCM:R/P1-C1/5.0-25M", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-hifi --cs=short -y -R @RG\\tID:0de7f0a4/27--27\\tPL:PACBIO\\tDS:READTYPE=CCS;Ipd:CodecV1=ip;PulseWidth:CodecV1=pw;BINDINGKIT=102-739-100;SEQUENCINGKIT=102-118-800;BASECALLERVERSION=5.0;SMRTCELLKIT=102-202-200;SMRTCELLID=EA138735;RUNID=r84093_20241115_102726;ICSVERSION=13.0.0.212033;MOVIELENGTH=1440.0;FRAMERATEHZ=100.000000;BarcodeFile=metadata/m84093_241116_151316_s2.barcodes.fasta;BarcodeHash=86d73e586a6d3ede0295785b51105eea;BarcodeCount=96;BarcodeMode=Symmetric;BarcodeQuality=Score\\tLB:TRAC-2-8053\\tPU:m84093_241116_151316_s2\\tSM:TOL_ASG14652249\\tPM:REVIO\\tBC:ACTGCAGCACGAGTAT\\tCM:R/P1-C1/5.0-25M -I1G -a GCA_964034985.1.subset.unmasked.mmi -", + "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o pacbio.SAMEA114784749.ERR14209104_test.hifitrimmer.fastq.gz.0.SAMEA114784749.ERR14209104_test.bam -T pacbio.SAMEA114784749.ERR14209104_test.hifitrimmer.fastq.gz.0.SAMEA114784749.ERR14209104_test_sort_tmp --write-index -l1 -", + "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_964034985.1.subset.unmasked.fa SAMEA114784749.ERR14209104_test.merge.bam 1/pacbio.SAMEA114784749.ERR14209104_test.hifitrimmer.fastq.gz.0.SAMEA114784749.ERR14209104_test.bam", + "@PG\tID:crumble\tPN:crumble\tPP:samtools.1\tVN:0.9.1\tCL:crumble -y pbccs -O bam SAMEA114784749.ERR14209104_test.merge.bam SAMEA114784749.ERR14209104_test.merge.crumble.bam" + ] + }, + { + }, [ "pacbio.SAMEA114784749.ERR14209104.hifitrimmer.summary.json:md5,f8d293d48de8a48ba7b1bffa56b5ab89", @@ -173,6 +202,6 @@ "nf-test": "0.9.3", "nextflow": "25.10.4" }, - "timestamp": "2026-04-29T19:16:58.80829055" + "timestamp": "2026-05-28T20:23:05.002283734" } -} +} \ No newline at end of file diff --git a/tests/untrim.nf.test b/tests/untrim.nf.test index c776ae42..d1736f4a 100644 --- a/tests/untrim.nf.test +++ b/tests/untrim.nf.test @@ -31,6 +31,18 @@ nextflow_pipeline { def bam_path = getAllFilesFromDir(params.outdir, include: ['**/*.bam'], relative: true, includeDir: false) def fasta = 'https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/assembly/release/mMelMel3.1_paternal_haplotype/GCA_922984935.2.subset.fasta' + def strip_absolute_path_lines = { text -> + def lines = text?.getClass()?.isArray() + ? text.toList() + : (text instanceof Collection ? text : (text?.toString()?.readLines() ?: [])) + lines + .collect { line -> + line.toString() + .replaceAll(/\bUR:\/(?:([^\/\s]+)\/([^\/\s]+)\/([^\/\s]+))\/\S+/, 'UR:/$1/$2/$3/') + .replaceAll(/(^|\s)\/(?:[^\s\/]+\/)+[^\s\/]+/, '$1') + } + } + assertAll( { assert workflow.success}, { assert snapshot( @@ -44,6 +56,8 @@ nextflow_pipeline { // Stable mapping files bam_path.collect{ f -> [(new File(f).getName()): bam("${params.outdir}/${f}").getStatistics()] }.collectEntries{ it }.sort(), cram_path.collect{ f -> [(new File(f).getName()): cram("${params.outdir}/${f}", fasta).getStatistics()] }.collectEntries{ it }.sort(), + bam_path.collect{ f -> [(new File(f).getName()): strip_absolute_path_lines(bam("${params.outdir}/${f}").getHeader())] }.collectEntries{ it }.sort(), + cram_path.collect{ f -> [(new File(f).getName()): strip_absolute_path_lines(cram("${params.outdir}/${f}", fasta).getHeader())] }.collectEntries{ it }.sort(), // Stable trimming json hifitrimmer_json.collect{ f -> diff --git a/tests/untrim.nf.test.snap b/tests/untrim.nf.test.snap index c85069e7..5ebff3c9 100644 --- a/tests/untrim.nf.test.snap +++ b/tests/untrim.nf.test.snap @@ -1,7 +1,7 @@ { "-profile test --pacbio_adapter_fasta false --pacbio_adapter_yaml false --outfmt bam": { "content": [ - 68, + 70, { "BGZIP_BEDGRAPH": { "samtools": "1.23.1" @@ -39,6 +39,9 @@ "MINIMAP2_INDEX": { "minimap2": "2.30-r1287" }, + "SAMTOOLS_ADD_PG": { + "samtools": "1.23.1" + }, "SAMTOOLS_FAIDX": { "samtools": "1.23.1" }, @@ -67,7 +70,7 @@ "samtools": "1.23.1" }, "Workflow": { - "sanger-tol/readmapping": "v2.0.3" + "sanger-tol/readmapping": "v2.1.0-dev" } }, [ @@ -192,16 +195,72 @@ } }, { - + + }, + { + "GCA_922984935.2.subset.ont.SAMEA7524440.PAE35587.minimap2.bam": [ + "@HD\tVN:1.6\tSO:coordinate", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/resources/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@RG\tID:PAE35587_pass_1f1f0707_115\tPL:ONT\tSM:SAMEA7524440", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-ont -y -R @RG\\tID:PAE35587_pass_1f1f0707_115\\tPL:ONT\\tSM:SAMEA7524440 -I1G -a GCA_922984935.2.subset.unmasked.mmi -", + "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o PAE35587_pass_1f1f0707_115.subset.fastq.gz.0.SAMEA7524440.PAE35587.bam -T PAE35587_pass_1f1f0707_115.subset.fastq.gz.0.SAMEA7524440.PAE35587_sort_tmp --write-index -l1 -", + "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa SAMEA7524440.PAE35587.merge.bam 1/PAE35587_pass_1f1f0707_115.subset.fastq.gz.0.SAMEA7524440.PAE35587.bam", + "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.ont.SAMEA7524440.PAE35587.minimap2.bam" + ], + "GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.bam": [ + "@HD\tVN:1.6\tSO:coordinate", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/resources/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@RG\tID:61ddc6c3/15--15\tPL:PACBIO\tDS:READTYPE=CCS;BINDINGKIT=101-789-500;SEQUENCINGKIT=101-826-100;BASECALLERVERSION=5.0.0;FRAMERATEHZ=100.000000;BarcodeFile=/lustre/scratch116/vr/projects/vgp/ref/barcodes/Sequel_16_Barcodes_v3.fasta;BarcodeHash=e418d89cefcbef90f3cb0e6455b7e2a3;BarcodeCount=16;BarcodeMode=Symmetric;BarcodeQuality=Score\tLB:DN615654G-A1\tPU:m64094_200910_173211\tPM:SEQUELII\tBC:CACTCACGTGTGATATT\tCM:S/P4-C2/5.0-8M\tSM:SAMEA7524440", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-hifi --cs=short -y -R @RG\\tID:61ddc6c3/15--15\\tPL:PACBIO\\tDS:READTYPE=CCS;BINDINGKIT=101-789-500;SEQUENCINGKIT=101-826-100;BASECALLERVERSION=5.0.0;FRAMERATEHZ=100.000000;BarcodeFile=/lustre/scratch116/vr/projects/vgp/ref/barcodes/Sequel_16_Barcodes_v3.fasta;BarcodeHash=e418d89cefcbef90f3cb0e6455b7e2a3;BarcodeCount=16;BarcodeMode=Symmetric;BarcodeQuality=Score\\tLB:DN615654G-A1\\tPU:m64094_200910_173211\\tPM:SEQUELII\\tBC:CACTCACGTGTGATATT\\tCM:S/P4-C2/5.0-8M\\tSM:SAMEA7524440 -I1G -a GCA_922984935.2.subset.unmasked.mmi -", + "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o SAMEA7524440.ERR6939248_other.fastq.gz.0.SAMEA7524440.ERR6939248.bam -T SAMEA7524440.ERR6939248_other.fastq.gz.0.SAMEA7524440.ERR6939248_sort_tmp --write-index -l1 -", + "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa SAMEA7524440.ERR6939248.merge.bam 1/SAMEA7524440.ERR6939248_other.fastq.gz.0.SAMEA7524440.ERR6939248.bam", + "@PG\tID:crumble\tPN:crumble\tPP:samtools.1\tVN:0.9.1\tCL:crumble -y pbccs -O bam SAMEA7524440.ERR6939248.merge.bam SAMEA7524440.ERR6939248.merge.crumble.bam", + "@PG\tID:samtools.2\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.bam" + ], + "GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam": [ + "@HD\tVN:1.6\tSO:coordinate", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/resources/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@RG\tID:m64094_200911_174739\tPL:PACBIO\tSM:SAMEA7524440", + "@PG\tID:samtools.extra_header\tPN:samtools\tVN:1.22.1\tCL:samtools collate --output-fmt cram -O -u -T mMelMel3_T4.collate --threads 4 --reference GCA_922984935.2.subset.unmasked.fasta m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.fastq.gz -", + "@PG\tID:samtools.1.extra_header\tPN:samtools\tPP:samtools\tVN:1.22.1\tCL:samtools fixmate -m -u --threads 4 - -", + "@PG\tID:samtools.2.extra_header\tPN:samtools\tPP:samtools.1\tVN:1.22.1\tCL:samtools sort -u -T mMelMel3_T4.sort --threads 4 -", + "@PG\tID:samtools.3.extra_header\tPN:samtools\tPP:samtools.2\tVN:1.22.1\tCL:samtools markdup -T mMelMel3_T4.markdup -f mMelMel3_T4.metrics --threads 4 - mMelMel3_T4.cram", + "@PG\tID:samtools.4.extra_header\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools view -H m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.cram", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-hifi --cs=short -y -R @RG\\tID:m64094_200911_174739\\tPL:PACBIO\\tSM:SAMEA7524440 -I1G -a GCA_922984935.2.subset.unmasked.mmi -", + "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.fastq.gz.0.SAMEA7524440.ERR6939249.bam -T m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.fastq.gz.0.SAMEA7524440.ERR6939249_sort_tmp --write-index -l1 -", + "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa SAMEA7524440.ERR6939249.merge.bam 1/m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.fastq.gz.0.SAMEA7524440.ERR6939249.bam", + "@PG\tID:crumble\tPN:crumble\tPP:samtools.1\tVN:0.9.1\tCL:crumble -y pbccs -O bam SAMEA7524440.ERR6939249.merge.bam SAMEA7524440.ERR6939249.merge.crumble.bam", + "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", + "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", + "@PG\tID:samtools.4\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", + "@PG\tID:samtools.5\tPN:samtools\tPP:samtools.3.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", + "@PG\tID:samtools.6\tPN:samtools\tPP:samtools.4.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", + "@PG\tID:samtools.7\tPN:samtools\tPP:samtools.4\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam" + ], + "GCA_922984935.2.subset.pacbio.SAMEA7524440.merged_1.minimap2.bam": [ + "@HD\tVN:1.6\tSO:coordinate", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/resources/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@RG\tID:m64094_200911_174739\tPL:PACBIO\tSM:SAMEA7524440", + "@RG\tID:61ddc6c3/15--15\tPL:PACBIO\tDS:READTYPE=CCS;BINDINGKIT=101-789-500;SEQUENCINGKIT=101-826-100;BASECALLERVERSION=5.0.0;FRAMERATEHZ=100.000000;BarcodeFile=/lustre/scratch116/vr/projects/vgp/ref/barcodes/Sequel_16_Barcodes_v3.fasta;BarcodeHash=e418d89cefcbef90f3cb0e6455b7e2a3;BarcodeCount=16;BarcodeMode=Symmetric;BarcodeQuality=Score\tLB:DN615654G-A1\tPU:m64094_200910_173211\tPM:SEQUELII\tBC:CACTCACGTGTGATATT\tCM:S/P4-C2/5.0-8M\tSM:SAMEA7524440", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-hifi --cs=short -y -R @RG\\tID:m64094_200911_174739\\tPL:PACBIO\\tSM:SAMEA7524440 -I1G -a GCA_922984935.2.subset.unmasked.mmi -", + "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.fastq.gz.0.SAMEA7524440.ERR6939249.bam -T m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.fastq.gz.0.SAMEA7524440.ERR6939249_sort_tmp --write-index -l1 -", + "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa SAMEA7524440.ERR6939249.merge.bam 1/m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.fastq.gz.0.SAMEA7524440.ERR6939249.bam", + "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p SAMEA7524440.merged_1.merge.bam 1/SAMEA7524440.ERR6939249.merge.bam 2/SAMEA7524440.ERR6939248.merge.bam", + "@PG\tID:crumble\tPN:crumble\tPP:samtools.2\tVN:0.9.1\tCL:crumble -y pbccs -O bam SAMEA7524440.merged_1.merge.bam SAMEA7524440.merged_1.merge.crumble.bam", + "@PG\tID:samtools.3\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.merged_1.minimap2.bam" + ] + }, + { + }, [ - + ] ], "meta": { "nf-test": "0.9.3", "nextflow": "25.10.4" }, - "timestamp": "2026-04-29T19:28:07.623617833" + "timestamp": "2026-05-29T01:47:41.430447254" } -} +} \ No newline at end of file From 84e057fbc540c5a1ad4daa6c67ee671666d86373 Mon Sep 17 00:00:00 2001 From: sainsachiko Date: Fri, 29 May 2026 03:00:46 +0100 Subject: [PATCH 07/20] Fix linting --- CHANGELOG.md | 1 - assets/samplesheet_short_reads.csv | 2 +- docs/usage.md | 16 ++++++++-------- modules.json | 2 +- subworkflows/local/align_long.nf | 2 +- subworkflows/local/align_short.nf | 6 +++--- subworkflows/local/convert_stats.nf | 2 +- subworkflows/local/input_check.nf | 6 +++--- subworkflows/local/prepare_read_groups.nf | 4 ++-- workflows/readmapping.nf | 2 +- 10 files changed, 21 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 349e1ff4..eafbbdad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - ## [[v2.1.0-dev](https://github.com/sanger-tol/readmapping/releases/tag/2.1.0-dev)] - 2.1.0-dev - [release-date] ### Enhancements & fixes diff --git a/assets/samplesheet_short_reads.csv b/assets/samplesheet_short_reads.csv index 9af9dc64..8a466b65 100644 --- a/assets/samplesheet_short_reads.csv +++ b/assets/samplesheet_short_reads.csv @@ -1,4 +1,4 @@ -specimen,run,datatype,datafile,library,barcode +specimen,run,datatype,datafile,library,barcode,extra_header SAMEA7524438,ERR6688599,illumina,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel1/illumina/31231_3_1.subset.bam,, SAMEA7524439,ERR6688600,illumina,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel2/illumina/31231_4_1.subset.fastq.gz,, SAMEA7524440,ERR6688402,hic,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel3/hic/35528_2_1.subset.cram,,,https://tolit.cog.sanger.ac.uk/test-data/Meles_meles/genomic_data/mMelMel3/hic/35528_2_1.subset.header_no_rg.sam diff --git a/docs/usage.md b/docs/usage.md index 20ce093c..e11bff39 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -40,14 +40,14 @@ specimen2,run4,pacbio,pacbio1.bam,uli,,headers/pacbio_rg.sam specimen3,run5,pacbio,pacbio2.bam,,, ``` -| Column | Description | -| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `specimen` | Identifier of the specimen. Usually a BioSpecimen accession, i,e. `SAMEA7521529`. | -| `run` | Identifier of the sequencing run. Usually the accession number of the data in INSDC. For example,`ERR9248445` (hic), `ERR9284044` (pacbio). | -| `datatype` | Type of sequencing data. Must be one of `hic`, `illumina`, `pacbio`, `pacbio_clr`, or `ont`. | -| `datafile` | Full path to read data file. Must be `bam`, `cram`, `fastq.gz` or `fq.gz` for `illumina` and `hic`. Must be `bam`, `fastq.gz` or `fq.gz` for `pacbio`, `pacbio_clr`, and `ont`. Note that FASTQ inputs should be interleaved if paired-end. | -| `library` | (Optional) The library value is a unique identifier which is assigned to read group (`@RG`) ID. If the library name is not specified, the pipeline will auto-create library name using the data filename provided in the samplesheet. | -| `barcode` | (Optional) Barcode identifier used to trim barcode adapter for PacBio reads. If empty, barcode-specific adapter sequences will not be trimmed. | +| Column | Description | +| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `specimen` | Identifier of the specimen. Usually a BioSpecimen accession, i,e. `SAMEA7521529`. | +| `run` | Identifier of the sequencing run. Usually the accession number of the data in INSDC. For example,`ERR9248445` (hic), `ERR9284044` (pacbio). | +| `datatype` | Type of sequencing data. Must be one of `hic`, `illumina`, `pacbio`, `pacbio_clr`, or `ont`. | +| `datafile` | Full path to read data file. Must be `bam`, `cram`, `fastq.gz` or `fq.gz` for `illumina` and `hic`. Must be `bam`, `fastq.gz` or `fq.gz` for `pacbio`, `pacbio_clr`, and `ont`. Note that FASTQ inputs should be interleaved if paired-end. | +| `library` | (Optional) The library value is a unique identifier which is assigned to read group (`@RG`) ID. If the library name is not specified, the pipeline will auto-create library name using the data filename provided in the samplesheet. | +| `barcode` | (Optional) Barcode identifier used to trim barcode adapter for PacBio reads. If empty, barcode-specific adapter sequences will not be trimmed. | | `extra_header` | (Optional) Path to a SAM file containing additional SAM header lines including `@RG`, `@PG`. These information will be injected into output BAM/CRAM headers. `@RG` lines are overwritten, while `@PG` lines are added to the existing headers (auto add `.extra_header` to `@PG ID`). | An [example samplesheet](../assets/samplesheet.csv) has been provided with the pipeline. diff --git a/modules.json b/modules.json index c00ecfad..979208ba 100644 --- a/modules.json +++ b/modules.json @@ -77,7 +77,7 @@ }, "samtools/addreplacerg": { "branch": "master", - "git_sha": "6d46786420b4d7bc88eba026eb389c0c5535d120", + "git_sha": "156feda0cb6589cd29c04902004fa3b53bc00205", "installed_by": ["modules"] }, "samtools/bgzip": { diff --git a/subworkflows/local/align_long.nf b/subworkflows/local/align_long.nf index 4982e0d1..cc72428f 100644 --- a/subworkflows/local/align_long.nf +++ b/subworkflows/local/align_long.nf @@ -63,7 +63,7 @@ workflow ALIGN_LONG { ch_yaml_meta = ch_reads.pacbio .combine( channel.fromPath(val_pacbio_adapter_yaml, checkIfExists: true) ) .map{ meta, _reads, yaml -> [ meta, yaml ]} - .branch { meta, yaml -> + .branch { meta, _yaml -> has_barcode: meta.barcode != null && !meta.barcode.isEmpty() no_barcode: true } diff --git a/subworkflows/local/align_short.nf b/subworkflows/local/align_short.nf index 1b91a437..8f285fa2 100644 --- a/subworkflows/local/align_short.nf +++ b/subworkflows/local/align_short.nf @@ -22,10 +22,10 @@ workflow ALIGN_SHORT { reads_with_rg = PREPARE_READ_GROUPS.out.reads // - // LOGIC: Convert FASTQ to CRAM adn add RG information if needed + // LOGIC: Convert FASTQ to CRAM and add RG information if needed // // Check file types and branch - ch_reads = reads_with_rg.branch { meta, read_files -> + ch_reads = reads_with_rg.branch { _meta, read_files -> cram: read_files.name.endsWith(".cram") non_cram: true } @@ -39,7 +39,7 @@ workflow ALIGN_SHORT { // Add read group information to CRAMs if not already present, and merge with CRAMs that already have RG information ch_crams_to_addrg = CONVERT_CRAM.out.cram .mix ( ch_reads.cram ) - .branch { meta, cram -> + .branch { meta, _cram -> replace_rg: meta.replace_rg == true not_replace_rg: true } diff --git a/subworkflows/local/convert_stats.nf b/subworkflows/local/convert_stats.nf index e8ad5005..dac085d4 100644 --- a/subworkflows/local/convert_stats.nf +++ b/subworkflows/local/convert_stats.nf @@ -96,7 +96,7 @@ workflow CONVERT_STATS { if ( "bam" in outfmt_options ) { // Re-header && reindex BAM - ch_bam = params.header ? SAMTOOLS_REHEADER_BAM ( ch_bams_add_pg, header.first() ).bam : ch_bams_add_pg.map{ meta, bam, _empty-> [ meta, bam ] } + ch_bam = params.header ? SAMTOOLS_REHEADER_BAM ( ch_bams_add_pg, header.first() ).bam : ch_bams_add_pg.map{ meta, bam_file, _empty -> [ meta, bam_file ] } SAMTOOLS_INDEX_BAM ( ch_bam ) // Set the BAM and BAI channels for emission diff --git a/subworkflows/local/input_check.nf b/subworkflows/local/input_check.nf index 07be329a..4d7134c5 100644 --- a/subworkflows/local/input_check.nf +++ b/subworkflows/local/input_check.nf @@ -22,7 +22,7 @@ workflow INPUT_CHECK { SAMTOOLS_FLAGSTAT ( samplesheet_rows ) // Create the read channel for the rest of the pipeline - reads = samplesheet_rows + ch_reads = samplesheet_rows .join( SAMTOOLS_FLAGSTAT.out.flagstat ) .map { meta, datafile, _meta2, stats -> create_data_channel( meta, datafile, stats ) } @@ -39,7 +39,7 @@ workflow INPUT_CHECK { MASK_UNMASK ( ch_fasta_for_unmask ) emit: - reads // channel: [ val(meta), /path/to/datafile ] + reads = ch_reads // channel: [ val(meta), /path/to/datafile ] fasta = MASK_UNMASK.out.unmasked.first() // channel: [ meta, /path/to/fasta ] } @@ -55,7 +55,7 @@ def create_data_channel ( LinkedHashMap row, datafile, stats ) { meta.datatype = row.datatype meta.library = row.library meta.barcode = row.barcode - meta.extra_header = row.extra_header ? file(row.extra_header, checkExists:true) : [] + meta.extra_header = row.extra_header ? file(row.extra_header, checkIfExists: true) : [] def platform = (meta.datatype == "hic" || meta.datatype == "illumina") ? "ILLUMINA" : (meta.datatype == "pacbio" || meta.datatype == "pacbio_clr") ? "PACBIO" : diff --git a/subworkflows/local/prepare_read_groups.nf b/subworkflows/local/prepare_read_groups.nf index 04ff501d..8f87f196 100644 --- a/subworkflows/local/prepare_read_groups.nf +++ b/subworkflows/local/prepare_read_groups.nf @@ -46,7 +46,7 @@ workflow PREPARE_READ_GROUPS { : "${line}\tSM:${meta.id}" "${rg_flag} '${l.replaceAll("\t", "\\\\t")}'" }.join(' ') - ].findAll { it }.join(' ') + ].findAll { value -> value }.join(' ') : (meta.read_group ?: '') def output_read_files = meta.read_file ?: read_files @@ -60,5 +60,5 @@ workflow PREPARE_READ_GROUPS { .mix(ch_reads_extra_header.no_extra_header_fastq) emit: - reads = ch_reads_with_rg // channel: [ val(meta), /path/to/read_file ] + reads = ch_reads_with_rg // channel: [ val(meta), /path/to/read_file ] } diff --git a/workflows/readmapping.nf b/workflows/readmapping.nf index 50797945..f522562f 100644 --- a/workflows/readmapping.nf +++ b/workflows/readmapping.nf @@ -159,7 +159,7 @@ workflow READMAPPING { emit: - versions = ch_collated_versions // channel: [ path(versions.yml) ] + versions = ch_collated_versions // channel: [ path(versions.yml) ] } From dc76ec2d6eff04f7df330c46c4ee7f63e5ef5530 Mon Sep 17 00:00:00 2001 From: sainsachiko Date: Fri, 29 May 2026 03:26:37 +0100 Subject: [PATCH 08/20] fix(samtools-reheader): preserve @PG chain when suffixing extra header IDs --- .../reheader/samtools_replaceheader.nf | 3 +- tests/default.nf.test.snap | 110 ++++++++---------- tests/short_aligner_minimap2.nf.test.snap | 68 ++++++++--- tests/untrim.nf.test.snap | 20 ++-- 4 files changed, 112 insertions(+), 89 deletions(-) diff --git a/modules/local/samtools/reheader/samtools_replaceheader.nf b/modules/local/samtools/reheader/samtools_replaceheader.nf index fd06babd..93123950 100644 --- a/modules/local/samtools/reheader/samtools_replaceheader.nf +++ b/modules/local/samtools/reheader/samtools_replaceheader.nf @@ -24,7 +24,8 @@ process SAMTOOLS_REHEADER { suffix = file.getExtension() def sq_template = header_template ? " | grep -v ^@SQ && grep '^@SQ' ${header_template}" : "" // Suffix all PG IDs from sample extra_header to keep them distinct from native file-header PG IDs. - def pg_extra = sample_extra_header ? "grep '^@PG' ${sample_extra_header} | awk 'BEGIN { FS = OFS = \"\\t\" } { for (i = 1; i <= NF; i++) if (\$i ~ /^ID:/) { \$i = \$i \".extra_header\"; break } print }' || true" : "true" + // Also rewrite matching PP references so the extra-header PG chain remains intact after suffixing. + def pg_extra = sample_extra_header ? "awk 'BEGIN { FS = OFS = \"\\t\" } FNR == NR { if (\$1 == \"@PG\") for (i = 1; i <= NF; i++) if (\$i ~ /^ID:/) { ids[substr(\$i, 4)] = 1; break } next } \$1 == \"@PG\" { for (i = 1; i <= NF; i++) { if (\$i ~ /^ID:/) { \$i = \$i \".extra_header\" } else if (\$i ~ /^PP:/) { pp = substr(\$i, 4); if (pp in ids) \$i = \"PP:\" pp \".extra_header\" } } print }' ${sample_extra_header} ${sample_extra_header} || true" : "true" if ("$file" == "${prefix}.${suffix}") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" """ diff --git a/tests/default.nf.test.snap b/tests/default.nf.test.snap index d33de6ed..13ed1309 100644 --- a/tests/default.nf.test.snap +++ b/tests/default.nf.test.snap @@ -389,21 +389,21 @@ "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", "@RG\tID:35528_2_1\tPL:ILLUMINA\tSM:SAMEA7524440", "@PG\tID:SCS.extra_header\tVN:1.7.0\tPN:NovaSeq Control Software\tDS:Controlling software on instrument", - "@PG\tID:basecalling.extra_header\tPP:SCS\tVN:Unknown\tPN:Unknown\tDS:Basecalling Package", - "@PG\tID:bambi.extra_header\tPP:basecalling\tVN:0.13.1\tCL:/software/pkgg/bambi/0.13.1/bin/bambi i2b --intensity-dir=/lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities --basecalls-dir=/lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BaseCalls --lane=2 --platform-unit=201117_A00948_0206_AHGML2DSXY_2 --read-group-id=35528_2 --study-name=\"ERP116890: Sequencing and assembly of genomes from British species for the Darwin Tree of Life Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ \" --sample-alias=SAMEA5962964,mCerEla1 --threads=8 --output-file=- --compression-level=0\tPN:bambi\tDS:Convert Illumina BCL to BAM or SAM file", - "@PG\tID:bambi.1.extra_header\tPN:bambi\tPP:bambi\tVN:0.13.1\tCL:/software/pkgg/bambi/0.13.1/bin/bambi decode --metrics-file /lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BAM_basecalls_20201119-090808/35528_2.bam.tag_decode.metrics --barcode-file /lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BAM_basecalls_20201119-090808/metadata_cache_35528/lane_2.taglist --compression-level 0 -", - "@PG\tID:bamcollate2.extra_header\tPN:bamcollate2\tCL:/software/pkgg/biobambam2/2.0.79/bin/bamcollate2 collate=2 level=0\tPP:bambi.1\tVN:2.0.79", - "@PG\tID:minimap2.extra_header\tPN:minimap2\tCL:minimap2 -ax sr --MD -t 3 -Y -F 1200 -K 100000000 /lustre/scratch121/npg_repository/references/PhiX/Sanger-SNPs/all/minimap2/phix_unsnipped_short_no_N.fa.mmi /tmp/wr_cwd/0/e/8/dce75fe12433429e1b439b8872bc7693328371/tmp/s0uOqe6xfG/alnphix_bamtofastq_out\tPP:bamcollate2\tVN:2.10-r761", - "@PG\tID:samtools.extra_header\tPN:samtools\tCL:/software/pkgg/samtools/1.11.0/bin/samtools view --threads 3 -u -F 0x900 -\tPP:minimap2\tVN:1.11", - "@PG\tID:bam12auxmerge.extra_header\tPN:bam12auxmerge\tCL:/software/pkgg/biobambam2/2.0.79/bin/bam12auxmerge level=0 rankstrip=1 ranksplit=1 zztoname=0 clipreinsert=1 /tmp/wr_cwd/0/e/8/dce75fe12433429e1b439b8872bc7693328371/tmp/ac_8ARdDJl/tee_collated:td1_out\tPP:samtools\tVN:2.0.79", - "@PG\tID:samtools.1.extra_header\tPN:samtools\tPP:bam12auxmerge\tVN:1.11\tCL:/software/pkgg/samtools/1.11.0/bin/samtools split --threads 4 --output-fmt cram,no_ref=1 -f /lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BAM_basecalls_20201119-090808/no_cal/%!.cram -", - "@PG\tID:samtools.2.extra_header\tPN:samtools\tPP:samtools.1\tVN:1.11\tCL:/software/pkgg/samtools/1.11.0/bin/samtools merge -n -O BAM -l 0 --input-fmt-option no_ref=1 - /lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BAM_basecalls_20201119-090808/no_cal/35528_2#1.cram", - "@PG\tID:spf.extra_header\tPN:spatial_filter\tPP:samtools.2\tDS:A program to apply a spatial filter\tVN:0.13.1\tCL:/software/pkgg/bambi/0.13.1/bin/bambi spatial_filter -a --compression-level 0 -f -l /lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BAM_basecalls_20201119-090808/no_cal/archive/lane2/plex1/35528_2#1.spatial_filter.stats -F /lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BAM_basecalls_20201119-090808/no_cal/35528_2.spatial_filter --rg 35528_2#1 -", - "@PG\tID:bambi.2.extra_header\tPN:bambi\tPP:spf\tVN:0.13.1\tCL:/software/pkgg/bambi/0.13.1/bin/bambi select --compression-level 0 --input /tmp/wr_cwd/5/0/6/86a8369ba62bab2227fd63e2ff1ad119662395/tmp/9RE_mnwwls/ssfqc_tee_ssfqc:straight_through1_out --output /tmp/wr_cwd/5/0/6/86a8369ba62bab2227fd63e2ff1ad119662395/tmp/b6x1p8j3v_/alignment_filter:phix_bam_out_out -n /tmp/wr_cwd/5/0/6/86a8369ba62bab2227fd63e2ff1ad119662395/tmp/IuuBniSlRB/alignment_filter:target_bam_out_out -m 35528_2#1_bam_alignment_filter_metrics.json\tDS:Split alignments into different files", - "@PG\tID:scramble.extra_header\tPN:scramble\tPP:bambi.2\tVN:1.14.9\tCL:/software/pkgg/io_lib/1.14.9/bin/scramble -t 5 -7 -I bam -O cram -x ", - "@PG\tID:samtools.3.extra_header\tPN:samtools\tPP:scramble\tVN:1.15\tCL:/usr/local/bin/samtools view -h /lustre/scratch124/tol/projects/darwin/data/mammals/Meles_meles/genomic_data/mMelMel3/hic-arima2/35528_2#1.cram", - "@PG\tID:samtools.4.extra_header\tPN:samtools\tPP:samtools.3\tVN:1.20\tCL:/usr/local/bin/samtools view --cram 35528_2#1.subset.sam", - "@PG\tID:samtools.5.extra_header\tPN:samtools\tPP:samtools.4\tVN:1.23.1\tCL:samtools view -H 35528_2_1.subset.cram", + "@PG\tID:basecalling.extra_header\tPP:SCS.extra_header\tVN:Unknown\tPN:Unknown\tDS:Basecalling Package", + "@PG\tID:bambi.extra_header\tPP:basecalling.extra_header\tVN:0.13.1\tCL:/software/pkgg/bambi/0.13.1/bin/bambi i2b --intensity-dir=/lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities --basecalls-dir=/lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BaseCalls --lane=2 --platform-unit=201117_A00948_0206_AHGML2DSXY_2 --read-group-id=35528_2 --study-name=\"ERP116890: Sequencing and assembly of genomes from British species for the Darwin Tree of Life Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ \" --sample-alias=SAMEA5962964,mCerEla1 --threads=8 --output-file=- --compression-level=0\tPN:bambi\tDS:Convert Illumina BCL to BAM or SAM file", + "@PG\tID:bambi.1.extra_header\tPN:bambi\tPP:bambi.extra_header\tVN:0.13.1\tCL:/software/pkgg/bambi/0.13.1/bin/bambi decode --metrics-file /lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BAM_basecalls_20201119-090808/35528_2.bam.tag_decode.metrics --barcode-file /lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BAM_basecalls_20201119-090808/metadata_cache_35528/lane_2.taglist --compression-level 0 -", + "@PG\tID:bamcollate2.extra_header\tPN:bamcollate2\tCL:/software/pkgg/biobambam2/2.0.79/bin/bamcollate2 collate=2 level=0\tPP:bambi.1.extra_header\tVN:2.0.79", + "@PG\tID:minimap2.extra_header\tPN:minimap2\tCL:minimap2 -ax sr --MD -t 3 -Y -F 1200 -K 100000000 /lustre/scratch121/npg_repository/references/PhiX/Sanger-SNPs/all/minimap2/phix_unsnipped_short_no_N.fa.mmi /tmp/wr_cwd/0/e/8/dce75fe12433429e1b439b8872bc7693328371/tmp/s0uOqe6xfG/alnphix_bamtofastq_out\tPP:bamcollate2.extra_header\tVN:2.10-r761", + "@PG\tID:samtools.extra_header\tPN:samtools\tCL:/software/pkgg/samtools/1.11.0/bin/samtools view --threads 3 -u -F 0x900 -\tPP:minimap2.extra_header\tVN:1.11", + "@PG\tID:bam12auxmerge.extra_header\tPN:bam12auxmerge\tCL:/software/pkgg/biobambam2/2.0.79/bin/bam12auxmerge level=0 rankstrip=1 ranksplit=1 zztoname=0 clipreinsert=1 /tmp/wr_cwd/0/e/8/dce75fe12433429e1b439b8872bc7693328371/tmp/ac_8ARdDJl/tee_collated:td1_out\tPP:samtools.extra_header\tVN:2.0.79", + "@PG\tID:samtools.1.extra_header\tPN:samtools\tPP:bam12auxmerge.extra_header\tVN:1.11\tCL:/software/pkgg/samtools/1.11.0/bin/samtools split --threads 4 --output-fmt cram,no_ref=1 -f /lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BAM_basecalls_20201119-090808/no_cal/%!.cram -", + "@PG\tID:samtools.2.extra_header\tPN:samtools\tPP:samtools.1.extra_header\tVN:1.11\tCL:/software/pkgg/samtools/1.11.0/bin/samtools merge -n -O BAM -l 0 --input-fmt-option no_ref=1 - /lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BAM_basecalls_20201119-090808/no_cal/35528_2#1.cram", + "@PG\tID:spf.extra_header\tPN:spatial_filter\tPP:samtools.2.extra_header\tDS:A program to apply a spatial filter\tVN:0.13.1\tCL:/software/pkgg/bambi/0.13.1/bin/bambi spatial_filter -a --compression-level 0 -f -l /lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BAM_basecalls_20201119-090808/no_cal/archive/lane2/plex1/35528_2#1.spatial_filter.stats -F /lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BAM_basecalls_20201119-090808/no_cal/35528_2.spatial_filter --rg 35528_2#1 -", + "@PG\tID:bambi.2.extra_header\tPN:bambi\tPP:spf.extra_header\tVN:0.13.1\tCL:/software/pkgg/bambi/0.13.1/bin/bambi select --compression-level 0 --input /tmp/wr_cwd/5/0/6/86a8369ba62bab2227fd63e2ff1ad119662395/tmp/9RE_mnwwls/ssfqc_tee_ssfqc:straight_through1_out --output /tmp/wr_cwd/5/0/6/86a8369ba62bab2227fd63e2ff1ad119662395/tmp/b6x1p8j3v_/alignment_filter:phix_bam_out_out -n /tmp/wr_cwd/5/0/6/86a8369ba62bab2227fd63e2ff1ad119662395/tmp/IuuBniSlRB/alignment_filter:target_bam_out_out -m 35528_2#1_bam_alignment_filter_metrics.json\tDS:Split alignments into different files", + "@PG\tID:scramble.extra_header\tPN:scramble\tPP:bambi.2.extra_header\tVN:1.14.9\tCL:/software/pkgg/io_lib/1.14.9/bin/scramble -t 5 -7 -I bam -O cram -x ", + "@PG\tID:samtools.3.extra_header\tPN:samtools\tPP:scramble.extra_header\tVN:1.15\tCL:/usr/local/bin/samtools view -h /lustre/scratch124/tol/projects/darwin/data/mammals/Meles_meles/genomic_data/mMelMel3/hic-arima2/35528_2#1.cram", + "@PG\tID:samtools.4.extra_header\tPN:samtools\tPP:samtools.3.extra_header\tVN:1.20\tCL:/usr/local/bin/samtools view --cram 35528_2#1.subset.sam", + "@PG\tID:samtools.5.extra_header\tPN:samtools\tPP:samtools.4.extra_header\tVN:1.23.1\tCL:samtools view -H 35528_2_1.subset.cram", "@PG\tID:bwa-mem2\tPN:bwa-mem2\tVN:2.2.1\tCL:bwa-mem2 mem -5SPCp -t 4 ./bwamem2/GCA_922984935.2.subset.unmasked.fa -C -H @RG\\tID:35528_2_1\\tPL:ILLUMINA\\tSM:SAMEA7524440 -", "@PG\tID:samtools\tPN:samtools\tPP:bwa-mem2\tVN:1.22.1\tCL:samtools fixmate -mpu - -", "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.22.1\tCL:samtools view -h", @@ -411,24 +411,12 @@ "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa - 1/35528_2_1.subset_addRG.cram.0.SAMEA7524440.ERR6688402.bam 2/35528_2_1.subset_addRG.cram.1.SAMEA7524440.ERR6688402.bam", "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools markdup -T SAMEA7524440.ERR6688402 -f SAMEA7524440.ERR6688402.metrics --threads 4 --reference GCA_922984935.2.subset.unmasked.fa - SAMEA7524440.ERR6688402.bam", "@PG\tID:crumble\tPN:crumble\tPP:samtools.4\tVN:0.9.1\tCL:crumble -O bam SAMEA7524440.ERR6688402.bam SAMEA7524440.ERR6688402.crumble.bam", - "@PG\tID:samtools.5\tPN:samtools\tPP:bam12auxmerge.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.bam", - "@PG\tID:samtools.6\tPN:samtools\tPP:samtools.2.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.bam", - "@PG\tID:samtools.7\tPN:samtools\tPP:spf.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.bam", - "@PG\tID:samtools.8\tPN:samtools\tPP:samtools.4.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.bam", - "@PG\tID:samtools.9\tPN:samtools\tPP:samtools.5.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.bam", - "@PG\tID:samtools.10\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.bam", - "@PG\tID:samtools.11\tPN:samtools\tPP:samtools.5\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.bam", - "@PG\tID:samtools.12\tPN:samtools\tPP:samtools.6\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.bam", - "@PG\tID:samtools.13\tPN:samtools\tPP:samtools.7\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.bam", - "@PG\tID:samtools.14\tPN:samtools\tPP:samtools.8\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.bam", - "@PG\tID:samtools.15\tPN:samtools\tPP:samtools.9\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.bam", - "@PG\tID:samtools.16\tPN:samtools\tPP:samtools.10\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.bam", - "@PG\tID:samtools.17\tPN:samtools\tPP:samtools.11\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram", - "@PG\tID:samtools.18\tPN:samtools\tPP:samtools.12\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram", - "@PG\tID:samtools.19\tPN:samtools\tPP:samtools.13\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram", - "@PG\tID:samtools.20\tPN:samtools\tPP:samtools.14\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram", - "@PG\tID:samtools.21\tPN:samtools\tPP:samtools.15\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram", - "@PG\tID:samtools.22\tPN:samtools\tPP:samtools.16\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram" + "@PG\tID:samtools.5\tPN:samtools\tPP:samtools.5.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.bam", + "@PG\tID:samtools.6\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.bam", + "@PG\tID:samtools.7\tPN:samtools\tPP:samtools.5\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.bam", + "@PG\tID:samtools.8\tPN:samtools\tPP:samtools.6\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.bam", + "@PG\tID:samtools.9\tPN:samtools\tPP:samtools.7\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram", + "@PG\tID:samtools.10\tPN:samtools\tPP:samtools.8\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram" ], "GCA_922984935.2.subset.illumina.SAMEA7524438.ERR6688599.bwamem2.cram": [ "@HD\tVN:1.6\tSO:coordinate", @@ -481,11 +469,11 @@ "GCA_922984935.2.subset.ont.SAMEA7524440.merged_1.minimap2.cram": [ "@HD\tVN:1.6\tSO:coordinate", "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", - "@RG\tID:PAE35587_pass_1f1f0707_115\tPL:ONT\tSM:mMelMel3", - "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-ont -y -R @RG\\tID:PAE35587_pass_1f1f0707_115\\tPL:ONT\\tSM:mMelMel3 -I1G -a GCA_922984935.2.subset.unmasked.mmi -", - "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o SAMEA7524440.PAE35587_test_other.fastq.gz.0.SAMEA7524440.PAE35587_test.bam -T SAMEA7524440.PAE35587_test_other.fastq.gz.0.SAMEA7524440.PAE35587_test_sort_tmp --write-index -l1 -", - "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa SAMEA7524440.PAE35587_test.merge.bam 1/SAMEA7524440.PAE35587_test_other.fastq.gz.0.SAMEA7524440.PAE35587_test.bam", - "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p SAMEA7524440.merged_1.merge.bam 1/SAMEA7524440.PAE35587_test.merge.bam 2/SAMEA7524440.PAE35587.merge.bam", + "@RG\tID:PAE35587_pass_1f1f0707_115\tPL:ONT\tSM:SAMEA7524440", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-ont -y -R @RG\\tID:PAE35587_pass_1f1f0707_115\\tPL:ONT\\tSM:SAMEA7524440 -I1G -a GCA_922984935.2.subset.unmasked.mmi -", + "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o PAE35587_pass_1f1f0707_115.subset.fastq.gz.0.SAMEA7524440.PAE35587.bam -T PAE35587_pass_1f1f0707_115.subset.fastq.gz.0.SAMEA7524440.PAE35587_sort_tmp --write-index -l1 -", + "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa SAMEA7524440.PAE35587.merge.bam 1/PAE35587_pass_1f1f0707_115.subset.fastq.gz.0.SAMEA7524440.PAE35587.bam", + "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p SAMEA7524440.merged_1.merge.bam 1/SAMEA7524440.PAE35587.merge.bam 2/SAMEA7524440.PAE35587_test.merge.bam", "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.ont.SAMEA7524440.merged_1.minimap2.cram GCA_922984935.2.subset.ont.SAMEA7524440.merged_1.minimap2.bam", "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.ont.SAMEA7524440.merged_1.minimap2.cram" ], @@ -495,45 +483,39 @@ "@RG\tID:61ddc6c3/15--15\tPL:PACBIO\tDS:READTYPE=CCS;BINDINGKIT=101-789-500;SEQUENCINGKIT=101-826-100;BASECALLERVERSION=5.0.0;FRAMERATEHZ=100.000000;BarcodeFile=/lustre/scratch116/vr/projects/vgp/ref/barcodes/Sequel_16_Barcodes_v3.fasta;BarcodeHash=e418d89cefcbef90f3cb0e6455b7e2a3;BarcodeCount=16;BarcodeMode=Symmetric;BarcodeQuality=Score\tLB:DN615654G-A1\tPU:m64094_200910_173211\tPM:SEQUELII\tBC:CACTCACGTGTGATATT\tCM:S/P4-C2/5.0-8M\tSM:SAMEA7524440", "@PG\tID:ccs-4.2.0.extra_header\tPN:ccs\tVN:4.2.0\tDS:Generate circular consensus sequences (ccs) from subreads.\tCL:ccs ccs --chunk 1/64 -j 8 --max-length 50000 ../../m64094_200910_173211.subreads.bam m64094_200910_173211.ccs.bam", "@PG\tID:lima.extra_header\tVN:1.11.0 (commit v1.11.0)\tCL:lima -j 8 --split-bam-named --same --peek-guess --guess-min-count 1000 --ccs m64094_200910_173211.ccs.bam /lustre/scratch116/vr/projects/vgp/ref/barcodes/Sequel_16_Barcodes_v3.fasta lima/m64094_200910_173211.ccs.bam", - "@PG\tID:samtools.extra_header\tPN:samtools\tVN:1.10\tPP:ccs-4.2.0\tCL:samtools merge -@8 -ncp -b m64094_200910_173211.chunks.fofn m64094_200910_173211.ccs.bam", - "@PG\tID:samtools.1.extra_header\tPN:samtools\tPP:samtools\tVN:1.19.2\tCL:samtools view -b -h -N /nfs/users/nfs_m/mm49/READS -o /nfs/users/nfs_m/mm49/x.bam m64094_200910_173211.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.bam", - "@PG\tID:samtools.2.extra_header\tPN:samtools\tPP:samtools.1\tVN:1.23.1\tCL:samtools view -H m64094_200910_173211.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.bam", + "@PG\tID:samtools.extra_header\tPN:samtools\tVN:1.10\tPP:ccs-4.2.0.extra_header\tCL:samtools merge -@8 -ncp -b m64094_200910_173211.chunks.fofn m64094_200910_173211.ccs.bam", + "@PG\tID:samtools.1.extra_header\tPN:samtools\tPP:samtools.extra_header\tVN:1.19.2\tCL:samtools view -b -h -N /nfs/users/nfs_m/mm49/READS -o /nfs/users/nfs_m/mm49/x.bam m64094_200910_173211.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.bam", + "@PG\tID:samtools.2.extra_header\tPN:samtools\tPP:samtools.1.extra_header\tVN:1.23.1\tCL:samtools view -H m64094_200910_173211.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.bam", "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-hifi --cs=short -y -R @RG\\tID:61ddc6c3/15--15\\tPL:PACBIO\\tDS:READTYPE=CCS;BINDINGKIT=101-789-500;SEQUENCINGKIT=101-826-100;BASECALLERVERSION=5.0.0;FRAMERATEHZ=100.000000;BarcodeFile=/lustre/scratch116/vr/projects/vgp/ref/barcodes/Sequel_16_Barcodes_v3.fasta;BarcodeHash=e418d89cefcbef90f3cb0e6455b7e2a3;BarcodeCount=16;BarcodeMode=Symmetric;BarcodeQuality=Score\\tLB:DN615654G-A1\\tPU:m64094_200910_173211\\tPM:SEQUELII\\tBC:CACTCACGTGTGATATT\\tCM:S/P4-C2/5.0-8M\\tSM:SAMEA7524440 -I1G -a GCA_922984935.2.subset.unmasked.mmi -", "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o pacbio.SAMEA7524440.ERR6939248.hifitrimmer.fastq.gz.0.SAMEA7524440.ERR6939248.bam -T pacbio.SAMEA7524440.ERR6939248.hifitrimmer.fastq.gz.0.SAMEA7524440.ERR6939248_sort_tmp --write-index -l1 -", "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa SAMEA7524440.ERR6939248.merge.bam 1/pacbio.SAMEA7524440.ERR6939248.hifitrimmer.fastq.gz.0.SAMEA7524440.ERR6939248.bam", "@PG\tID:crumble\tPN:crumble\tPP:samtools.1\tVN:0.9.1\tCL:crumble -y pbccs -O bam SAMEA7524440.ERR6939248.merge.bam SAMEA7524440.ERR6939248.merge.crumble.bam", - "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.bam", - "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.bam", - "@PG\tID:samtools.4\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.bam", - "@PG\tID:samtools.5\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.cram GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.bam", - "@PG\tID:samtools.6\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.cram GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.bam", - "@PG\tID:samtools.7\tPN:samtools\tPP:samtools.4\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.cram GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.bam", - "@PG\tID:samtools.8\tPN:samtools\tPP:samtools.5\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.cram", - "@PG\tID:samtools.9\tPN:samtools\tPP:samtools.6\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.cram", - "@PG\tID:samtools.10\tPN:samtools\tPP:samtools.7\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.cram" + "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.2.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.bam", + "@PG\tID:samtools.3\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.bam", + "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.cram GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.bam", + "@PG\tID:samtools.5\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.cram GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.bam", + "@PG\tID:samtools.6\tPN:samtools\tPP:samtools.4\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.cram", + "@PG\tID:samtools.7\tPN:samtools\tPP:samtools.5\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.cram" ], "GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.cram": [ "@HD\tVN:1.6\tSO:coordinate", "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", "@RG\tID:m64094_200911_174739\tPL:PACBIO\tSM:SAMEA7524440", "@PG\tID:samtools.extra_header\tPN:samtools\tVN:1.22.1\tCL:samtools collate --output-fmt cram -O -u -T mMelMel3_T4.collate --threads 4 --reference GCA_922984935.2.subset.unmasked.fasta m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.fastq.gz -", - "@PG\tID:samtools.1.extra_header\tPN:samtools\tPP:samtools\tVN:1.22.1\tCL:samtools fixmate -m -u --threads 4 - -", - "@PG\tID:samtools.2.extra_header\tPN:samtools\tPP:samtools.1\tVN:1.22.1\tCL:samtools sort -u -T mMelMel3_T4.sort --threads 4 -", - "@PG\tID:samtools.3.extra_header\tPN:samtools\tPP:samtools.2\tVN:1.22.1\tCL:samtools markdup -T mMelMel3_T4.markdup -f mMelMel3_T4.metrics --threads 4 - mMelMel3_T4.cram", - "@PG\tID:samtools.4.extra_header\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools view -H m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.cram", + "@PG\tID:samtools.1.extra_header\tPN:samtools\tPP:samtools.extra_header\tVN:1.22.1\tCL:samtools fixmate -m -u --threads 4 - -", + "@PG\tID:samtools.2.extra_header\tPN:samtools\tPP:samtools.1.extra_header\tVN:1.22.1\tCL:samtools sort -u -T mMelMel3_T4.sort --threads 4 -", + "@PG\tID:samtools.3.extra_header\tPN:samtools\tPP:samtools.2.extra_header\tVN:1.22.1\tCL:samtools markdup -T mMelMel3_T4.markdup -f mMelMel3_T4.metrics --threads 4 - mMelMel3_T4.cram", + "@PG\tID:samtools.4.extra_header\tPN:samtools\tPP:samtools.3.extra_header\tVN:1.23.1\tCL:samtools view -H m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.cram", "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-hifi --cs=short -y -R @RG\\tID:m64094_200911_174739\\tPL:PACBIO\\tSM:SAMEA7524440 -I1G -a GCA_922984935.2.subset.unmasked.mmi -", "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o pacbio.SAMEA7524440.ERR6939249.hifitrimmer.fastq.gz.0.SAMEA7524440.ERR6939249.bam -T pacbio.SAMEA7524440.ERR6939249.hifitrimmer.fastq.gz.0.SAMEA7524440.ERR6939249_sort_tmp --write-index -l1 -", "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa SAMEA7524440.ERR6939249.merge.bam 1/pacbio.SAMEA7524440.ERR6939249.hifitrimmer.fastq.gz.0.SAMEA7524440.ERR6939249.bam", "@PG\tID:crumble\tPN:crumble\tPP:samtools.1\tVN:0.9.1\tCL:crumble -y pbccs -O bam SAMEA7524440.ERR6939249.merge.bam SAMEA7524440.ERR6939249.merge.crumble.bam", - "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", - "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", - "@PG\tID:samtools.4\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", - "@PG\tID:samtools.5\tPN:samtools\tPP:samtools.3.extra_header\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.cram GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", - "@PG\tID:samtools.6\tPN:samtools\tPP:samtools.4.extra_header\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.cram GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", - "@PG\tID:samtools.7\tPN:samtools\tPP:samtools.4\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.cram GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", - "@PG\tID:samtools.8\tPN:samtools\tPP:samtools.5\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.cram", - "@PG\tID:samtools.9\tPN:samtools\tPP:samtools.6\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.cram", - "@PG\tID:samtools.10\tPN:samtools\tPP:samtools.7\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.cram" + "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.4.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", + "@PG\tID:samtools.3\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", + "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.cram GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", + "@PG\tID:samtools.5\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.cram GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", + "@PG\tID:samtools.6\tPN:samtools\tPP:samtools.4\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.cram", + "@PG\tID:samtools.7\tPN:samtools\tPP:samtools.5\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.cram" ], "GCA_922984935.2.subset.pacbio.SAMEA7524440.merged_1.minimap2.cram": [ "@HD\tVN:1.6\tSO:coordinate", @@ -558,6 +540,6 @@ "nf-test": "0.9.3", "nextflow": "25.10.4" }, - "timestamp": "2026-05-29T01:57:02.637423352" + "timestamp": "2026-05-29T03:22:38.8477332" } } \ No newline at end of file diff --git a/tests/short_aligner_minimap2.nf.test.snap b/tests/short_aligner_minimap2.nf.test.snap index c48be2e6..8926f46d 100644 --- a/tests/short_aligner_minimap2.nf.test.snap +++ b/tests/short_aligner_minimap2.nf.test.snap @@ -1,7 +1,7 @@ { "-profile test --short_aligner minimap2 --outfmt 'bam,cram'": { "content": [ - 79, + 81, { "BGZIP_BEDGRAPH": { "samtools": "1.23.1" @@ -46,6 +46,9 @@ "SAMTOOLS_ADDREPLACERG": { "samtools": "1.23.1" }, + "SAMTOOLS_ADD_PG": { + "samtools": "1.23.1" + }, "SAMTOOLS_CRAM": { "samtools": "1.23.1" }, @@ -224,15 +227,34 @@ "GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.bam": [ "@HD\tVN:1.6\tSO:coordinate", "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", - "@RG\tID:35528_2#1\tDT:2020-11-17T00:00:00+0000\tPU:201117_A00948_0206_AHGML2DSXY_2#1\tLB:33637906\tPG:SCS\tSM:SAMEA5962964\tCN:SC\tPL:ILLUMINA\tDS:ERP116890: Sequencing and assembly of genomes from British species for the Darwin Tree of Life Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ ", - "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax sr --cs=short -I1.0G -y -R @RG\\tID:35528_2#1\\tDT:2020-11-17T00:00:00+0000\\tPU:201117_A00948_0206_AHGML2DSXY_2#1\\tLB:33637906\\tPG:SCS\\tSM:SAMEA5962964\\tCN:SC\\tPL:ILLUMINA\\tDS:ERP116890: Sequencing and assembly of genomes from British species for the Darwin Tree of Life Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ GCA_922984935.2.subset.unmasked.mmi -", + "@RG\tID:35528_2_1\tPL:ILLUMINA\tSM:SAMEA7524440", + "@PG\tID:SCS.extra_header\tVN:1.7.0\tPN:NovaSeq Control Software\tDS:Controlling software on instrument", + "@PG\tID:basecalling.extra_header\tPP:SCS.extra_header\tVN:Unknown\tPN:Unknown\tDS:Basecalling Package", + "@PG\tID:bambi.extra_header\tPP:basecalling.extra_header\tVN:0.13.1\tCL:/software/pkgg/bambi/0.13.1/bin/bambi i2b --intensity-dir=/lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities --basecalls-dir=/lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BaseCalls --lane=2 --platform-unit=201117_A00948_0206_AHGML2DSXY_2 --read-group-id=35528_2 --study-name=\"ERP116890: Sequencing and assembly of genomes from British species for the Darwin Tree of Life Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ \" --sample-alias=SAMEA5962964,mCerEla1 --threads=8 --output-file=- --compression-level=0\tPN:bambi\tDS:Convert Illumina BCL to BAM or SAM file", + "@PG\tID:bambi.1.extra_header\tPN:bambi\tPP:bambi.extra_header\tVN:0.13.1\tCL:/software/pkgg/bambi/0.13.1/bin/bambi decode --metrics-file /lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BAM_basecalls_20201119-090808/35528_2.bam.tag_decode.metrics --barcode-file /lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BAM_basecalls_20201119-090808/metadata_cache_35528/lane_2.taglist --compression-level 0 -", + "@PG\tID:bamcollate2.extra_header\tPN:bamcollate2\tCL:/software/pkgg/biobambam2/2.0.79/bin/bamcollate2 collate=2 level=0\tPP:bambi.1.extra_header\tVN:2.0.79", + "@PG\tID:minimap2.extra_header\tPN:minimap2\tCL:minimap2 -ax sr --MD -t 3 -Y -F 1200 -K 100000000 /lustre/scratch121/npg_repository/references/PhiX/Sanger-SNPs/all/minimap2/phix_unsnipped_short_no_N.fa.mmi /tmp/wr_cwd/0/e/8/dce75fe12433429e1b439b8872bc7693328371/tmp/s0uOqe6xfG/alnphix_bamtofastq_out\tPP:bamcollate2.extra_header\tVN:2.10-r761", + "@PG\tID:samtools.extra_header\tPN:samtools\tCL:/software/pkgg/samtools/1.11.0/bin/samtools view --threads 3 -u -F 0x900 -\tPP:minimap2.extra_header\tVN:1.11", + "@PG\tID:bam12auxmerge.extra_header\tPN:bam12auxmerge\tCL:/software/pkgg/biobambam2/2.0.79/bin/bam12auxmerge level=0 rankstrip=1 ranksplit=1 zztoname=0 clipreinsert=1 /tmp/wr_cwd/0/e/8/dce75fe12433429e1b439b8872bc7693328371/tmp/ac_8ARdDJl/tee_collated:td1_out\tPP:samtools.extra_header\tVN:2.0.79", + "@PG\tID:samtools.1.extra_header\tPN:samtools\tPP:bam12auxmerge.extra_header\tVN:1.11\tCL:/software/pkgg/samtools/1.11.0/bin/samtools split --threads 4 --output-fmt cram,no_ref=1 -f /lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BAM_basecalls_20201119-090808/no_cal/%!.cram -", + "@PG\tID:samtools.2.extra_header\tPN:samtools\tPP:samtools.1.extra_header\tVN:1.11\tCL:/software/pkgg/samtools/1.11.0/bin/samtools merge -n -O BAM -l 0 --input-fmt-option no_ref=1 - /lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BAM_basecalls_20201119-090808/no_cal/35528_2#1.cram", + "@PG\tID:spf.extra_header\tPN:spatial_filter\tPP:samtools.2.extra_header\tDS:A program to apply a spatial filter\tVN:0.13.1\tCL:/software/pkgg/bambi/0.13.1/bin/bambi spatial_filter -a --compression-level 0 -f -l /lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BAM_basecalls_20201119-090808/no_cal/archive/lane2/plex1/35528_2#1.spatial_filter.stats -F /lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BAM_basecalls_20201119-090808/no_cal/35528_2.spatial_filter --rg 35528_2#1 -", + "@PG\tID:bambi.2.extra_header\tPN:bambi\tPP:spf.extra_header\tVN:0.13.1\tCL:/software/pkgg/bambi/0.13.1/bin/bambi select --compression-level 0 --input /tmp/wr_cwd/5/0/6/86a8369ba62bab2227fd63e2ff1ad119662395/tmp/9RE_mnwwls/ssfqc_tee_ssfqc:straight_through1_out --output /tmp/wr_cwd/5/0/6/86a8369ba62bab2227fd63e2ff1ad119662395/tmp/b6x1p8j3v_/alignment_filter:phix_bam_out_out -n /tmp/wr_cwd/5/0/6/86a8369ba62bab2227fd63e2ff1ad119662395/tmp/IuuBniSlRB/alignment_filter:target_bam_out_out -m 35528_2#1_bam_alignment_filter_metrics.json\tDS:Split alignments into different files", + "@PG\tID:scramble.extra_header\tPN:scramble\tPP:bambi.2.extra_header\tVN:1.14.9\tCL:/software/pkgg/io_lib/1.14.9/bin/scramble -t 5 -7 -I bam -O cram -x ", + "@PG\tID:samtools.3.extra_header\tPN:samtools\tPP:scramble.extra_header\tVN:1.15\tCL:/usr/local/bin/samtools view -h /lustre/scratch124/tol/projects/darwin/data/mammals/Meles_meles/genomic_data/mMelMel3/hic-arima2/35528_2#1.cram", + "@PG\tID:samtools.4.extra_header\tPN:samtools\tPP:samtools.3.extra_header\tVN:1.20\tCL:/usr/local/bin/samtools view --cram 35528_2#1.subset.sam", + "@PG\tID:samtools.5.extra_header\tPN:samtools\tPP:samtools.4.extra_header\tVN:1.23.1\tCL:samtools view -H 35528_2_1.subset.cram", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax sr --cs=short -I1.0G -y -R @RG\\tID:35528_2_1\\tPL:ILLUMINA\\tSM:SAMEA7524440 GCA_922984935.2.subset.unmasked.mmi -", "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.22.1\tCL:samtools fixmate -mpu - -", "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.22.1\tCL:samtools view -h", - "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.22.1\tCL:samtools sort --write-index -l1 -@4 -T 35528_2_1.subset.cram.0.SAMEA7524440.ERR6688402_tmp -o 35528_2_1.subset.cram.0.SAMEA7524440.ERR6688402.bam -", - "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa - 1/35528_2_1.subset.cram.0.SAMEA7524440.ERR6688402.bam 2/35528_2_1.subset.cram.1.SAMEA7524440.ERR6688402.bam", + "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.22.1\tCL:samtools sort --write-index -l1 -@4 -T 35528_2_1.subset_addRG.cram.0.SAMEA7524440.ERR6688402_tmp -o 35528_2_1.subset_addRG.cram.0.SAMEA7524440.ERR6688402.bam -", + "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa - 1/35528_2_1.subset_addRG.cram.0.SAMEA7524440.ERR6688402.bam 2/35528_2_1.subset_addRG.cram.1.SAMEA7524440.ERR6688402.bam", "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools markdup -T SAMEA7524440.ERR6688402 -f SAMEA7524440.ERR6688402.metrics --threads 4 --reference GCA_922984935.2.subset.unmasked.fa - SAMEA7524440.ERR6688402.bam", "@PG\tID:crumble\tPN:crumble\tPP:samtools.4\tVN:0.9.1\tCL:crumble -O bam SAMEA7524440.ERR6688402.bam SAMEA7524440.ERR6688402.crumble.bam", - "@PG\tID:samtools.5\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.bam" + "@PG\tID:samtools.5\tPN:samtools\tPP:samtools.5.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.bam", + "@PG\tID:samtools.6\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.bam", + "@PG\tID:samtools.7\tPN:samtools\tPP:samtools.5\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.bam", + "@PG\tID:samtools.8\tPN:samtools\tPP:samtools.6\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.bam" ], "GCA_922984935.2.subset.illumina.SAMEA7524438.ERR6688599.minimap2.bam": [ "@HD\tVN:1.6\tSO:coordinate", @@ -265,16 +287,36 @@ "GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.cram": [ "@HD\tVN:1.6\tSO:coordinate", "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", - "@RG\tID:35528_2#1\tDT:2020-11-17T00:00:00+0000\tPU:201117_A00948_0206_AHGML2DSXY_2#1\tLB:33637906\tPG:SCS\tSM:SAMEA5962964\tCN:SC\tPL:ILLUMINA\tDS:ERP116890: Sequencing and assembly of genomes from British species for the Darwin Tree of Life Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ ", - "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax sr --cs=short -I1.0G -y -R @RG\\tID:35528_2#1\\tDT:2020-11-17T00:00:00+0000\\tPU:201117_A00948_0206_AHGML2DSXY_2#1\\tLB:33637906\\tPG:SCS\\tSM:SAMEA5962964\\tCN:SC\\tPL:ILLUMINA\\tDS:ERP116890: Sequencing and assembly of genomes from British species for the Darwin Tree of Life Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ GCA_922984935.2.subset.unmasked.mmi -", + "@RG\tID:35528_2_1\tPL:ILLUMINA\tSM:SAMEA7524440", + "@PG\tID:SCS.extra_header\tVN:1.7.0\tPN:NovaSeq Control Software\tDS:Controlling software on instrument", + "@PG\tID:basecalling.extra_header\tPP:SCS.extra_header\tVN:Unknown\tPN:Unknown\tDS:Basecalling Package", + "@PG\tID:bambi.extra_header\tPP:basecalling.extra_header\tVN:0.13.1\tCL:/software/pkgg/bambi/0.13.1/bin/bambi i2b --intensity-dir=/lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities --basecalls-dir=/lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BaseCalls --lane=2 --platform-unit=201117_A00948_0206_AHGML2DSXY_2 --read-group-id=35528_2 --study-name=\"ERP116890: Sequencing and assembly of genomes from British species for the Darwin Tree of Life Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ \" --sample-alias=SAMEA5962964,mCerEla1 --threads=8 --output-file=- --compression-level=0\tPN:bambi\tDS:Convert Illumina BCL to BAM or SAM file", + "@PG\tID:bambi.1.extra_header\tPN:bambi\tPP:bambi.extra_header\tVN:0.13.1\tCL:/software/pkgg/bambi/0.13.1/bin/bambi decode --metrics-file /lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BAM_basecalls_20201119-090808/35528_2.bam.tag_decode.metrics --barcode-file /lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BAM_basecalls_20201119-090808/metadata_cache_35528/lane_2.taglist --compression-level 0 -", + "@PG\tID:bamcollate2.extra_header\tPN:bamcollate2\tCL:/software/pkgg/biobambam2/2.0.79/bin/bamcollate2 collate=2 level=0\tPP:bambi.1.extra_header\tVN:2.0.79", + "@PG\tID:minimap2.extra_header\tPN:minimap2\tCL:minimap2 -ax sr --MD -t 3 -Y -F 1200 -K 100000000 /lustre/scratch121/npg_repository/references/PhiX/Sanger-SNPs/all/minimap2/phix_unsnipped_short_no_N.fa.mmi /tmp/wr_cwd/0/e/8/dce75fe12433429e1b439b8872bc7693328371/tmp/s0uOqe6xfG/alnphix_bamtofastq_out\tPP:bamcollate2.extra_header\tVN:2.10-r761", + "@PG\tID:samtools.extra_header\tPN:samtools\tCL:/software/pkgg/samtools/1.11.0/bin/samtools view --threads 3 -u -F 0x900 -\tPP:minimap2.extra_header\tVN:1.11", + "@PG\tID:bam12auxmerge.extra_header\tPN:bam12auxmerge\tCL:/software/pkgg/biobambam2/2.0.79/bin/bam12auxmerge level=0 rankstrip=1 ranksplit=1 zztoname=0 clipreinsert=1 /tmp/wr_cwd/0/e/8/dce75fe12433429e1b439b8872bc7693328371/tmp/ac_8ARdDJl/tee_collated:td1_out\tPP:samtools.extra_header\tVN:2.0.79", + "@PG\tID:samtools.1.extra_header\tPN:samtools\tPP:bam12auxmerge.extra_header\tVN:1.11\tCL:/software/pkgg/samtools/1.11.0/bin/samtools split --threads 4 --output-fmt cram,no_ref=1 -f /lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BAM_basecalls_20201119-090808/no_cal/%!.cram -", + "@PG\tID:samtools.2.extra_header\tPN:samtools\tPP:samtools.1.extra_header\tVN:1.11\tCL:/software/pkgg/samtools/1.11.0/bin/samtools merge -n -O BAM -l 0 --input-fmt-option no_ref=1 - /lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BAM_basecalls_20201119-090808/no_cal/35528_2#1.cram", + "@PG\tID:spf.extra_header\tPN:spatial_filter\tPP:samtools.2.extra_header\tDS:A program to apply a spatial filter\tVN:0.13.1\tCL:/software/pkgg/bambi/0.13.1/bin/bambi spatial_filter -a --compression-level 0 -f -l /lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BAM_basecalls_20201119-090808/no_cal/archive/lane2/plex1/35528_2#1.spatial_filter.stats -F /lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BAM_basecalls_20201119-090808/no_cal/35528_2.spatial_filter --rg 35528_2#1 -", + "@PG\tID:bambi.2.extra_header\tPN:bambi\tPP:spf.extra_header\tVN:0.13.1\tCL:/software/pkgg/bambi/0.13.1/bin/bambi select --compression-level 0 --input /tmp/wr_cwd/5/0/6/86a8369ba62bab2227fd63e2ff1ad119662395/tmp/9RE_mnwwls/ssfqc_tee_ssfqc:straight_through1_out --output /tmp/wr_cwd/5/0/6/86a8369ba62bab2227fd63e2ff1ad119662395/tmp/b6x1p8j3v_/alignment_filter:phix_bam_out_out -n /tmp/wr_cwd/5/0/6/86a8369ba62bab2227fd63e2ff1ad119662395/tmp/IuuBniSlRB/alignment_filter:target_bam_out_out -m 35528_2#1_bam_alignment_filter_metrics.json\tDS:Split alignments into different files", + "@PG\tID:scramble.extra_header\tPN:scramble\tPP:bambi.2.extra_header\tVN:1.14.9\tCL:/software/pkgg/io_lib/1.14.9/bin/scramble -t 5 -7 -I bam -O cram -x ", + "@PG\tID:samtools.3.extra_header\tPN:samtools\tPP:scramble.extra_header\tVN:1.15\tCL:/usr/local/bin/samtools view -h /lustre/scratch124/tol/projects/darwin/data/mammals/Meles_meles/genomic_data/mMelMel3/hic-arima2/35528_2#1.cram", + "@PG\tID:samtools.4.extra_header\tPN:samtools\tPP:samtools.3.extra_header\tVN:1.20\tCL:/usr/local/bin/samtools view --cram 35528_2#1.subset.sam", + "@PG\tID:samtools.5.extra_header\tPN:samtools\tPP:samtools.4.extra_header\tVN:1.23.1\tCL:samtools view -H 35528_2_1.subset.cram", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax sr --cs=short -I1.0G -y -R @RG\\tID:35528_2_1\\tPL:ILLUMINA\\tSM:SAMEA7524440 GCA_922984935.2.subset.unmasked.mmi -", "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.22.1\tCL:samtools fixmate -mpu - -", "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.22.1\tCL:samtools view -h", - "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.22.1\tCL:samtools sort --write-index -l1 -@4 -T 35528_2_1.subset.cram.0.SAMEA7524440.ERR6688402_tmp -o 35528_2_1.subset.cram.0.SAMEA7524440.ERR6688402.bam -", - "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa - 1/35528_2_1.subset.cram.0.SAMEA7524440.ERR6688402.bam 2/35528_2_1.subset.cram.1.SAMEA7524440.ERR6688402.bam", + "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.22.1\tCL:samtools sort --write-index -l1 -@4 -T 35528_2_1.subset_addRG.cram.0.SAMEA7524440.ERR6688402_tmp -o 35528_2_1.subset_addRG.cram.0.SAMEA7524440.ERR6688402.bam -", + "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa - 1/35528_2_1.subset_addRG.cram.0.SAMEA7524440.ERR6688402.bam 2/35528_2_1.subset_addRG.cram.1.SAMEA7524440.ERR6688402.bam", "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools markdup -T SAMEA7524440.ERR6688402 -f SAMEA7524440.ERR6688402.metrics --threads 4 --reference GCA_922984935.2.subset.unmasked.fa - SAMEA7524440.ERR6688402.bam", "@PG\tID:crumble\tPN:crumble\tPP:samtools.4\tVN:0.9.1\tCL:crumble -O bam SAMEA7524440.ERR6688402.bam SAMEA7524440.ERR6688402.crumble.bam", - "@PG\tID:samtools.5\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.cram GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.bam", - "@PG\tID:samtools.6\tPN:samtools\tPP:samtools.5\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.cram" + "@PG\tID:samtools.5\tPN:samtools\tPP:samtools.5.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.bam", + "@PG\tID:samtools.6\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.bam", + "@PG\tID:samtools.7\tPN:samtools\tPP:samtools.5\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.cram GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.bam", + "@PG\tID:samtools.8\tPN:samtools\tPP:samtools.6\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.cram GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.bam", + "@PG\tID:samtools.9\tPN:samtools\tPP:samtools.7\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.cram", + "@PG\tID:samtools.10\tPN:samtools\tPP:samtools.8\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.cram" ], "GCA_922984935.2.subset.illumina.SAMEA7524438.ERR6688599.minimap2.cram": [ "@HD\tVN:1.6\tSO:coordinate", @@ -313,6 +355,6 @@ "nf-test": "0.9.3", "nextflow": "25.10.4" }, - "timestamp": "2026-05-29T01:22:33.94399251" + "timestamp": "2026-05-29T03:07:26.580580159" } } \ No newline at end of file diff --git a/tests/untrim.nf.test.snap b/tests/untrim.nf.test.snap index 5ebff3c9..1b98a7cb 100644 --- a/tests/untrim.nf.test.snap +++ b/tests/untrim.nf.test.snap @@ -222,20 +222,18 @@ "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/resources/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", "@RG\tID:m64094_200911_174739\tPL:PACBIO\tSM:SAMEA7524440", "@PG\tID:samtools.extra_header\tPN:samtools\tVN:1.22.1\tCL:samtools collate --output-fmt cram -O -u -T mMelMel3_T4.collate --threads 4 --reference GCA_922984935.2.subset.unmasked.fasta m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.fastq.gz -", - "@PG\tID:samtools.1.extra_header\tPN:samtools\tPP:samtools\tVN:1.22.1\tCL:samtools fixmate -m -u --threads 4 - -", - "@PG\tID:samtools.2.extra_header\tPN:samtools\tPP:samtools.1\tVN:1.22.1\tCL:samtools sort -u -T mMelMel3_T4.sort --threads 4 -", - "@PG\tID:samtools.3.extra_header\tPN:samtools\tPP:samtools.2\tVN:1.22.1\tCL:samtools markdup -T mMelMel3_T4.markdup -f mMelMel3_T4.metrics --threads 4 - mMelMel3_T4.cram", - "@PG\tID:samtools.4.extra_header\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools view -H m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.cram", + "@PG\tID:samtools.1.extra_header\tPN:samtools\tPP:samtools.extra_header\tVN:1.22.1\tCL:samtools fixmate -m -u --threads 4 - -", + "@PG\tID:samtools.2.extra_header\tPN:samtools\tPP:samtools.1.extra_header\tVN:1.22.1\tCL:samtools sort -u -T mMelMel3_T4.sort --threads 4 -", + "@PG\tID:samtools.3.extra_header\tPN:samtools\tPP:samtools.2.extra_header\tVN:1.22.1\tCL:samtools markdup -T mMelMel3_T4.markdup -f mMelMel3_T4.metrics --threads 4 - mMelMel3_T4.cram", + "@PG\tID:samtools.4.extra_header\tPN:samtools\tPP:samtools.3.extra_header\tVN:1.23.1\tCL:samtools view -H m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.cram", "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-hifi --cs=short -y -R @RG\\tID:m64094_200911_174739\\tPL:PACBIO\\tSM:SAMEA7524440 -I1G -a GCA_922984935.2.subset.unmasked.mmi -", "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.fastq.gz.0.SAMEA7524440.ERR6939249.bam -T m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.fastq.gz.0.SAMEA7524440.ERR6939249_sort_tmp --write-index -l1 -", "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa SAMEA7524440.ERR6939249.merge.bam 1/m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.fastq.gz.0.SAMEA7524440.ERR6939249.bam", "@PG\tID:crumble\tPN:crumble\tPP:samtools.1\tVN:0.9.1\tCL:crumble -y pbccs -O bam SAMEA7524440.ERR6939249.merge.bam SAMEA7524440.ERR6939249.merge.crumble.bam", - "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", - "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", - "@PG\tID:samtools.4\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", - "@PG\tID:samtools.5\tPN:samtools\tPP:samtools.3.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", - "@PG\tID:samtools.6\tPN:samtools\tPP:samtools.4.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", - "@PG\tID:samtools.7\tPN:samtools\tPP:samtools.4\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam" + "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.4.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", + "@PG\tID:samtools.3\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", + "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", + "@PG\tID:samtools.5\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam" ], "GCA_922984935.2.subset.pacbio.SAMEA7524440.merged_1.minimap2.bam": [ "@HD\tVN:1.6\tSO:coordinate", @@ -261,6 +259,6 @@ "nf-test": "0.9.3", "nextflow": "25.10.4" }, - "timestamp": "2026-05-29T01:47:41.430447254" + "timestamp": "2026-05-29T03:12:18.823237748" } } \ No newline at end of file From bf2636393b4169a91b68d32b47290d67071a35cb Mon Sep 17 00:00:00 2001 From: sainsachiko Date: Fri, 29 May 2026 03:27:14 +0100 Subject: [PATCH 09/20] Fix grammar --- docs/usage.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/usage.md b/docs/usage.md index e11bff39..4c9294da 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -40,15 +40,15 @@ specimen2,run4,pacbio,pacbio1.bam,uli,,headers/pacbio_rg.sam specimen3,run5,pacbio,pacbio2.bam,,, ``` -| Column | Description | -| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `specimen` | Identifier of the specimen. Usually a BioSpecimen accession, i,e. `SAMEA7521529`. | -| `run` | Identifier of the sequencing run. Usually the accession number of the data in INSDC. For example,`ERR9248445` (hic), `ERR9284044` (pacbio). | -| `datatype` | Type of sequencing data. Must be one of `hic`, `illumina`, `pacbio`, `pacbio_clr`, or `ont`. | -| `datafile` | Full path to read data file. Must be `bam`, `cram`, `fastq.gz` or `fq.gz` for `illumina` and `hic`. Must be `bam`, `fastq.gz` or `fq.gz` for `pacbio`, `pacbio_clr`, and `ont`. Note that FASTQ inputs should be interleaved if paired-end. | -| `library` | (Optional) The library value is a unique identifier which is assigned to read group (`@RG`) ID. If the library name is not specified, the pipeline will auto-create library name using the data filename provided in the samplesheet. | -| `barcode` | (Optional) Barcode identifier used to trim barcode adapter for PacBio reads. If empty, barcode-specific adapter sequences will not be trimmed. | -| `extra_header` | (Optional) Path to a SAM file containing additional SAM header lines including `@RG`, `@PG`. These information will be injected into output BAM/CRAM headers. `@RG` lines are overwritten, while `@PG` lines are added to the existing headers (auto add `.extra_header` to `@PG ID`). | +| Column | Description | +| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `specimen` | Identifier of the specimen. Usually a BioSpecimen accession, i,e. `SAMEA7521529`. | +| `run` | Identifier of the sequencing run. Usually the accession number of the data in INSDC. For example,`ERR9248445` (hic), `ERR9284044` (pacbio). | +| `datatype` | Type of sequencing data. Must be one of `hic`, `illumina`, `pacbio`, `pacbio_clr`, or `ont`. | +| `datafile` | Full path to read data file. Must be `bam`, `cram`, `fastq.gz` or `fq.gz` for `illumina` and `hic`. Must be `bam`, `fastq.gz` or `fq.gz` for `pacbio`, `pacbio_clr`, and `ont`. Note that FASTQ inputs should be interleaved if paired-end. | +| `library` | (Optional) The library value is a unique identifier which is assigned to read group (`@RG`) ID. If the library name is not specified, the pipeline will auto-create library name using the data filename provided in the samplesheet. | +| `barcode` | (Optional) Barcode identifier used to trim barcode adapter for PacBio reads. If empty, barcode-specific adapter sequences will not be trimmed. | +| `extra_header` | (Optional) Path to a SAM file containing additional SAM header lines including `@RG`, `@PG`. This information will be injected into output BAM/CRAM headers. `@RG` lines are overwritten, while `@PG` lines are added to the existing headers (auto add `.extra_header` to `@PG ID`). | An [example samplesheet](../assets/samplesheet.csv) has been provided with the pipeline. From 61a9d06295b1e9c1a1858e1ffae127d5c2324741 Mon Sep 17 00:00:00 2001 From: sainsachiko Date: Fri, 29 May 2026 04:11:14 +0100 Subject: [PATCH 10/20] For test no header, keep filename only --- tests/uli.nf.test | 2 +- tests/uli.nf.test.snap | 18 +++++++++--------- tests/uli_no_lima.nf.test | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/uli.nf.test b/tests/uli.nf.test index befcb382..a21e05a1 100644 --- a/tests/uli.nf.test +++ b/tests/uli.nf.test @@ -34,7 +34,7 @@ nextflow_pipeline { lines .collect { line -> line.toString() - .replaceAll(/\bUR:\/(?:([^\/\s]+)\/([^\/\s]+)\/([^\/\s]+))\/\S+/, 'UR:/$1/$2/$3/') + .replaceAll(/\bUR:\/(?:[^\/\s]+\/)*([^\/\s]+)/, 'UR:$1') .replaceAll(/(^|\s)\/(?:[^\s\/]+\/)+[^\s\/]+/, '$1') } } diff --git a/tests/uli.nf.test.snap b/tests/uli.nf.test.snap index cbc2ae1b..31372cd3 100644 --- a/tests/uli.nf.test.snap +++ b/tests/uli.nf.test.snap @@ -175,10 +175,10 @@ { "GCA_964034985.1.subset.pacbio.SAMEA114784749.ERR14209104.minimap2.cram": [ "@HD\tVN:1.6\tSO:coordinate", - "@SQ\tSN:CAXIUN010000020.1\tLN:15094\tM5:eb4b4e09fa2962e012fc983eeb6b65dc\tUR:/lustre/scratch124/tol/", - "@SQ\tSN:CAXIUN010000038.1\tLN:1000\tM5:3fe8a9b5a85c60b19e74e88ca5ca434e\tUR:/lustre/scratch124/tol/", - "@SQ\tSN:CAXIUN010000104.1\tLN:10110\tM5:10013ae295fb0e1a002ab812d6c2e77e\tUR:/lustre/scratch124/tol/", - "@SQ\tSN:CAXIUN010000129.1\tLN:29940\tM5:9579779c87681c88e68a924f572f5599\tUR:/lustre/scratch124/tol/", + "@SQ\tSN:CAXIUN010000020.1\tLN:15094\tM5:eb4b4e09fa2962e012fc983eeb6b65dc\tUR:GCA_964034985.1.subset.unmasked.fa", + "@SQ\tSN:CAXIUN010000038.1\tLN:1000\tM5:3fe8a9b5a85c60b19e74e88ca5ca434e\tUR:GCA_964034985.1.subset.unmasked.fa", + "@SQ\tSN:CAXIUN010000104.1\tLN:10110\tM5:10013ae295fb0e1a002ab812d6c2e77e\tUR:GCA_964034985.1.subset.unmasked.fa", + "@SQ\tSN:CAXIUN010000129.1\tLN:29940\tM5:9579779c87681c88e68a924f572f5599\tUR:GCA_964034985.1.subset.unmasked.fa", "@RG\tID:0de7f0a4/27--27\tPL:PACBIO\tDS:READTYPE=CCS;Ipd:CodecV1=ip;PulseWidth:CodecV1=pw;BINDINGKIT=102-739-100;SEQUENCINGKIT=102-118-800;BASECALLERVERSION=5.0;SMRTCELLKIT=102-202-200;SMRTCELLID=EA138735;RUNID=r84093_20241115_102726;ICSVERSION=13.0.0.212033;MOVIELENGTH=1440.0;FRAMERATEHZ=100.000000;BarcodeFile=metadata/m84093_241116_151316_s2.barcodes.fasta;BarcodeHash=86d73e586a6d3ede0295785b51105eea;BarcodeCount=96;BarcodeMode=Symmetric;BarcodeQuality=Score\tLB:TRAC-2-8053\tPU:m84093_241116_151316_s2\tSM:TOL_ASG14652249\tPM:REVIO\tBC:ACTGCAGCACGAGTAT\tCM:R/P1-C1/5.0-25M", "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-hifi --cs=short -y -R @RG\\tID:0de7f0a4/27--27\\tPL:PACBIO\\tDS:READTYPE=CCS;Ipd:CodecV1=ip;PulseWidth:CodecV1=pw;BINDINGKIT=102-739-100;SEQUENCINGKIT=102-118-800;BASECALLERVERSION=5.0;SMRTCELLKIT=102-202-200;SMRTCELLID=EA138735;RUNID=r84093_20241115_102726;ICSVERSION=13.0.0.212033;MOVIELENGTH=1440.0;FRAMERATEHZ=100.000000;BarcodeFile=metadata/m84093_241116_151316_s2.barcodes.fasta;BarcodeHash=86d73e586a6d3ede0295785b51105eea;BarcodeCount=96;BarcodeMode=Symmetric;BarcodeQuality=Score\\tLB:TRAC-2-8053\\tPU:m84093_241116_151316_s2\\tSM:TOL_ASG14652249\\tPM:REVIO\\tBC:ACTGCAGCACGAGTAT\\tCM:R/P1-C1/5.0-25M -I1G -a GCA_964034985.1.subset.unmasked.mmi -", "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o pacbio.SAMEA114784749.ERR14209104.hifitrimmer.fastq.gz.0.SAMEA114784749.ERR14209104.bam -T pacbio.SAMEA114784749.ERR14209104.hifitrimmer.fastq.gz.0.SAMEA114784749.ERR14209104_sort_tmp --write-index -l1 -", @@ -188,10 +188,10 @@ ], "GCA_964034985.1.subset.pacbio.SAMEA114784749.ERR14209104_test.minimap2.cram": [ "@HD\tVN:1.6\tSO:coordinate", - "@SQ\tSN:CAXIUN010000020.1\tLN:15094\tM5:eb4b4e09fa2962e012fc983eeb6b65dc\tUR:/lustre/scratch124/tol/", - "@SQ\tSN:CAXIUN010000038.1\tLN:1000\tM5:3fe8a9b5a85c60b19e74e88ca5ca434e\tUR:/lustre/scratch124/tol/", - "@SQ\tSN:CAXIUN010000104.1\tLN:10110\tM5:10013ae295fb0e1a002ab812d6c2e77e\tUR:/lustre/scratch124/tol/", - "@SQ\tSN:CAXIUN010000129.1\tLN:29940\tM5:9579779c87681c88e68a924f572f5599\tUR:/lustre/scratch124/tol/", + "@SQ\tSN:CAXIUN010000020.1\tLN:15094\tM5:eb4b4e09fa2962e012fc983eeb6b65dc\tUR:GCA_964034985.1.subset.unmasked.fa", + "@SQ\tSN:CAXIUN010000038.1\tLN:1000\tM5:3fe8a9b5a85c60b19e74e88ca5ca434e\tUR:GCA_964034985.1.subset.unmasked.fa", + "@SQ\tSN:CAXIUN010000104.1\tLN:10110\tM5:10013ae295fb0e1a002ab812d6c2e77e\tUR:GCA_964034985.1.subset.unmasked.fa", + "@SQ\tSN:CAXIUN010000129.1\tLN:29940\tM5:9579779c87681c88e68a924f572f5599\tUR:GCA_964034985.1.subset.unmasked.fa", "@RG\tID:0de7f0a4/27--27\tPL:PACBIO\tDS:READTYPE=CCS;Ipd:CodecV1=ip;PulseWidth:CodecV1=pw;BINDINGKIT=102-739-100;SEQUENCINGKIT=102-118-800;BASECALLERVERSION=5.0;SMRTCELLKIT=102-202-200;SMRTCELLID=EA138735;RUNID=r84093_20241115_102726;ICSVERSION=13.0.0.212033;MOVIELENGTH=1440.0;FRAMERATEHZ=100.000000;BarcodeFile=metadata/m84093_241116_151316_s2.barcodes.fasta;BarcodeHash=86d73e586a6d3ede0295785b51105eea;BarcodeCount=96;BarcodeMode=Symmetric;BarcodeQuality=Score\tLB:TRAC-2-8053\tPU:m84093_241116_151316_s2\tSM:TOL_ASG14652249\tPM:REVIO\tBC:ACTGCAGCACGAGTAT\tCM:R/P1-C1/5.0-25M", "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-hifi --cs=short -y -R @RG\\tID:0de7f0a4/27--27\\tPL:PACBIO\\tDS:READTYPE=CCS;Ipd:CodecV1=ip;PulseWidth:CodecV1=pw;BINDINGKIT=102-739-100;SEQUENCINGKIT=102-118-800;BASECALLERVERSION=5.0;SMRTCELLKIT=102-202-200;SMRTCELLID=EA138735;RUNID=r84093_20241115_102726;ICSVERSION=13.0.0.212033;MOVIELENGTH=1440.0;FRAMERATEHZ=100.000000;BarcodeFile=metadata/m84093_241116_151316_s2.barcodes.fasta;BarcodeHash=86d73e586a6d3ede0295785b51105eea;BarcodeCount=96;BarcodeMode=Symmetric;BarcodeQuality=Score\\tLB:TRAC-2-8053\\tPU:m84093_241116_151316_s2\\tSM:TOL_ASG14652249\\tPM:REVIO\\tBC:ACTGCAGCACGAGTAT\\tCM:R/P1-C1/5.0-25M -I1G -a GCA_964034985.1.subset.unmasked.mmi -", "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o pacbio.SAMEA114784749.ERR14209104_test.hifitrimmer.fastq.gz.0.SAMEA114784749.ERR14209104_test.bam -T pacbio.SAMEA114784749.ERR14209104_test.hifitrimmer.fastq.gz.0.SAMEA114784749.ERR14209104_test_sort_tmp --write-index -l1 -", @@ -209,6 +209,6 @@ "nf-test": "0.9.3", "nextflow": "25.10.4" }, - "timestamp": "2026-05-29T00:46:30.255398793" + "timestamp": "2026-05-29T03:53:26.611534435" } } \ No newline at end of file diff --git a/tests/uli_no_lima.nf.test b/tests/uli_no_lima.nf.test index 7db645a8..272164c2 100644 --- a/tests/uli_no_lima.nf.test +++ b/tests/uli_no_lima.nf.test @@ -36,7 +36,7 @@ nextflow_pipeline { lines .collect { line -> line.toString() - .replaceAll(/\bUR:\/(?:([^\/\s]+)\/([^\/\s]+)\/([^\/\s]+))\/\S+/, 'UR:/$1/$2/$3/') + .replaceAll(/\bUR:\/(?:[^\/\s]+\/)*([^\/\s]+)/, 'UR:$1') .replaceAll(/(^|\s)\/(?:[^\s\/]+\/)+[^\s\/]+/, '$1') } } From e77498b1bcfd475044704e0f547105e747321acc Mon Sep 17 00:00:00 2001 From: sainsachiko Date: Fri, 29 May 2026 04:12:53 +0100 Subject: [PATCH 11/20] Removed tDT in RG for snapshot of test minimap2 as short aligner --- tests/short_aligner_minimap2.nf.test | 1 + tests/short_aligner_minimap2.nf.test.snap | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/short_aligner_minimap2.nf.test b/tests/short_aligner_minimap2.nf.test index e129528c..fecd4327 100644 --- a/tests/short_aligner_minimap2.nf.test +++ b/tests/short_aligner_minimap2.nf.test @@ -37,6 +37,7 @@ nextflow_pipeline { .collect { line -> line.toString() .replaceAll(/\bUR:\/((?:[^\/\s]+\/){2})\S+/, 'UR:/$1') + .replaceAll(/\tDT:[^\t\n]+/, '') } } diff --git a/tests/short_aligner_minimap2.nf.test.snap b/tests/short_aligner_minimap2.nf.test.snap index 8926f46d..9d955622 100644 --- a/tests/short_aligner_minimap2.nf.test.snap +++ b/tests/short_aligner_minimap2.nf.test.snap @@ -259,7 +259,7 @@ "GCA_922984935.2.subset.illumina.SAMEA7524438.ERR6688599.minimap2.bam": [ "@HD\tVN:1.6\tSO:coordinate", "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", - "@RG\tID:31231_3#1\tDT:2019-10-03T01:00:00+0100\tPU:191003_HX4_31231_A_H3353CCX2_3#1\tLB:23687379\tPG:SCS\tSM:SAMEA5962962\tCN:SC\tPL:ILLUMINA\tDS:ERP114452: Sequencing and assembly of vertebrate genomes from British species for the Darwin Tree of Life Project in collaboration with the Vertebrate Genomes Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/", + "@RG\tID:31231_3#1\tPU:191003_HX4_31231_A_H3353CCX2_3#1\tLB:23687379\tPG:SCS\tSM:SAMEA5962962\tCN:SC\tPL:ILLUMINA\tDS:ERP114452: Sequencing and assembly of vertebrate genomes from British species for the Darwin Tree of Life Project in collaboration with the Vertebrate Genomes Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/", "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax sr --cs=short -I1.0G -y -R @RG\\tID:31231_3#1\\tDT:2019-10-03T00:00:00+0000\\tPU:191003_HX4_31231_A_H3353CCX2_3#1\\tLB:23687379\\tPG:SCS\\tSM:SAMEA5962962\\tCN:SC\\tPL:ILLUMINA\\tDS:ERP114452: Sequencing and assembly of vertebrate genomes from British species for the Darwin Tree of Life Project in collaboration with the Vertebrate Genomes Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ GCA_922984935.2.subset.unmasked.mmi -", "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.22.1\tCL:samtools fixmate -mpu - -", "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.22.1\tCL:samtools view -h", @@ -321,7 +321,7 @@ "GCA_922984935.2.subset.illumina.SAMEA7524438.ERR6688599.minimap2.cram": [ "@HD\tVN:1.6\tSO:coordinate", "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", - "@RG\tID:31231_3#1\tDT:2019-10-03T01:00:00+0100\tPU:191003_HX4_31231_A_H3353CCX2_3#1\tLB:23687379\tPG:SCS\tSM:SAMEA5962962\tCN:SC\tPL:ILLUMINA\tDS:ERP114452: Sequencing and assembly of vertebrate genomes from British species for the Darwin Tree of Life Project in collaboration with the Vertebrate Genomes Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/", + "@RG\tID:31231_3#1\tPU:191003_HX4_31231_A_H3353CCX2_3#1\tLB:23687379\tPG:SCS\tSM:SAMEA5962962\tCN:SC\tPL:ILLUMINA\tDS:ERP114452: Sequencing and assembly of vertebrate genomes from British species for the Darwin Tree of Life Project in collaboration with the Vertebrate Genomes Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/", "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax sr --cs=short -I1.0G -y -R @RG\\tID:31231_3#1\\tDT:2019-10-03T00:00:00+0000\\tPU:191003_HX4_31231_A_H3353CCX2_3#1\\tLB:23687379\\tPG:SCS\\tSM:SAMEA5962962\\tCN:SC\\tPL:ILLUMINA\\tDS:ERP114452: Sequencing and assembly of vertebrate genomes from British species for the Darwin Tree of Life Project in collaboration with the Vertebrate Genomes Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ GCA_922984935.2.subset.unmasked.mmi -", "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.22.1\tCL:samtools fixmate -mpu - -", "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.22.1\tCL:samtools view -h", @@ -355,6 +355,6 @@ "nf-test": "0.9.3", "nextflow": "25.10.4" }, - "timestamp": "2026-05-29T03:07:26.580580159" + "timestamp": "2026-05-29T04:12:24.650580553" } } \ No newline at end of file From a4f205b3876dcb54a642fa364ed87f307bd1d410 Mon Sep 17 00:00:00 2001 From: sainsachiko Date: Wed, 3 Jun 2026 15:37:44 +0100 Subject: [PATCH 12/20] Fix UTC timezone for nf-test --- nf-test.config | 4 ++++ tests/short_aligner_minimap2.nf.test | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/nf-test.config b/nf-test.config index 0b2e3c59..27fd64a7 100644 --- a/nf-test.config +++ b/nf-test.config @@ -1,3 +1,7 @@ +// Force UTC so DT fields in BAM/CRAM headers don't shift across DST +System.setProperty('user.timezone', 'UTC') +TimeZone.setDefault(TimeZone.getTimeZone('UTC')) + config { // location for all nf-test tests testsDir "." diff --git a/tests/short_aligner_minimap2.nf.test b/tests/short_aligner_minimap2.nf.test index fecd4327..e129528c 100644 --- a/tests/short_aligner_minimap2.nf.test +++ b/tests/short_aligner_minimap2.nf.test @@ -37,7 +37,6 @@ nextflow_pipeline { .collect { line -> line.toString() .replaceAll(/\bUR:\/((?:[^\/\s]+\/){2})\S+/, 'UR:/$1') - .replaceAll(/\tDT:[^\t\n]+/, '') } } From a70a591deb871c3b3426bbf7d9a73bd1768306c0 Mon Sep 17 00:00:00 2001 From: sainsachiko Date: Wed, 3 Jun 2026 16:06:32 +0100 Subject: [PATCH 13/20] Test snapshot: Replace abs path with file name --- tests/default.nf.test | 2 +- tests/short_aligner_minimap2.nf.test | 2 +- tests/uli.nf.test | 1 - tests/uli_no_lima.nf.test | 1 - tests/untrim.nf.test | 3 +-- 5 files changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/default.nf.test b/tests/default.nf.test index e827d4a4..5f591b09 100644 --- a/tests/default.nf.test +++ b/tests/default.nf.test @@ -34,7 +34,7 @@ nextflow_pipeline { lines .collect { line -> line.toString() - .replaceAll(/\bUR:\/((?:[^\/\s]+\/){2})\S+/, 'UR:/$1') + .replaceAll(/\bUR:\/(?:[^\/\s]+\/)*([^\/\s]+)/, 'UR:$1') } } diff --git a/tests/short_aligner_minimap2.nf.test b/tests/short_aligner_minimap2.nf.test index e129528c..3d4914c2 100644 --- a/tests/short_aligner_minimap2.nf.test +++ b/tests/short_aligner_minimap2.nf.test @@ -36,7 +36,7 @@ nextflow_pipeline { lines .collect { line -> line.toString() - .replaceAll(/\bUR:\/((?:[^\/\s]+\/){2})\S+/, 'UR:/$1') + .replaceAll(/\bUR:\/(?:[^\/\s]+\/)*([^\/\s]+)/, 'UR:$1') } } diff --git a/tests/uli.nf.test b/tests/uli.nf.test index a21e05a1..7656457f 100644 --- a/tests/uli.nf.test +++ b/tests/uli.nf.test @@ -35,7 +35,6 @@ nextflow_pipeline { .collect { line -> line.toString() .replaceAll(/\bUR:\/(?:[^\/\s]+\/)*([^\/\s]+)/, 'UR:$1') - .replaceAll(/(^|\s)\/(?:[^\s\/]+\/)+[^\s\/]+/, '$1') } } diff --git a/tests/uli_no_lima.nf.test b/tests/uli_no_lima.nf.test index 272164c2..99c780b6 100644 --- a/tests/uli_no_lima.nf.test +++ b/tests/uli_no_lima.nf.test @@ -37,7 +37,6 @@ nextflow_pipeline { .collect { line -> line.toString() .replaceAll(/\bUR:\/(?:[^\/\s]+\/)*([^\/\s]+)/, 'UR:$1') - .replaceAll(/(^|\s)\/(?:[^\s\/]+\/)+[^\s\/]+/, '$1') } } diff --git a/tests/untrim.nf.test b/tests/untrim.nf.test index d1736f4a..925013bf 100644 --- a/tests/untrim.nf.test +++ b/tests/untrim.nf.test @@ -38,8 +38,7 @@ nextflow_pipeline { lines .collect { line -> line.toString() - .replaceAll(/\bUR:\/(?:([^\/\s]+)\/([^\/\s]+)\/([^\/\s]+))\/\S+/, 'UR:/$1/$2/$3/') - .replaceAll(/(^|\s)\/(?:[^\s\/]+\/)+[^\s\/]+/, '$1') + .replaceAll(/\bUR:\/(?:[^\/\s]+\/)*([^\/\s]+)/, 'UR:$1') } } From e9c043d84fdfa4c982dc6e13817c98cbd2520a53 Mon Sep 17 00:00:00 2001 From: sainsachiko Date: Wed, 3 Jun 2026 16:07:36 +0100 Subject: [PATCH 14/20] Fix logic of handling RG --- subworkflows/local/prepare_read_groups.nf | 87 +++++++++++++---------- 1 file changed, 49 insertions(+), 38 deletions(-) diff --git a/subworkflows/local/prepare_read_groups.nf b/subworkflows/local/prepare_read_groups.nf index 8f87f196..d97750ec 100644 --- a/subworkflows/local/prepare_read_groups.nf +++ b/subworkflows/local/prepare_read_groups.nf @@ -2,7 +2,8 @@ // Prepare read-group metadata from optional extra_header and BAM input headers // -include { SAMTOOLS_SPLITHEADER } from '../../modules/nf-core/samtools/splitheader/main' +include { SAMTOOLS_SPLITHEADER as SAMTOOLS_SPLITHEADER_EXTRA } from '../../modules/nf-core/samtools/splitheader/main' +include { SAMTOOLS_SPLITHEADER as SAMTOOLS_SPLITHEADER_BAM } from '../../modules/nf-core/samtools/splitheader/main' workflow PREPARE_READ_GROUPS { take: @@ -15,49 +16,59 @@ workflow PREPARE_READ_GROUPS { def rg_flag = rg_mode == 'long' ? '-R' : '-r' // Pre-populate read_group for all inputs; downstream steps may override it from extracted @RG lines - ch_reads_prefixed = reads.map { meta, read_file -> [meta + [read_group: "${rg_lead} ${rg_flag} $meta.read_group", replace_rg: true], read_file] } + ch_reads_prefixed = reads.map { meta, read_file -> + [meta + [read_group: "${rg_lead} ${rg_flag} $meta.read_group", replace_rg: true, read_file: read_file], read_file] + } - ch_reads_extra_header = ch_reads_prefixed - .branch { meta, read_file -> - // Inputs with explicit extra_header metadata should be parsed directly - has_extra_header: meta.extra_header != [] - return [meta + [read_file: read_file], meta.extra_header] - // For BAM/CRAM without extra_header metadata, extract header from the alignment file. - no_extra_header_bam_cram: meta.extra_header == [] && read_file.name ==~ /.*\.(bam|cram)$/ - // FASTQ and remaining inputs keep the pre-populated read_group. - no_extra_header_fastq: true - } + ch_branched = ch_reads_prefixed.branch { meta, read_file -> + // An input may match both extra and bam_cram extraction: extra_header is parsed here; BAM/CRAM is also parsed below as an independent fallback source + has_extra: meta.extra_header != [] + return [meta, meta.extra_header] + fastq: !(read_file.name ==~ /.*\.(bam|cram)$/) + other: true + } + ch_bam_cram = ch_reads_prefixed.filter { _meta, read_file -> read_file.name ==~ /.*\.(bam|cram)$/ } + + // Extract @RG/@PG from extra_header files and (independently) from BAM/CRAM alignment files + SAMTOOLS_SPLITHEADER_EXTRA(ch_branched.has_extra) + SAMTOOLS_SPLITHEADER_BAM(ch_bam_cram) - // Extract @RG/@PG from provided extra_header files and BAM/CRAM headers - SAMTOOLS_SPLITHEADER(ch_reads_extra_header.has_extra_header.mix(ch_reads_extra_header.no_extra_header_bam_cram)) + // Tag each result with its source so the resolver can pick precedence: extra_header > bam > precomputed + ch_extra = SAMTOOLS_SPLITHEADER_EXTRA.out.readgroup.join(SAMTOOLS_SPLITHEADER_EXTRA.out.programs).map { it + ['extra'] } + ch_bam = SAMTOOLS_SPLITHEADER_BAM.out.readgroup.join(SAMTOOLS_SPLITHEADER_BAM.out.programs).map { it + ['bam'] } - ch_reads_with_rg = SAMTOOLS_SPLITHEADER.out.readgroup - .join(SAMTOOLS_SPLITHEADER.out.programs) - .join(ch_reads_extra_header.has_extra_header.mix(ch_reads_extra_header.no_extra_header_bam_cram), by: 0) - .map { meta, rg_file, program_file, read_files -> - def rglines = file(rg_file).readLines() - // Prefer extracted @RG lines; fallback to the existing read_group only when extraction is empty - def rg_args = rglines ? [ - rg_lead, - rglines.collect { line -> - // Add SM when not present to avoid errors from downstream tools (e.g. variant callers) - def l = line.contains('SM:') ? line - : meta.sample ? "${line}\tSM:${meta.sample}" - : "${line}\tSM:${meta.id}" - "${rg_flag} '${l.replaceAll("\t", "\\\\t")}'" - }.join(' ') - ].findAll { value -> value }.join(' ') + // Group all extracted headers per meta; inputs may yield 0, 1 (extra or bam only), or 2 (both) entries + ch_resolved = ch_extra.mix(ch_bam) + .map { meta, rg, pg, src -> [meta.id, meta, rg, pg, src] } + .groupTuple() + .map { _id, metas, rgs, pgs, srcs -> + def meta = metas[0] + def bySrc = [srcs, rgs, pgs].transpose().collectEntries { src, rg, pg -> [(src): [rg: rg, pg: pg]] } + // RG: prefer extra_header lines; fall back to BAM @RG; finally fall back to precomputed meta.read_group + def picked_rg = ['extra', 'bam'].findResult { src -> + def entry = bySrc[src] + if (!entry) return null + def lines = file(entry.rg).readLines() + lines ? [src: src, rglines: lines] : null + } + // PG: inject @PG downstream only when extra_header supplies them; otherwise preserve whatever the BAM/CRAM already has + def extra_has_pg = bySrc.extra && !file(bySrc.extra.pg).readLines().isEmpty() + + def from_bam = picked_rg?.src == 'bam' + def rg_args = picked_rg ? [rg_lead, picked_rg.rglines.collect { line -> + // Add SM when not present to avoid errors from downstream tools (e.g. variant callers) + def l = line.contains('SM:') ? line : "${line}\tSM:${meta.sample ?: meta.id}" + "${rg_flag} '${l.replaceAll('\t', '\\\\t')}'" + }.join(' ')].findAll().join(' ') : (meta.read_group ?: '') - def output_read_files = meta.read_file ?: read_files - // If RG came from an existing BAM/CRAM header, and no extra RG provided to overwrite, preserve it and avoid replacing downstream - // If PG came from an existing BAM/CRAM header, and no extra PG provided to overwrite, preserve it and avoid replacing downstream - def replace_rg = !meta.extra_header && rglines ? false : true - def add_pg = !meta.extra_header && program_file ? false : true - def new_meta = meta.subMap(meta.keySet() - ['read_file']) + [read_group: rg_args, replace_rg: replace_rg, add_pg: add_pg] - [new_meta, output_read_files] + // Don't replace RG when it already comes from the BAM/CRAM header itself + def replace_rg = !(from_bam && picked_rg) + def new_meta = meta.subMap(meta.keySet() - ['read_file']) + [read_group: rg_args, replace_rg: replace_rg, add_pg: extra_has_pg] + [new_meta, meta.read_file] } - .mix(ch_reads_extra_header.no_extra_header_fastq) + + ch_reads_with_rg = ch_resolved.mix(ch_branched.fastq.map { meta, rf -> [meta.subMap(meta.keySet() - ['read_file']), rf] }) emit: reads = ch_reads_with_rg // channel: [ val(meta), /path/to/read_file ] From ebf6fd1a3434773dfdfecc9fc5233e60935fa1eb Mon Sep 17 00:00:00 2001 From: sainsachiko Date: Wed, 3 Jun 2026 17:08:05 +0100 Subject: [PATCH 15/20] Update Snapshots --- tests/default.nf.test.snap | 55 ++++++++++++----------- tests/short_aligner_minimap2.nf.test.snap | 40 ++++++++++------- tests/uli.nf.test.snap | 4 +- tests/uli_no_lima.nf.test.snap | 4 +- tests/untrim.nf.test.snap | 34 +++++++------- 5 files changed, 75 insertions(+), 62 deletions(-) diff --git a/tests/default.nf.test.snap b/tests/default.nf.test.snap index 13ed1309..da6fbc45 100644 --- a/tests/default.nf.test.snap +++ b/tests/default.nf.test.snap @@ -1,7 +1,7 @@ { "-profile test": { "content": [ - 182, + 183, { "BGZIP_BEDGRAPH": { "samtools": "1.23.1" @@ -109,6 +109,12 @@ "SAMTOOLS_SPLITHEADER": { "samtools": "1.23.1" }, + "SAMTOOLS_SPLITHEADER_BAM": { + "samtools": "1.23.1" + }, + "SAMTOOLS_SPLITHEADER_EXTRA": { + "samtools": "1.23.1" + }, "SAMTOOLS_STATS": { "samtools": "1.23.1" }, @@ -386,8 +392,8 @@ { "GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram": [ "@HD\tVN:1.6\tSO:coordinate", - "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", - "@RG\tID:35528_2_1\tPL:ILLUMINA\tSM:SAMEA7524440", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:GCA_922984935.2.subset.fasta.gz\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@RG\tID:35528_2#1\tDT:2020-11-17T00:00:00+0000\tPU:201117_A00948_0206_AHGML2DSXY_2#1\tLB:33637906\tPG:SCS\tSM:SAMEA5962964\tCN:SC\tPL:ILLUMINA\tDS:ERP116890: Sequencing and assembly of genomes from British species for the Darwin Tree of Life Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ ", "@PG\tID:SCS.extra_header\tVN:1.7.0\tPN:NovaSeq Control Software\tDS:Controlling software on instrument", "@PG\tID:basecalling.extra_header\tPP:SCS.extra_header\tVN:Unknown\tPN:Unknown\tDS:Basecalling Package", "@PG\tID:bambi.extra_header\tPP:basecalling.extra_header\tVN:0.13.1\tCL:/software/pkgg/bambi/0.13.1/bin/bambi i2b --intensity-dir=/lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities --basecalls-dir=/lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BaseCalls --lane=2 --platform-unit=201117_A00948_0206_AHGML2DSXY_2 --read-group-id=35528_2 --study-name=\"ERP116890: Sequencing and assembly of genomes from British species for the Darwin Tree of Life Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ \" --sample-alias=SAMEA5962964,mCerEla1 --threads=8 --output-file=- --compression-level=0\tPN:bambi\tDS:Convert Illumina BCL to BAM or SAM file", @@ -404,11 +410,11 @@ "@PG\tID:samtools.3.extra_header\tPN:samtools\tPP:scramble.extra_header\tVN:1.15\tCL:/usr/local/bin/samtools view -h /lustre/scratch124/tol/projects/darwin/data/mammals/Meles_meles/genomic_data/mMelMel3/hic-arima2/35528_2#1.cram", "@PG\tID:samtools.4.extra_header\tPN:samtools\tPP:samtools.3.extra_header\tVN:1.20\tCL:/usr/local/bin/samtools view --cram 35528_2#1.subset.sam", "@PG\tID:samtools.5.extra_header\tPN:samtools\tPP:samtools.4.extra_header\tVN:1.23.1\tCL:samtools view -H 35528_2_1.subset.cram", - "@PG\tID:bwa-mem2\tPN:bwa-mem2\tVN:2.2.1\tCL:bwa-mem2 mem -5SPCp -t 4 ./bwamem2/GCA_922984935.2.subset.unmasked.fa -C -H @RG\\tID:35528_2_1\\tPL:ILLUMINA\\tSM:SAMEA7524440 -", + "@PG\tID:bwa-mem2\tPN:bwa-mem2\tVN:2.2.1\tCL:bwa-mem2 mem -5SPCp -t 4 ./bwamem2/GCA_922984935.2.subset.unmasked.fa -C -H @RG\\tID:35528_2#1\\tDT:2020-11-17T00:00:00+0000\\tPU:201117_A00948_0206_AHGML2DSXY_2#1\\tLB:33637906\\tPG:SCS\\tSM:SAMEA5962964\\tCN:SC\\tPL:ILLUMINA\\tDS:ERP116890: Sequencing and assembly of genomes from British species for the Darwin Tree of Life Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ -", "@PG\tID:samtools\tPN:samtools\tPP:bwa-mem2\tVN:1.22.1\tCL:samtools fixmate -mpu - -", "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.22.1\tCL:samtools view -h", - "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.22.1\tCL:samtools sort --write-index -l1 -@4 -T 35528_2_1.subset_addRG.cram.0.SAMEA7524440.ERR6688402_tmp -o 35528_2_1.subset_addRG.cram.0.SAMEA7524440.ERR6688402.bam -", - "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa - 1/35528_2_1.subset_addRG.cram.0.SAMEA7524440.ERR6688402.bam 2/35528_2_1.subset_addRG.cram.1.SAMEA7524440.ERR6688402.bam", + "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.22.1\tCL:samtools sort --write-index -l1 -@4 -T 35528_2_1.subset.cram.0.SAMEA7524440.ERR6688402_tmp -o 35528_2_1.subset.cram.0.SAMEA7524440.ERR6688402.bam -", + "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa - 1/35528_2_1.subset.cram.0.SAMEA7524440.ERR6688402.bam 2/35528_2_1.subset.cram.1.SAMEA7524440.ERR6688402.bam", "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools markdup -T SAMEA7524440.ERR6688402 -f SAMEA7524440.ERR6688402.metrics --threads 4 --reference GCA_922984935.2.subset.unmasked.fa - SAMEA7524440.ERR6688402.bam", "@PG\tID:crumble\tPN:crumble\tPP:samtools.4\tVN:0.9.1\tCL:crumble -O bam SAMEA7524440.ERR6688402.bam SAMEA7524440.ERR6688402.crumble.bam", "@PG\tID:samtools.5\tPN:samtools\tPP:samtools.5.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.bam", @@ -420,8 +426,8 @@ ], "GCA_922984935.2.subset.illumina.SAMEA7524438.ERR6688599.bwamem2.cram": [ "@HD\tVN:1.6\tSO:coordinate", - "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", - "@RG\tID:31231_3#1\tDT:2019-10-03T01:00:00+0100\tPU:191003_HX4_31231_A_H3353CCX2_3#1\tLB:23687379\tPG:SCS\tSM:SAMEA5962962\tCN:SC\tPL:ILLUMINA\tDS:ERP114452: Sequencing and assembly of vertebrate genomes from British species for the Darwin Tree of Life Project in collaboration with the Vertebrate Genomes Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:GCA_922984935.2.subset.fasta.gz\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@RG\tID:31231_3#1\tDT:2019-10-03T00:00:00+0000\tPU:191003_HX4_31231_A_H3353CCX2_3#1\tLB:23687379\tPG:SCS\tSM:SAMEA5962962\tCN:SC\tPL:ILLUMINA\tDS:ERP114452: Sequencing and assembly of vertebrate genomes from British species for the Darwin Tree of Life Project in collaboration with the Vertebrate Genomes Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/", "@PG\tID:bwa-mem2\tPN:bwa-mem2\tVN:2.2.1\tCL:bwa-mem2 mem -p -t 4 ./bwamem2/GCA_922984935.2.subset.unmasked.fa -C -H @RG\\tID:31231_3#1\\tDT:2019-10-03T00:00:00+0000\\tPU:191003_HX4_31231_A_H3353CCX2_3#1\\tLB:23687379\\tPG:SCS\\tSM:SAMEA5962962\\tCN:SC\\tPL:ILLUMINA\\tDS:ERP114452: Sequencing and assembly of vertebrate genomes from British species for the Darwin Tree of Life Project in collaboration with the Vertebrate Genomes Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ -", "@PG\tID:samtools\tPN:samtools\tPP:bwa-mem2\tVN:1.22.1\tCL:samtools fixmate -mpu - -", "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.22.1\tCL:samtools view -h", @@ -434,7 +440,7 @@ ], "GCA_922984935.2.subset.illumina.SAMEA7524439.ERR6688600.bwamem2.cram": [ "@HD\tVN:1.6\tSO:coordinate", - "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:GCA_922984935.2.subset.fasta.gz\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", "@RG\tID:31231_4_1\tPL:ILLUMINA\tSM:SAMEA7524439", "@PG\tID:bwa-mem2\tPN:bwa-mem2\tVN:2.2.1\tCL:bwa-mem2 mem -p -t 4 ./bwamem2/GCA_922984935.2.subset.unmasked.fa -C -H @RG\\tID:31231_4_1\\tPL:ILLUMINA\\tSM:SAMEA7524439 -", "@PG\tID:samtools\tPN:samtools\tPP:bwa-mem2\tVN:1.22.1\tCL:samtools fixmate -mpu - -", @@ -448,7 +454,7 @@ ], "GCA_922984935.2.subset.ont.SAMEA7524440.PAE35587.minimap2.cram": [ "@HD\tVN:1.6\tSO:coordinate", - "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:GCA_922984935.2.subset.fasta.gz\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", "@RG\tID:PAE35587_pass_1f1f0707_115\tPL:ONT\tSM:SAMEA7524440", "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-ont -y -R @RG\\tID:PAE35587_pass_1f1f0707_115\\tPL:ONT\\tSM:SAMEA7524440 -I1G -a GCA_922984935.2.subset.unmasked.mmi -", "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o PAE35587_pass_1f1f0707_115.subset.fastq.gz.0.SAMEA7524440.PAE35587.bam -T PAE35587_pass_1f1f0707_115.subset.fastq.gz.0.SAMEA7524440.PAE35587_sort_tmp --write-index -l1 -", @@ -458,7 +464,7 @@ ], "GCA_922984935.2.subset.ont.SAMEA7524440.PAE35587_test.minimap2.cram": [ "@HD\tVN:1.6\tSO:coordinate", - "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:GCA_922984935.2.subset.fasta.gz\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", "@RG\tID:PAE35587_pass_1f1f0707_115\tPL:ONT\tSM:mMelMel3", "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-ont -y -R @RG\\tID:PAE35587_pass_1f1f0707_115\\tPL:ONT\\tSM:mMelMel3 -I1G -a GCA_922984935.2.subset.unmasked.mmi -", "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o SAMEA7524440.PAE35587_test_other.fastq.gz.0.SAMEA7524440.PAE35587_test.bam -T SAMEA7524440.PAE35587_test_other.fastq.gz.0.SAMEA7524440.PAE35587_test_sort_tmp --write-index -l1 -", @@ -468,7 +474,7 @@ ], "GCA_922984935.2.subset.ont.SAMEA7524440.merged_1.minimap2.cram": [ "@HD\tVN:1.6\tSO:coordinate", - "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:GCA_922984935.2.subset.fasta.gz\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", "@RG\tID:PAE35587_pass_1f1f0707_115\tPL:ONT\tSM:SAMEA7524440", "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-ont -y -R @RG\\tID:PAE35587_pass_1f1f0707_115\\tPL:ONT\\tSM:SAMEA7524440 -I1G -a GCA_922984935.2.subset.unmasked.mmi -", "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o PAE35587_pass_1f1f0707_115.subset.fastq.gz.0.SAMEA7524440.PAE35587.bam -T PAE35587_pass_1f1f0707_115.subset.fastq.gz.0.SAMEA7524440.PAE35587_sort_tmp --write-index -l1 -", @@ -479,7 +485,7 @@ ], "GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.cram": [ "@HD\tVN:1.6\tSO:coordinate", - "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:GCA_922984935.2.subset.fasta.gz\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", "@RG\tID:61ddc6c3/15--15\tPL:PACBIO\tDS:READTYPE=CCS;BINDINGKIT=101-789-500;SEQUENCINGKIT=101-826-100;BASECALLERVERSION=5.0.0;FRAMERATEHZ=100.000000;BarcodeFile=/lustre/scratch116/vr/projects/vgp/ref/barcodes/Sequel_16_Barcodes_v3.fasta;BarcodeHash=e418d89cefcbef90f3cb0e6455b7e2a3;BarcodeCount=16;BarcodeMode=Symmetric;BarcodeQuality=Score\tLB:DN615654G-A1\tPU:m64094_200910_173211\tPM:SEQUELII\tBC:CACTCACGTGTGATATT\tCM:S/P4-C2/5.0-8M\tSM:SAMEA7524440", "@PG\tID:ccs-4.2.0.extra_header\tPN:ccs\tVN:4.2.0\tDS:Generate circular consensus sequences (ccs) from subreads.\tCL:ccs ccs --chunk 1/64 -j 8 --max-length 50000 ../../m64094_200910_173211.subreads.bam m64094_200910_173211.ccs.bam", "@PG\tID:lima.extra_header\tVN:1.11.0 (commit v1.11.0)\tCL:lima -j 8 --split-bam-named --same --peek-guess --guess-min-count 1000 --ccs m64094_200910_173211.ccs.bam /lustre/scratch116/vr/projects/vgp/ref/barcodes/Sequel_16_Barcodes_v3.fasta lima/m64094_200910_173211.ccs.bam", @@ -499,18 +505,17 @@ ], "GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.cram": [ "@HD\tVN:1.6\tSO:coordinate", - "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", - "@RG\tID:m64094_200911_174739\tPL:PACBIO\tSM:SAMEA7524440", - "@PG\tID:samtools.extra_header\tPN:samtools\tVN:1.22.1\tCL:samtools collate --output-fmt cram -O -u -T mMelMel3_T4.collate --threads 4 --reference GCA_922984935.2.subset.unmasked.fasta m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.fastq.gz -", - "@PG\tID:samtools.1.extra_header\tPN:samtools\tPP:samtools.extra_header\tVN:1.22.1\tCL:samtools fixmate -m -u --threads 4 - -", - "@PG\tID:samtools.2.extra_header\tPN:samtools\tPP:samtools.1.extra_header\tVN:1.22.1\tCL:samtools sort -u -T mMelMel3_T4.sort --threads 4 -", - "@PG\tID:samtools.3.extra_header\tPN:samtools\tPP:samtools.2.extra_header\tVN:1.22.1\tCL:samtools markdup -T mMelMel3_T4.markdup -f mMelMel3_T4.metrics --threads 4 - mMelMel3_T4.cram", - "@PG\tID:samtools.4.extra_header\tPN:samtools\tPP:samtools.3.extra_header\tVN:1.23.1\tCL:samtools view -H m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.cram", - "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-hifi --cs=short -y -R @RG\\tID:m64094_200911_174739\\tPL:PACBIO\\tSM:SAMEA7524440 -I1G -a GCA_922984935.2.subset.unmasked.mmi -", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:GCA_922984935.2.subset.fasta.gz\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@RG\tID:aaa0cf18/15--15\tPL:PACBIO\tDS:READTYPE=CCS;BINDINGKIT=101-789-500;SEQUENCINGKIT=101-826-100;BASECALLERVERSION=5.0.0;FRAMERATEHZ=100.000000;BarcodeFile=/lustre/scratch116/vr/projects/vgp/ref/barcodes/Sequel_16_Barcodes_v3.fasta;BarcodeHash=e418d89cefcbef90f3cb0e6455b7e2a3;BarcodeCount=16;BarcodeMode=Symmetric;BarcodeQuality=Score\tLB:DN615654G-A1\tPU:m64094_200911_174739\tPM:SEQUELII\tBC:CACTCACGTGTGATATT\tCM:S/P4-C2/5.0-8M\tSM:SAMEA7524440", + "@PG\tID:ccs-4.2.0.extra_header\tPN:ccs\tVN:4.2.0\tDS:Generate circular consensus sequences (ccs) from subreads.\tCL:ccs ccs --chunk 1/64 -j 8 --max-length 50000 ../../m64094_200911_174739.subreads.bam m64094_200911_174739.ccs.bam", + "@PG\tID:lima.extra_header\tVN:1.11.0 (commit v1.11.0)\tCL:lima -j 8 --split-bam-named --same --peek-guess --guess-min-count 1000 --ccs m64094_200911_174739.ccs.bam /lustre/scratch116/vr/projects/vgp/ref/barcodes/Sequel_16_Barcodes_v3.fasta lima/m64094_200911_174739.ccs.bam", + "@PG\tID:samtools.extra_header\tPN:samtools\tVN:1.10\tPP:ccs-4.2.0.extra_header\tCL:samtools merge -@8 -ncp -b m64094_200911_174739.chunks.fofn m64094_200911_174739.ccs.bam", + "@PG\tID:samtools.1.extra_header\tPN:samtools\tPP:samtools.extra_header\tVN:1.23.1\tCL:samtools view -H /lustre/scratch122/tol/data/9/9/f/1/6/d/Meles_meles/genomic_data/mMelMel3/pacbio/m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.bam", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-hifi --cs=short -y -R @RG\\tID:aaa0cf18/15--15\\tPL:PACBIO\\tDS:READTYPE=CCS;BINDINGKIT=101-789-500;SEQUENCINGKIT=101-826-100;BASECALLERVERSION=5.0.0;FRAMERATEHZ=100.000000;BarcodeFile=/lustre/scratch116/vr/projects/vgp/ref/barcodes/Sequel_16_Barcodes_v3.fasta;BarcodeHash=e418d89cefcbef90f3cb0e6455b7e2a3;BarcodeCount=16;BarcodeMode=Symmetric;BarcodeQuality=Score\\tLB:DN615654G-A1\\tPU:m64094_200911_174739\\tPM:SEQUELII\\tBC:CACTCACGTGTGATATT\\tCM:S/P4-C2/5.0-8M\\tSM:SAMEA7524440 -I1G -a GCA_922984935.2.subset.unmasked.mmi -", "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o pacbio.SAMEA7524440.ERR6939249.hifitrimmer.fastq.gz.0.SAMEA7524440.ERR6939249.bam -T pacbio.SAMEA7524440.ERR6939249.hifitrimmer.fastq.gz.0.SAMEA7524440.ERR6939249_sort_tmp --write-index -l1 -", "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa SAMEA7524440.ERR6939249.merge.bam 1/pacbio.SAMEA7524440.ERR6939249.hifitrimmer.fastq.gz.0.SAMEA7524440.ERR6939249.bam", "@PG\tID:crumble\tPN:crumble\tPP:samtools.1\tVN:0.9.1\tCL:crumble -y pbccs -O bam SAMEA7524440.ERR6939249.merge.bam SAMEA7524440.ERR6939249.merge.crumble.bam", - "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.4.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", + "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", "@PG\tID:samtools.3\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.cram GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", "@PG\tID:samtools.5\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.cram GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", @@ -519,9 +524,9 @@ ], "GCA_922984935.2.subset.pacbio.SAMEA7524440.merged_1.minimap2.cram": [ "@HD\tVN:1.6\tSO:coordinate", - "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:GCA_922984935.2.subset.fasta.gz\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", "@RG\tID:61ddc6c3/15--15\tPL:PACBIO\tDS:READTYPE=CCS;BINDINGKIT=101-789-500;SEQUENCINGKIT=101-826-100;BASECALLERVERSION=5.0.0;FRAMERATEHZ=100.000000;BarcodeFile=/lustre/scratch116/vr/projects/vgp/ref/barcodes/Sequel_16_Barcodes_v3.fasta;BarcodeHash=e418d89cefcbef90f3cb0e6455b7e2a3;BarcodeCount=16;BarcodeMode=Symmetric;BarcodeQuality=Score\tLB:DN615654G-A1\tPU:m64094_200910_173211\tPM:SEQUELII\tBC:CACTCACGTGTGATATT\tCM:S/P4-C2/5.0-8M\tSM:SAMEA7524440", - "@RG\tID:m64094_200911_174739\tPL:PACBIO\tSM:SAMEA7524440", + "@RG\tID:aaa0cf18/15--15\tPL:PACBIO\tDS:READTYPE=CCS;BINDINGKIT=101-789-500;SEQUENCINGKIT=101-826-100;BASECALLERVERSION=5.0.0;FRAMERATEHZ=100.000000;BarcodeFile=/lustre/scratch116/vr/projects/vgp/ref/barcodes/Sequel_16_Barcodes_v3.fasta;BarcodeHash=e418d89cefcbef90f3cb0e6455b7e2a3;BarcodeCount=16;BarcodeMode=Symmetric;BarcodeQuality=Score\tLB:DN615654G-A1\tPU:m64094_200911_174739\tPM:SEQUELII\tBC:CACTCACGTGTGATATT\tCM:S/P4-C2/5.0-8M\tSM:SAMEA7524440", "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-hifi --cs=short -y -R @RG\\tID:61ddc6c3/15--15\\tPL:PACBIO\\tDS:READTYPE=CCS;BINDINGKIT=101-789-500;SEQUENCINGKIT=101-826-100;BASECALLERVERSION=5.0.0;FRAMERATEHZ=100.000000;BarcodeFile=/lustre/scratch116/vr/projects/vgp/ref/barcodes/Sequel_16_Barcodes_v3.fasta;BarcodeHash=e418d89cefcbef90f3cb0e6455b7e2a3;BarcodeCount=16;BarcodeMode=Symmetric;BarcodeQuality=Score\\tLB:DN615654G-A1\\tPU:m64094_200910_173211\\tPM:SEQUELII\\tBC:CACTCACGTGTGATATT\\tCM:S/P4-C2/5.0-8M\\tSM:SAMEA7524440 -I1G -a GCA_922984935.2.subset.unmasked.mmi -", "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o pacbio.SAMEA7524440.ERR6939248.hifitrimmer.fastq.gz.0.SAMEA7524440.ERR6939248.bam -T pacbio.SAMEA7524440.ERR6939248.hifitrimmer.fastq.gz.0.SAMEA7524440.ERR6939248_sort_tmp --write-index -l1 -", "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa SAMEA7524440.ERR6939248.merge.bam 1/pacbio.SAMEA7524440.ERR6939248.hifitrimmer.fastq.gz.0.SAMEA7524440.ERR6939248.bam", @@ -540,6 +545,6 @@ "nf-test": "0.9.3", "nextflow": "25.10.4" }, - "timestamp": "2026-05-29T03:22:38.8477332" + "timestamp": "2026-06-03T16:06:47.981156535" } } \ No newline at end of file diff --git a/tests/short_aligner_minimap2.nf.test.snap b/tests/short_aligner_minimap2.nf.test.snap index 9d955622..fcf979ae 100644 --- a/tests/short_aligner_minimap2.nf.test.snap +++ b/tests/short_aligner_minimap2.nf.test.snap @@ -82,6 +82,12 @@ "SAMTOOLS_SPLITHEADER": { "samtools": "1.23.1" }, + "SAMTOOLS_SPLITHEADER_BAM": { + "samtools": "1.23.1" + }, + "SAMTOOLS_SPLITHEADER_EXTRA": { + "samtools": "1.23.1" + }, "SAMTOOLS_STATS": { "samtools": "1.23.1" }, @@ -226,8 +232,8 @@ { "GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.bam": [ "@HD\tVN:1.6\tSO:coordinate", - "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", - "@RG\tID:35528_2_1\tPL:ILLUMINA\tSM:SAMEA7524440", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:GCA_922984935.2.subset.fasta.gz\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@RG\tID:35528_2#1\tDT:2020-11-17T00:00:00+0000\tPU:201117_A00948_0206_AHGML2DSXY_2#1\tLB:33637906\tPG:SCS\tSM:SAMEA5962964\tCN:SC\tPL:ILLUMINA\tDS:ERP116890: Sequencing and assembly of genomes from British species for the Darwin Tree of Life Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ ", "@PG\tID:SCS.extra_header\tVN:1.7.0\tPN:NovaSeq Control Software\tDS:Controlling software on instrument", "@PG\tID:basecalling.extra_header\tPP:SCS.extra_header\tVN:Unknown\tPN:Unknown\tDS:Basecalling Package", "@PG\tID:bambi.extra_header\tPP:basecalling.extra_header\tVN:0.13.1\tCL:/software/pkgg/bambi/0.13.1/bin/bambi i2b --intensity-dir=/lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities --basecalls-dir=/lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BaseCalls --lane=2 --platform-unit=201117_A00948_0206_AHGML2DSXY_2 --read-group-id=35528_2 --study-name=\"ERP116890: Sequencing and assembly of genomes from British species for the Darwin Tree of Life Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ \" --sample-alias=SAMEA5962964,mCerEla1 --threads=8 --output-file=- --compression-level=0\tPN:bambi\tDS:Convert Illumina BCL to BAM or SAM file", @@ -244,11 +250,11 @@ "@PG\tID:samtools.3.extra_header\tPN:samtools\tPP:scramble.extra_header\tVN:1.15\tCL:/usr/local/bin/samtools view -h /lustre/scratch124/tol/projects/darwin/data/mammals/Meles_meles/genomic_data/mMelMel3/hic-arima2/35528_2#1.cram", "@PG\tID:samtools.4.extra_header\tPN:samtools\tPP:samtools.3.extra_header\tVN:1.20\tCL:/usr/local/bin/samtools view --cram 35528_2#1.subset.sam", "@PG\tID:samtools.5.extra_header\tPN:samtools\tPP:samtools.4.extra_header\tVN:1.23.1\tCL:samtools view -H 35528_2_1.subset.cram", - "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax sr --cs=short -I1.0G -y -R @RG\\tID:35528_2_1\\tPL:ILLUMINA\\tSM:SAMEA7524440 GCA_922984935.2.subset.unmasked.mmi -", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax sr --cs=short -I1.0G -y -R @RG\\tID:35528_2#1\\tDT:2020-11-17T00:00:00+0000\\tPU:201117_A00948_0206_AHGML2DSXY_2#1\\tLB:33637906\\tPG:SCS\\tSM:SAMEA5962964\\tCN:SC\\tPL:ILLUMINA\\tDS:ERP116890: Sequencing and assembly of genomes from British species for the Darwin Tree of Life Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ GCA_922984935.2.subset.unmasked.mmi -", "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.22.1\tCL:samtools fixmate -mpu - -", "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.22.1\tCL:samtools view -h", - "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.22.1\tCL:samtools sort --write-index -l1 -@4 -T 35528_2_1.subset_addRG.cram.0.SAMEA7524440.ERR6688402_tmp -o 35528_2_1.subset_addRG.cram.0.SAMEA7524440.ERR6688402.bam -", - "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa - 1/35528_2_1.subset_addRG.cram.0.SAMEA7524440.ERR6688402.bam 2/35528_2_1.subset_addRG.cram.1.SAMEA7524440.ERR6688402.bam", + "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.22.1\tCL:samtools sort --write-index -l1 -@4 -T 35528_2_1.subset.cram.0.SAMEA7524440.ERR6688402_tmp -o 35528_2_1.subset.cram.0.SAMEA7524440.ERR6688402.bam -", + "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa - 1/35528_2_1.subset.cram.0.SAMEA7524440.ERR6688402.bam 2/35528_2_1.subset.cram.1.SAMEA7524440.ERR6688402.bam", "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools markdup -T SAMEA7524440.ERR6688402 -f SAMEA7524440.ERR6688402.metrics --threads 4 --reference GCA_922984935.2.subset.unmasked.fa - SAMEA7524440.ERR6688402.bam", "@PG\tID:crumble\tPN:crumble\tPP:samtools.4\tVN:0.9.1\tCL:crumble -O bam SAMEA7524440.ERR6688402.bam SAMEA7524440.ERR6688402.crumble.bam", "@PG\tID:samtools.5\tPN:samtools\tPP:samtools.5.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.bam", @@ -258,8 +264,8 @@ ], "GCA_922984935.2.subset.illumina.SAMEA7524438.ERR6688599.minimap2.bam": [ "@HD\tVN:1.6\tSO:coordinate", - "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", - "@RG\tID:31231_3#1\tPU:191003_HX4_31231_A_H3353CCX2_3#1\tLB:23687379\tPG:SCS\tSM:SAMEA5962962\tCN:SC\tPL:ILLUMINA\tDS:ERP114452: Sequencing and assembly of vertebrate genomes from British species for the Darwin Tree of Life Project in collaboration with the Vertebrate Genomes Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:GCA_922984935.2.subset.fasta.gz\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@RG\tID:31231_3#1\tDT:2019-10-03T00:00:00+0000\tPU:191003_HX4_31231_A_H3353CCX2_3#1\tLB:23687379\tPG:SCS\tSM:SAMEA5962962\tCN:SC\tPL:ILLUMINA\tDS:ERP114452: Sequencing and assembly of vertebrate genomes from British species for the Darwin Tree of Life Project in collaboration with the Vertebrate Genomes Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/", "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax sr --cs=short -I1.0G -y -R @RG\\tID:31231_3#1\\tDT:2019-10-03T00:00:00+0000\\tPU:191003_HX4_31231_A_H3353CCX2_3#1\\tLB:23687379\\tPG:SCS\\tSM:SAMEA5962962\\tCN:SC\\tPL:ILLUMINA\\tDS:ERP114452: Sequencing and assembly of vertebrate genomes from British species for the Darwin Tree of Life Project in collaboration with the Vertebrate Genomes Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ GCA_922984935.2.subset.unmasked.mmi -", "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.22.1\tCL:samtools fixmate -mpu - -", "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.22.1\tCL:samtools view -h", @@ -271,7 +277,7 @@ ], "GCA_922984935.2.subset.illumina.SAMEA7524439.ERR6688600.minimap2.bam": [ "@HD\tVN:1.6\tSO:coordinate", - "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:GCA_922984935.2.subset.fasta.gz\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", "@RG\tID:31231_4_1\tPL:ILLUMINA\tSM:SAMEA7524439", "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax sr --cs=short -I1.0G -y -R @RG\\tID:31231_4_1\\tPL:ILLUMINA\\tSM:SAMEA7524439 GCA_922984935.2.subset.unmasked.mmi -", "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.22.1\tCL:samtools fixmate -mpu - -", @@ -286,8 +292,8 @@ { "GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.cram": [ "@HD\tVN:1.6\tSO:coordinate", - "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", - "@RG\tID:35528_2_1\tPL:ILLUMINA\tSM:SAMEA7524440", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:GCA_922984935.2.subset.fasta.gz\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@RG\tID:35528_2#1\tDT:2020-11-17T00:00:00+0000\tPU:201117_A00948_0206_AHGML2DSXY_2#1\tLB:33637906\tPG:SCS\tSM:SAMEA5962964\tCN:SC\tPL:ILLUMINA\tDS:ERP116890: Sequencing and assembly of genomes from British species for the Darwin Tree of Life Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ ", "@PG\tID:SCS.extra_header\tVN:1.7.0\tPN:NovaSeq Control Software\tDS:Controlling software on instrument", "@PG\tID:basecalling.extra_header\tPP:SCS.extra_header\tVN:Unknown\tPN:Unknown\tDS:Basecalling Package", "@PG\tID:bambi.extra_header\tPP:basecalling.extra_header\tVN:0.13.1\tCL:/software/pkgg/bambi/0.13.1/bin/bambi i2b --intensity-dir=/lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities --basecalls-dir=/lustre/scratch121/esa-sv-20200210-01/IL_seq_data/analysis/201117_A00948_0206_AHGML2DSXY/Data/Intensities/BaseCalls --lane=2 --platform-unit=201117_A00948_0206_AHGML2DSXY_2 --read-group-id=35528_2 --study-name=\"ERP116890: Sequencing and assembly of genomes from British species for the Darwin Tree of Life Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ \" --sample-alias=SAMEA5962964,mCerEla1 --threads=8 --output-file=- --compression-level=0\tPN:bambi\tDS:Convert Illumina BCL to BAM or SAM file", @@ -304,11 +310,11 @@ "@PG\tID:samtools.3.extra_header\tPN:samtools\tPP:scramble.extra_header\tVN:1.15\tCL:/usr/local/bin/samtools view -h /lustre/scratch124/tol/projects/darwin/data/mammals/Meles_meles/genomic_data/mMelMel3/hic-arima2/35528_2#1.cram", "@PG\tID:samtools.4.extra_header\tPN:samtools\tPP:samtools.3.extra_header\tVN:1.20\tCL:/usr/local/bin/samtools view --cram 35528_2#1.subset.sam", "@PG\tID:samtools.5.extra_header\tPN:samtools\tPP:samtools.4.extra_header\tVN:1.23.1\tCL:samtools view -H 35528_2_1.subset.cram", - "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax sr --cs=short -I1.0G -y -R @RG\\tID:35528_2_1\\tPL:ILLUMINA\\tSM:SAMEA7524440 GCA_922984935.2.subset.unmasked.mmi -", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax sr --cs=short -I1.0G -y -R @RG\\tID:35528_2#1\\tDT:2020-11-17T00:00:00+0000\\tPU:201117_A00948_0206_AHGML2DSXY_2#1\\tLB:33637906\\tPG:SCS\\tSM:SAMEA5962964\\tCN:SC\\tPL:ILLUMINA\\tDS:ERP116890: Sequencing and assembly of genomes from British species for the Darwin Tree of Life Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ GCA_922984935.2.subset.unmasked.mmi -", "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.22.1\tCL:samtools fixmate -mpu - -", "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.22.1\tCL:samtools view -h", - "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.22.1\tCL:samtools sort --write-index -l1 -@4 -T 35528_2_1.subset_addRG.cram.0.SAMEA7524440.ERR6688402_tmp -o 35528_2_1.subset_addRG.cram.0.SAMEA7524440.ERR6688402.bam -", - "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa - 1/35528_2_1.subset_addRG.cram.0.SAMEA7524440.ERR6688402.bam 2/35528_2_1.subset_addRG.cram.1.SAMEA7524440.ERR6688402.bam", + "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.22.1\tCL:samtools sort --write-index -l1 -@4 -T 35528_2_1.subset.cram.0.SAMEA7524440.ERR6688402_tmp -o 35528_2_1.subset.cram.0.SAMEA7524440.ERR6688402.bam -", + "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa - 1/35528_2_1.subset.cram.0.SAMEA7524440.ERR6688402.bam 2/35528_2_1.subset.cram.1.SAMEA7524440.ERR6688402.bam", "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools markdup -T SAMEA7524440.ERR6688402 -f SAMEA7524440.ERR6688402.metrics --threads 4 --reference GCA_922984935.2.subset.unmasked.fa - SAMEA7524440.ERR6688402.bam", "@PG\tID:crumble\tPN:crumble\tPP:samtools.4\tVN:0.9.1\tCL:crumble -O bam SAMEA7524440.ERR6688402.bam SAMEA7524440.ERR6688402.crumble.bam", "@PG\tID:samtools.5\tPN:samtools\tPP:samtools.5.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.bam", @@ -320,8 +326,8 @@ ], "GCA_922984935.2.subset.illumina.SAMEA7524438.ERR6688599.minimap2.cram": [ "@HD\tVN:1.6\tSO:coordinate", - "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", - "@RG\tID:31231_3#1\tPU:191003_HX4_31231_A_H3353CCX2_3#1\tLB:23687379\tPG:SCS\tSM:SAMEA5962962\tCN:SC\tPL:ILLUMINA\tDS:ERP114452: Sequencing and assembly of vertebrate genomes from British species for the Darwin Tree of Life Project in collaboration with the Vertebrate Genomes Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:GCA_922984935.2.subset.fasta.gz\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@RG\tID:31231_3#1\tDT:2019-10-03T00:00:00+0000\tPU:191003_HX4_31231_A_H3353CCX2_3#1\tLB:23687379\tPG:SCS\tSM:SAMEA5962962\tCN:SC\tPL:ILLUMINA\tDS:ERP114452: Sequencing and assembly of vertebrate genomes from British species for the Darwin Tree of Life Project in collaboration with the Vertebrate Genomes Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/", "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax sr --cs=short -I1.0G -y -R @RG\\tID:31231_3#1\\tDT:2019-10-03T00:00:00+0000\\tPU:191003_HX4_31231_A_H3353CCX2_3#1\\tLB:23687379\\tPG:SCS\\tSM:SAMEA5962962\\tCN:SC\\tPL:ILLUMINA\\tDS:ERP114452: Sequencing and assembly of vertebrate genomes from British species for the Darwin Tree of Life Project in collaboration with the Vertebrate Genomes Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ GCA_922984935.2.subset.unmasked.mmi -", "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.22.1\tCL:samtools fixmate -mpu - -", "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.22.1\tCL:samtools view -h", @@ -334,7 +340,7 @@ ], "GCA_922984935.2.subset.illumina.SAMEA7524439.ERR6688600.minimap2.cram": [ "@HD\tVN:1.6\tSO:coordinate", - "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:GCA_922984935.2.subset.fasta.gz\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", "@RG\tID:31231_4_1\tPL:ILLUMINA\tSM:SAMEA7524439", "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax sr --cs=short -I1.0G -y -R @RG\\tID:31231_4_1\\tPL:ILLUMINA\\tSM:SAMEA7524439 GCA_922984935.2.subset.unmasked.mmi -", "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.22.1\tCL:samtools fixmate -mpu - -", @@ -355,6 +361,6 @@ "nf-test": "0.9.3", "nextflow": "25.10.4" }, - "timestamp": "2026-05-29T04:12:24.650580553" + "timestamp": "2026-06-03T15:03:31.017178618" } } \ No newline at end of file diff --git a/tests/uli.nf.test.snap b/tests/uli.nf.test.snap index 31372cd3..67e31b7e 100644 --- a/tests/uli.nf.test.snap +++ b/tests/uli.nf.test.snap @@ -78,7 +78,7 @@ "SAMTOOLS_MERGE": { "samtools": "1.23.1" }, - "SAMTOOLS_SPLITHEADER": { + "SAMTOOLS_SPLITHEADER_BAM": { "samtools": "1.23.1" }, "SAMTOOLS_STATS": { @@ -209,6 +209,6 @@ "nf-test": "0.9.3", "nextflow": "25.10.4" }, - "timestamp": "2026-05-29T03:53:26.611534435" + "timestamp": "2026-06-03T15:10:45.578688714" } } \ No newline at end of file diff --git a/tests/uli_no_lima.nf.test.snap b/tests/uli_no_lima.nf.test.snap index ab978f72..ae7ad0e0 100644 --- a/tests/uli_no_lima.nf.test.snap +++ b/tests/uli_no_lima.nf.test.snap @@ -75,7 +75,7 @@ "SAMTOOLS_MERGE": { "samtools": "1.23.1" }, - "SAMTOOLS_SPLITHEADER": { + "SAMTOOLS_SPLITHEADER_BAM": { "samtools": "1.23.1" }, "SAMTOOLS_STATS": { @@ -202,6 +202,6 @@ "nf-test": "0.9.3", "nextflow": "25.10.4" }, - "timestamp": "2026-05-28T20:23:05.002283734" + "timestamp": "2026-06-03T15:01:25.398827197" } } \ No newline at end of file diff --git a/tests/untrim.nf.test.snap b/tests/untrim.nf.test.snap index 1b98a7cb..359723b2 100644 --- a/tests/untrim.nf.test.snap +++ b/tests/untrim.nf.test.snap @@ -63,7 +63,10 @@ "SAMTOOLS_REHEADER_BAM": { "samtools": "1.23.1" }, - "SAMTOOLS_SPLITHEADER": { + "SAMTOOLS_SPLITHEADER_BAM": { + "samtools": "1.23.1" + }, + "SAMTOOLS_SPLITHEADER_EXTRA": { "samtools": "1.23.1" }, "SAMTOOLS_STATS": { @@ -200,7 +203,7 @@ { "GCA_922984935.2.subset.ont.SAMEA7524440.PAE35587.minimap2.bam": [ "@HD\tVN:1.6\tSO:coordinate", - "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/resources/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:GCA_922984935.2.subset.fasta.gz\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", "@RG\tID:PAE35587_pass_1f1f0707_115\tPL:ONT\tSM:SAMEA7524440", "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-ont -y -R @RG\\tID:PAE35587_pass_1f1f0707_115\\tPL:ONT\\tSM:SAMEA7524440 -I1G -a GCA_922984935.2.subset.unmasked.mmi -", "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o PAE35587_pass_1f1f0707_115.subset.fastq.gz.0.SAMEA7524440.PAE35587.bam -T PAE35587_pass_1f1f0707_115.subset.fastq.gz.0.SAMEA7524440.PAE35587_sort_tmp --write-index -l1 -", @@ -209,7 +212,7 @@ ], "GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.bam": [ "@HD\tVN:1.6\tSO:coordinate", - "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/resources/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:GCA_922984935.2.subset.fasta.gz\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", "@RG\tID:61ddc6c3/15--15\tPL:PACBIO\tDS:READTYPE=CCS;BINDINGKIT=101-789-500;SEQUENCINGKIT=101-826-100;BASECALLERVERSION=5.0.0;FRAMERATEHZ=100.000000;BarcodeFile=/lustre/scratch116/vr/projects/vgp/ref/barcodes/Sequel_16_Barcodes_v3.fasta;BarcodeHash=e418d89cefcbef90f3cb0e6455b7e2a3;BarcodeCount=16;BarcodeMode=Symmetric;BarcodeQuality=Score\tLB:DN615654G-A1\tPU:m64094_200910_173211\tPM:SEQUELII\tBC:CACTCACGTGTGATATT\tCM:S/P4-C2/5.0-8M\tSM:SAMEA7524440", "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-hifi --cs=short -y -R @RG\\tID:61ddc6c3/15--15\\tPL:PACBIO\\tDS:READTYPE=CCS;BINDINGKIT=101-789-500;SEQUENCINGKIT=101-826-100;BASECALLERVERSION=5.0.0;FRAMERATEHZ=100.000000;BarcodeFile=/lustre/scratch116/vr/projects/vgp/ref/barcodes/Sequel_16_Barcodes_v3.fasta;BarcodeHash=e418d89cefcbef90f3cb0e6455b7e2a3;BarcodeCount=16;BarcodeMode=Symmetric;BarcodeQuality=Score\\tLB:DN615654G-A1\\tPU:m64094_200910_173211\\tPM:SEQUELII\\tBC:CACTCACGTGTGATATT\\tCM:S/P4-C2/5.0-8M\\tSM:SAMEA7524440 -I1G -a GCA_922984935.2.subset.unmasked.mmi -", "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o SAMEA7524440.ERR6939248_other.fastq.gz.0.SAMEA7524440.ERR6939248.bam -T SAMEA7524440.ERR6939248_other.fastq.gz.0.SAMEA7524440.ERR6939248_sort_tmp --write-index -l1 -", @@ -219,28 +222,27 @@ ], "GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam": [ "@HD\tVN:1.6\tSO:coordinate", - "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/resources/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", - "@RG\tID:m64094_200911_174739\tPL:PACBIO\tSM:SAMEA7524440", - "@PG\tID:samtools.extra_header\tPN:samtools\tVN:1.22.1\tCL:samtools collate --output-fmt cram -O -u -T mMelMel3_T4.collate --threads 4 --reference GCA_922984935.2.subset.unmasked.fasta m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.fastq.gz -", - "@PG\tID:samtools.1.extra_header\tPN:samtools\tPP:samtools.extra_header\tVN:1.22.1\tCL:samtools fixmate -m -u --threads 4 - -", - "@PG\tID:samtools.2.extra_header\tPN:samtools\tPP:samtools.1.extra_header\tVN:1.22.1\tCL:samtools sort -u -T mMelMel3_T4.sort --threads 4 -", - "@PG\tID:samtools.3.extra_header\tPN:samtools\tPP:samtools.2.extra_header\tVN:1.22.1\tCL:samtools markdup -T mMelMel3_T4.markdup -f mMelMel3_T4.metrics --threads 4 - mMelMel3_T4.cram", - "@PG\tID:samtools.4.extra_header\tPN:samtools\tPP:samtools.3.extra_header\tVN:1.23.1\tCL:samtools view -H m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.cram", - "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-hifi --cs=short -y -R @RG\\tID:m64094_200911_174739\\tPL:PACBIO\\tSM:SAMEA7524440 -I1G -a GCA_922984935.2.subset.unmasked.mmi -", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:GCA_922984935.2.subset.fasta.gz\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@RG\tID:aaa0cf18/15--15\tPL:PACBIO\tDS:READTYPE=CCS;BINDINGKIT=101-789-500;SEQUENCINGKIT=101-826-100;BASECALLERVERSION=5.0.0;FRAMERATEHZ=100.000000;BarcodeFile=/lustre/scratch116/vr/projects/vgp/ref/barcodes/Sequel_16_Barcodes_v3.fasta;BarcodeHash=e418d89cefcbef90f3cb0e6455b7e2a3;BarcodeCount=16;BarcodeMode=Symmetric;BarcodeQuality=Score\tLB:DN615654G-A1\tPU:m64094_200911_174739\tPM:SEQUELII\tBC:CACTCACGTGTGATATT\tCM:S/P4-C2/5.0-8M\tSM:SAMEA7524440", + "@PG\tID:ccs-4.2.0.extra_header\tPN:ccs\tVN:4.2.0\tDS:Generate circular consensus sequences (ccs) from subreads.\tCL:ccs ccs --chunk 1/64 -j 8 --max-length 50000 ../../m64094_200911_174739.subreads.bam m64094_200911_174739.ccs.bam", + "@PG\tID:lima.extra_header\tVN:1.11.0 (commit v1.11.0)\tCL:lima -j 8 --split-bam-named --same --peek-guess --guess-min-count 1000 --ccs m64094_200911_174739.ccs.bam /lustre/scratch116/vr/projects/vgp/ref/barcodes/Sequel_16_Barcodes_v3.fasta lima/m64094_200911_174739.ccs.bam", + "@PG\tID:samtools.extra_header\tPN:samtools\tVN:1.10\tPP:ccs-4.2.0.extra_header\tCL:samtools merge -@8 -ncp -b m64094_200911_174739.chunks.fofn m64094_200911_174739.ccs.bam", + "@PG\tID:samtools.1.extra_header\tPN:samtools\tPP:samtools.extra_header\tVN:1.23.1\tCL:samtools view -H /lustre/scratch122/tol/data/9/9/f/1/6/d/Meles_meles/genomic_data/mMelMel3/pacbio/m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.bam", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-hifi --cs=short -y -R @RG\\tID:aaa0cf18/15--15\\tPL:PACBIO\\tDS:READTYPE=CCS;BINDINGKIT=101-789-500;SEQUENCINGKIT=101-826-100;BASECALLERVERSION=5.0.0;FRAMERATEHZ=100.000000;BarcodeFile=/lustre/scratch116/vr/projects/vgp/ref/barcodes/Sequel_16_Barcodes_v3.fasta;BarcodeHash=e418d89cefcbef90f3cb0e6455b7e2a3;BarcodeCount=16;BarcodeMode=Symmetric;BarcodeQuality=Score\\tLB:DN615654G-A1\\tPU:m64094_200911_174739\\tPM:SEQUELII\\tBC:CACTCACGTGTGATATT\\tCM:S/P4-C2/5.0-8M\\tSM:SAMEA7524440 -I1G -a GCA_922984935.2.subset.unmasked.mmi -", "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.fastq.gz.0.SAMEA7524440.ERR6939249.bam -T m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.fastq.gz.0.SAMEA7524440.ERR6939249_sort_tmp --write-index -l1 -", "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa SAMEA7524440.ERR6939249.merge.bam 1/m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.fastq.gz.0.SAMEA7524440.ERR6939249.bam", "@PG\tID:crumble\tPN:crumble\tPP:samtools.1\tVN:0.9.1\tCL:crumble -y pbccs -O bam SAMEA7524440.ERR6939249.merge.bam SAMEA7524440.ERR6939249.merge.crumble.bam", - "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.4.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", + "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", "@PG\tID:samtools.3\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", "@PG\tID:samtools.5\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam" ], "GCA_922984935.2.subset.pacbio.SAMEA7524440.merged_1.minimap2.bam": [ "@HD\tVN:1.6\tSO:coordinate", - "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:/nfs/treeoflife-01/resources/\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", - "@RG\tID:m64094_200911_174739\tPL:PACBIO\tSM:SAMEA7524440", + "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:GCA_922984935.2.subset.fasta.gz\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", + "@RG\tID:aaa0cf18/15--15\tPL:PACBIO\tDS:READTYPE=CCS;BINDINGKIT=101-789-500;SEQUENCINGKIT=101-826-100;BASECALLERVERSION=5.0.0;FRAMERATEHZ=100.000000;BarcodeFile=/lustre/scratch116/vr/projects/vgp/ref/barcodes/Sequel_16_Barcodes_v3.fasta;BarcodeHash=e418d89cefcbef90f3cb0e6455b7e2a3;BarcodeCount=16;BarcodeMode=Symmetric;BarcodeQuality=Score\tLB:DN615654G-A1\tPU:m64094_200911_174739\tPM:SEQUELII\tBC:CACTCACGTGTGATATT\tCM:S/P4-C2/5.0-8M\tSM:SAMEA7524440", "@RG\tID:61ddc6c3/15--15\tPL:PACBIO\tDS:READTYPE=CCS;BINDINGKIT=101-789-500;SEQUENCINGKIT=101-826-100;BASECALLERVERSION=5.0.0;FRAMERATEHZ=100.000000;BarcodeFile=/lustre/scratch116/vr/projects/vgp/ref/barcodes/Sequel_16_Barcodes_v3.fasta;BarcodeHash=e418d89cefcbef90f3cb0e6455b7e2a3;BarcodeCount=16;BarcodeMode=Symmetric;BarcodeQuality=Score\tLB:DN615654G-A1\tPU:m64094_200910_173211\tPM:SEQUELII\tBC:CACTCACGTGTGATATT\tCM:S/P4-C2/5.0-8M\tSM:SAMEA7524440", - "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-hifi --cs=short -y -R @RG\\tID:m64094_200911_174739\\tPL:PACBIO\\tSM:SAMEA7524440 -I1G -a GCA_922984935.2.subset.unmasked.mmi -", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-hifi --cs=short -y -R @RG\\tID:aaa0cf18/15--15\\tPL:PACBIO\\tDS:READTYPE=CCS;BINDINGKIT=101-789-500;SEQUENCINGKIT=101-826-100;BASECALLERVERSION=5.0.0;FRAMERATEHZ=100.000000;BarcodeFile=/lustre/scratch116/vr/projects/vgp/ref/barcodes/Sequel_16_Barcodes_v3.fasta;BarcodeHash=e418d89cefcbef90f3cb0e6455b7e2a3;BarcodeCount=16;BarcodeMode=Symmetric;BarcodeQuality=Score\\tLB:DN615654G-A1\\tPU:m64094_200911_174739\\tPM:SEQUELII\\tBC:CACTCACGTGTGATATT\\tCM:S/P4-C2/5.0-8M\\tSM:SAMEA7524440 -I1G -a GCA_922984935.2.subset.unmasked.mmi -", "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.fastq.gz.0.SAMEA7524440.ERR6939249.bam -T m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.fastq.gz.0.SAMEA7524440.ERR6939249_sort_tmp --write-index -l1 -", "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa SAMEA7524440.ERR6939249.merge.bam 1/m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.fastq.gz.0.SAMEA7524440.ERR6939249.bam", "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p SAMEA7524440.merged_1.merge.bam 1/SAMEA7524440.ERR6939249.merge.bam 2/SAMEA7524440.ERR6939248.merge.bam", @@ -259,6 +261,6 @@ "nf-test": "0.9.3", "nextflow": "25.10.4" }, - "timestamp": "2026-05-29T03:12:18.823237748" + "timestamp": "2026-06-03T15:07:54.364990996" } } \ No newline at end of file From 85468305093b049ae134ace4c0985ae374044745 Mon Sep 17 00:00:00 2001 From: Hanh Hoang <134130358+sainsachiko@users.noreply.github.com> Date: Wed, 3 Jun 2026 23:10:45 +0700 Subject: [PATCH 16/20] Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Matthieu Muffato Co-authored-by: Hanh Hoang <134130358+sainsachiko@users.noreply.github.com> --- .github/workflows/download_pipeline.yml | 2 +- assets/schema_input.json | 4 ++-- subworkflows/local/input_check.nf | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/download_pipeline.yml b/.github/workflows/download_pipeline.yml index 52784804..45884ff9 100644 --- a/.github/workflows/download_pipeline.yml +++ b/.github/workflows/download_pipeline.yml @@ -32,7 +32,7 @@ jobs: run: | echo "REPO_LOWERCASE=${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT" echo "REPOTITLE_LOWERCASE=$(basename ${GITHUB_REPOSITORY,,})" >> "$GITHUB_OUTPUT" - echo "REPO_BRANCH=${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.event.inputs.testbranch || 'dev' }}" >> "$GITHUB_OUTPUT" + echo "REPO_BRANCH=${{ github.event.inputs.testbranch || 'dev' }}" >> "$GITHUB_OUTPUT" download: runs-on: ubuntu-latest diff --git a/assets/schema_input.json b/assets/schema_input.json index 70754236..879e4422 100644 --- a/assets/schema_input.json +++ b/assets/schema_input.json @@ -50,8 +50,8 @@ "type": "string", "format": "file-path", "exists": true, - "pattern": "^\\S+\\.(sam|sam.gz)$", - "errorMessage": "SAM header file cannot contain spaces and must be in SAM format", + "pattern": "^\\S+\\.sam$", + "errorMessage": "SAM header file cannot contain spaces and must be an uncompressed SAM file" "meta": ["extra_header"] } }, diff --git a/subworkflows/local/input_check.nf b/subworkflows/local/input_check.nf index 4d7134c5..fb8bd8e3 100644 --- a/subworkflows/local/input_check.nf +++ b/subworkflows/local/input_check.nf @@ -55,7 +55,7 @@ def create_data_channel ( LinkedHashMap row, datafile, stats ) { meta.datatype = row.datatype meta.library = row.library meta.barcode = row.barcode - meta.extra_header = row.extra_header ? file(row.extra_header, checkIfExists: true) : [] + meta.extra_header = row.extra_header ?: [] def platform = (meta.datatype == "hic" || meta.datatype == "illumina") ? "ILLUMINA" : (meta.datatype == "pacbio" || meta.datatype == "pacbio_clr") ? "PACBIO" : From b3abe170866ed3c2415f949b8c15234f1045b4b2 Mon Sep 17 00:00:00 2001 From: sainsachiko Date: Wed, 3 Jun 2026 17:17:32 +0100 Subject: [PATCH 17/20] Forgot comma --- assets/schema_input.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/schema_input.json b/assets/schema_input.json index 879e4422..4b2ac6d3 100644 --- a/assets/schema_input.json +++ b/assets/schema_input.json @@ -51,7 +51,7 @@ "format": "file-path", "exists": true, "pattern": "^\\S+\\.sam$", - "errorMessage": "SAM header file cannot contain spaces and must be an uncompressed SAM file" + "errorMessage": "SAM header file cannot contain spaces and must be an uncompressed SAM file", "meta": ["extra_header"] } }, From e4ae1ed7de421728a23f42f7487f55e5874d9050 Mon Sep 17 00:00:00 2001 From: sainsachiko Date: Thu, 4 Jun 2026 17:58:16 +0100 Subject: [PATCH 18/20] Chaining PG line in header --- .../local/samtools/reheader/samtools_replaceheader.nf | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/modules/local/samtools/reheader/samtools_replaceheader.nf b/modules/local/samtools/reheader/samtools_replaceheader.nf index 93123950..b5435e15 100644 --- a/modules/local/samtools/reheader/samtools_replaceheader.nf +++ b/modules/local/samtools/reheader/samtools_replaceheader.nf @@ -14,7 +14,7 @@ process SAMTOOLS_REHEADER { output: tuple val(meta), path("${prefix}.bam") , optional:true, emit: bam tuple val(meta), path("${prefix}.cram"), optional:true, emit: cram - tuple val("${task.process}"), val('samtools'), eval("samtools version | sed '1!d;s/.* //'"), topic: versions, emit: versions_samtools + tuple val("${task.process}"), val('samtools'), eval("samtools version | sed '1!d;s/.* //'") , topic: versions, emit: versions_samtools when: task.ext.when == null || task.ext.when @@ -26,6 +26,8 @@ process SAMTOOLS_REHEADER { // Suffix all PG IDs from sample extra_header to keep them distinct from native file-header PG IDs. // Also rewrite matching PP references so the extra-header PG chain remains intact after suffixing. def pg_extra = sample_extra_header ? "awk 'BEGIN { FS = OFS = \"\\t\" } FNR == NR { if (\$1 == \"@PG\") for (i = 1; i <= NF; i++) if (\$i ~ /^ID:/) { ids[substr(\$i, 4)] = 1; break } next } \$1 == \"@PG\" { for (i = 1; i <= NF; i++) { if (\$i ~ /^ID:/) { \$i = \$i \".extra_header\" } else if (\$i ~ /^PP:/) { pp = substr(\$i, 4); if (pp in ids) \$i = \"PP:\" pp \".extra_header\" } } print }' ${sample_extra_header} ${sample_extra_header} || true" : "true" + // Last inserted PG ID (after suffix) used to bridge native PG root via PP. + def pg_extra_last_id = sample_extra_header ? "awk 'BEGIN { FS = OFS = \"\\t\" } \$1 == \"@PG\" { for (i = 1; i <= NF; i++) if (\$i ~ /^ID:/) { last = substr(\$i, 4) \".extra_header\"; break } } END { if (last != \"\") print last }' ${sample_extra_header}" : "echo ''" if ("$file" == "${prefix}.${suffix}") error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!" """ @@ -34,13 +36,14 @@ process SAMTOOLS_REHEADER { ${sq_template} ) > temp.header.sam # custom sort for readability (retain order of insertion but sort groups by tag) - # Add PG lines from sample header + # Add PG lines from sample header and bridge native PG root to inserted chain # Sort order: HD, SQ, RG, extra PG, PG, other + bridge_id="\$(${pg_extra_last_id})" ( grep ^@HD temp.header.sam || true && \\ grep ^@SQ temp.header.sam || true && \\ grep ^@RG temp.header.sam || true && \\ ${pg_extra} && \\ - grep ^@PG temp.header.sam || true && \\ + awk -v bridge_id="\$bridge_id" 'BEGIN { FS = OFS = "\\t" } \$1 == "@PG" { if (!bridged) { has_pp = 0; for (i = 1; i <= NF; i++) if (\$i ~ /^PP:/) { has_pp = 1; break } if (!has_pp && bridge_id != "") \$0 = \$0 OFS "PP:" bridge_id; bridged = 1 } print; next }' temp.header.sam || true && \\ grep -v -E '^@HD|^@SQ|^@RG|^@PG' temp.header.sam || true; \\ ) > temp.sorted.header.sam @@ -54,4 +57,4 @@ process SAMTOOLS_REHEADER { """ touch ${prefix}.${suffix} """ -} +} \ No newline at end of file From bb4757af35ec2336c85576451debe253cef239c7 Mon Sep 17 00:00:00 2001 From: sainsachiko Date: Thu, 4 Jun 2026 19:51:52 +0100 Subject: [PATCH 19/20] Reheader SQ in SAMTOOLS_VIEW --- conf/modules.config | 1 - modules.json | 3 +- modules/nf-core/samtools/view/main.nf | 60 +++++++++--- .../nf-core/samtools/view/samtools-view.diff | 92 +++++++++++++++++++ subworkflows/local/align_short.nf | 2 +- subworkflows/local/convert_stats.nf | 33 +++---- tests/default.nf.test.snap | 85 ++++++++--------- tests/short_aligner_minimap2.nf.test.snap | 41 +++------ tests/uli.nf.test.snap | 2 +- tests/uli_no_lima.nf.test.snap | 2 +- tests/untrim.nf.test.snap | 14 +-- 11 files changed, 213 insertions(+), 122 deletions(-) create mode 100644 modules/nf-core/samtools/view/samtools-view.diff diff --git a/conf/modules.config b/conf/modules.config index f7f2b817..7c8ee275 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -220,7 +220,6 @@ process { // CRAM and index: from SAMTOOLS_CRAM if no header provided, else from SAMTOOLS_INDEX_CRAM saveAs: { filename -> if (filename == 'versions.yml' - || (task.process =~ /SAMTOOLS_CRAM/ && params.header && filename.matches('.*\\.(cram|crai)$')) || ((task.process =~ /SAMTOOLS_CRAM/) && filename.endsWith('.bam') )) { return null } diff --git a/modules.json b/modules.json index 979208ba..e8eb0fe0 100644 --- a/modules.json +++ b/modules.json @@ -130,7 +130,8 @@ "samtools/view": { "branch": "master", "git_sha": "2057a0a8dbd67000d08613a556570aa7184a7c89", - "installed_by": ["modules"] + "installed_by": ["modules"], + "patch": "modules/nf-core/samtools/view/samtools-view.diff" } } }, diff --git a/modules/nf-core/samtools/view/main.nf b/modules/nf-core/samtools/view/main.nf index 724561bf..4031e7fe 100644 --- a/modules/nf-core/samtools/view/main.nf +++ b/modules/nf-core/samtools/view/main.nf @@ -12,6 +12,7 @@ process SAMTOOLS_VIEW { tuple val(meta2), path(fasta), path(fai) tuple val(meta3), path(qname) tuple val(meta4), path(bed) + tuple val(meta5), path(reheader_header) val index_format output: @@ -33,6 +34,9 @@ process SAMTOOLS_VIEW { def args2 = task.ext.args2 ?: '' prefix = task.ext.prefix ?: "${meta.id}" def reference = fasta ? "--reference ${fasta}" : "" + def args_no_write_index = args.replaceAll(/(^|\\s)--write-index(\\s|$)/, ' ').trim() + def should_index = index_format || args.contains('--write-index') + def index_opt = index_format == 'bai' ? '-b' : index_format == 'csi' ? '-c' : '' file_type = args.contains("--output-fmt sam") ? "sam" : args.contains("--output-fmt bam") @@ -57,19 +61,49 @@ process SAMTOOLS_VIEW { error("Indexing not compatible with SAM output") } } - """ - # Note: --threads value represents *additional* CPUs to allocate (total CPUs = 1 + --threads). - samtools \\ - view \\ - --threads ${task.cpus - 1} \\ - ${reference} \\ - ${readnames} \\ - ${bedfile} \\ - ${args} \\ - -o ${output_file} \\ - ${input} \\ - ${args2} - """ + + if (reheader_header) { + """ + # Note: --threads value represents *additional* CPUs to allocate (total CPUs = 1 + --threads). + samtools \\ + view \\ + --threads ${task.cpus - 1} \\ + ${reference} \\ + ${readnames} \\ + ${bedfile} \\ + ${args_no_write_index} \\ + -o ${prefix}.${file_type} \\ + ${input} \\ + ${args2} + + # Build a complete header by preserving existing lines and replacing only @SQ from template. + ( samtools view --no-PG --header-only ${prefix}.${file_type} | grep -v '^@SQ' && grep '^@SQ' ${reheader_header} ) > temp.reheader.header.sam + + samtools reheader temp.reheader.header.sam ${prefix}.${file_type} > ${prefix}.reheader.${file_type} + mv ${prefix}.reheader.${file_type} ${prefix}.${file_type} + + if [[ "${should_index}" == "true" && "${file_type}" != "sam" ]]; then + samtools index --threads ${task.cpus - 1} ${index_opt} ${prefix}.${file_type} + if [[ -s ${prefix}.unselected.${file_type} ]]; then + samtools index --threads ${task.cpus - 1} ${index_opt} ${prefix}.unselected.${file_type} + fi + fi + """ + } else { + """ + # Note: --threads value represents *additional* CPUs to allocate (total CPUs = 1 + --threads). + samtools \\ + view \\ + --threads ${task.cpus - 1} \\ + ${reference} \\ + ${readnames} \\ + ${bedfile} \\ + ${args} \\ + -o ${output_file} \\ + ${input} \\ + ${args2} + """ + } stub: def args = task.ext.args ?: '' diff --git a/modules/nf-core/samtools/view/samtools-view.diff b/modules/nf-core/samtools/view/samtools-view.diff new file mode 100644 index 00000000..5b0c9ded --- /dev/null +++ b/modules/nf-core/samtools/view/samtools-view.diff @@ -0,0 +1,92 @@ +Changes in component 'nf-core/samtools/view' +'modules/nf-core/samtools/view/meta.yml' is unchanged +'modules/nf-core/samtools/view/environment.yml' is unchanged +Changes in 'samtools/view/main.nf': +--- modules/nf-core/samtools/view/main.nf ++++ modules/nf-core/samtools/view/main.nf +@@ -12,6 +12,7 @@ + tuple val(meta2), path(fasta), path(fai) + tuple val(meta3), path(qname) + tuple val(meta4), path(bed) ++ tuple val(meta5), path(reheader_header) + val index_format + + output: +@@ -33,6 +34,9 @@ + def args2 = task.ext.args2 ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + def reference = fasta ? "--reference ${fasta}" : "" ++ def args_no_write_index = args.replaceAll(/(^|\\s)--write-index(\\s|$)/, ' ').trim() ++ def should_index = index_format || args.contains('--write-index') ++ def index_opt = index_format == 'bai' ? '-b' : index_format == 'csi' ? '-c' : '' + file_type = args.contains("--output-fmt sam") + ? "sam" + : args.contains("--output-fmt bam") +@@ -57,19 +61,49 @@ + error("Indexing not compatible with SAM output") + } + } +- """ +- # Note: --threads value represents *additional* CPUs to allocate (total CPUs = 1 + --threads). +- samtools \\ +- view \\ +- --threads ${task.cpus - 1} \\ +- ${reference} \\ +- ${readnames} \\ +- ${bedfile} \\ +- ${args} \\ +- -o ${output_file} \\ +- ${input} \\ +- ${args2} +- """ ++ ++ if (reheader_header) { ++ """ ++ # Note: --threads value represents *additional* CPUs to allocate (total CPUs = 1 + --threads). ++ samtools \\ ++ view \\ ++ --threads ${task.cpus - 1} \\ ++ ${reference} \\ ++ ${readnames} \\ ++ ${bedfile} \\ ++ ${args_no_write_index} \\ ++ -o ${prefix}.${file_type} \\ ++ ${input} \\ ++ ${args2} ++ ++ # Build a complete header by preserving existing lines and replacing only @SQ from template. ++ ( samtools view --no-PG --header-only ${prefix}.${file_type} | grep -v '^@SQ' && grep '^@SQ' ${reheader_header} ) > temp.reheader.header.sam ++ ++ samtools reheader temp.reheader.header.sam ${prefix}.${file_type} > ${prefix}.reheader.${file_type} ++ mv ${prefix}.reheader.${file_type} ${prefix}.${file_type} ++ ++ if [[ "${should_index}" == "true" && "${file_type}" != "sam" ]]; then ++ samtools index --threads ${task.cpus - 1} ${index_opt} ${prefix}.${file_type} ++ if [[ -s ${prefix}.unselected.${file_type} ]]; then ++ samtools index --threads ${task.cpus - 1} ${index_opt} ${prefix}.unselected.${file_type} ++ fi ++ fi ++ """ ++ } else { ++ """ ++ # Note: --threads value represents *additional* CPUs to allocate (total CPUs = 1 + --threads). ++ samtools \\ ++ view \\ ++ --threads ${task.cpus - 1} \\ ++ ${reference} \\ ++ ${readnames} \\ ++ ${bedfile} \\ ++ ${args} \\ ++ -o ${output_file} \\ ++ ${input} \\ ++ ${args2} ++ """ ++ } + + stub: + def args = task.ext.args ?: '' + +'modules/nf-core/samtools/view/tests/nextflow.config' is unchanged +'modules/nf-core/samtools/view/tests/main.nf.test' is unchanged +'modules/nf-core/samtools/view/tests/main.nf.test.snap' is unchanged +************************************************************ diff --git a/subworkflows/local/align_short.nf b/subworkflows/local/align_short.nf index 8f285fa2..c2cf4c3d 100644 --- a/subworkflows/local/align_short.nf +++ b/subworkflows/local/align_short.nf @@ -34,7 +34,7 @@ workflow ALIGN_SHORT { ch_reads_non_crams = ch_reads.non_cram.map { meta, file -> [ meta, file, [] ] } fasta_dummy_idx = fasta.map { meta, fasta_file -> [ meta, fasta_file, [] ] } - CONVERT_CRAM ( ch_reads_non_crams, fasta_dummy_idx, [[],[]], [[],[]], "" ) + CONVERT_CRAM ( ch_reads_non_crams, fasta_dummy_idx, [[],[]], [[],[]], [[],[]], "" ) // Add read group information to CRAMs if not already present, and merge with CRAMs that already have RG information ch_crams_to_addrg = CONVERT_CRAM.out.cram diff --git a/subworkflows/local/convert_stats.nf b/subworkflows/local/convert_stats.nf index dac085d4..21b37335 100644 --- a/subworkflows/local/convert_stats.nf +++ b/subworkflows/local/convert_stats.nf @@ -5,9 +5,7 @@ // MODULE: local modules include { CHANGE_NAME } from '../../modules/local/change_name' -include { SAMTOOLS_REHEADER as SAMTOOLS_ADD_PG } from '../../modules/local/samtools/reheader/samtools_replaceheader' include { SAMTOOLS_REHEADER as SAMTOOLS_REHEADER_BAM } from '../../modules/local/samtools/reheader/samtools_replaceheader' -include { SAMTOOLS_REHEADER as SAMTOOLS_REHEADER_CRAM } from '../../modules/local/samtools/reheader/samtools_replaceheader' // MODULE: nf-core modules include { BLOBTK_DEPTH } from '../../modules/nf-core/blobtk/depth/main' @@ -15,7 +13,6 @@ include { CRUMBLE } from '../../modules/nf-cor include { PIGZ_COMPRESS as GZIP_STATS } from '../../modules/nf-core/pigz/compress/main' include { SAMTOOLS_VIEW as SAMTOOLS_CRAM } from '../../modules/nf-core/samtools/view/main' include { SAMTOOLS_INDEX as SAMTOOLS_INDEX_BAM } from '../../modules/nf-core/samtools/index/main' -include { SAMTOOLS_INDEX as SAMTOOLS_INDEX_CRAM } from '../../modules/nf-core/samtools/index/main' include { SAMTOOLS_STATS } from '../../modules/nf-core/samtools/stats/main' include { SAMTOOLS_FLAGSTAT } from '../../modules/nf-core/samtools/flagstat/main' include { SAMTOOLS_IDXSTATS } from '../../modules/nf-core/samtools/idxstats/main' @@ -57,16 +54,18 @@ workflow CONVERT_STATS { // Change name of BAM files to final name for publishing CHANGE_NAME ( ch_bams_for_renaming, fasta ) + header_value = params.header ? header.first() : channel.value([]) ch_renamed_bams = CHANGE_NAME.out.file .branch { meta, bam_file -> - extra_header: meta.add_pg - return [ meta, bam_file, meta.extra_header ] - no_extra_header: true + reheader: (params.header || meta.add_pg) + return [ meta, bam_file, (meta.add_pg ? meta.extra_header : []) ] + passthrough: true } - SAMTOOLS_ADD_PG( ch_renamed_bams.extra_header, [] ) - ch_bams_add_pg = SAMTOOLS_ADD_PG.out.bam - .mix( ch_renamed_bams.no_extra_header ) + // Reheader only when needed: optional template header and/or sample extra @PG. + SAMTOOLS_REHEADER_BAM( ch_renamed_bams.reheader, header_value ) + ch_bams_reheadered = SAMTOOLS_REHEADER_BAM.out.bam + .mix( ch_renamed_bams.passthrough ) .map { meta, bam_file -> [ meta, bam_file, [] ] } // (Optionally) convert to CRAM if it's specified in outfmt @@ -74,18 +73,12 @@ workflow CONVERT_STATS { ch_crai = channel.empty() fasta_dummy_idx = fasta.map { meta, fasta_file -> [ meta, fasta_file, [] ] } + cram_reheader_header = params.header ? header_value.map { hdr -> [[], hdr] } : [[],[]] if ( "cram" in outfmt_options ) { - SAMTOOLS_CRAM ( ch_bams_add_pg, fasta_dummy_idx, [[],[]], [[],[]], "" ) + SAMTOOLS_CRAM ( ch_bams_reheadered, fasta_dummy_idx, [[],[]], [[],[]], cram_reheader_header, "" ) ch_cram = SAMTOOLS_CRAM.out.cram ch_crai = SAMTOOLS_CRAM.out.crai - if ( params.header ) { - SAMTOOLS_REHEADER_CRAM ( SAMTOOLS_CRAM.out.cram.map{ meta, cram -> [ meta, cram, []] }, header.first() ) - SAMTOOLS_INDEX_CRAM ( SAMTOOLS_REHEADER_CRAM.out.cram ) - ch_cram = SAMTOOLS_INDEX_CRAM.out.input - ch_crai = SAMTOOLS_INDEX_CRAM.out.index - } - // Combine CRAM and CRAI into one channel ch_for_stats = ch_cram.join ( ch_crai ) } @@ -95,8 +88,8 @@ workflow CONVERT_STATS { ch_bai = channel.empty() if ( "bam" in outfmt_options ) { - // Re-header && reindex BAM - ch_bam = params.header ? SAMTOOLS_REHEADER_BAM ( ch_bams_add_pg, header.first() ).bam : ch_bams_add_pg.map{ meta, bam_file, _empty -> [ meta, bam_file ] } + // Reindex BAM already processed by unified reheader step. + ch_bam = ch_bams_reheadered.map{ meta, bam_file, _empty -> [ meta, bam_file ] } SAMTOOLS_INDEX_BAM ( ch_bam ) // Set the BAM and BAI channels for emission @@ -110,7 +103,7 @@ workflow CONVERT_STATS { } // Calculate read depth - BLOBTK_DEPTH ( ch_bams_add_pg ) + BLOBTK_DEPTH ( ch_bams_reheadered ) BGZIP_BEDGRAPH ( BLOBTK_DEPTH.out.bed ) // Calculate statistics diff --git a/tests/default.nf.test.snap b/tests/default.nf.test.snap index da6fbc45..d98898ae 100644 --- a/tests/default.nf.test.snap +++ b/tests/default.nf.test.snap @@ -1,7 +1,7 @@ { "-profile test": { "content": [ - 183, + 171, { "BGZIP_BEDGRAPH": { "samtools": "1.23.1" @@ -73,9 +73,6 @@ "SAMTOOLS_ADDREPLACERG": { "samtools": "1.23.1" }, - "SAMTOOLS_ADD_PG": { - "samtools": "1.23.1" - }, "SAMTOOLS_CRAM": { "samtools": "1.23.1" }, @@ -94,16 +91,13 @@ "SAMTOOLS_INDEX": { "samtools": "1.23.1" }, - "SAMTOOLS_INDEX_CRAM": { - "samtools": "1.23.1" - }, "SAMTOOLS_MERGE": { "samtools": "1.23.1" }, "SAMTOOLS_MERGEDUP": { "samtools": "1.23.1" }, - "SAMTOOLS_REHEADER_CRAM": { + "SAMTOOLS_REHEADER_BAM": { "samtools": "1.23.1" }, "SAMTOOLS_SPLITHEADER": { @@ -410,19 +404,16 @@ "@PG\tID:samtools.3.extra_header\tPN:samtools\tPP:scramble.extra_header\tVN:1.15\tCL:/usr/local/bin/samtools view -h /lustre/scratch124/tol/projects/darwin/data/mammals/Meles_meles/genomic_data/mMelMel3/hic-arima2/35528_2#1.cram", "@PG\tID:samtools.4.extra_header\tPN:samtools\tPP:samtools.3.extra_header\tVN:1.20\tCL:/usr/local/bin/samtools view --cram 35528_2#1.subset.sam", "@PG\tID:samtools.5.extra_header\tPN:samtools\tPP:samtools.4.extra_header\tVN:1.23.1\tCL:samtools view -H 35528_2_1.subset.cram", - "@PG\tID:bwa-mem2\tPN:bwa-mem2\tVN:2.2.1\tCL:bwa-mem2 mem -5SPCp -t 4 ./bwamem2/GCA_922984935.2.subset.unmasked.fa -C -H @RG\\tID:35528_2#1\\tDT:2020-11-17T00:00:00+0000\\tPU:201117_A00948_0206_AHGML2DSXY_2#1\\tLB:33637906\\tPG:SCS\\tSM:SAMEA5962964\\tCN:SC\\tPL:ILLUMINA\\tDS:ERP116890: Sequencing and assembly of genomes from British species for the Darwin Tree of Life Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ -", + "@PG\tID:bwa-mem2\tPN:bwa-mem2\tVN:2.2.1\tCL:bwa-mem2 mem -5SPCp -t 4 ./bwamem2/GCA_922984935.2.subset.unmasked.fa -C -H @RG\\tID:35528_2#1\\tDT:2020-11-17T00:00:00+0000\\tPU:201117_A00948_0206_AHGML2DSXY_2#1\\tLB:33637906\\tPG:SCS\\tSM:SAMEA5962964\\tCN:SC\\tPL:ILLUMINA\\tDS:ERP116890: Sequencing and assembly of genomes from British species for the Darwin Tree of Life Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ -\tPP:samtools.5.extra_header", "@PG\tID:samtools\tPN:samtools\tPP:bwa-mem2\tVN:1.22.1\tCL:samtools fixmate -mpu - -", "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.22.1\tCL:samtools view -h", "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.22.1\tCL:samtools sort --write-index -l1 -@4 -T 35528_2_1.subset.cram.0.SAMEA7524440.ERR6688402_tmp -o 35528_2_1.subset.cram.0.SAMEA7524440.ERR6688402.bam -", "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa - 1/35528_2_1.subset.cram.0.SAMEA7524440.ERR6688402.bam 2/35528_2_1.subset.cram.1.SAMEA7524440.ERR6688402.bam", "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools markdup -T SAMEA7524440.ERR6688402 -f SAMEA7524440.ERR6688402.metrics --threads 4 --reference GCA_922984935.2.subset.unmasked.fa - SAMEA7524440.ERR6688402.bam", "@PG\tID:crumble\tPN:crumble\tPP:samtools.4\tVN:0.9.1\tCL:crumble -O bam SAMEA7524440.ERR6688402.bam SAMEA7524440.ERR6688402.crumble.bam", - "@PG\tID:samtools.5\tPN:samtools\tPP:samtools.5.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.bam", - "@PG\tID:samtools.6\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.bam", - "@PG\tID:samtools.7\tPN:samtools\tPP:samtools.5\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.bam", - "@PG\tID:samtools.8\tPN:samtools\tPP:samtools.6\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.bam", - "@PG\tID:samtools.9\tPN:samtools\tPP:samtools.7\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram", - "@PG\tID:samtools.10\tPN:samtools\tPP:samtools.8\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram" + "@PG\tID:samtools.5\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.bam", + "@PG\tID:samtools.6\tPN:samtools\tPP:samtools.5\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.bam", + "@PG\tID:samtools.7\tPN:samtools\tPP:samtools.6\tVN:1.23.1\tCL:samtools reheader temp.reheader.header.sam GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.bwamem2.cram" ], "GCA_922984935.2.subset.illumina.SAMEA7524438.ERR6688599.bwamem2.cram": [ "@HD\tVN:1.6\tSO:coordinate", @@ -435,8 +426,9 @@ "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa - 1/31231_3_1.subset.cram.0.SAMEA7524438.ERR6688599.bam 2/31231_3_1.subset.cram.1.SAMEA7524438.ERR6688599.bam", "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools markdup -T SAMEA7524438.ERR6688599 -f SAMEA7524438.ERR6688599.metrics --threads 4 --reference GCA_922984935.2.subset.unmasked.fa - SAMEA7524438.ERR6688599.bam", "@PG\tID:crumble\tPN:crumble\tPP:samtools.4\tVN:0.9.1\tCL:crumble -O bam SAMEA7524438.ERR6688599.bam SAMEA7524438.ERR6688599.crumble.bam", - "@PG\tID:samtools.5\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.illumina.SAMEA7524438.ERR6688599.bwamem2.cram GCA_922984935.2.subset.illumina.SAMEA7524438.ERR6688599.bwamem2.bam", - "@PG\tID:samtools.6\tPN:samtools\tPP:samtools.5\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.illumina.SAMEA7524438.ERR6688599.bwamem2.cram" + "@PG\tID:samtools.5\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.illumina.SAMEA7524438.ERR6688599.bwamem2.bam", + "@PG\tID:samtools.6\tPN:samtools\tPP:samtools.5\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.illumina.SAMEA7524438.ERR6688599.bwamem2.cram GCA_922984935.2.subset.illumina.SAMEA7524438.ERR6688599.bwamem2.bam", + "@PG\tID:samtools.7\tPN:samtools\tPP:samtools.6\tVN:1.23.1\tCL:samtools reheader temp.reheader.header.sam GCA_922984935.2.subset.illumina.SAMEA7524438.ERR6688599.bwamem2.cram" ], "GCA_922984935.2.subset.illumina.SAMEA7524439.ERR6688600.bwamem2.cram": [ "@HD\tVN:1.6\tSO:coordinate", @@ -449,8 +441,9 @@ "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa - 1/SAMEA7524439.ERR6688600_addRG.cram.0.SAMEA7524439.ERR6688600.bam 2/SAMEA7524439.ERR6688600_addRG.cram.1.SAMEA7524439.ERR6688600.bam", "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools markdup -T SAMEA7524439.ERR6688600 -f SAMEA7524439.ERR6688600.metrics --threads 4 --reference GCA_922984935.2.subset.unmasked.fa - SAMEA7524439.ERR6688600.bam", "@PG\tID:crumble\tPN:crumble\tPP:samtools.4\tVN:0.9.1\tCL:crumble -O bam SAMEA7524439.ERR6688600.bam SAMEA7524439.ERR6688600.crumble.bam", - "@PG\tID:samtools.5\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.illumina.SAMEA7524439.ERR6688600.bwamem2.cram GCA_922984935.2.subset.illumina.SAMEA7524439.ERR6688600.bwamem2.bam", - "@PG\tID:samtools.6\tPN:samtools\tPP:samtools.5\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.illumina.SAMEA7524439.ERR6688600.bwamem2.cram" + "@PG\tID:samtools.5\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.illumina.SAMEA7524439.ERR6688600.bwamem2.bam", + "@PG\tID:samtools.6\tPN:samtools\tPP:samtools.5\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.illumina.SAMEA7524439.ERR6688600.bwamem2.cram GCA_922984935.2.subset.illumina.SAMEA7524439.ERR6688600.bwamem2.bam", + "@PG\tID:samtools.7\tPN:samtools\tPP:samtools.6\tVN:1.23.1\tCL:samtools reheader temp.reheader.header.sam GCA_922984935.2.subset.illumina.SAMEA7524439.ERR6688600.bwamem2.cram" ], "GCA_922984935.2.subset.ont.SAMEA7524440.PAE35587.minimap2.cram": [ "@HD\tVN:1.6\tSO:coordinate", @@ -459,8 +452,9 @@ "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-ont -y -R @RG\\tID:PAE35587_pass_1f1f0707_115\\tPL:ONT\\tSM:SAMEA7524440 -I1G -a GCA_922984935.2.subset.unmasked.mmi -", "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o PAE35587_pass_1f1f0707_115.subset.fastq.gz.0.SAMEA7524440.PAE35587.bam -T PAE35587_pass_1f1f0707_115.subset.fastq.gz.0.SAMEA7524440.PAE35587_sort_tmp --write-index -l1 -", "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa SAMEA7524440.PAE35587.merge.bam 1/PAE35587_pass_1f1f0707_115.subset.fastq.gz.0.SAMEA7524440.PAE35587.bam", - "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.ont.SAMEA7524440.PAE35587.minimap2.cram GCA_922984935.2.subset.ont.SAMEA7524440.PAE35587.minimap2.bam", - "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.ont.SAMEA7524440.PAE35587.minimap2.cram" + "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.ont.SAMEA7524440.PAE35587.minimap2.bam", + "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.ont.SAMEA7524440.PAE35587.minimap2.cram GCA_922984935.2.subset.ont.SAMEA7524440.PAE35587.minimap2.bam", + "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools reheader temp.reheader.header.sam GCA_922984935.2.subset.ont.SAMEA7524440.PAE35587.minimap2.cram" ], "GCA_922984935.2.subset.ont.SAMEA7524440.PAE35587_test.minimap2.cram": [ "@HD\tVN:1.6\tSO:coordinate", @@ -469,19 +463,21 @@ "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-ont -y -R @RG\\tID:PAE35587_pass_1f1f0707_115\\tPL:ONT\\tSM:mMelMel3 -I1G -a GCA_922984935.2.subset.unmasked.mmi -", "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o SAMEA7524440.PAE35587_test_other.fastq.gz.0.SAMEA7524440.PAE35587_test.bam -T SAMEA7524440.PAE35587_test_other.fastq.gz.0.SAMEA7524440.PAE35587_test_sort_tmp --write-index -l1 -", "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa SAMEA7524440.PAE35587_test.merge.bam 1/SAMEA7524440.PAE35587_test_other.fastq.gz.0.SAMEA7524440.PAE35587_test.bam", - "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.ont.SAMEA7524440.PAE35587_test.minimap2.cram GCA_922984935.2.subset.ont.SAMEA7524440.PAE35587_test.minimap2.bam", - "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.ont.SAMEA7524440.PAE35587_test.minimap2.cram" + "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.ont.SAMEA7524440.PAE35587_test.minimap2.bam", + "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.ont.SAMEA7524440.PAE35587_test.minimap2.cram GCA_922984935.2.subset.ont.SAMEA7524440.PAE35587_test.minimap2.bam", + "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools reheader temp.reheader.header.sam GCA_922984935.2.subset.ont.SAMEA7524440.PAE35587_test.minimap2.cram" ], "GCA_922984935.2.subset.ont.SAMEA7524440.merged_1.minimap2.cram": [ "@HD\tVN:1.6\tSO:coordinate", "@SQ\tSN:OV277441.1\tLN:7999920\tM5:0457acf8690429f1c98ee545cb8573b8\tUR:GCA_922984935.2.subset.fasta.gz\tAS:GCA_922984935.2\tAN:SUPER_1\tSP:Meles meles", - "@RG\tID:PAE35587_pass_1f1f0707_115\tPL:ONT\tSM:SAMEA7524440", - "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-ont -y -R @RG\\tID:PAE35587_pass_1f1f0707_115\\tPL:ONT\\tSM:SAMEA7524440 -I1G -a GCA_922984935.2.subset.unmasked.mmi -", - "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o PAE35587_pass_1f1f0707_115.subset.fastq.gz.0.SAMEA7524440.PAE35587.bam -T PAE35587_pass_1f1f0707_115.subset.fastq.gz.0.SAMEA7524440.PAE35587_sort_tmp --write-index -l1 -", - "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa SAMEA7524440.PAE35587.merge.bam 1/PAE35587_pass_1f1f0707_115.subset.fastq.gz.0.SAMEA7524440.PAE35587.bam", - "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p SAMEA7524440.merged_1.merge.bam 1/SAMEA7524440.PAE35587.merge.bam 2/SAMEA7524440.PAE35587_test.merge.bam", - "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.ont.SAMEA7524440.merged_1.minimap2.cram GCA_922984935.2.subset.ont.SAMEA7524440.merged_1.minimap2.bam", - "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.ont.SAMEA7524440.merged_1.minimap2.cram" + "@RG\tID:PAE35587_pass_1f1f0707_115\tPL:ONT\tSM:mMelMel3", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-ont -y -R @RG\\tID:PAE35587_pass_1f1f0707_115\\tPL:ONT\\tSM:mMelMel3 -I1G -a GCA_922984935.2.subset.unmasked.mmi -", + "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o SAMEA7524440.PAE35587_test_other.fastq.gz.0.SAMEA7524440.PAE35587_test.bam -T SAMEA7524440.PAE35587_test_other.fastq.gz.0.SAMEA7524440.PAE35587_test_sort_tmp --write-index -l1 -", + "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa SAMEA7524440.PAE35587_test.merge.bam 1/SAMEA7524440.PAE35587_test_other.fastq.gz.0.SAMEA7524440.PAE35587_test.bam", + "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p SAMEA7524440.merged_1.merge.bam 1/SAMEA7524440.PAE35587_test.merge.bam 2/SAMEA7524440.PAE35587.merge.bam", + "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.ont.SAMEA7524440.merged_1.minimap2.bam", + "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.ont.SAMEA7524440.merged_1.minimap2.cram GCA_922984935.2.subset.ont.SAMEA7524440.merged_1.minimap2.bam", + "@PG\tID:samtools.5\tPN:samtools\tPP:samtools.4\tVN:1.23.1\tCL:samtools reheader temp.reheader.header.sam GCA_922984935.2.subset.ont.SAMEA7524440.merged_1.minimap2.cram" ], "GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.cram": [ "@HD\tVN:1.6\tSO:coordinate", @@ -492,16 +488,13 @@ "@PG\tID:samtools.extra_header\tPN:samtools\tVN:1.10\tPP:ccs-4.2.0.extra_header\tCL:samtools merge -@8 -ncp -b m64094_200910_173211.chunks.fofn m64094_200910_173211.ccs.bam", "@PG\tID:samtools.1.extra_header\tPN:samtools\tPP:samtools.extra_header\tVN:1.19.2\tCL:samtools view -b -h -N /nfs/users/nfs_m/mm49/READS -o /nfs/users/nfs_m/mm49/x.bam m64094_200910_173211.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.bam", "@PG\tID:samtools.2.extra_header\tPN:samtools\tPP:samtools.1.extra_header\tVN:1.23.1\tCL:samtools view -H m64094_200910_173211.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.bam", - "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-hifi --cs=short -y -R @RG\\tID:61ddc6c3/15--15\\tPL:PACBIO\\tDS:READTYPE=CCS;BINDINGKIT=101-789-500;SEQUENCINGKIT=101-826-100;BASECALLERVERSION=5.0.0;FRAMERATEHZ=100.000000;BarcodeFile=/lustre/scratch116/vr/projects/vgp/ref/barcodes/Sequel_16_Barcodes_v3.fasta;BarcodeHash=e418d89cefcbef90f3cb0e6455b7e2a3;BarcodeCount=16;BarcodeMode=Symmetric;BarcodeQuality=Score\\tLB:DN615654G-A1\\tPU:m64094_200910_173211\\tPM:SEQUELII\\tBC:CACTCACGTGTGATATT\\tCM:S/P4-C2/5.0-8M\\tSM:SAMEA7524440 -I1G -a GCA_922984935.2.subset.unmasked.mmi -", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-hifi --cs=short -y -R @RG\\tID:61ddc6c3/15--15\\tPL:PACBIO\\tDS:READTYPE=CCS;BINDINGKIT=101-789-500;SEQUENCINGKIT=101-826-100;BASECALLERVERSION=5.0.0;FRAMERATEHZ=100.000000;BarcodeFile=/lustre/scratch116/vr/projects/vgp/ref/barcodes/Sequel_16_Barcodes_v3.fasta;BarcodeHash=e418d89cefcbef90f3cb0e6455b7e2a3;BarcodeCount=16;BarcodeMode=Symmetric;BarcodeQuality=Score\\tLB:DN615654G-A1\\tPU:m64094_200910_173211\\tPM:SEQUELII\\tBC:CACTCACGTGTGATATT\\tCM:S/P4-C2/5.0-8M\\tSM:SAMEA7524440 -I1G -a GCA_922984935.2.subset.unmasked.mmi -\tPP:samtools.2.extra_header", "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o pacbio.SAMEA7524440.ERR6939248.hifitrimmer.fastq.gz.0.SAMEA7524440.ERR6939248.bam -T pacbio.SAMEA7524440.ERR6939248.hifitrimmer.fastq.gz.0.SAMEA7524440.ERR6939248_sort_tmp --write-index -l1 -", "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa SAMEA7524440.ERR6939248.merge.bam 1/pacbio.SAMEA7524440.ERR6939248.hifitrimmer.fastq.gz.0.SAMEA7524440.ERR6939248.bam", "@PG\tID:crumble\tPN:crumble\tPP:samtools.1\tVN:0.9.1\tCL:crumble -y pbccs -O bam SAMEA7524440.ERR6939248.merge.bam SAMEA7524440.ERR6939248.merge.crumble.bam", - "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.2.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.bam", - "@PG\tID:samtools.3\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.bam", - "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.cram GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.bam", - "@PG\tID:samtools.5\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.cram GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.bam", - "@PG\tID:samtools.6\tPN:samtools\tPP:samtools.4\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.cram", - "@PG\tID:samtools.7\tPN:samtools\tPP:samtools.5\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.cram" + "@PG\tID:samtools.2\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.bam", + "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.cram GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.bam", + "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools reheader temp.reheader.header.sam GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939248.minimap2.cram" ], "GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.cram": [ "@HD\tVN:1.6\tSO:coordinate", @@ -511,16 +504,13 @@ "@PG\tID:lima.extra_header\tVN:1.11.0 (commit v1.11.0)\tCL:lima -j 8 --split-bam-named --same --peek-guess --guess-min-count 1000 --ccs m64094_200911_174739.ccs.bam /lustre/scratch116/vr/projects/vgp/ref/barcodes/Sequel_16_Barcodes_v3.fasta lima/m64094_200911_174739.ccs.bam", "@PG\tID:samtools.extra_header\tPN:samtools\tVN:1.10\tPP:ccs-4.2.0.extra_header\tCL:samtools merge -@8 -ncp -b m64094_200911_174739.chunks.fofn m64094_200911_174739.ccs.bam", "@PG\tID:samtools.1.extra_header\tPN:samtools\tPP:samtools.extra_header\tVN:1.23.1\tCL:samtools view -H /lustre/scratch122/tol/data/9/9/f/1/6/d/Meles_meles/genomic_data/mMelMel3/pacbio/m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.bam", - "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-hifi --cs=short -y -R @RG\\tID:aaa0cf18/15--15\\tPL:PACBIO\\tDS:READTYPE=CCS;BINDINGKIT=101-789-500;SEQUENCINGKIT=101-826-100;BASECALLERVERSION=5.0.0;FRAMERATEHZ=100.000000;BarcodeFile=/lustre/scratch116/vr/projects/vgp/ref/barcodes/Sequel_16_Barcodes_v3.fasta;BarcodeHash=e418d89cefcbef90f3cb0e6455b7e2a3;BarcodeCount=16;BarcodeMode=Symmetric;BarcodeQuality=Score\\tLB:DN615654G-A1\\tPU:m64094_200911_174739\\tPM:SEQUELII\\tBC:CACTCACGTGTGATATT\\tCM:S/P4-C2/5.0-8M\\tSM:SAMEA7524440 -I1G -a GCA_922984935.2.subset.unmasked.mmi -", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-hifi --cs=short -y -R @RG\\tID:aaa0cf18/15--15\\tPL:PACBIO\\tDS:READTYPE=CCS;BINDINGKIT=101-789-500;SEQUENCINGKIT=101-826-100;BASECALLERVERSION=5.0.0;FRAMERATEHZ=100.000000;BarcodeFile=/lustre/scratch116/vr/projects/vgp/ref/barcodes/Sequel_16_Barcodes_v3.fasta;BarcodeHash=e418d89cefcbef90f3cb0e6455b7e2a3;BarcodeCount=16;BarcodeMode=Symmetric;BarcodeQuality=Score\\tLB:DN615654G-A1\\tPU:m64094_200911_174739\\tPM:SEQUELII\\tBC:CACTCACGTGTGATATT\\tCM:S/P4-C2/5.0-8M\\tSM:SAMEA7524440 -I1G -a GCA_922984935.2.subset.unmasked.mmi -\tPP:samtools.1.extra_header", "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o pacbio.SAMEA7524440.ERR6939249.hifitrimmer.fastq.gz.0.SAMEA7524440.ERR6939249.bam -T pacbio.SAMEA7524440.ERR6939249.hifitrimmer.fastq.gz.0.SAMEA7524440.ERR6939249_sort_tmp --write-index -l1 -", "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa SAMEA7524440.ERR6939249.merge.bam 1/pacbio.SAMEA7524440.ERR6939249.hifitrimmer.fastq.gz.0.SAMEA7524440.ERR6939249.bam", "@PG\tID:crumble\tPN:crumble\tPP:samtools.1\tVN:0.9.1\tCL:crumble -y pbccs -O bam SAMEA7524440.ERR6939249.merge.bam SAMEA7524440.ERR6939249.merge.crumble.bam", - "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", - "@PG\tID:samtools.3\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", - "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.cram GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", - "@PG\tID:samtools.5\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.cram GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", - "@PG\tID:samtools.6\tPN:samtools\tPP:samtools.4\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.cram", - "@PG\tID:samtools.7\tPN:samtools\tPP:samtools.5\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.cram" + "@PG\tID:samtools.2\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", + "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.cram GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", + "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools reheader temp.reheader.header.sam GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.cram" ], "GCA_922984935.2.subset.pacbio.SAMEA7524440.merged_1.minimap2.cram": [ "@HD\tVN:1.6\tSO:coordinate", @@ -532,8 +522,9 @@ "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa SAMEA7524440.ERR6939248.merge.bam 1/pacbio.SAMEA7524440.ERR6939248.hifitrimmer.fastq.gz.0.SAMEA7524440.ERR6939248.bam", "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p SAMEA7524440.merged_1.merge.bam 1/SAMEA7524440.ERR6939248.merge.bam 2/SAMEA7524440.ERR6939249.merge.bam", "@PG\tID:crumble\tPN:crumble\tPP:samtools.2\tVN:0.9.1\tCL:crumble -y pbccs -O bam SAMEA7524440.merged_1.merge.bam SAMEA7524440.merged_1.merge.crumble.bam", - "@PG\tID:samtools.3\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.pacbio.SAMEA7524440.merged_1.minimap2.cram GCA_922984935.2.subset.pacbio.SAMEA7524440.merged_1.minimap2.bam", - "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.merged_1.minimap2.cram" + "@PG\tID:samtools.3\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.merged_1.minimap2.bam", + "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1 --write-index -o GCA_922984935.2.subset.pacbio.SAMEA7524440.merged_1.minimap2.cram GCA_922984935.2.subset.pacbio.SAMEA7524440.merged_1.minimap2.bam", + "@PG\tID:samtools.5\tPN:samtools\tPP:samtools.4\tVN:1.23.1\tCL:samtools reheader temp.reheader.header.sam GCA_922984935.2.subset.pacbio.SAMEA7524440.merged_1.minimap2.cram" ] }, [ @@ -545,6 +536,6 @@ "nf-test": "0.9.3", "nextflow": "25.10.4" }, - "timestamp": "2026-06-03T16:06:47.981156535" + "timestamp": "2026-06-04T18:14:24.285247311" } } \ No newline at end of file diff --git a/tests/short_aligner_minimap2.nf.test.snap b/tests/short_aligner_minimap2.nf.test.snap index fcf979ae..eb2b93a0 100644 --- a/tests/short_aligner_minimap2.nf.test.snap +++ b/tests/short_aligner_minimap2.nf.test.snap @@ -1,7 +1,7 @@ { "-profile test --short_aligner minimap2 --outfmt 'bam,cram'": { "content": [ - 81, + 74, { "BGZIP_BEDGRAPH": { "samtools": "1.23.1" @@ -46,9 +46,6 @@ "SAMTOOLS_ADDREPLACERG": { "samtools": "1.23.1" }, - "SAMTOOLS_ADD_PG": { - "samtools": "1.23.1" - }, "SAMTOOLS_CRAM": { "samtools": "1.23.1" }, @@ -67,18 +64,12 @@ "SAMTOOLS_INDEX_BAM": { "samtools": "1.23.1" }, - "SAMTOOLS_INDEX_CRAM": { - "samtools": "1.23.1" - }, "SAMTOOLS_MERGEDUP": { "samtools": "1.23.1" }, "SAMTOOLS_REHEADER_BAM": { "samtools": "1.23.1" }, - "SAMTOOLS_REHEADER_CRAM": { - "samtools": "1.23.1" - }, "SAMTOOLS_SPLITHEADER": { "samtools": "1.23.1" }, @@ -250,17 +241,14 @@ "@PG\tID:samtools.3.extra_header\tPN:samtools\tPP:scramble.extra_header\tVN:1.15\tCL:/usr/local/bin/samtools view -h /lustre/scratch124/tol/projects/darwin/data/mammals/Meles_meles/genomic_data/mMelMel3/hic-arima2/35528_2#1.cram", "@PG\tID:samtools.4.extra_header\tPN:samtools\tPP:samtools.3.extra_header\tVN:1.20\tCL:/usr/local/bin/samtools view --cram 35528_2#1.subset.sam", "@PG\tID:samtools.5.extra_header\tPN:samtools\tPP:samtools.4.extra_header\tVN:1.23.1\tCL:samtools view -H 35528_2_1.subset.cram", - "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax sr --cs=short -I1.0G -y -R @RG\\tID:35528_2#1\\tDT:2020-11-17T00:00:00+0000\\tPU:201117_A00948_0206_AHGML2DSXY_2#1\\tLB:33637906\\tPG:SCS\\tSM:SAMEA5962964\\tCN:SC\\tPL:ILLUMINA\\tDS:ERP116890: Sequencing and assembly of genomes from British species for the Darwin Tree of Life Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ GCA_922984935.2.subset.unmasked.mmi -", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax sr --cs=short -I1.0G -y -R @RG\\tID:35528_2#1\\tDT:2020-11-17T00:00:00+0000\\tPU:201117_A00948_0206_AHGML2DSXY_2#1\\tLB:33637906\\tPG:SCS\\tSM:SAMEA5962964\\tCN:SC\\tPL:ILLUMINA\\tDS:ERP116890: Sequencing and assembly of genomes from British species for the Darwin Tree of Life Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ GCA_922984935.2.subset.unmasked.mmi -\tPP:samtools.5.extra_header", "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.22.1\tCL:samtools fixmate -mpu - -", "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.22.1\tCL:samtools view -h", "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.22.1\tCL:samtools sort --write-index -l1 -@4 -T 35528_2_1.subset.cram.0.SAMEA7524440.ERR6688402_tmp -o 35528_2_1.subset.cram.0.SAMEA7524440.ERR6688402.bam -", "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa - 1/35528_2_1.subset.cram.0.SAMEA7524440.ERR6688402.bam 2/35528_2_1.subset.cram.1.SAMEA7524440.ERR6688402.bam", "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools markdup -T SAMEA7524440.ERR6688402 -f SAMEA7524440.ERR6688402.metrics --threads 4 --reference GCA_922984935.2.subset.unmasked.fa - SAMEA7524440.ERR6688402.bam", "@PG\tID:crumble\tPN:crumble\tPP:samtools.4\tVN:0.9.1\tCL:crumble -O bam SAMEA7524440.ERR6688402.bam SAMEA7524440.ERR6688402.crumble.bam", - "@PG\tID:samtools.5\tPN:samtools\tPP:samtools.5.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.bam", - "@PG\tID:samtools.6\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.bam", - "@PG\tID:samtools.7\tPN:samtools\tPP:samtools.5\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.bam", - "@PG\tID:samtools.8\tPN:samtools\tPP:samtools.6\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.bam" + "@PG\tID:samtools.5\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.bam" ], "GCA_922984935.2.subset.illumina.SAMEA7524438.ERR6688599.minimap2.bam": [ "@HD\tVN:1.6\tSO:coordinate", @@ -310,19 +298,16 @@ "@PG\tID:samtools.3.extra_header\tPN:samtools\tPP:scramble.extra_header\tVN:1.15\tCL:/usr/local/bin/samtools view -h /lustre/scratch124/tol/projects/darwin/data/mammals/Meles_meles/genomic_data/mMelMel3/hic-arima2/35528_2#1.cram", "@PG\tID:samtools.4.extra_header\tPN:samtools\tPP:samtools.3.extra_header\tVN:1.20\tCL:/usr/local/bin/samtools view --cram 35528_2#1.subset.sam", "@PG\tID:samtools.5.extra_header\tPN:samtools\tPP:samtools.4.extra_header\tVN:1.23.1\tCL:samtools view -H 35528_2_1.subset.cram", - "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax sr --cs=short -I1.0G -y -R @RG\\tID:35528_2#1\\tDT:2020-11-17T00:00:00+0000\\tPU:201117_A00948_0206_AHGML2DSXY_2#1\\tLB:33637906\\tPG:SCS\\tSM:SAMEA5962964\\tCN:SC\\tPL:ILLUMINA\\tDS:ERP116890: Sequencing and assembly of genomes from British species for the Darwin Tree of Life Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ GCA_922984935.2.subset.unmasked.mmi -", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax sr --cs=short -I1.0G -y -R @RG\\tID:35528_2#1\\tDT:2020-11-17T00:00:00+0000\\tPU:201117_A00948_0206_AHGML2DSXY_2#1\\tLB:33637906\\tPG:SCS\\tSM:SAMEA5962964\\tCN:SC\\tPL:ILLUMINA\\tDS:ERP116890: Sequencing and assembly of genomes from British species for the Darwin Tree of Life Project. This data is part of a pre-publication release. For information on the proper use of pre-publication data shared by the Wellcome Trust Sanger Institute (including details of any publication moratoria), please see http://www.sanger.ac.uk/datasharing/ GCA_922984935.2.subset.unmasked.mmi -\tPP:samtools.5.extra_header", "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.22.1\tCL:samtools fixmate -mpu - -", "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.22.1\tCL:samtools view -h", "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1\tVN:1.22.1\tCL:samtools sort --write-index -l1 -@4 -T 35528_2_1.subset.cram.0.SAMEA7524440.ERR6688402_tmp -o 35528_2_1.subset.cram.0.SAMEA7524440.ERR6688402.bam -", "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa - 1/35528_2_1.subset.cram.0.SAMEA7524440.ERR6688402.bam 2/35528_2_1.subset.cram.1.SAMEA7524440.ERR6688402.bam", "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools markdup -T SAMEA7524440.ERR6688402 -f SAMEA7524440.ERR6688402.metrics --threads 4 --reference GCA_922984935.2.subset.unmasked.fa - SAMEA7524440.ERR6688402.bam", "@PG\tID:crumble\tPN:crumble\tPP:samtools.4\tVN:0.9.1\tCL:crumble -O bam SAMEA7524440.ERR6688402.bam SAMEA7524440.ERR6688402.crumble.bam", - "@PG\tID:samtools.5\tPN:samtools\tPP:samtools.5.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.bam", - "@PG\tID:samtools.6\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.bam", - "@PG\tID:samtools.7\tPN:samtools\tPP:samtools.5\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.cram GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.bam", - "@PG\tID:samtools.8\tPN:samtools\tPP:samtools.6\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.cram GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.bam", - "@PG\tID:samtools.9\tPN:samtools\tPP:samtools.7\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.cram", - "@PG\tID:samtools.10\tPN:samtools\tPP:samtools.8\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.cram" + "@PG\tID:samtools.5\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.bam", + "@PG\tID:samtools.6\tPN:samtools\tPP:samtools.5\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.cram GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.bam", + "@PG\tID:samtools.7\tPN:samtools\tPP:samtools.6\tVN:1.23.1\tCL:samtools reheader temp.reheader.header.sam GCA_922984935.2.subset.hic.SAMEA7524440.ERR6688402.minimap2.cram" ], "GCA_922984935.2.subset.illumina.SAMEA7524438.ERR6688599.minimap2.cram": [ "@HD\tVN:1.6\tSO:coordinate", @@ -335,8 +320,9 @@ "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa - 1/SAMEA7524438.ERR6688599.cram.0.SAMEA7524438.ERR6688599.bam 2/SAMEA7524438.ERR6688599.cram.1.SAMEA7524438.ERR6688599.bam", "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools markdup -T SAMEA7524438.ERR6688599 -f SAMEA7524438.ERR6688599.metrics --threads 4 --reference GCA_922984935.2.subset.unmasked.fa - SAMEA7524438.ERR6688599.bam", "@PG\tID:crumble\tPN:crumble\tPP:samtools.4\tVN:0.9.1\tCL:crumble -O bam SAMEA7524438.ERR6688599.bam SAMEA7524438.ERR6688599.crumble.bam", - "@PG\tID:samtools.5\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.illumina.SAMEA7524438.ERR6688599.minimap2.cram GCA_922984935.2.subset.illumina.SAMEA7524438.ERR6688599.minimap2.bam", - "@PG\tID:samtools.6\tPN:samtools\tPP:samtools.5\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.illumina.SAMEA7524438.ERR6688599.minimap2.cram" + "@PG\tID:samtools.5\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.illumina.SAMEA7524438.ERR6688599.minimap2.bam", + "@PG\tID:samtools.6\tPN:samtools\tPP:samtools.5\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.illumina.SAMEA7524438.ERR6688599.minimap2.cram GCA_922984935.2.subset.illumina.SAMEA7524438.ERR6688599.minimap2.bam", + "@PG\tID:samtools.7\tPN:samtools\tPP:samtools.6\tVN:1.23.1\tCL:samtools reheader temp.reheader.header.sam GCA_922984935.2.subset.illumina.SAMEA7524438.ERR6688599.minimap2.cram" ], "GCA_922984935.2.subset.illumina.SAMEA7524439.ERR6688600.minimap2.cram": [ "@HD\tVN:1.6\tSO:coordinate", @@ -349,8 +335,9 @@ "@PG\tID:samtools.3\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa - 1/SAMEA7524439.ERR6688600_addRG.cram.0.SAMEA7524439.ERR6688600.bam 2/SAMEA7524439.ERR6688600_addRG.cram.1.SAMEA7524439.ERR6688600.bam", "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools markdup -T SAMEA7524439.ERR6688600 -f SAMEA7524439.ERR6688600.metrics --threads 4 --reference GCA_922984935.2.subset.unmasked.fa - SAMEA7524439.ERR6688600.bam", "@PG\tID:crumble\tPN:crumble\tPP:samtools.4\tVN:0.9.1\tCL:crumble -O bam SAMEA7524439.ERR6688600.bam SAMEA7524439.ERR6688600.crumble.bam", - "@PG\tID:samtools.5\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.illumina.SAMEA7524439.ERR6688600.minimap2.cram GCA_922984935.2.subset.illumina.SAMEA7524439.ERR6688600.minimap2.bam", - "@PG\tID:samtools.6\tPN:samtools\tPP:samtools.5\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.illumina.SAMEA7524439.ERR6688600.minimap2.cram" + "@PG\tID:samtools.5\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.illumina.SAMEA7524439.ERR6688600.minimap2.bam", + "@PG\tID:samtools.6\tPN:samtools\tPP:samtools.5\tVN:1.23.1\tCL:samtools view --threads 3 --reference GCA_922984935.2.subset.unmasked.fa --output-fmt cram,version=3.0,archive,level=8,embed_ref=1,lossy_names=1 --write-index -o GCA_922984935.2.subset.illumina.SAMEA7524439.ERR6688600.minimap2.cram GCA_922984935.2.subset.illumina.SAMEA7524439.ERR6688600.minimap2.bam", + "@PG\tID:samtools.7\tPN:samtools\tPP:samtools.6\tVN:1.23.1\tCL:samtools reheader temp.reheader.header.sam GCA_922984935.2.subset.illumina.SAMEA7524439.ERR6688600.minimap2.cram" ] }, [ @@ -361,6 +348,6 @@ "nf-test": "0.9.3", "nextflow": "25.10.4" }, - "timestamp": "2026-06-03T15:03:31.017178618" + "timestamp": "2026-06-04T18:01:23.719076494" } } \ No newline at end of file diff --git a/tests/uli.nf.test.snap b/tests/uli.nf.test.snap index 67e31b7e..427e9d44 100644 --- a/tests/uli.nf.test.snap +++ b/tests/uli.nf.test.snap @@ -209,6 +209,6 @@ "nf-test": "0.9.3", "nextflow": "25.10.4" }, - "timestamp": "2026-06-03T15:10:45.578688714" + "timestamp": "2026-06-04T16:11:38.490048351" } } \ No newline at end of file diff --git a/tests/uli_no_lima.nf.test.snap b/tests/uli_no_lima.nf.test.snap index ae7ad0e0..f76ac480 100644 --- a/tests/uli_no_lima.nf.test.snap +++ b/tests/uli_no_lima.nf.test.snap @@ -202,6 +202,6 @@ "nf-test": "0.9.3", "nextflow": "25.10.4" }, - "timestamp": "2026-06-03T15:01:25.398827197" + "timestamp": "2026-06-04T16:08:54.193324076" } } \ No newline at end of file diff --git a/tests/untrim.nf.test.snap b/tests/untrim.nf.test.snap index 359723b2..513558c7 100644 --- a/tests/untrim.nf.test.snap +++ b/tests/untrim.nf.test.snap @@ -1,7 +1,7 @@ { "-profile test --pacbio_adapter_fasta false --pacbio_adapter_yaml false --outfmt bam": { "content": [ - 70, + 69, { "BGZIP_BEDGRAPH": { "samtools": "1.23.1" @@ -39,9 +39,6 @@ "MINIMAP2_INDEX": { "minimap2": "2.30-r1287" }, - "SAMTOOLS_ADD_PG": { - "samtools": "1.23.1" - }, "SAMTOOLS_FAIDX": { "samtools": "1.23.1" }, @@ -228,14 +225,11 @@ "@PG\tID:lima.extra_header\tVN:1.11.0 (commit v1.11.0)\tCL:lima -j 8 --split-bam-named --same --peek-guess --guess-min-count 1000 --ccs m64094_200911_174739.ccs.bam /lustre/scratch116/vr/projects/vgp/ref/barcodes/Sequel_16_Barcodes_v3.fasta lima/m64094_200911_174739.ccs.bam", "@PG\tID:samtools.extra_header\tPN:samtools\tVN:1.10\tPP:ccs-4.2.0.extra_header\tCL:samtools merge -@8 -ncp -b m64094_200911_174739.chunks.fofn m64094_200911_174739.ccs.bam", "@PG\tID:samtools.1.extra_header\tPN:samtools\tPP:samtools.extra_header\tVN:1.23.1\tCL:samtools view -H /lustre/scratch122/tol/data/9/9/f/1/6/d/Meles_meles/genomic_data/mMelMel3/pacbio/m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.bam", - "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-hifi --cs=short -y -R @RG\\tID:aaa0cf18/15--15\\tPL:PACBIO\\tDS:READTYPE=CCS;BINDINGKIT=101-789-500;SEQUENCINGKIT=101-826-100;BASECALLERVERSION=5.0.0;FRAMERATEHZ=100.000000;BarcodeFile=/lustre/scratch116/vr/projects/vgp/ref/barcodes/Sequel_16_Barcodes_v3.fasta;BarcodeHash=e418d89cefcbef90f3cb0e6455b7e2a3;BarcodeCount=16;BarcodeMode=Symmetric;BarcodeQuality=Score\\tLB:DN615654G-A1\\tPU:m64094_200911_174739\\tPM:SEQUELII\\tBC:CACTCACGTGTGATATT\\tCM:S/P4-C2/5.0-8M\\tSM:SAMEA7524440 -I1G -a GCA_922984935.2.subset.unmasked.mmi -", + "@PG\tID:minimap2\tPN:minimap2\tVN:2.30-r1287\tCL:minimap2 -t4 -ax map-hifi --cs=short -y -R @RG\\tID:aaa0cf18/15--15\\tPL:PACBIO\\tDS:READTYPE=CCS;BINDINGKIT=101-789-500;SEQUENCINGKIT=101-826-100;BASECALLERVERSION=5.0.0;FRAMERATEHZ=100.000000;BarcodeFile=/lustre/scratch116/vr/projects/vgp/ref/barcodes/Sequel_16_Barcodes_v3.fasta;BarcodeHash=e418d89cefcbef90f3cb0e6455b7e2a3;BarcodeCount=16;BarcodeMode=Symmetric;BarcodeQuality=Score\\tLB:DN615654G-A1\\tPU:m64094_200911_174739\\tPM:SEQUELII\\tBC:CACTCACGTGTGATATT\\tCM:S/P4-C2/5.0-8M\\tSM:SAMEA7524440 -I1G -a GCA_922984935.2.subset.unmasked.mmi -\tPP:samtools.1.extra_header", "@PG\tID:samtools\tPN:samtools\tPP:minimap2\tVN:1.23.1\tCL:samtools sort -@ 3 -o m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.fastq.gz.0.SAMEA7524440.ERR6939249.bam -T m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.fastq.gz.0.SAMEA7524440.ERR6939249_sort_tmp --write-index -l1 -", "@PG\tID:samtools.1\tPN:samtools\tPP:samtools\tVN:1.23.1\tCL:samtools merge --threads 3 -c -p --reference GCA_922984935.2.subset.unmasked.fa SAMEA7524440.ERR6939249.merge.bam 1/m64094_200911_174739.ccs.bc1022_BAK8B_OA--bc1022_BAK8B_OA.subset.fastq.gz.0.SAMEA7524440.ERR6939249.bam", "@PG\tID:crumble\tPN:crumble\tPP:samtools.1\tVN:0.9.1\tCL:crumble -y pbccs -O bam SAMEA7524440.ERR6939249.merge.bam SAMEA7524440.ERR6939249.merge.crumble.bam", - "@PG\tID:samtools.2\tPN:samtools\tPP:samtools.1.extra_header\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", - "@PG\tID:samtools.3\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", - "@PG\tID:samtools.4\tPN:samtools\tPP:samtools.2\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam", - "@PG\tID:samtools.5\tPN:samtools\tPP:samtools.3\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam" + "@PG\tID:samtools.2\tPN:samtools\tPP:crumble\tVN:1.23.1\tCL:samtools reheader temp.sorted.header.sam input/GCA_922984935.2.subset.pacbio.SAMEA7524440.ERR6939249.minimap2.bam" ], "GCA_922984935.2.subset.pacbio.SAMEA7524440.merged_1.minimap2.bam": [ "@HD\tVN:1.6\tSO:coordinate", @@ -261,6 +255,6 @@ "nf-test": "0.9.3", "nextflow": "25.10.4" }, - "timestamp": "2026-06-03T15:07:54.364990996" + "timestamp": "2026-06-04T15:41:59.639942625" } } \ No newline at end of file From 6eb286b2e3a89cba853b4e1c1e6f0f8963ca0a3c Mon Sep 17 00:00:00 2001 From: sainsachiko Date: Thu, 4 Jun 2026 20:28:27 +0100 Subject: [PATCH 20/20] Fix pre-commit --- modules/local/samtools/reheader/samtools_replaceheader.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/local/samtools/reheader/samtools_replaceheader.nf b/modules/local/samtools/reheader/samtools_replaceheader.nf index b5435e15..ce84f57e 100644 --- a/modules/local/samtools/reheader/samtools_replaceheader.nf +++ b/modules/local/samtools/reheader/samtools_replaceheader.nf @@ -57,4 +57,4 @@ process SAMTOOLS_REHEADER { """ touch ${prefix}.${suffix} """ -} \ No newline at end of file +}