running a batch file: cannot open .bam file from shared network drive

301 views
Skip to first unread message

Brittany Greene

unread,
Jan 15, 2014, 10:21:06 AM1/15/14
to igv-...@googlegroups.com
IGV v2.3
OS: Linux Mint 15

I am trying to write a .txt batch file to automate taking snapshots of certain areas of interest. Before jumping into the automation, I wanted to make sure I could run a simple batch file to start a new session, open a file, specify a region, and save a snapshot. Below is the code I wrote:

new
load smb://172.17.50.54/synology_storage/Original_Data/NJLAGS_SEQ/wo231_disk1/LP6005170-DNA_A01/Assembly/genome/bam/LP6005170-DNA_A01.bam
goto chr1:113,144,120-113,164,120
snapshotDirectory /home/brzlab/Documents/IGV
snapshot test.png

When I ran this file, it executed all commands BUT did not open the .bam file. No error was displayed. I can open the file in the standard way- File>Load from File. Alternatively, I replaced the previous load statement with:

load /run/user/brzlab/gvfs/smb-share:server=172.17.50.54,share=synology_storage/Original_Data/NJLAGS_SEQ/wo231_disk1/LP6005170-DNA_A01/Assembly/genome/bam/LP6005170-DNA_A01.bam

This is the path that appears beside "resource" in the session.xml file when I load the file normally and save the session. It does not work either.
I think the problem lies in that the file is stored on a password-protected shared drive. The drive is mounted using samba.

Is there any way to load files from shared drives via a batch file? Is there something obviously wrong with what I wrote? Is there any resource you might suggest to help me figure this out?

Thanks a lot,
Brittany

Jacob Silterra

unread,
Jan 15, 2014, 11:10:00 AM1/15/14
to igv-...@googlegroups.com
Hi Brittany,

When you load the file from a session (or File > Load) are you presented with a prompt for a password? Also, if you could send your igv.log file that would be very helpful.

-Jacob


--
 
---
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/002d2434-ecc7-4ae5-8e2e-071725ac2741%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Jacob Silterra
Software Engineer
Broad Institute

Brittany Greene

unread,
Jan 15, 2014, 11:26:54 AM1/15/14
to igv-...@googlegroups.com
Hi Jacob,

No, I am not prompted for a password when I open it via File > Load.
I'm not sure what an igv.log file is, but here is the batch file I ran and the session saved as an xml, if that helps. Let me know how to access the .log file and I will.
By the way, when I extracted a segment of the bam file and saved it locally, I had no problem accessing the local file.
Thanks,
Brittany


--
 
---
You received this message because you are subscribed to a topic in the Google Groups "igv-help" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/igv-help/WNUxIrXtcyg/unsubscribe.
To unsubscribe from this group and all its topics, 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/CAFbhPKVNg9FMX3ibst6264gN7XSULbSy1mn6c8XQUaiN6ZYVAA%40mail.gmail.com.
igv_batch_test.txt
batch_test_igv_session.xml

Jacob Silterra

unread,
Jan 15, 2014, 11:40:39 AM1/15/14
to igv-...@googlegroups.com
Hi Brittany,

Thanks for the extra info. The igv.log file is located at ~/igv/igv.log, it contains debugging information that may be helpful.

Thanks,
-Jacob



For more options, visit https://groups.google.com/groups/opt_out.

Brittany Greene

unread,
Jan 15, 2014, 11:42:58 AM1/15/14
to igv-...@googlegroups.com
Jacob-
Here's the .log file. Thanks for being so prompt!

Best,
Brittany


igv.log

Jacob Silterra

unread,
Jan 15, 2014, 12:57:25 PM1/15/14
to igv-...@googlegroups.com
Hello,

I think that the second form (/run/user/brzlab/gvfs/smb-
share:server=172.17.50.54,share=synology_storage/Original_Data/NJLAGS_SEQ/wo231_disk1/LP6005170-DNA_A01/Assembly/genome/bam/LP6005170-DNA_A01.bam) would work, except that the batch script doesn't allow files to have commas in the name because one can also load comma separated lists of files. I've noted that is a bug, I'm thinking in an upcoming release commas will be allowed if the string is quoted. eg:

load "/run/user/brzlab/gvfs/smb-
share:server=172.17.50.54,share=synology_storage/Original_Data/NJLAGS_SEQ/wo231_disk1/LP6005170-DNA_A01/Assembly/genome/bam/LP6005170-DNA_A01.bam"

This is what we do with spaces. I'll let you know when that's implemented.

-Jacob



For more options, visit https://groups.google.com/groups/opt_out.

Brittany Greene

unread,
Jan 15, 2014, 12:59:25 PM1/15/14
to igv-help
Jacob,

Thanks a lot. Keep me posted. Any idea of when that would be implemented? 
If not soon, is there any possible work-around?

Thanks,
Brittany


Jacob Silterra

unread,
Jan 15, 2014, 1:09:47 PM1/15/14
to igv-...@googlegroups.com
Hi Brittany,

Since you can load from a session file, you could save a session file with the appropriate file in it and load the session file from the batch script instead.

A fix which doesn't involve IGV would be creating a symlink on your local machine to the network resource, and loading the symlink. As long as that file name doesn't have any commas in it I think that will work.

-Jacob



For more options, visit https://groups.google.com/groups/opt_out.

Brittany Greene

unread,
Jan 15, 2014, 2:05:02 PM1/15/14
to igv-help
Thanks a lot! Great idea, the symbolic links work
Have a great day


Brittany Greene

unread,
Jan 23, 2014, 1:19:26 PM1/23/14
to igv-help
Hi Jacob--

A few people in my lab are having problems running IGV, getting a message at start-up: "Warning: IGV is running with minimal available memory (516 mb)" We've had no trouble running the program with 10 gb's in the past on the same machines...

They just wanted to double check that IGV is aware of this issue. Thanks!

Best regards,
Brittany Greene


Jacob Silterra

unread,
Jan 23, 2014, 1:21:19 PM1/23/14
to igv-...@googlegroups.com
Hi Brittany,

How are they starting IGV? Double-clicking the jar directly will often incur this problem, one should start from the command line with -Xmx set (the builtin scripts use -Xmx2000m for 2GB of starting memory)


-Jacob



For more options, visit https://groups.google.com/groups/opt_out.

Brittany Greene

unread,
Jan 23, 2014, 1:29:12 PM1/23/14
to igv-help, sil...@dls.rutgers.edu
They tried that, and when opening that way they get no error message but the memory usage caps out still at ~500. She said she also tried a bash open and via java...

Gillian is the colleague -- her email is sil...@dls.rutgers.edu. She just ran to class but she could give you more info about whats going wrong. 

Thanks a lot for your prompt repsonse,
Brittany


Reply all
Reply to author
Forward
0 new messages