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/60/e24e66445882756051fa9581f059b7/.command.sh
Downloading: s3://natera-rnd-pltf-dev-nextflow-scratch-01/work/db/8448daadd40c3b0120e35584b95066/aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.bam
Downloading: s3://natera-rnd-pltf-dev-nextflow-scratch-01/work/db/8448daadd40c3b0120e35584b95066/aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.bai
Downloading: s3://natera-platform-sandbox/pipeline-resources/AIH/rna/GRCh38/starfusion/ctat_genome_lib_build_dir/ref_genome.dict
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/60/e24e66445882756051fa9581f059b7/.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-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-4c132f-R1_A23WJ53LT4_1
+ all_qc -bam aih-tih-sc-4c132f-R1_A23WJ53LT4_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-4c132f-R1_A23WJ53LT4_1 -reference ref_genome.fa -region chr20
mkdir -p aih-tih-sc-4c132f-R1_A23WJ53LT4_1/aih-tih-sc-4c132f-R1_A23WJ53LT4_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-4c132f-R1_A23WJ53LT4_1/aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md/full_bed.bed
seqtool depth -bam aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.bam -bed aih-tih-sc-4c132f-R1_A23WJ53LT4_1/aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md/full_bed.bed -threads 4 -bam_threads 2 | bgzip -c > aih-tih-sc-4c132f-R1_A23WJ53LT4_1/aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md/aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.depth.gz
saturation_plot -bams aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.bam -region chr20 -output aih-tih-sc-4c132f-R1_A23WJ53LT4_1/aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md/saturation_plot.png -threads 1
seqtool saturation_metric -at 1000000 -region chr20 -bam_threads 1 aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.bam > aih-tih-sc-4c132f-R1_A23WJ53LT4_1/aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md/saturation_qc.tsv
fragment_size -bams aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.bam -region chr20 -output_prefix aih-tih-sc-4c132f-R1_A23WJ53LT4_1/aih-tih-sc-4c132f-R1_A23WJ53LT4_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-4c132f-R1_A23WJ53LT4_1.md.bam > aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.mpileup && contamination -input aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.mpileup -dbsnp_vcf Homo_sapiens_assembly38.dbsnp138.vcf.gz > aih-tih-sc-4c132f-R1_A23WJ53LT4_1/aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md/contamination.tsv
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-4c132f-R1_A23WJ53LT4_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-4c132f-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-4c132f-R1_A23WJ53LT4_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-4c132f-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.bai
0it [00:00, ?it/s]
142497it [00:00, 1424828.68it/s]
303408it [00:00, 1533197.94it/s]
472295it [00:00, 1604258.55it/s]
640649it [00:00, 1635530.04it/s]
808741it [00:00, 1651881.06it/s]
978612it [00:00, 1667786.86it/s]
1151516it [00:00, 1687797.55it/s]
1324096it [00:00, 1699880.49it/s]
1495805it [00:00, 1705246.86it/s]
1667341it [00:01, 1708229.88it/s]
1838164it [00:01, 1699709.25it/s]
2008145it [00:01, 1682378.16it/s]
2185263it [00:01, 1709008.37it/s]
2356568it [00:01, 1710206.75it/s]
2529708it [00:01, 1716518.80it/s]
2701489it [00:01, 1716891.92it/s]
2876297it [00:01, 1726235.26it/s]
3048938it [00:01, 1716464.08it/s]
3220852it [00:01, 1717250.68it/s]
3392594it [00:02, 1705171.31it/s]
3563241it [00:02, 1705510.25it/s]
3733812it [00:02, 1687039.79it/s]
3902566it [00:02, 1648387.17it/s]
4067598it [00:02, 1607622.38it/s]
4229219it [00:02, 1610075.05it/s]
4399685it [00:02, 1637733.90it/s]
4572680it [00:02, 1664896.66it/s]
4739364it [00:02, 1664759.05it/s]
4910491it [00:02, 1678561.68it/s]
5081655it [00:03, 1688311.55it/s]
5255953it [00:03, 1704614.06it/s]
5431205it [00:03, 1718912.66it/s]
5606183it [00:03, 1728086.66it/s]
5782113it [00:03, 1737414.35it/s]
5956448it [00:03, 1739124.01it/s]
6130380it [00:03, 1723087.91it/s]
6303742it [00:03, 1726190.21it/s]
6477917it [00:03, 1730805.93it/s]
6651782it [00:03, 1733125.49it/s]
6825114it [00:04, 1718592.22it/s]
6997012it [00:04, 1716409.20it/s]
7168679it [00:04, 1715055.11it/s]
7340202it [00:04, 1704914.30it/s]
7510715it [00:04, 1703459.18it/s]
7681894it [00:04, 1705792.34it/s]
7852485it [00:04, 1693200.92it/s]
8021830it [00:04, 1691795.70it/s]
8191026it [00:04, 1690749.25it/s]
8365716it [00:04, 1707495.37it/s]
8539826it [00:05, 1717529.07it/s]
8712575it [00:05, 1720495.88it/s]
8884636it [00:05, 1720023.32it/s]
9056646it [00:05, 1702594.67it/s]
9226949it [00:05, 1698685.01it/s]
9397072it [00:05, 1699404.78it/s]
9568511it [00:05, 1703863.07it/s]
9740716it [00:05, 1709285.23it/s]
9911904it [00:05, 1710046.31it/s]
10083202it [00:05, 1710820.28it/s]
10254292it [00:06, 1703009.13it/s]
10427012it [00:06, 1710204.11it/s]
10600485it [00:06, 1717401.41it/s]
10772236it [00:06, 1716859.68it/s]
10946525it [00:06, 1724640.02it/s]
11120519it [00:06, 1729208.97it/s]
11294379it [00:06, 1732009.55it/s]
11467584it [00:06, 1731692.90it/s]
11640756it [00:06, 1729584.78it/s]
11696157it [00:06, 1699875.99it/s]
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.bai
tabix -s 1 -b 2 -e 2 aih-tih-sc-4c132f-R1_A23WJ53LT4_1/aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md/aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.depth.gz
seqtool depth_hist -nbins 500 aih-tih-sc-4c132f-R1_A23WJ53LT4_1/aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md/aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.depth.gz > aih-tih-sc-4c132f-R1_A23WJ53LT4_1/aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md/aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.depth_hist.tsv
cat aih-tih-sc-4c132f-R1_A23WJ53LT4_1/aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md/aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.depth_hist.tsv | plot -x 0 -xlabel Depth -ylabel "Number of Sites" -xlim 0 2000 -title aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md -output aih-tih-sc-4c132f-R1_A23WJ53LT4_1/aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md/aih-tih-sc-4c132f-R1_A23WJ53LT4_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-4c132f-R1_A23WJ53LT4_1.md.bam > aih-tih-sc-4c132f-R1_A23WJ53LT4_1/aih-tih-sc-4c132f-R1_A23WJ53LT4_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-4c132f-R1_A23WJ53LT4_1.md.bam > aih-tih-sc-4c132f-R1_A23WJ53LT4_1/aih-tih-sc-4c132f-R1_A23WJ53LT4_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-4c132f-R1_A23WJ53LT4_1/aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md/aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.depth.gz> aih-tih-sc-4c132f-R1_A23WJ53LT4_1/aih-tih-sc-4c132f-R1_A23WJ53LT4_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-4c132f-R1_A23WJ53LT4_1.md.bam > aih-tih-sc-4c132f-R1_A23WJ53LT4_1/aih-tih-sc-4c132f-R1_A23WJ53LT4_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-4c132f-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md.bai
cat aih-tih-sc-4c132f-R1_A23WJ53LT4_1/aih-tih-sc-4c132f-R1_A23WJ53LT4_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-4c132f-R1_A23WJ53LT4_1.md" -suptitle "Twist_rna_exome_AND_fusion_hg38.bed" -output "aih-tih-sc-4c132f-R1_A23WJ53LT4_1/aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md/gc_bias.Twist_rna_exome_AND_fusion_hg38.bed.png" -ylabel "Fold enrichment / depletion" -xlabel "GC Quantile"
echo `date` > aih-tih-sc-4c132f-R1_A23WJ53LT4_1/aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md/qc_complete.txt
+ merge_qc -folders aih-tih-sc-4c132f-R1_A23WJ53LT4_1/aih-tih-sc-4c132f-R1_A23WJ53LT4_1.md -output aih-tih-sc-4c132f-R1_A23WJ53LT4_1/aih-tih-sc-4c132f-R1_A23WJ53LT4_1_full_basic_stats.tsv
+ head -n1 aih-tih-sc-4c132f-R1_A23WJ53LT4_1/aih-tih-sc-4c132f-R1_A23WJ53LT4_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-4c132f-R1_A23WJ53LT4_1/aih-tih-sc-4c132f-R1_A23WJ53LT4_1_full_basic_stats.tsv