Downloading: s3://natera-rnd-pltf-dev-nextflow-scratch-01/work/78/1b9e159374a593edcf03e9d5c395f4/aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.bam
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/2a/1cf16aabf5e4309dce163838389e40/.command.sh
Downloading: s3://natera-rnd-pltf-dev-nextflow-scratch-01/work/78/1b9e159374a593edcf03e9d5c395f4/aih-tih-sc-7dd1d5-R1_B23WHYVLT4_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/2a/1cf16aabf5e4309dce163838389e40/.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-7dd1d5-R1_B23WHYVLT4_1
+ all_qc -bam aih-tih-sc-7dd1d5-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-7dd1d5-R1_B23WHYVLT4_1 -reference ref_genome.fa -region chr20
mkdir -p aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1/aih-tih-sc-7dd1d5-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-7dd1d5-R1_B23WHYVLT4_1/aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md/full_bed.bed
seqtool depth -bam aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.bam -bed aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1/aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md/full_bed.bed -threads 4 -bam_threads 2 | bgzip -c > aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1/aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md/aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.depth.gz
saturation_plot -bams aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.bam -region chr20 -output aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1/aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md/saturation_plot.png -threads 1
seqtool saturation_metric -at 1000000 -region chr20 -bam_threads 1 aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.bam > aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1/aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md/saturation_qc.tsv
samtools mpileup -B --min-MQ 60 --min-BQ 30 -f ref_genome.fa -l dbsnp_hg38_contam_sites.bed aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.bam > aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.mpileup && contamination -input aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.mpileup -dbsnp_vcf Homo_sapiens_assembly38.dbsnp138.vcf.gz > aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1/aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md/contamination.tsv
fragment_size -bams aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.bam -region chr20 -output_prefix aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1/aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md/fragsize -threads 1
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-7dd1d5-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-7dd1d5-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-7dd1d5-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-7dd1d5-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-7dd1d5-R1_B23WHYVLT4_1.md.bai
153568it [00:00, 1535337.37it/s]
307102it [00:00, 1485705.61it/s]
455782it [00:00, 1462251.28it/s]
612105it [00:00, 1501257.02it/s]
774796it [00:00, 1545930.73it/s]
939487it [00:00, 1579923.49it/s]
1097601it [00:00, 1544572.72it/s]
1252278it [00:00, 1483983.73it/s]
1418265it [00:00, 1536677.39it/s]
1576241it [00:01, 1549560.33it/s]
1731640it [00:01, 1515827.75it/s]
1903192it [00:01, 1574721.25it/s]
2061131it [00:01, 1564017.40it/s]
2231146it [00:01, 1604269.21it/s]
2400573it [00:01, 1630838.04it/s]
2563909it [00:01, 1406283.83it/s]
2710055it [00:01, 1173568.31it/s]
2867568it [00:01, 1270086.11it/s]
3021776it [00:02, 1339606.14it/s]
3190048it [00:02, 1431382.66it/s]
3353600it [00:02, 1487805.05it/s]
3522978it [00:02, 1546105.33it/s]
3695476it [00:02, 1597582.50it/s]
3868009it [00:02, 1634787.61it/s]
4035000it [00:02, 1645071.27it/s]
4206322it [00:02, 1665078.76it/s]
4373916it [00:02, 1650264.55it/s]
4539725it [00:02, 1576219.08it/s]
4698530it [00:03, 1471267.34it/s]
4847611it [00:03, 1403635.72it/s]
4989607it [00:03, 1335096.93it/s]
5126169it [00:03, 1343301.21it/s]
5261555it [00:03, 1341096.95it/s]
5403934it [00:03, 1364433.82it/s]
5545613it [00:03, 1379510.22it/s]
5684074it [00:03, 1271391.03it/s]
5850333it [00:03, 1379794.12it/s]
6019690it [00:04, 1468796.13it/s]
6185915it [00:04, 1524557.45it/s]
6352514it [00:04, 1565744.60it/s]
6522127it [00:04, 1603937.81it/s]
6683484it [00:04, 1548999.55it/s]
6839421it [00:04, 1520246.93it/s]
7002269it [00:04, 1551287.54it/s]
7161973it [00:04, 1564590.92it/s]
7318932it [00:04, 1564043.60it/s]
7483978it [00:05, 1589554.66it/s]
7643216it [00:05, 1574966.12it/s]
7811420it [00:05, 1606616.84it/s]
7981300it [00:05, 1633943.89it/s]
8146715it [00:05, 1639865.06it/s]
8312928it [00:05, 1646484.04it/s]
8479601it [00:05, 1652505.49it/s]
8647642it [00:05, 1660817.81it/s]
8816720it [00:05, 1669756.88it/s]
8983730it [00:05, 1669781.44it/s]
9150732it [00:06, 1560034.55it/s]
9308206it [00:06, 1540692.77it/s]
9473742it [00:06, 1573540.13it/s]
9642199it [00:06, 1605773.52it/s]
9806829it [00:06, 1617505.29it/s]
9969098it [00:06, 1594832.01it/s]
10128988it [00:06, 1576964.42it/s]
10286981it [00:06, 1571988.95it/s]
10427202it [00:06, 1523251.39it/s]
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.bai
tabix -s 1 -b 2 -e 2 aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1/aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md/aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.depth.gz
seqtool depth_hist -nbins 500 aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1/aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md/aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.depth.gz > aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1/aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md/aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.depth_hist.tsv
cat aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1/aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md/aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.depth_hist.tsv | plot -x 0 -xlabel Depth -ylabel "Number of Sites" -xlim 0 2000 -title aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md -output aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1/aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md/aih-tih-sc-7dd1d5-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-7dd1d5-R1_B23WHYVLT4_1.md.bam > aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1/aih-tih-sc-7dd1d5-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-7dd1d5-R1_B23WHYVLT4_1.md.bam > aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1/aih-tih-sc-7dd1d5-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-7dd1d5-R1_B23WHYVLT4_1/aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md/aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.depth.gz> aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1/aih-tih-sc-7dd1d5-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-7dd1d5-R1_B23WHYVLT4_1.md.bam > aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1/aih-tih-sc-7dd1d5-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-7dd1d5-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.bai
[W::hts_idx_load3] The index file is older than the data file: aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md.bai
cat aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1/aih-tih-sc-7dd1d5-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-7dd1d5-R1_B23WHYVLT4_1.md" -suptitle "Twist_rna_exome_AND_fusion_hg38.bed" -output "aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1/aih-tih-sc-7dd1d5-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-7dd1d5-R1_B23WHYVLT4_1/aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md/qc_complete.txt
+ merge_qc -folders aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1/aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1.md -output aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1/aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1_full_basic_stats.tsv
+ head -n1 aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1/aih-tih-sc-7dd1d5-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-7dd1d5-R1_B23WHYVLT4_1/aih-tih-sc-7dd1d5-R1_B23WHYVLT4_1_full_basic_stats.tsv