gatk-sv icon indicating copy to clipboard operation
gatk-sv copied to clipboard

Scripts to create downsampled files

Open VJalili opened this issue 3 months ago • 0 comments

This PR adds utility scripts to create test data for the pipeline, which are created either by downsampling a larger file to contain information overlapping given test regions or by converting file types, whichever suits best. The resulting files are smaller than the input files, leading to faster and cheaper execution of workflows for testing purposes.

The following changes are implemented:

  • [x] Create a tests folder containing all the tests, and move the Carrot-related files to this folder;

  • [x] Implement methods to downsample different types of files; .cram. .vcf, .interval_list, and primary contigs file are the currently supported file types.

  • [x] Implement a script that iterates through given workflow JSON files, downsamples the set files, pushes them to the cloud if needed, and creates an output JSON file containing the downsampled files in addition to untouched inputs. For instance:

  • input JSON:

    {
        "GatherSampleEvidence.bam_or_cram_file": "gs://.../HG00096.final.cram",
        "GatherSampleEvidence.sample_id": "HG00096",
    }
    
  • output json:

    {
        "GatherSampleEvidence.bam_or_cram_file": "gs://my-test-bucket/downsampled_HG00096.final.cram",
        "GatherSampleEvidence.sample_id": "HG00096",
    }
    
  • [x] Add a BED file with default target regions such that resulting downsampled files run successfully through the GatherSampleEvidence workflow.

The UUID of a test run on GCP: dd8bc64f-7ac0-46b6-ae39-2af86f0fe573

VJalili avatar Apr 02 '24 17:04 VJalili