Loading and keeping bed files loaded with new sessions

26 views
Skip to first unread message

acl...@gmail.com

unread,
Jul 22, 2019, 4:30:37 PM7/22/19
to igv-help
Hi All,

I'm trying to get two custom bed files to auto-load when the IGV bat file is executed, and to maintain these two files after I create a new session. The two bed files are located in the same directory with the IGV bat file, and both can be loaded without any issues after IGV starts, so I'm confident it's not an issue with the file format.

I'm running Windows 10 and my bat file looks like this:

::Get the current batch file's short path
for %%x in (%0) do set BatchPath=%%~dpsx
for %%x in (%BatchPath%) do set BatchPath=%%~dpsx
jre1.8.0_131\bin\javaw  -Xmx10G -Dproduction=true -Djava.net.preferIPv4Stack=true -Dsun.java2d.noddraw=true -jar %BatchPath%lib\igv.jar -o C:\Users\<hidden>\igv\prefs.properties -o File1.bed -o File2.bed %*

I tried adding the text in red to options above, which didn't work. If I change the text to -o *.bed then one of the files loads, but the other never does. Is there a (better) way to get these two bed files to auto-load on startup? And once they are loaded, is there a way to get these two files to persist if I open a new session?

Thanks for any help. I'm stuck using Windows and am trying to make sense of modifying windows batch files. 

-Adam

James Robinson

unread,
Jul 22, 2019, 7:26:27 PM7/22/19
to igv-help
The "-o" option is for preference files.   To load your data files just list them.   For example

jre1.8.0......   File1.bed  File2.bed -o C:\Users\<hidden>\igv\prefs.properties

The answer to your second question is no, the files are part of your current session and will be cleared when loading another session.

Command line arguments are documented here:  

http://software.broadinstitute.org/software/igv/startingIGV

acl...@gmail.com

unread,
Jul 23, 2019, 8:25:10 AM7/23/19
to igv-help
Thanks for the quick reply James!

I'm seeing an interesting behavior with this method, where only the first file is loaded. The second file gets a pop-up window stating "Cannot find feature or locus: File2.bed" If I switch the order of files on the batch script, whichever is second will get this error message. Does IGV need some kind of delay between loading the two files in order for it to work properly?

Thanks again,

-Adam

James Robinson

unread,
Jul 23, 2019, 11:01:29 AM7/23/19
to igv-...@googlegroups.com
What version if IGV are you using?


--

---
You received this message because you are subscribed to the Google Groups "igv-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to igv-help+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/igv-help/bb43d64c-f86e-41d5-a55e-2e3a8f3085ec%40googlegroups.com.
--
Sent from Gmail Mobile

acl...@gmail.com

unread,
Jul 23, 2019, 11:16:48 AM7/23/19
to igv-help
2.4.10

On Tuesday, July 23, 2019 at 9:01:29 AM UTC-6, James Robinson wrote:
What version if IGV are you using?

On Tue, Jul 23, 2019 at 5:25 AM <acl...@gmail.com> wrote:
Thanks for the quick reply James!

I'm seeing an interesting behavior with this method, where only the first file is loaded. The second file gets a pop-up window stating "Cannot find feature or locus: File2.bed" If I switch the order of files on the batch script, whichever is second will get this error message. Does IGV need some kind of delay between loading the two files in order for it to work properly?

Thanks again,

-Adam


On Monday, July 22, 2019 at 5:26:27 PM UTC-6, James Robinson wrote:
The "-o" option is for preference files.   To load your data files just list them.   For example

jre1.8.0......   File1.bed  File2.bed -o C:\Users\<hidden>\igv\prefs.properties

The answer to your second question is no, the files are part of your current session and will be cleared when loading another session.

Command line arguments are documented here:  

http://software.broadinstitute.org/software/igv/startingIGV

--

---
You received this message because you are subscribed to the Google Groups "igv-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to igv-...@googlegroups.com.

James Robinson

unread,
Jul 23, 2019, 1:57:45 PM7/23/19
to igv-help
That's an old version, not supported anymore,  but if I recall correctly multiple files were separated by commas in that version.  So it would be  File1.bed,File2.bad,   or perhaps File1.bed%2CFile2.bed.


To unsubscribe from this group and stop receiving emails from it, send an email to igv-help+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/igv-help/a7f0918f-801b-4860-94d6-f353079c468e%40googlegroups.com.

acl...@gmail.com

unread,
Jul 23, 2019, 2:13:33 PM7/23/19
to igv-help
Yeah, I need to update to a newer version of IGV. Commas are the solution I was looking for.

Thanks so much,

-Adam

Adam Clayton

unread,
Jan 15, 2026, 1:56:08 PM (5 days ago) Jan 15
to igv-help
Resurrecting a bit of an old thread here. I've recently switched to using IGV on a mac running 2.19.7 and wondering how to get extra bed or bed.gz files to load at start. I tried adding them to the java_arguments file in the hidden .igv folder, but IGV refuses to start when I do this. Any other tips?

-Adam
Reply all
Reply to author
Forward
0 new messages