You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement support for ranged downloads of BAM and VCF files using external tools like samtools and tabix. The new feature should allow users to specify genomic regions for download, making the process more efficient when only certain regions are required. This feature will involve creating a new utility script to handle the ranged requests and file management.
Acceptance Criteria:
Tool Verification:
The script should first check if the required external tools (samtools and tabix) are available on the system.
Check if the tools meet the minimal required version. If the tools are not available or the versions are insufficient, the script should log an error and exit gracefully.
Performing Ranged Requests:
After downloading the respective index files locally, the script should perform the ranged requests using:
samtools for BAM files.
tabix for VCF files.
The script should support commands like the following example for samtools:
```bash
samtools view '' chr1:1-100000
```
The output should be the specified genomic region.
File Naming:
The resulting files should be renamed by adding the genomic range to the file name in a normalized form (e.g., chr1_1_100000 before the file extension).
For example:
Input file: LB24-ONTCCMJH308-ready.bam
Output file after ranged request: LB24-ONTCCMJH308-ready.chr1_1_100000.bam
Index File Handling:
Before performing the ranged requests, ensure the necessary index files (.bai or .tbi) are downloaded and available locally.
Utility Script:
Create a new utility script to handle the ranged requests.
The script should handle downloading the index files and using the appropriate external commands for processing.
The script should log the process, including tool checks, the region being downloaded, and the final file output.
Sample Command Example:
```bash
samtools view '' chr1:1-100000
```
Additional Notes:
Ensure the process is well-logged and user-friendly.
The feature should be integrated in a way that it can be easily invoked within the existing system.
Implement error handling for situations where tools are missing or the ranged request fails.
Description:
Implement support for ranged downloads of BAM and VCF files using external tools like
samtools
andtabix
. The new feature should allow users to specify genomic regions for download, making the process more efficient when only certain regions are required. This feature will involve creating a new utility script to handle the ranged requests and file management.Acceptance Criteria:
Tool Verification:
samtools
andtabix
) are available on the system.Performing Ranged Requests:
samtools
for BAM files.tabix
for VCF files.samtools
:```bash
samtools view '' chr1:1-100000
```
File Naming:
chr1_1_100000
before the file extension).LB24-ONTCCMJH308-ready.bam
LB24-ONTCCMJH308-ready.chr1_1_100000.bam
Index File Handling:
.bai
or.tbi
) are downloaded and available locally.Utility Script:
Sample Command Example:
```bash
samtools view '' chr1:1-100000
```
Additional Notes:
Resources:
Tasks:
samtools
,tabix
) and versions.The text was updated successfully, but these errors were encountered: