@include "rna/_cr_lib_stages.mro"

call ALIGN_AND_COUNT(
    gem_well                    = 1,
    read_chunks                 = [
        {
            "chemistry": {
                "barcode_read_length": 16,
                "barcode_read_offset": 0,
                "barcode_read_type": "R1",
                "barcode_whitelist": "visium-v1",
                "description": "Spatial 3' v1",
                "endedness": "three_prime",
                "name": "SPATIAL3Pv1",
                "read_type_to_bcl2fastq_filename": {
                    "I1": "I1",
                    "I2": null,
                    "R1": "R1",
                    "R2": "R2",
                },
                "read_type_to_bcl_processor_filename": {
                    "I1": "I1",
                    "I2": null,
                    "R1": "RA",
                    "R2": null,
                },
                "rna_read2_length": null,
                "rna_read2_offset": 0,
                "rna_read2_type": null,
                "rna_read_length": null,
                "rna_read_offset": 0,
                "rna_read_type": "R2",
                "si_read_length": null,
                "si_read_offset": 0,
                "si_read_type": "I1",
                "strandedness": "+",
                "umi_min_read_length": 10,
                "umi_read_length": 12,
                "umi_read_offset": 16,
                "umi_read_type": "R1",
            },
            "chunk_id": 0,
            "fastqs": {
                "i1": null,
                "i2": null,
                "r1": "/gpfs/data/yanailab/runs/2023-04-15/Sample_BS21014A/BS21014A_S5_R1_001.fastq.gz",
                "r1_interleaved": false,
                "r2": "/gpfs/data/yanailab/runs/2023-04-15/Sample_BS21014A/BS21014A_S5_R2_001.fastq.gz",
            },
            "gem_group": 1,
            "library_id": 0,
            "library_type": "Gene Expression",
            "read_group": "399-A1:0:1:H5GJGBGXT:1",
            "read_lengths": {},
            "subsample_rate": null,
        },
    ],
    reference_path              = "/gpfs/data/yanailab/refs/mus_musculus/refdata-gex-mm10-2020-A_JY",
    valid_reads                 = ["/gpfs/data/yanailab/projects/jw7078/processed_data/399-A1/SPATIAL_RNA_COUNTER_CS/SPATIAL_RNA_COUNTER/_BASIC_SPATIAL_RNA_COUNTER/_MATRIX_COMPUTER/MAKE_SHARD/fork0/chnk0-ue5873dae19/files/valid.shard"],
    corrected_reads             = [
        "/gpfs/data/yanailab/projects/jw7078/processed_data/399-A1/SPATIAL_RNA_COUNTER_CS/SPATIAL_RNA_COUNTER/_BASIC_SPATIAL_RNA_COUNTER/_MATRIX_COMPUTER/BARCODE_CORRECTION/fork0/chnk0-ue5873daf42/files/valid_shard.shard",
        "/gpfs/data/yanailab/projects/jw7078/processed_data/399-A1/SPATIAL_RNA_COUNTER_CS/SPATIAL_RNA_COUNTER/_BASIC_SPATIAL_RNA_COUNTER/_MATRIX_COMPUTER/BARCODE_CORRECTION/fork0/chnk1-ue5873daf42/files/valid_shard.shard",
        "/gpfs/data/yanailab/projects/jw7078/processed_data/399-A1/SPATIAL_RNA_COUNTER_CS/SPATIAL_RNA_COUNTER/_BASIC_SPATIAL_RNA_COUNTER/_MATRIX_COMPUTER/BARCODE_CORRECTION/fork0/chnk2-ue5873daf42/files/valid_shard.shard",
        "/gpfs/data/yanailab/projects/jw7078/processed_data/399-A1/SPATIAL_RNA_COUNTER_CS/SPATIAL_RNA_COUNTER/_BASIC_SPATIAL_RNA_COUNTER/_MATRIX_COMPUTER/BARCODE_CORRECTION/fork0/chnk3-ue5873daf42/files/valid_shard.shard",
        "/gpfs/data/yanailab/projects/jw7078/processed_data/399-A1/SPATIAL_RNA_COUNTER_CS/SPATIAL_RNA_COUNTER/_BASIC_SPATIAL_RNA_COUNTER/_MATRIX_COMPUTER/BARCODE_CORRECTION/fork0/chnk4-ue5873daf42/files/valid_shard.shard",
    ],
    invalid_reads               = [
        "/gpfs/data/yanailab/projects/jw7078/processed_data/399-A1/SPATIAL_RNA_COUNTER_CS/SPATIAL_RNA_COUNTER/_BASIC_SPATIAL_RNA_COUNTER/_MATRIX_COMPUTER/BARCODE_CORRECTION/fork0/chnk0-ue5873daf42/files/invalid_shard.shard",
        "/gpfs/data/yanailab/projects/jw7078/processed_data/399-A1/SPATIAL_RNA_COUNTER_CS/SPATIAL_RNA_COUNTER/_BASIC_SPATIAL_RNA_COUNTER/_MATRIX_COMPUTER/BARCODE_CORRECTION/fork0/chnk1-ue5873daf42/files/invalid_shard.shard",
        "/gpfs/data/yanailab/projects/jw7078/processed_data/399-A1/SPATIAL_RNA_COUNTER_CS/SPATIAL_RNA_COUNTER/_BASIC_SPATIAL_RNA_COUNTER/_MATRIX_COMPUTER/BARCODE_CORRECTION/fork0/chnk2-ue5873daf42/files/invalid_shard.shard",
        "/gpfs/data/yanailab/projects/jw7078/processed_data/399-A1/SPATIAL_RNA_COUNTER_CS/SPATIAL_RNA_COUNTER/_BASIC_SPATIAL_RNA_COUNTER/_MATRIX_COMPUTER/BARCODE_CORRECTION/fork0/chnk3-ue5873daf42/files/invalid_shard.shard",
        "/gpfs/data/yanailab/projects/jw7078/processed_data/399-A1/SPATIAL_RNA_COUNTER_CS/SPATIAL_RNA_COUNTER/_BASIC_SPATIAL_RNA_COUNTER/_MATRIX_COMPUTER/BARCODE_CORRECTION/fork0/chnk4-ue5873daf42/files/invalid_shard.shard",
    ],
    feature_counts              = "/gpfs/data/yanailab/projects/jw7078/processed_data/399-A1/SPATIAL_RNA_COUNTER_CS/SPATIAL_RNA_COUNTER/_BASIC_SPATIAL_RNA_COUNTER/_MATRIX_COMPUTER/MAKE_SHARD/fork0/join-ue5873dae13/files/feature_counts.fbc.bincode",
    feature_reference           = "/gpfs/data/yanailab/projects/jw7078/processed_data/399-A1/SPATIAL_RNA_COUNTER_CS/SPATIAL_RNA_COUNTER/_BASIC_SPATIAL_RNA_COUNTER/_MATRIX_COMPUTER/MAKE_SHARD/fork0/split-ue5873dae13/files/feature_reference.frf.bincode",
    target_set                  = null,
    chemistry_def               = {
        "barcode_read_length": 16,
        "barcode_read_offset": 0,
        "barcode_read_type": "R1",
        "barcode_whitelist": "visium-v1",
        "description": "Spatial 3' v1",
        "endedness": "three_prime",
        "name": "SPATIAL3Pv1",
        "read_type_to_bcl2fastq_filename": {
            "I1": "I1",
            "I2": null,
            "R1": "R1",
            "R2": "R2",
        },
        "read_type_to_bcl_processor_filename": {
            "I1": "I1",
            "I2": null,
            "R1": "RA",
            "R2": null,
        },
        "rna_read2_length": null,
        "rna_read2_offset": 0,
        "rna_read2_type": null,
        "rna_read_length": null,
        "rna_read_offset": 0,
        "rna_read_type": "R2",
        "si_read_length": null,
        "si_read_offset": 0,
        "si_read_type": "I1",
        "strandedness": "+",
        "umi_min_read_length": 10,
        "umi_read_length": 12,
        "umi_read_offset": 16,
        "umi_read_type": "R1",
    },
    aligner                     = null,
    aligner_subsample_rate      = null,
    include_introns             = false,
    is_pd                       = false,
    targeted_umi_min_read_count = null,
    transcriptome_min_score     = 30,
    trim_polya_min_score        = 20,
    trim_tso_min_score          = 20,
    total_barcode_counts        = "/gpfs/data/yanailab/projects/jw7078/processed_data/399-A1/SPATIAL_RNA_COUNTER_CS/SPATIAL_RNA_COUNTER/_BASIC_SPATIAL_RNA_COUNTER/_MATRIX_COMPUTER/BARCODE_CORRECTION/fork0/join-ue5873daf42/files/total_barcode_counts.tbcc.bincode",
    barcode_subset              = null,
)
