Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move lablog_bam2fq.sh to RAW/ & Fix Path Issues #455

Merged
merged 3 commits into from
Mar 4, 2025

Conversation

OPSergio
Copy link
Contributor

@OPSergio OPSergio commented Mar 4, 2025

Summary

This PR moves lablog_bam2fq.sh to RAW/, corrects path and regex errors, and ensures that the BAM-to-FASTQ pipeline functions correctly.
Additionally, it adapts the _01_bam2fq.sh and _02_pgzip.sh scripts and introduces a new _03_symlink.sh to create symbolic links in ANALYSIS/00-reads/.

Main Changes & Fixes

1. Moved lablog_bam2fq.sh to RAW/

  • Ensures all BAM-to-FASTQ processing happens inside RAW/.
  • Prevents issues caused by working in ANALYSIS/.

2. Fixed errors related to paths and regular expressions

  • Adjusted directory handling to prevent incorrect relative paths.
  • Improved BAM file name parsing to avoid incorrect sample extraction.

3. Adapted _01_bam2fq.sh and _02_pgzip.sh to work properly

  • _01_bam2fq.sh now correctly detects all BAM files in RAW/.
  • _02_pgzip.sh ensures compression of FASTQ files and removes uncompressed files.

4. Created _03_symlink.sh to generate symbolic links in ANALYSIS/00-reads/

  • Automatically removes broken links before recreating them.
  • Ensures symlinks correctly point to RAW/*.fastq.gz instead of invalid paths.
  • Uses ln -sf to force overwrite incorrect links if they exist.

Execution Workflow

With these changes, the correct pipeline execution is:

bash lablog_bam2fq.sh   # Generates scripts
bash _01_bam2fq.sh      # Convert BAM to FASTQ in RAW/
bash _02_pgzip.sh       # Compress FASTQ 
bash _03_symlink.sh     # Create correct symbolic links in ANALYSIS/00-reads/

@OPSergio OPSergio requested a review from svarona March 4, 2025 15:25
Copy link
Member

@svarona svarona left a comment

Choose a reason for hiding this comment

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

LGTM

@OPSergio OPSergio merged commit ea33ffb into BU-ISCIII:develop Mar 4, 2025
2 checks passed
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