Load BAM files with a space character in pathname via port control

9 views
Skip to first unread message

stefandi...@googlemail.com

unread,
Jun 6, 2016, 5:32:59 AM6/6/16
to igv-help
Hello,

I have written a Java program, which is comunicating with IGV via port 60151. It`s working fine up to now. But when I try to load a BAM file with a space character or a coma in its filepath IGV cuts up at the first space in filepath.

Is there any way to encode this path to make sure IGV will find the file. Renaming th file will not be an option, because everything is automated.
Thanks a lot for your help!

Regards
Stefan

James Robinson

unread,
Jun 6, 2016, 4:36:45 PM6/6/16
to igv-...@googlegroups.com
Try quoting the filename, as in the example below

private static void testFileWithSpaces(PrintWriter out, BufferedReader in) throws IOException {
String response;
String command = "load \"/Users/jrobinso/projects/Version_1.5_rc2/test/data/gct/file with spaces.gct\"";
System.out.println("asking igv to " + command);
out.println(command);
System.out.println("waiting for response");
response = in.readLine();
System.out.println(response);
}



--

---
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/e553e3ea-902f-4cae-bc26-1cbb7c3969e4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

stefandi...@googlemail.com

unread,
Jun 7, 2016, 3:15:53 AM6/7/16
to igv-help
Hi Jim,

thanks a lot! It is working. I tried it with single quotes ( ' ) before, which did not work. I did not come up with the idea trying it with double quotes.

Thanks again!
Stefan
Reply all
Reply to author
Forward
0 new messages