File Info

Filename
.command.sh
Full Path
s3://natera-rnd-pltf-dev-nextflow-scratch-01/work/65/ebc5bafa0e1772c4a75842daee2e1d/.command.sh
Size
1.3 KB
Attempt
#!/bin/bash -euo pipefail
python -u /usr/local/src/CTAT-SPLICING/STAR_to_cancer_introns.py \
    --SJ_tab_file FFPE_V4_0001_RNA_0001_B23LG7FLT4_2.SJ.out.tab \
    --chimJ_file FFPE_V4_0001_RNA_0001_B23LG7FLT4_2.Chimeric.out.junction \
    --bam_file FFPE_V4_0001_RNA_0001_B23LG7FLT4_2.Aligned.sortedByCoord.out.bam \
    --output_prefix FFPE_V4_0001_RNA_0001_B23LG7FLT4_2 \
    --ctat_genome_lib ctat_genome_lib_build_dir \
    --vis --sample_name FFPE_V4_0001_RNA_0001_B23LG7FLT4_2

# Sort output files to ensure consistent ordering across runs while preserving headers
if [ -f FFPE_V4_0001_RNA_0001_B23LG7FLT4_2.cancer.introns ]; then
    # Extract header (first line) and sort data lines by fourth column (uniq_mapped) descending, then by first column (intron)
    head -n 1 FFPE_V4_0001_RNA_0001_B23LG7FLT4_2.cancer.introns > FFPE_V4_0001_RNA_0001_B23LG7FLT4_2.cancer.introns.tmp
    tail -n +2 FFPE_V4_0001_RNA_0001_B23LG7FLT4_2.cancer.introns | LC_ALL=C sort -k4,4nr -k1,1 >> FFPE_V4_0001_RNA_0001_B23LG7FLT4_2.cancer.introns.tmp
    mv FFPE_V4_0001_RNA_0001_B23LG7FLT4_2.cancer.introns.tmp FFPE_V4_0001_RNA_0001_B23LG7FLT4_2.cancer.introns
fi

cat <<-END_VERSIONS > versions.yml
"NFCORE_RNAFUSION:RNAFUSION:CTATSPLICING_STARTOCANCERINTRONS":
    ctat-splicing: 0.0.3
END_VERSIONS