Skip to content

Fgumi initial commit#165

Open
freerkvandijk wants to merge 27 commits intodevfrom
fgumi
Open

Fgumi initial commit#165
freerkvandijk wants to merge 27 commits intodevfrom
fgumi

Conversation

@freerkvandijk
Copy link
Copy Markdown

PR checklist

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added a new tool - have you followed the pipeline conventions in the contribution docs
  • Make sure your code lints (nf-core pipelines lint).
  • Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
  • Check for unexpected warnings in debug mode (nextflow run . -profile debug,test,docker --outdir <OUTDIR>).
  • Usage Documentation in docs/usage.md is updated.
  • Output Documentation in docs/output.md is updated.
  • CHANGELOG.md is updated.
  • README.md is updated (including new tool citations and authors/contributors).

matthdsm and others added 3 commits June 23, 2025 12:48
- module updates
- faster bclconvert output handling
- modified output structure, featuring qc reports per library and enhanced run QC
- fastq output when aligner equals false, with falco report
- per sample analysis definition for more flexibility
@freerkvandijk freerkvandijk requested a review from matthdsm April 7, 2026 13:31
Comment thread assets/schema_input.json
Comment thread assets/schema_sampleinfo.json
Comment thread conf/modules.config Outdated
Comment thread conf/modules.config Outdated
Comment thread conf/modules.config
Comment thread conf/modules.config Outdated
Comment thread modules/local/fgumi/extract/main.nf Outdated
Comment thread modules/local/fgumi/extract/main.nf Outdated
Comment thread modules/local/fgumi/filter/main.nf Outdated
Comment thread modules/local/fgumi/snapzippersort/main.nf
Comment thread subworkflows/local/fastq_to_aligned_cram/main.nf Outdated
Comment thread subworkflows/local/fastq_to_aligned_cram/main.nf Outdated
Comment thread subworkflows/local/fastq_to_aligned_cram/main.nf Outdated
Comment thread tests/inputs/fgumi/grouped.bam Outdated
Comment thread tests/inputs/test.yml Outdated
Copy link
Copy Markdown
Member

@matthdsm matthdsm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments

Comment thread conf/modules.config Outdated
Comment thread conf/modules.config Outdated
Comment thread conf/modules.config Outdated
Comment thread conf/modules.config Outdated
Comment thread modules/local/fgumi/extract/main.nf Outdated
Comment thread modules/local/fgumi/group/main.nf Outdated
Comment thread modules/local/fgumi/sort/main.nf Outdated
Comment thread subworkflows/local/umi_consensus/main.nf Outdated
Comment thread tests/modules/local/fgumi/duplexmetrics/main.nf.test Outdated
Comment thread tests/modules/local/fgumi/sort/main.nf.test
Comment thread workflows/preprocessing.nf Outdated
Copy link
Copy Markdown
Member

@matthdsm matthdsm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More being difficult

Comment thread conf/modules.config Outdated
Comment thread conf/modules.config Outdated
@matthdsm
Copy link
Copy Markdown
Member

Still need to fix the tests

@freerkvandijk
Copy link
Copy Markdown
Author

flowchart TD
    A["Input channel: meta + reads + aligner + index + fasta + gtf"] --> B{sample_type}
    B -->|RNA| R1[FASTQ_ALIGN_RNA]
    B -->|DNA| C{"meta.fgumi_aware == true"}

    C -->|false| D1["FASTQ_ALIGN_DNA non-UMI"]
    C -->|true| U0[Enter UMI_CONSENSUS_FGUMI]

    subgraph UMI_CONSENSUS_FGUMI
      U1["Step 1: FGUMI_EXTRACT<br/>reads -> unmapped BAM with UMI tags"]
      U1J["Join with reference assets<br/>SNAP index + fasta + dict from meta.genome_data"]
      U2["Step 3: FGUMI_SNAP_ZIPPER_SORT"]
      U2a["samtools sort -n<br/>unmapped BAM"]
      U2b[fgumi fastq]
      U2c[snap-aligner paired]
      U2d["samtools sort -n<br/>post-SNAP"]
      U2e[fgumi zipper]
      U2f["fgumi sort --order template-coordinate"]
      U3["Step 4: FGUMI_GROUP"]
      U4["Step 5: FGUMI_SIMPLEX"]
      U5J["Join simplex BAM with fasta"]
      U5["Step 7a: FGUMI_FILTER"]
      U6["Step 7b: FGUMI_SORT<br/>coordinate sort + index"]

      U1 --> U1J --> U2
      U2 --> U2a --> U2b --> U2c --> U2d --> U2e --> U2f
      U2f --> U3 --> U4 --> U5J --> U5 --> U6
    end

    D1 --> M1["Markdup branch selector<br/>bamsormadup | samtools | sort"]
    R1 --> M1

    U6 --> MIX1[Mix UMI BAM/BAI into common postprocess stream]
    U3 --> MET1[grouping_metrics]
    U3 --> MET2[family_size_histogram]
    U4 --> MET3[consensus_metrics]
    U5 --> MET4[filtering_metrics]
    U6 --> MET5[filtered_consensus_bam]

    M1 --> P1["BIOBAMBAM_BAMSORMADUP or SAMTOOLS_SORMADUP or SAMTOOLS_SORT"]
    P1 --> COMP{bam or cram}
    MIX1 --> COMP

    COMP -->|bam| CVT[SAMTOOLS_CONVERT to CRAM]
    COMP -->|cram| OUT1["cram + crai"]
    CVT --> OUT1

    OUT1 --> E1["emit: cram_crai"]
    MET1 --> E2["emit: sormadup_metrics"]
    MET2["emit: family_size_histogram"] --> E3
    MET5 --> E4["emit: filtered_consensus_bam"]
Loading

@matthdsm
Copy link
Copy Markdown
Member

comments:

  • why the name sort before alignment?
  • figure out why the snap native name sort is insufficient for zipper
  • replace 7b fgumi sort with samtools sort to enable direct to cram sorting

Comment thread conf/modules.config
ext.args = {
[
"--sample \"${meta.id}\"",
"--library \"${meta.library ?: meta.id}\"",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sure all the RG info is encoded in the uBam so we don't lose any info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants