Downloading: s3://natera-platform-sandbox/pipeline-resources/AIH/rna/GRCh38/starfusion/ctat_genome_lib_build_dir/ref_genome.fa
Downloading: s3://natera-platform-sandbox/pipeline-resources/Homo_sapiens_assembly38.dbsnp138.vcf.gz
Downloading: s3://natera-rnd-pltf-dev-nextflow-scratch-01/work/ce/ea0686309417ad545f412df63a99ae/.command.sh
Downloading: s3://natera-platform-sandbox/pipeline-resources/AIH/rna/GRCh38/starfusion/ctat_genome_lib_build_dir/ref_genome.dict
Downloading: s3://natera-rnd-pltf-dev-nextflow-scratch-01/work/6f/6f68937af1ee9ca5c19c3c0f4d07c0/aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bai
Downloading: s3://natera-platform-sandbox/pipeline-resources/AIH/rna/GRCh38/gatk4/dbsnp_hg38_contam_sites.bed
Downloading: s3://natera-rnd-pltf-dev-nextflow-scratch-01/work/ce/ea0686309417ad545f412df63a99ae/.command.run
Downloading: s3://natera-platform-sandbox/pipeline-resources/AIH/rna/GRCh38/starfusion/ctat_genome_lib_build_dir/ref_genome.fa.fai
Downloading: s3://natera-rnd-pltf-dev-nextflow-scratch-01/work/6f/6f68937af1ee9ca5c19c3c0f4d07c0/aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bam
Downloading: s3://natera-platform-sandbox/pipeline-resources/beds/twist/Twist_rna_exome_AND_fusion_hg38.bed
Downloading: s3://natera-platform-sandbox/pipeline-resources/Homo_sapiens_assembly38.dbsnp138.vcf.gz.tbi
==> STAGING COMPLETE (11 inputs)
+ mkdir aih-tih-sc-20b7e4-R1_B23WHYVLT4_1
+ all_qc -bam aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bam -beds Twist_rna_exome_AND_fusion_hg38.bed -dbsnp_vcf Homo_sapiens_assembly38.dbsnp138.vcf.gz -contamination_bed dbsnp_hg38_contam_sites.bed -output_folder aih-tih-sc-20b7e4-R1_B23WHYVLT4_1 -reference ref_genome.fa -region chr20
mkdir -p aih-tih-sc-20b7e4-R1_B23WHYVLT4_1/aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md/
cat Twist_rna_exome_AND_fusion_hg38.bed | cut -f 1-3 | bedtools sort -g ref_genome.fa.fai | bedtools merge > aih-tih-sc-20b7e4-R1_B23WHYVLT4_1/aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md/full_bed.bed
seqtool depth -bam aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bam -bed aih-tih-sc-20b7e4-R1_B23WHYVLT4_1/aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md/full_bed.bed -threads 4 -bam_threads 2 | bgzip -c > aih-tih-sc-20b7e4-R1_B23WHYVLT4_1/aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md/aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.depth.gz
saturation_plot -bams aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bam -region chr20 -output aih-tih-sc-20b7e4-R1_B23WHYVLT4_1/aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md/saturation_plot.png -threads 1
seqtool saturation_metric -at 1000000 -region chr20 -bam_threads 1 aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bam > aih-tih-sc-20b7e4-R1_B23WHYVLT4_1/aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md/saturation_qc.tsv
fragment_size -bams aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bam -region chr20 -output_prefix aih-tih-sc-20b7e4-R1_B23WHYVLT4_1/aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md/fragsize -threads 1
samtools mpileup -B --min-MQ 60 --min-BQ 30 -f ref_genome.fa -l dbsnp_hg38_contam_sites.bed aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bam > aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.mpileup && contamination -input aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.mpileup -dbsnp_vcf Homo_sapiens_assembly38.dbsnp138.vcf.gz > aih-tih-sc-20b7e4-R1_B23WHYVLT4_1/aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md/contamination.tsv
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bai
[mpileup] 1 samples in 1 input files
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bai
/opt/conda/lib/python3.9/site-packages/pyranges/__init__.py:8: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
import pkg_resources
/opt/conda/lib/python3.9/site-packages/pyranges/__init__.py:8: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
import pkg_resources
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bai
0it [00:00, ?it/s][W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bai
66971it [00:00, 669635.60it/s]
139118it [00:00, 700101.86it/s]
210446it [00:00, 706097.80it/s]
281528it [00:00, 707946.26it/s]
353659it [00:00, 712748.21it/s]
426724it [00:00, 718819.07it/s]
499371it [00:00, 721304.71it/s]
572325it [00:00, 723912.80it/s]
644991it [00:00, 724756.67it/s]
717637it [00:01, 725253.36it/s]
791823it [00:01, 730322.44it/s]
865054it [00:01, 730912.41it/s]
938146it [00:01, 729667.04it/s]
1011114it [00:01, 727291.54it/s]
1083845it [00:01, 718913.48it/s]
1155757it [00:01, 716214.46it/s]
1229368it [00:01, 722048.95it/s]
1303073it [00:01, 726510.70it/s]
1376226it [00:01, 727998.01it/s]
1449037it [00:02, 724089.10it/s]
1521829it [00:02, 725215.56it/s]
1594359it [00:02, 724534.89it/s]
1666819it [00:02, 721343.68it/s]
1740168it [00:02, 724896.97it/s]
1812664it [00:02, 719638.86it/s]
1885417it [00:02, 721973.44it/s]
1958480it [00:02, 724533.57it/s]
2031238it [00:02, 725429.67it/s]
2105007it [00:02, 729083.31it/s]
2177921it [00:03, 728221.93it/s]
2250794it [00:03, 728361.75it/s][W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bai
2324021it [00:03, 729518.55it/s]
2396975it [00:03, 726696.57it/s]
2469649it [00:03, 717760.98it/s]
2541450it [00:03, 713942.08it/s]
2612863it [00:03, 713426.55it/s]
2686032it [00:03, 718771.57it/s]
2759153it [00:03, 722468.43it/s]
2831692it [00:03, 723326.88it/s]
2904117it [00:04, 723560.35it/s]
2976479it [00:04, 721215.30it/s]
3048606it [00:04, 717994.00it/s]
3120762it [00:04, 719043.47it/s]
3192672it [00:04, 715484.78it/s]
3266101it [00:04, 721076.90it/s]
3339033it [00:04, 723526.12it/s]
3412653it [00:04, 727291.65it/s]
3486494it [00:04, 730607.43it/s]
3560166it [00:04, 732422.84it/s]
3633412it [00:05, 732227.02it/s]
3706638it [00:05, 729260.60it/s]
3798684it [00:05, 786337.87it/s]
3903597it [00:05, 864954.02it/s][W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bai
3998311it [00:05, 889549.79it/s]
4092652it [00:05, 905668.77it/s]
4200301it [00:05, 956847.10it/s]
4308028it [00:05, 992932.31it/s]
4409799it [00:05, 1000243.72it/s]
4514804it [00:05, 1015160.16it/s]
4607331it [00:06, 764999.26it/s]
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bai
tabix -s 1 -b 2 -e 2 aih-tih-sc-20b7e4-R1_B23WHYVLT4_1/aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md/aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.depth.gz
seqtool depth_hist -nbins 500 aih-tih-sc-20b7e4-R1_B23WHYVLT4_1/aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md/aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.depth.gz > aih-tih-sc-20b7e4-R1_B23WHYVLT4_1/aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md/aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.depth_hist.tsv
cat aih-tih-sc-20b7e4-R1_B23WHYVLT4_1/aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md/aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.depth_hist.tsv | plot -x 0 -xlabel Depth -ylabel "Number of Sites" -xlim 0 2000 -title aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md -output aih-tih-sc-20b7e4-R1_B23WHYVLT4_1/aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md/aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.depth.png
[W::hts_idx_load3] The index file is older than the data file: Homo_sapiens_assembly38.dbsnp138.vcf.gz.tbi
seqtool read_qc -bed Twist_rna_exome_AND_fusion_hg38.bed -n_threads 1 -bam_threads 2 aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bam > aih-tih-sc-20b7e4-R1_B23WHYVLT4_1/aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md/read_qc.Twist_rna_exome_AND_fusion_hg38.bed.tsv
seqtool reads_per_target -bed Twist_rna_exome_AND_fusion_hg38.bed -threads 1 -bam_threads 2 aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bam > aih-tih-sc-20b7e4-R1_B23WHYVLT4_1/aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md/reads_per_target.Twist_rna_exome_AND_fusion_hg38.bed.tsv
seqtool depth_stats -bed Twist_rna_exome_AND_fusion_hg38.bed aih-tih-sc-20b7e4-R1_B23WHYVLT4_1/aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md/aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.depth.gz> aih-tih-sc-20b7e4-R1_B23WHYVLT4_1/aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md/depth_stats.Twist_rna_exome_AND_fusion_hg38.bed.tsv
seqtool gc_bias -reference ref_genome.fa -bed Twist_rna_exome_AND_fusion_hg38.bed -bin_size 0.05 -threads 1 -bam_threads 2 aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bam > aih-tih-sc-20b7e4-R1_B23WHYVLT4_1/aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md/gc_bias_qc.Twist_rna_exome_AND_fusion_hg38.bed.tsv
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md.bai
cat aih-tih-sc-20b7e4-R1_B23WHYVLT4_1/aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md/gc_bias_qc.Twist_rna_exome_AND_fusion_hg38.bed.tsv | plot -x 0 -header infer -ylim 0 2 -title "aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md" -suptitle "Twist_rna_exome_AND_fusion_hg38.bed" -output "aih-tih-sc-20b7e4-R1_B23WHYVLT4_1/aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md/gc_bias.Twist_rna_exome_AND_fusion_hg38.bed.png" -ylabel "Fold enrichment / depletion" -xlabel "GC Quantile"
echo `date` > aih-tih-sc-20b7e4-R1_B23WHYVLT4_1/aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md/qc_complete.txt
+ merge_qc -folders aih-tih-sc-20b7e4-R1_B23WHYVLT4_1/aih-tih-sc-20b7e4-R1_B23WHYVLT4_1.md -output aih-tih-sc-20b7e4-R1_B23WHYVLT4_1/aih-tih-sc-20b7e4-R1_B23WHYVLT4_1_full_basic_stats.tsv
+ head -n1 aih-tih-sc-20b7e4-R1_B23WHYVLT4_1/aih-tih-sc-20b7e4-R1_B23WHYVLT4_1_full_basic_stats.tsv
++ basename Twist_rna_exome_AND_fusion_hg38.bed
+ grep -e Twist_rna_exome_AND_fusion_hg38.bed aih-tih-sc-20b7e4-R1_B23WHYVLT4_1/aih-tih-sc-20b7e4-R1_B23WHYVLT4_1_full_basic_stats.tsv