Downloading: s3://natera-rnd-pltf-dev-nextflow-scratch-01/work/62/3e97889db3bded017a4dfedb2c1067/aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.bai
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/76/a3af7fb4286a47d9b72c1e3b25d308/.command.sh
Downloading: s3://natera-rnd-pltf-dev-nextflow-scratch-01/work/62/3e97889db3bded017a4dfedb2c1067/aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.bam
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/76/a3af7fb4286a47d9b72c1e3b25d308/.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-b675f7-R1_A23WJ53LT4_1
+ all_qc -bam aih-tih-sc-b675f7-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-b675f7-R1_A23WJ53LT4_1 -reference ref_genome.fa -region chr20
mkdir -p aih-tih-sc-b675f7-R1_A23WJ53LT4_1/aih-tih-sc-b675f7-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-b675f7-R1_A23WJ53LT4_1/aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md/full_bed.bed
seqtool depth -bam aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.bam -bed aih-tih-sc-b675f7-R1_A23WJ53LT4_1/aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md/full_bed.bed -threads 4 -bam_threads 2 | bgzip -c > aih-tih-sc-b675f7-R1_A23WJ53LT4_1/aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md/aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.depth.gz
saturation_plot -bams aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.bam -region chr20 -output aih-tih-sc-b675f7-R1_A23WJ53LT4_1/aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md/saturation_plot.png -threads 1
seqtool saturation_metric -at 1000000 -region chr20 -bam_threads 1 aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.bam > aih-tih-sc-b675f7-R1_A23WJ53LT4_1/aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md/saturation_qc.tsv
fragment_size -bams aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.bam -region chr20 -output_prefix aih-tih-sc-b675f7-R1_A23WJ53LT4_1/aih-tih-sc-b675f7-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-b675f7-R1_A23WJ53LT4_1.md.bam > aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.mpileup && contamination -input aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.mpileup -dbsnp_vcf Homo_sapiens_assembly38.dbsnp138.vcf.gz > aih-tih-sc-b675f7-R1_A23WJ53LT4_1/aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md/contamination.tsv
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-b675f7-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-b675f7-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-b675f7-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-b675f7-R1_A23WJ53LT4_1.md.bai
0it [00:00, ?it/s][W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.bai
144369it [00:00, 1443639.75it/s]
303992it [00:00, 1533370.34it/s]
466398it [00:00, 1574755.39it/s]
633426it [00:00, 1612321.60it/s]
794658it [00:00, 1589499.92it/s]
962124it [00:00, 1618167.51it/s]
1124005it [00:00, 1593428.64it/s]
1294076it [00:00, 1627060.52it/s]
1461803it [00:00, 1642581.23it/s]
1631336it [00:01, 1658737.95it/s]
1799925it [00:01, 1666993.75it/s]
1966685it [00:01, 1664713.82it/s]
2137739it [00:01, 1678537.90it/s]
2308287it [00:01, 1686644.44it/s]
2483999it [00:01, 1707840.24it/s]
2654805it [00:01, 1706358.36it/s]
2825456it [00:01, 1704636.16it/s]
2995931it [00:01, 1701398.85it/s]
3167653it [00:01, 1706025.58it/s]
3338263it [00:02, 1703876.47it/s]
3508656it [00:02, 1681789.39it/s]
3676899it [00:02, 1677485.26it/s]
3845588it [00:02, 1680072.02it/s]
4015722it [00:02, 1686282.34it/s]
4188683it [00:02, 1699203.52it/s]
4358629it [00:02, 1696890.12it/s]
4528698it [00:02, 1698013.56it/s]
4699387it [00:02, 1700542.29it/s]
4869681it [00:02, 1701150.36it/s]
5039803it [00:03, 1658424.91it/s]
5211235it [00:03, 1674737.03it/s]
5384354it [00:03, 1691378.38it/s]
5555461it [00:03, 1697127.07it/s]
5728187it [00:03, 1706095.02it/s]
5899617it [00:03, 1708533.54it/s]
6070533it [00:03, 1700216.76it/s]
6240606it [00:03, 1696593.89it/s]
6411787it [00:03, 1701120.43it/s]
6584017it [00:03, 1707435.31it/s]
6754896it [00:04, 1707768.00it/s]
6925688it [00:04, 1695319.74it/s]
7097963it [00:04, 1703482.51it/s]
7268337it [00:04, 1700224.83it/s]
7438964it [00:04, 1702019.68it/s]
7609997it [00:04, 1704372.82it/s]
7782999it [00:04, 1712038.77it/s]
7956442it [00:04, 1718727.36it/s]
8128322it [00:04, 1716660.97it/s]
8299994it [00:04, 1713749.48it/s]
8471440it [00:05, 1713951.62it/s]
8642839it [00:05, 1703507.14it/s]
8813205it [00:05, 1702913.61it/s]
8983507it [00:05, 1694907.29it/s]
9153011it [00:05, 1692947.22it/s]
9324266it [00:05, 1698787.43it/s]
9495233it [00:05, 1701953.57it/s]
9666438it [00:05, 1704922.92it/s]
9839984it [00:05, 1714056.87it/s]
10011396it [00:05, 1711438.00it/s]
10184802it [00:06, 1718199.45it/s]
10357125it [00:06, 1719693.50it/s]
10529098it [00:06, 1706266.62it/s]
10699750it [00:06, 1702415.69it/s]
10872963it [00:06, 1711266.65it/s]
11044108it [00:06, 1710796.71it/s]
11215200it [00:06, 1707108.24it/s]
11385920it [00:06, 1706072.38it/s]
11556534it [00:06, 1706014.01it/s]
11727140it [00:06, 1702482.67it/s]
11897393it [00:07, 1692033.30it/s]
12070707it [00:07, 1704259.19it/s]
12241579it [00:07, 1705580.98it/s]
12412905it [00:07, 1707866.96it/s]
12583702it [00:07, 1704335.63it/s]
12754144it [00:07, 1700445.89it/s]
12874542it [00:07, 1690596.86it/s]
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.bai
tabix -s 1 -b 2 -e 2 aih-tih-sc-b675f7-R1_A23WJ53LT4_1/aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md/aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.depth.gz
seqtool depth_hist -nbins 500 aih-tih-sc-b675f7-R1_A23WJ53LT4_1/aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md/aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.depth.gz > aih-tih-sc-b675f7-R1_A23WJ53LT4_1/aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md/aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.depth_hist.tsv
cat aih-tih-sc-b675f7-R1_A23WJ53LT4_1/aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md/aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.depth_hist.tsv | plot -x 0 -xlabel Depth -ylabel "Number of Sites" -xlim 0 2000 -title aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md -output aih-tih-sc-b675f7-R1_A23WJ53LT4_1/aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md/aih-tih-sc-b675f7-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-b675f7-R1_A23WJ53LT4_1.md.bam > aih-tih-sc-b675f7-R1_A23WJ53LT4_1/aih-tih-sc-b675f7-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-b675f7-R1_A23WJ53LT4_1.md.bam > aih-tih-sc-b675f7-R1_A23WJ53LT4_1/aih-tih-sc-b675f7-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-b675f7-R1_A23WJ53LT4_1/aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md/aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.depth.gz> aih-tih-sc-b675f7-R1_A23WJ53LT4_1/aih-tih-sc-b675f7-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-b675f7-R1_A23WJ53LT4_1.md.bam > aih-tih-sc-b675f7-R1_A23WJ53LT4_1/aih-tih-sc-b675f7-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-b675f7-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md.bai
cat aih-tih-sc-b675f7-R1_A23WJ53LT4_1/aih-tih-sc-b675f7-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-b675f7-R1_A23WJ53LT4_1.md" -suptitle "Twist_rna_exome_AND_fusion_hg38.bed" -output "aih-tih-sc-b675f7-R1_A23WJ53LT4_1/aih-tih-sc-b675f7-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-b675f7-R1_A23WJ53LT4_1/aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md/qc_complete.txt
+ merge_qc -folders aih-tih-sc-b675f7-R1_A23WJ53LT4_1/aih-tih-sc-b675f7-R1_A23WJ53LT4_1.md -output aih-tih-sc-b675f7-R1_A23WJ53LT4_1/aih-tih-sc-b675f7-R1_A23WJ53LT4_1_full_basic_stats.tsv
+ head -n1 aih-tih-sc-b675f7-R1_A23WJ53LT4_1/aih-tih-sc-b675f7-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-b675f7-R1_A23WJ53LT4_1/aih-tih-sc-b675f7-R1_A23WJ53LT4_1_full_basic_stats.tsv