Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial IGV_HaplotypeViz WDL workflow for generating IGV screenshots #468

Draft
wants to merge 43 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
43774f0
Add initial IGV_HaplotypeViz WDL workflow for generating IGV screenshots
shadizaheri Sep 5, 2024
7cb3c7e
Add new workflow for parallel processing of large BED files
shadizaheri Sep 5, 2024
27f85d6
fix the workflow name
shadizaheri Sep 5, 2024
6249a7c
update the docker
shadizaheri Sep 6, 2024
c2ac959
updating docker and fixing the igv command
shadizaheri Sep 6, 2024
dd2dfc9
fixing the docker and igv command
shadizaheri Sep 6, 2024
c0fa633
fixing the runtime
shadizaheri Sep 6, 2024
fafa429
fixing the runtime
shadizaheri Sep 6, 2024
9f0d53b
new wdl for taking the igv screenshots
shadizaheri Sep 8, 2024
9682125
update docker and the script to use only one bam
shadizaheri Sep 9, 2024
f574936
Updated Python script and WDL for IGV snapshot automation
shadizaheri Sep 9, 2024
1c11914
Update WDL and Python script to support IGV 2.18.2 with igv.sh
shadizaheri Sep 9, 2024
d10a140
update the directory to the python script
shadizaheri Sep 9, 2024
09154ed
update bai
shadizaheri Sep 9, 2024
4aedff1
checking for bai
shadizaheri Sep 9, 2024
bd53b9c
new wdl-the script has been tested on the vm
shadizaheri Sep 10, 2024
d533e40
technically the same script as IGV_HaplotypeViz but will locate the i…
shadizaheri Sep 10, 2024
76009fe
modify the runtime attributes
shadizaheri Sep 10, 2024
11f78ee
fixing the issue with bai
shadizaheri Sep 10, 2024
0b70896
fix the issue with output directory
shadizaheri Sep 10, 2024
7ac3c54
fix bai
shadizaheri Sep 10, 2024
3f7005d
updates for bai
shadizaheri Sep 10, 2024
c36a899
reverting baclk
shadizaheri Sep 10, 2024
6b9baf7
playing with bai definition
shadizaheri Sep 10, 2024
889c1fd
fai
shadizaheri Sep 10, 2024
b2c0836
fai
shadizaheri Sep 10, 2024
814c24e
updated the cmmand section
shadizaheri Sep 10, 2024
1fa0947
modify fai
shadizaheri Sep 10, 2024
965bf77
fix
shadizaheri Sep 10, 2024
4712c35
gs input
shadizaheri Sep 10, 2024
ce84cab
fix output
shadizaheri Sep 11, 2024
37fb974
fixing the output-the screenshots were created
shadizaheri Sep 11, 2024
f8a18c1
fixing the output-the screenshots were created
shadizaheri Sep 11, 2024
cd7c769
fixing the output-the screenshots were created
shadizaheri Sep 11, 2024
2b23838
fixing ...
shadizaheri Sep 11, 2024
5d8fb8d
output directory
shadizaheri Sep 11, 2024
793fddf
again
shadizaheri Sep 11, 2024
d98e0fa
dixing the output
shadizaheri Sep 11, 2024
f200192
removed mkdir
shadizaheri Sep 11, 2024
7e69291
updated the docker and output directory in the docker /cromwell_root/…
shadizaheri Sep 11, 2024
bfd534b
mv -- *.png output/IGV_Snapshots/
shadizaheri Sep 11, 2024
d60a716
SSD
shadizaheri Sep 11, 2024
28a6185
output fix
shadizaheri Sep 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
updated the cmmand section
  • Loading branch information
shadizaheri committed Sep 10, 2024
commit 814c24e18bcaae98bc243295c6235e8decab6261
40 changes: 21 additions & 19 deletions wdl/pipelines/PacBio/Utility/IGV_HaplotypeViz_bai_try.wdl
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
version 1.0

workflow IGVScreenshotWorkflow {

input {
File aligned_bam_hap1 # BAM file for haplotype 1
File aligned_bam_hap1_bai # BAM index for haplotype 1
File aligned_bam_hap2 # BAM file for haplotype 2
File aligned_bam_hap2_bai # BAM index for haplotype 2
File alignments # BAM file for total alignments
File alignments_bai # BAM index for total alignments
File bed_file # BED file with regions
File fasta_file # Reference FASTA file
File fasta_fai # FAI index for the FASTA file
String sample_name # Sample name to use in filenames
File aligned_bam_hap1
File aligned_bam_hap1_bai
File aligned_bam_hap2
File aligned_bam_hap2_bai
File alignments
File alignments_bai
File bed_file
File fasta_file
File fasta_file_fai # Include the .fai file
String sample_name
Int image_height = 500
Int memory_mb = 4000
Int disk_gb = 100 # Disk size in GB, default to 100 GB
Expand All @@ -29,7 +29,7 @@ workflow IGVScreenshotWorkflow {
alignments_bai = alignments_bai,
bed_file = bed_file,
fasta_file = fasta_file,
fasta_fai = fasta_fai,
fasta_file_fai = fasta_file_fai,
sample_name = sample_name,
image_height = image_height,
memory_mb = memory_mb,
Expand All @@ -43,6 +43,7 @@ workflow IGVScreenshotWorkflow {
}

task RunIGVScreenshot {

input {
File aligned_bam_hap1
File aligned_bam_hap1_bai
Expand All @@ -52,31 +53,32 @@ task RunIGVScreenshot {
File alignments_bai
File bed_file
File fasta_file
File fasta_fai # FAI index for the FASTA file
File fasta_file_fai
String sample_name
Int image_height
Int memory_mb
Int disk_gb
String docker_image
}

command {
mkdir -p IGV_Snapshots
command <<<
# Ensure the snapshots directory exists
mkdir -p /output/IGV_Snapshots && chmod 777 /output/IGV_Snapshots

# Start a virtual frame buffer to allow IGV to render
Xvfb :1 -screen 0 1024x768x16 &> xvfb.log &
export DISPLAY=:1

# Run the IGV screenshot script with the provided inputs
python3 /opt/IGV_Linux_2.18.2/make_igv_screenshot.py \
~{aligned_bam_hap1} ~{aligned_bam_hap2} ~{alignments} \
~{aligned_bam_hap1_bai} ~{aligned_bam_hap2_bai} ~{alignments_bai} \
-r ~{bed_file} \
-ht ~{image_height} \
-bin /opt/IGV_Linux_2.18.2/igv.sh \
-mem ~{memory_mb} \
--fasta_file ~{fasta_file} \
--fasta_fai ~{fasta_fai} \
--sample_name ~{sample_name}
}
>>>

runtime {
docker: docker_image
Expand All @@ -86,6 +88,6 @@ task RunIGVScreenshot {
}

output {
Array[File] snapshots = glob("IGV_Snapshots/*.png")
Array[File] snapshots = glob("/output/IGV_Snapshots/*.png")
}
}
Loading