Detect Library Type Specifications
Process Details
- Name:
detect_library_type - Process UUID:
dmhexu6n0l7qe4vf3ygthboa7crxvi - Process Group:
Misc.
Overview
This process analyzes BAM files to automatically detect whether they originated from single-end or paired-end sequencing reads. This determination is crucial for downstream analysis workflows that require knowledge of the library preparation type to apply appropriate processing parameters and quality control measures.
This process is implemented in Bash, which utilizes SAMtools for BAM file analysis.
Key Functionality
- Library Type Detection: Examines BAM file flags to determine if reads are paired-end or single-end
- Read Flag Analysis: Uses SAMtools to count reads with the paired-end flag (0x001) to make the determination
- Automatic Classification: Outputs the detected library type as an environment variable for use in subsequent processes
Input/Output Specification
Inputs
Required Inputs
-
BAM File
- Description: Aligned sequencing reads in BAM format to be analyzed for library type
- Format: BAM
-
Mate Information
- Description: Initial mate/library type information (will be updated based on detection results)
- Format: mate
Outputs
-
BAM File
- Description: The original BAM file, relocated to a bams/ subdirectory
- Format: BAM
-
Mate Type
- Description: Detected library type information (either "single" for single-end or "pair" for paired-end)
- Format: Environment variable (mate)
Parameters & Settings
This process does not have user-configurable parameters.
References & Resources
- Tool Documentation: SAMtools documentation available at http://www.htslib.org/doc/samtools.html