Batching png generator

26 views
Skip to first unread message

Alexander Farahani

unread,
Aug 17, 2021, 1:36:13 PM8/17/21
to igv-help
Hi Team,

I am working on generating a script to automatically generate images of various loci for a set of BAM files as part of a pipeline. I'm just having a little trouble getting the script commands to work. Even when I try to upload the following file into IGV using the GUI by going to Files->Load From File (although this might be intended to be loading from the .BAM?) it gives an error that this isn't the correct file type. 

Is there some easy way to generate images of loci from a directory of BAM files?

Thanks,
Alex

File for reference:
load /Path/To/Directory/File.bam
snapshotDirectory <local directory>
genome hg18
goto chr1: 17345375-17345453
sort
collapse
snapshot
goto chr1: 17349102-17349225
sort
collapse
snapshot
goto chr1: 17350467-17350569
sort
collapse
snapshot



Alexander Farahani

unread,
Aug 17, 2021, 1:41:37 PM8/17/21
to igv-help
Sorry forgot to mention that I'm using IGV_2.10.3 on a macOS 'Big Sur' Version 11.

James Robinson

unread,
Aug 17, 2021, 8:19:06 PM8/17/21
to igv-help
Sorry but you haven't described the issue you are having, only that you are having trouble.  So I can't help you with that.   I don't understand the reference to "directory of BAM files", but you don't load directories you load individual bams.  

With regards to running your script from the GUI you need to load it from the "Tools > Run batch script" menu.



Alexander Farahani

unread,
Aug 19, 2021, 11:54:21 AM8/19/21
to igv-help
Hi James, 

So sorry for the scarce information. I am also a novice at this so I apologize if I'm not giving to appropriate information or going the correct route. I am currently trying to run the following IGV command: 

xvfb-run --auto-servernum --server-num=1 java -Xmx4000m -jar /Users/aaf34/Documents/CID/PGDx/IGV-snapshot-automator/igv.jar -b /Users/aaf34/Documents/CID/PGDx/IGV-snapshot-automator/IGV_Snapshots/IGV_snapshots.bat

But I get the error: '/bin/sh: xvfb-run: command not found' 

Is there some other way I can attempt to automate running the batch function? 

Thank you in advance!

Alex


James Robinson

unread,
Aug 19, 2021, 12:11:07 PM8/19/21
to igv-help
Hi Alex,

I really don't know anything about xvfb,  but from the error message it looks like perhaps xvfb is not installed on your system.    But again that's not something I have any expertise in, and its not something we directly support. I am aware that many people do use this however.    You might find this project helpful. https://github.com/stevekm/IGV-snapshot-automator
Reply all
Reply to author
Forward
0 new messages