cfe-lab / cfe-lab/MiCall

A Merger Tool

Open
#1,036 1 comment 0 reactions 1 assignee View on GitHub

@Donaim is already working on this.

Since Feb 12, 2024.

enhancement
Dominant language
Python
Stars
21
Forks
11
Avg merge
12h 5m
Merged PRs (30d)
24

Description

Background:
The MiCall pipeline currently processes reads on per-real-sample basis and outputs an assembled consensus sequence for them. Each run relies on SampleSheet.csv files for input and output details. A feature to merge samples, ideally across different runs, would simplify the downstream analysis.

Feature Description:
Introduce a merger tool that takes a .csv mapping file and generates a merged SampleSheet.csv, RunInfo.xml, and a duplicate of the input .csv for traceability. The mapping file correlates sample_name and run_folder with output_name, specifying the merging plan.

Feature Objectives:

  1. Facilitate efficient sample mergers across different run folders.
  2. Ensure consistency and traceability for merged samples.
  3. Handle default values and conflicts in input .csv files.

Functional Requirements:

  • Input to the tool:
    • Path to the mapping .csv file.
    • Path to the output folder.
  • Outputs of the tool:
    • SampleSheet.csv with merged output_name records.
    • RunInfo.xml copied from the first associated run_folder.
    • Input .csv file to trace origins of merged data.
  • Conflict resolution strategy, with a strict mode option (--strict flag).

Conflict Resolution Rules:

  • project_name header field to follow the $current_date.merged pattern.
  • date header field to reflect the actual merge date.
  • All other fields should use the first observed value unless --strict is enabled.
  • Fields index and index2 should default to XXXXX.

Implementation Tasks:

  • Develop a merging script for the underlying sample files.
  • Develop logic to parse the input .csv and handle row defaults.
  • Implement conflict detection logic with stdout reporting.
  • Create file generation procedures for SampleSheet.csv and RunInfo.xml.
  • Build merging algorithm to create a consolidated .csv from the mapping file.
  • Add a --non-strict mode for conflict resolution, with it becoming the default.
  • Write unit tests to validate merging logic and conflict handling.
  • Add documentation for the merger tool usage and features.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.